How to share a wired Internet connection with an Android phone (reverse-tethering)?
I have been trying to share my wired Internet connection with my Android phone. However I could not succeed in doing this. Has anyone of you ever succeeded? Operating systems that I use are as follows:
- Ubuntu 10.10
- Android 2.3
Solution 1:
Yes, it is possible. I have Ubuntu 11.04, NetworkManager 0.8.4, Android Nexus One phone running Cyanogenmod 7.
As described by Roman, right-click on the NetworkManager icon and choose "Create new wireless network". I chose to leave the connection wide open (no WPA, no WEP). My phone was able to see the network right away and I connected without trouble. The bridging was automatically done so I could browse the internet without configuring anything extra.
The reason why you having trouble with the above method is because stock Android 2.3 doesn't support ad-hoc networks. To be precise, Android's wpa_supplicant does not show ad-hoc networks. There are a number of ways to fix this. Google around and go hunting in the xda-developers forums. You will probably need to do some hacking on your phone that is beyond the scope of this answer.
My personal recommendation: if your phone supports Cyanogenmod, you can install it to get ad-hoc support and other hackish delights. You will need to root your phone, which may or may not be to your taste.
Another alternative is to try "Infrastructure mode". After setting up the ad-hoc wireless network as per above, click on the NetworkManager icon, choose "Edit connections". Hit the wireless tab and Edit the ad-hoc network you just created. Under Mode, choose "Infrastructure". I am unsure if this will work for you since I don't have a stock Android phone to test with. My thought is if ad-hoc mode is the problem, then the another mode might be the solution.
Good luck!
Solution 2:
First of all as we all know stock ROM of Android i.e. the one which comes with the phone does not support ad-hoc mode (surprisingly), and even Ice-Cream Sandwich (Android 4.0) won't support ad-hoc mode.
So, we need to create an access point using Ubuntu to which any android phone can easily connect. In Windows you can use Connectify to do that and it works perfectly well but with Ubuntu you may have certain problems, depending on whether your wifi-card supports access point mode (master mode) or not.
Now, even if your wifi-card supports access point mode, the next problem is whether the driver of your wifi-card supports AP mode or not, if it does then the problem is solved and if does not then you have three options:
Wait till the driver receives an update for AP mode. (many wifi-card drivers are still in staging stage)
Buy a wifi-dongle and make sure it supports AP mode on ubuntu.
Use Windows, where Connectify will do the job for you.
If you are interested you can post the name of your wifi-card driver so that I can help you further. Use this command:
lshw -c network