Android basic WiFi tether - new project - Android Software Development

Hello everyone,
I'm a computing student and Ive got the task to develop a basic version of the WiFi router found here: http://code.google.com/p/android-wifi-tether/
Ive learned to program in Java during my 3 years of college and I consider that Ive got the basics covered but Im really bad at programming.. I am willing to learn a lot more to complete this project and in the process Im also planning to learn some serious programming skills considering the complexity of the application development.
Can someone please bring some light on this and help me with it? I actually dont even know where to start coding for this. All I managed to do in the last 24h is to find the below websites but I dont know how to put everything together and start coding. Ah, and I want to mention that once I finish it I will share it with the open source community, not looking for any profit. Its just a college project for me. Thanks in advance for any help that anyone can give me!
Android Developers
http://developer.android.com/
Wireless Tether for Root Users (Opensource)
http://forum.xda-developers.com/showthread.php?t=486767
Tethering my laptop with android
http://forum.xda-developers.com/showthread.php?t=577590
Tetherbot
http://graha.ms/androidproxy/
Tethering VIA USB - Install and troubleshooting
http://forum.xda-developers.com/showthread.php?t=443025&highlight=tether
tether Wifi
http://www.androidactivity.com/tetherWifi.html
iptables
http://www.netfilter.org/projects/iptables/index.html
Dnsmasq
http://www.thekelleys.org.uk/dnsmasq/doc.html
and of course wikipedia
http://en.wikipedia.org/wiki/Tethering
Well this is a functionality scenario for it. Id appreciate if one of the experienced programmers would give an opinion on it. Thanks!
#1 User starts the program by tapping the app icon.
#2 Code to check for Internet connection over GSM network (check gsm state. if off, go to 3. if on go to 7)
#3 Code to send instructions to the GSM modem to establish an internet conection.
#4 If the connection cant be established due to various technical errors like no signal, wrong APN settings etc then 5
#5 Code to show info message on the screen to inform user
#6 Once the device has a valid internet connection(check) then 7
#7 Code to show settings to user and allow customization of SSID (network name). [and security key(optional for now, we'll do it later if we have time)]
#8 The user presses the start button.
#9 Code to activate the wifi card in adhoc mode and broadcast the adhoc chosen SSID
#10 Code to accept connection from a valid device and communicate with it over wifi
#11 Code to share the established internet connection over GSM network with the device connected over wifi

Hi!
I'm one of the authors of "Wireless Tether for Root Users".
What means "a basic version of the WiFi router"?
You know that most wifi-interface-drivers of android-devices do not support master-mode which would be mandatory to implement a "wifi router/access-point" (that's the reason why we support adhoc-mode only)?
Harry

harry_m said:
Hi!
I'm one of the authors of "Wireless Tether for Root Users".
What means "a basic version of the WiFi router"?
You know that most wifi-interface-drivers of android-devices do not support master-mode which would be mandatory to implement a "wifi router/access-point" (that's the reason why we support adhoc-mode only)?
Harry
Click to expand...
Click to collapse
Hi Harry, I appreciate the reply, thanks a lot!
"a basic version of the WiFi router" means a functional application that will run on an android phone (hopefully not rooted), will accept an ad-hoc connection with another wifi device over wifi and share its built in Inet conneciton with the device that connects to it. If I manage to get this running within 3 weeks I will complete the project in time.
I didnt know about the android wifi-interface-drivers..I was planning to try and develop this (hopefully successful app) into a proper wifi router (the full version) as my last year project, but now that plan is down the drain
Could you please help me start this? Where did u start when u actually started coding for this project? Any advice you can give me will be very welcome!
Cheers m8, have a good weekend!

harry_m said:
Hi!
I'm one of the authors of "Wireless Tether for Root Users".
What means "a basic version of the WiFi router"?
You know that most wifi-interface-drivers of android-devices do not support master-mode which would be mandatory to implement a "wifi router/access-point" (that's the reason why we support adhoc-mode only)?
Harry
Click to expand...
Click to collapse
Hi Harry,
By ad-hoc mode do you mean that the phone has to be rooted?
My understanding is that there is no way to have GPRS/3G running at the same time as a WiFi connection on the normal Android OS on a non rooted phone?
@atl4ntys,
Nice to see another Irish developer on Android
What your trying to do in 3 weeks seems like a big task and the normal Android SDK wont be much help for the reason I have stated above unless you root the phone.

cheers draffodx, I appreciate the interest!
Abt your question, to my knowledge wifi can run at the same time with 3g on a stock non rooted phone but it will not run in adhoc/ap mode. Unless some found a workaround that.. I'd prefer to develop a very basic app that will run on any android but if it proves to be an impossible task (also given the dev time available) then I will be happy with a function one on a rooted android. Dont need security and fancy graphics I just need it to work, so Im sure between me and my project partner we'll get it done (hopefully with a bit of help from the android devs)

Have you got any resources for how to run 3G and Wifi at the same time?
Its something I need to be able to do and from a few days research it seems that the OS only switchs between Wifi and 3G and never runs both at the same time.
From the SDK API's I cant find anything allowing me to turn both 3G and Wifi on.
Can you also define what you mean by adhoc/ap mode?
Thanks

draffodx said:
Have you got any resources for how to run 3G and Wifi at the same time?
Click to expand...
Click to collapse
No, not yet.
draffodx said:
From the SDK API's I cant find anything allowing me to turn both 3G and Wifi on.
Click to expand...
Click to collapse
I havent looked into it properly yet. Maybe Harry will answer or if not, try here: http://forum.xda-developers.com/showthread.php?t=474470
draffodx said:
Can you also define what you mean by adhoc/ap mode?
Thanks
Click to expand...
Click to collapse
Adhoc is computer to computer connection, without an access point. Info here: http://compnetworking.about.com/cs/wirelessfaqs/f/adhocwireless.htm
ap is an access point
The difference is(wiki):
Wireless Access Point vs. Ad-Hoc Network
Some people confuse Wireless Access Points with Wireless Ad-Hoc networks. An Ad-Hoc network uses a connection between two or more devices without using a wireless access point: the devices communicate directly when in range. An Ad-Hoc network is used in situations such as a quick data exchange or a multiplayer LAN game because setup is easy and does not require an access point. Due to its peer-to-peer layout, Ad-Hoc connections are similar to Bluetooth ones and are generally not recommended for a permanent installation.
Internet access via Ad-Hoc networks, using features like Windows' Internet Connection Sharing, may work well with a small number of devices that are close to each other, but Ad-Hoc networks don't scale well. Internet traffic will converge to the nodes with direct internet connection, potentially congesting these nodes. For internet-enabled nodes, Access Points have a clear advantage, being designed to handle this load.

Thanks for that atl4ntys!
If you get wifi & 3G working at the same time let me know it would be very interesting.
Good luck with the project

draffodx said:
Thanks for that atl4ntys!
If you get wifi & 3G working at the same time let me know it would be very interesting.
Good luck with the project
Click to expand...
Click to collapse
hey draffodx, wifi and 3g do work in the same time but the wifi works in client mode not adhoc. the catch is to find out how to get it to work in adhoc mode while an inet connection is established over gsm
*1st post edited. Added possible functionality scenario opinions anyone? Thanks!

Hey atl4ntys,
How are you getting on with this?

draffodx said:
Hey atl4ntys,
How are you getting on with this?
Click to expand...
Click to collapse
hey draffdox,
I managed to get it working in the end but I had to base my code on harry's 9.3 http://code.google.com/p/android-wifi-tether/source/browse/#svn/branches/0.9.3
If u want to see my final report, wait a few days as I will upload it online somewhere.
cheers, have a good weekend!

atl4ntys said:
hey draffdox,
I managed to get it working in the end but I had to base my code on harry's 9.3 http://code.google.com/p/android-wifi-tether/source/browse/#svn/branches/0.9.3
If u want to see my final report, wait a few days as I will upload it online somewhere.
cheers, have a good weekend!
Click to expand...
Click to collapse
Thanks for that atl4ntys, excellent read, its a pity it still cant be done on a non rooted phone

Hey guys,
It's nice to meet some Irish People on this forum,
good luck with the project.
Sorry I can't add anything but I am an Android Developement newbie.(aswell as a java newbie)
I can't wait to see the app.

harry_m said:
I'm one of the authors of "Wireless Tether for Root Users".
Harry
Click to expand...
Click to collapse
Hi Harry, i'm using your software, all work fine except i have to use "proxoid" to re-write the user-agent. When not using it, no web surfing for my computer is impossible.
The problem is Poxoid is written in java, and slow down the internet connection from the phone. I'm downloading at about 100kB without proxoid, and only 20-30KB with.
I'm asking you if you know another program that does same thing (user agent rewriting) , easy to install for rooted android phones, or why not include that fonctionnailty to Wifi Tether?
Thanks for Wifi Tether, nice program !

is this - (the above posts)
a form of uma or gan???

mikob2d said:
Hi Harry, i'm using your software, all work fine except i have to use "proxoid" to re-write the user-agent. When not using it, no web surfing for my computer is impossible....
Click to expand...
Click to collapse
Hey mikob2d, I think its best if u send him a private msg or if u contact him here http://code.google.com/p/android-wifi-tether/
Don't think he's monitoring this thread anymore

Rptynan said:
Hey guys,
It's nice to meet some Irish People on this forum,
good luck with the project.
Sorry I can't add anything but I am an Android Developement newbie.(aswell as a java newbie)
I can't wait to see the app.
Click to expand...
Click to collapse
hey 2u2 and welcome here but I finished this project and will not release an open source or a commercial app. The project was way harder than I expected and I had to base my app on Harry's harry's 9.3 version of the app.
I sent u2 a pm with a link to the final technical specs. Hope you'll find the info useful

Related

Universal as wireless accespoint?

I travel by train pretty much, and I have a HTC Universal. Since I can make use of UMTS i was wondering if i could let my universal act as an accespoint, so that i can use it as router for my Nintendo DS to play online in the train. Is there some way to do this?
Its possible, using a java program to add router software to your universal. Try googling it a bit.
Surur
Hey if you find something keep us posted will ya?
i can only find lots of Telnet clients and tutorials how to connect your ppc to a router ~ ___~);;' no luck yet.
oops i cried too early Xp I found it
http://www.pocketpcmag.com/blogs/index.php?blog=3&p=453&more=1
The first part says:
Just get the HTTPSnoopProxy.class file, copy it to, say, the root of your "access point" Pocket PC and get a decent Java Virtual Machine (I recommend CrEme 4.00 because of its superior speed, reliability and moderate memory consumption).
Seems like only web surfing will be allowed.
I got an idea when i saw this line in the link you provided:
"To share an Internet connection, you'd need operating system-level support for connection sharing as is present in, say, the desktop Windows"
I bet Linux has this. And since some smart people here has managed to get linux running on the Universal this might just be possible.
Is there anyone reading this with some linux knowlage that knows how to set this up in linux?
maicrosoft said:
oops i cried too early Xp I found it
http://www.pocketpcmag.com/blogs/index.php?blog=3&p=453&more=1
The first part says:
Just get the HTTPSnoopProxy.class file, copy it to, say, the root of your "access point" Pocket PC and get a decent Java Virtual Machine (I recommend CrEme 4.00 because of its superior speed, reliability and moderate memory consumption).
Click to expand...
Click to collapse
Have you tried it? If so does it work?
I would love to setup my Jasjar as a WiFi access point using 3G, now that Vodafone IE have an unlimited 3G data plan.
How about making some sort of quasi proxy/(repeater or relay) site on a home PC?
I'm thinking of some way to pass parameters as part of the URL for port forwarding to a proxy site that forwards to the intended destination site.
would you enjoy gaming on your DS with 200msec ping times? UMTS is fast but ping times are almost as high as GPRS's...
I this this would be a great project for someone like vjay, I'd certainly pay for an app that lets me use my universal as a wireless access point.
ppeettee said:
I this this would be a great project for someone like vjay, I'd certainly pay for an app that lets me use my universal as a wireless access point.
Click to expand...
Click to collapse
SAME HERE!!
I've been looking for a thread like this for a long time now and finally found it!
Otherwise I've would've made one myself with the same question..
Is there any progress about this issue?
Plz let me /us know...
kchris said:
would you enjoy gaming on your DS with 200msec ping times? UMTS is fast but ping times are almost as high as GPRS's...
Click to expand...
Click to collapse
Well, I'd say it depends on the GSM operator. My UMTS ping times (Europe) are generally (well) under 100 ms.
hlc1971 said:
SAME HERE!!
I've been looking for a thread like this for a long time now and finally found it!
Otherwise I've would've made one myself with the same question..
Is there any progress about this issue?
Plz let me /us know...
Click to expand...
Click to collapse
Not yet. I'm, however, pushing Microsoft (in internal forums) very hard to implement REAL connection sharing - some kind of an extended version of the AKU3+ Internet Sharing tool.
Isn't internet connection sharing enabled in Crossbow?
V

Can Iperf run on the Titian?

Does anyone know how or if the Iperf application has been ported to this Windows platform? I have been using this application from a PC to test a new network and I would like to not need to use my XV6800 just as a modem, but be able to run the tests right from my device.
I might guess that there would be some limitations on using an app like this on my PDA, but I am willing to forgo memory hungry options for basic functionality. The network speeds we test max out at around 400kbps so I don't need massive throughput.
I am not a developer, but I can write some simple code and compile Open-Source code for Linux and Windows. If this project has not been tried, perhaps pointers on how to really give this a good try is all I would need to do it myself.
I have been searching the web for a couple of days and have not seen an answer to this question. I thought xda-developers would be the best place to start asking.
Here is a link to the project.
http://dast.nlanr.net/Projects/Iperf/
btw, DCD I love your work.
Thanks everyone for making this phone my one-stop-shop
nice ap, don't know of anything that robust for the ppc. there is ipconfig, and several aps to tweak the ip settings, but I haven't seen anything to act as a network stress/throughput/tester/optimizer.
I would love to see an ap like this though, especially open source.
Good luck!
Still no go?
djet said:
Still no go?
Click to expand...
Click to collapse
I am still looking but no offers or takers. I have thought about posting this request someplace where it might find a developer interested in the effort.
could try planetsourcecode.com lotta smart programmers there...
check out cam.com/windowsce.html
lots of network tools, cant get to the iperf site to see what it does exactly but i think vxUtil should do the trick, if not there is a few others

reverse bluetooth tether?

Hi.
I'm trying to use my G1 with the bluetooth pan network from my computer or from my mogul (which has an unlimited data plan) to go to the internet instead of using wifi to be more energy efficient.
So far, using wifi tether's bluetooth option, I manage to establish a pan network between my G1 and the computer running windows. However, traffic is not routed properly, I get "network unreachable" from the terminal when I try to ping something outside the local pan network.
Any ideas?
you cannot access the interwebs on your G1 from a network on your computer. you cannot reverse tether. it is not possible at this time, please people stop posting about this stuff
if you had searched you would have seen that it can't be done and you would have found a thread where theyare trying to get it working
I know it is not possible at this time, hence my post here.
I need someone with linux networking knowledge to have a look into this, the android platform is a bit peculiar to me, ifconfig is behaving differently on it then it does on a regular linux distro. I need help setting up the right dns entries, figuring out where they are stored in Android (resolv.conf? a property set using setprop?), etc...
The idea is to have Android connect to an existing bluetooth access point. Everything is there to do it, pand is working, a virtual bluetooth network adaptor can be created, I can even give it a proper ip address and I manage to ping it from the access point and I can ping the access point from android...
This is the perfect forum to post such a question.
Anyone else with a more useful comment?
stanelie said:
I know it is not possible at this time, hence my post here.
I need someone with linux networking knowledge to have a look into this, the android platform is a bit peculiar to me, ifconfig is behaving differently on it then it does on a regular linux distro. I need help setting up the right dns entries, figuring out where they are stored in Android (resolv.conf? a property set using setprop?), etc...
The idea is to have Android connect to an existing bluetooth access point. Everything is there to do it, pand is working, a virtual bluetooth network adaptor can be created, I can even give it a proper ip address and I manage to ping it from the access point and I can ping the access point from android...
This is the perfect forum to post such a question.
Anyone else with a more useful comment?
Click to expand...
Click to collapse
[MORE USEFUL COMMENT] post in the threads that are already discussing this topic rather than posting a new thread[/MORE USEFUL COMMENT]
You use the term "linux distro". Now, I know I may be beating a dead horse here, but linux is just the kernel--the rest is GNU software. Many things are going to behave differently on Android.
Exactly, what works in Fedora 10 possibly will not work in android... (and thats giving some ambition there.....)
that's exactly why I am asking here instead of elsewhere.
To tubaking182 : the really usefull answer would have been to give me a link to the right thread instead. The search features of this forum sucks.
Thanks anyway.
Hi stanelie,
I too am very interested in doing this VERY same thing. I've also searched and come up empty handed. If there is anyone out there with more information that could help please feel free to post. Thanks in advance.
I'm sorry some here do not like people asking questions but I too would very much appreciate REVERSE BLUETOOTH TETHER functionality for my Android phone. Despite what tubaking182 so very helpfully writes above (thank you ever so much!) there remains no EASY solution for this.
I will happily pay for an easy to install, reliable Android Market app that does this. I think lots of others will too.
So that there is no misunderstanding I wish to connect my phone as a Bluetooth PAN client to a Bluetooth PAN server. The server functionality is NOT required.
Thanks,
Paul

Paranoid user (QuickGPS, eTrust Antivirus vs..)

Hi everyone,
I will be a little paranoid over here so don't take it hard on me =)
I've been using a i-mate k-jam for a long time and switched to touch hd on january. Interestingly the biggest similarity and annoyance for me was the softwares pre-installed to download some sort of data over internet and bugging every week to download new signatures/data and bugging even more if you fail to download.
eTrust found out to be useless and I can't really pinpoint why most handheld GPS devices doesn't really require to update this kind of information (Please correct if I'm wrong).
We might assume the transaction is a simple wget/http download which wouldn't carry any other information to the other party that someone from that IP downloaded something. But if there is a handshaking or at least some kind of a http post is inplace, it could be also sending a unique device idea which would let the guys in Taiwan track our devices our a map.
As I said I'm just being paranoid and making almost a conspiracy theory here but still the possibility exists.
So how can we be sure they are not sending any information out?
We can set up a proxy and mirror incoming traffic from a source ip (phones ip) and dump it with wireshark. Then we will need to define the proxy on our phone and click download.
Is there a wireshark/ethereal kind of packet capture software which can run on these devices? It could ease the job.
Reverse engineering the code? Not experienced in that but It should be quite small when the you think the job it supposed to do.
Any comments, thoughts, help, information - greatly appreciated.
BR, Kaya
You can disable Quick GPS if you want because it isn't necessary for the GPS.
It just speeds up the process of finding satellites.
why don't you just use a nokia 3210? that way you should be pretty safe lolol
philocritus said:
why don't you just use a nokia 3210? that way you should be pretty safe lolol
Click to expand...
Click to collapse
Only if you leave BT off JK
I've sort of resigned myself to the fact that using a smartphone exposes someone to a lot of security gaps. The best advice is to keep your bluetooth off / in hidden mode, as this is one of the easiest ways to get at your handheld's data. Moving up the paranoia scale, you can use that NoData program to disable your data connection except for when you really need at - that will prevent most third-party programs from dialing home. And if you're really worried about being tracked, I'd recommend just shutting off your phone when you have something private to do.

Internet Connection Sharing, Please!

One of the glaring ommisions from the new platform (which I really like in so many other ways) is the loss of the Internet Connection Sharing application which as a business traveller I found indespensible. Someone please come up with a WM7 app version soon!
Many thanks
SM
yea i so with u.. i will keep my hd2 until some one comes up with a usb tethering app..
Tethering or wifi hotspot from phone is really needed (for security sake when travelling).
Search the thread regarding a diagnosis app in this general thread section...ill post the specific thread link when I have time
Tethering
It's possible, though not as simple as just running an app. There's a write-up at mobilitydigest.com. Search for "windows phone 7 tethers" (forum software won't let me post a direct link).
cuckooznest said:
It's possible, though not as simple as just running an app. There's a write-up at mobilitydigest.com. Search for "windows phone 7 tethers" (forum software won't let me post a direct link).
Click to expand...
Click to collapse
Everybody keeps pointing the OP to the tethering feature via the diagnostic app. While that is great and very useful, it is not what the OP asked for. He cannot "share" his internet via his tethered connection.
While the tether capability uncovered will serve a lot of us in the interim, WP7 really does need a "sharing" or 'local hot spot' creating capability down the road. I am sure that att et all will have issues, but this is 2010 and there are times when in the name of the job or some other instance, you simply have to have a hotspot. Isn't this why we pay over a $100 a month for a plan. Now I am confusing two separate issues. Back to the OP's question. Internet sharing is currently not supported.
I think that is exactly what OP wants. Internet Connection Sharing App on original WM is not a hotspot feature either. It offers data connection to one PC via either USB or Bluetooth.
WP7 has thethering capability built-in IIRC. But it is up to carrier to enable it. And we know all US carriers will disable it because they charge extra for tethering.
AT&T was able to modify and lock down ICS on WM 6.x phones to use a different APN so that you have to pay extra in order to use ICS on those phones. However, such restrictions are easily removed via a few registry hacks.
Apparently Connection Sharing/USB is Available
Check the pocketnow.com website under windows phone for a detailed explanation of how to do it...
http://pocketnow.com/windows-phone/samsung-focus-does-tethering-after-all-on-windows-phone-7
A third party app like this is not possible at the moment I believe. The WP7 SDK currently doesn't have support for sockets (yet) so any network based app are limited to web services only.

Categories

Resources