You may also call this reversed USB tether.
This might come in handy if you're near a computer (Win XP/Win7) and there's no Wifi to connect to etc..
So after some research and trying I've found some information on how to do this.
Requirements:
* Android 2.2 (or an older version with a root tethering app)
* ADB from Android SDK, or a rooted Android 2.2 with terminal in root mode
STEP 1:
Install USB drivers from Android SDK.
STEP 2:
Connect USB cable and activate USB Tethering.
You should see a new network interface. (On XP you might need to install the RNDIS driver manually, see below)
If you're also missing RNDIS driver on Win7, look here.
Win XP manual driver install Android USB Ethernet/RNDIS: (You can skip this if you're on Win 7)
1. Download the following configuration file inside the *.zip attached to this post (tetherxp.inf) to your Windows XP computer.
2. Use the USB cable that came with your phone to connect your phone to your computer.
3. On the Android phone, press Home > Menu > Settings to open the Settings application.
4. Press Wireless & networks > Tethering & portable hotspot.
5. Check USB tethering.
6. When Windows XP’s New Hardware Wizard opens, select No, not at this time and click Next.
7. Select Install from a list or specific location and click Next.
8. Click Browse to browse to the directory where you installed the configuration file you downloaded in Step 1 and click Next. Windows XP uses the configuration file to configure itself to support USB tethering with the Android phone. (This might take a while)
9. When Windows XP finishes installing the software for Android USB Ethernet/RNDIS, click Finish.
STEP 3:
Bridge the 2 network interfaces.
STEP 4:
Setup usb0 interface of your phone. You have to options:
1. From your computer, execute:
./adb shell netcfg usb0 dhcp
2. Or in a root terminal on your phone, type:
su
netcfg usb0 dhcp
You should now be able to connect to Internet on your phone using your computer's Internet connection.
Try to do a ping www.google.com to be sure.
STEP 5:
To shut down the reverse-tethering, first unbridge interfaces on your computer:
sudo ifconfig eth0 down
sudo ifconfig usb0 down
sudo ifconfig br0 down
sudo brctl delbr br0
sudo ifconfig eth0 up
sudo dhclient eth0
Then on your phone, uncheck the USB Tethering option.
Quote...
It is working now. After setting up ICS type in console emulator on your phone:
ifconfig usb1 192.168.2.2 netmask 255.255.255.0 up
route add default gw 192.168.2.1 dev usb0
iptables -F
iptables -F -t nat
setprop net.dns1 8.8.8.8
setprop "net.gprs.http-proxy" ""
Click to expand...
Click to collapse
Hope this helps some one who wants this to the right direction.
And maybe we're able to create an app to do this all automated.
Known issues but does not apply to all users:
1. Internet in browser application does not work.
2. Can't ping domain name.
For a little more info check out the sources, this includes the Linux version too.
Sources: Google android, Mycila
Nice info
Going to post a link on the hero forum where someone was wanting to do this. I wonder if this will work on a froyo hero too...
it would be cool if one of the devs could write a small app to switch this on n off great find tho shoemeistah
Thank you for the guide, It worked fine. There are several things not working though:
- can't download apps from market, they stuck on "downloading"
- my google account don't sync
- other apps don't update themselves. For example my twitter app won't show any new tweets until I open it and manually press "refresh"
I searched for this long time ago, even created a thread about it awhile back, didnt have luck like you did though
I gave up on it eventually, it would be nice to make an app out of it.
mind asking how did you confirm the net to be working on browser? by pinging google.com?
since i saw the last line you put "Internet in browser application does not work."
You can do that in the terminal
[U][B] Internet connection on your Android phone via your PC [/B][/U]
I think I found the best solution. Check it out connectify.me
I wanted to use my PC wired internet & I was astonished that this wasn't available in my HTC Desire & 1st Android device!. I looked over the net, I found many options but most asked for a rooted device! I didn't want to root my brand new Desire.
Connectify is an easy to use software router for Windows 7 computers. After downloading and installing the lightweight application, Connectify utilizes your computers' built in Wi-Fi card to wirelessly share any available Internet connection: a cable modem, a cellular card, or even another Wi-Fi network. Other Wi-Fi enabled devices including laptops, smart phones, music players, and gaming systems can see and join your Connectify hotspot just like any other Wi-Fi access point and are kept safe and secure by password-protected WPA2 Encryption.
I tried it & it's working perfectly for me .. It's a free app.
-----------
Phone: HTC Desire (SIM Free)
Type: Desire
Build: HTC Desire 2.2, 2.10 (kernel: htc 2.6.32.15)
Baseband: 5.09.05.30
Network: UMTS auto (EGY)
By me it didn't work. Using OpenDesire with Froyo 2.2
So I made it work, by edititng the .inf file.
Here the file for USB\VID_0BB4&PID_0C02.
For all which still have a problem(USB TETHERING ON DEVICE MUST BE ACTIVE, ALSO THE IDs DIFFERS BETWEEN CONNECTED WITH ADB OR NOT), go into the device manager -> open the device -> goto tab details -> choose device id
look at it, you see somewhere vid_XXXX and further pid_XXXX
open my file -> goto line 31 -> change vid_YYYY and pid_YYYY with what you see in your device dialog. the same you do on line 35. be careful with 0 or o.
Regards
Ralph
I am also using connectify, easy to install, set it up, connect with Desire, anything works fine.
Thanks GhostOfTheNet.
chrismast said:
I am also using connectify, easy to install, set it up, connect with Desire, anything works fine.
Click to expand...
Click to collapse
I appreciate the recommendations for other solutions.
But as you can see this thread is for a internet solution at places where is no Wifi available.
So please keep it on topic, thanks!
browser & webviews
Any idea why browser won't work?
I'm interested in testing against internal sites (of course no WAP here.. cuz they be scared i guess).. both Browser and embedded webviews.
connectify great program.works fine
its a default feature in hd roms but that doesnt work in all programs
Connectify doesn't work correctly with my Galaxy 5. It keeps connected for a short time then disconnects and then, connects again, connect, disconnect...
Does anyone know how to fix it?
Thanks Man
plz make a video tutroial of this
its difficult to under stand
does it actualy work?? anyone tried this and actualy worked??? just a simple yes or no.
thanks
small proble plz solve it
hi
I have a small problem in it when my device is not in usb tethering mode
i can see it in my adb devices
as soon as is start usbtethering it say no device found
plz help me
thanks a lot !!!
realy nice guide! Thanks!
Related
Hi everybody.
I just bought a desire hd. i can connect every wireless connection WEP, WPA, WPA2 etc. but i can not connect 802.1x Enterprise with peap gtc network
My friend has a Galaxy Ace he can connect same with 802.1x peap gtc network. his firmware also Android 2.2
I'm configuring same as he did but still can not connect it.
I don't know what is my Desire HDs problem?
can anybody help me?
I solved my problem
t is very sad that WPA2-Enterprise is not available to be configured in the WIFI-Settings dialog. But if you know how to configure it by hand you can get it to work. I want to use my schools WPA2-Enterprise so I tried it and found out how to get it working. I will explain my taken steps below so you can as well get it to work. The trick behind is that you edit the /data/misc/wifi/wpa_supplicant.conf by hand. In that file the configuration of the wifi-networks is saved. You need to add the following lines: (in my example for the HSR-Secure network)
network={
ssid="HSR-Secure"
key_mgmt=WPA-EAP
identity="<username without 'hsr\'>"
password="<your password>"
}
For those who don’t know how to do that here some more explanation. To edit the mentioned file above your phone has to be rooted. Than you need the Android SDK installed on your computer (we will need adb.exe). You need the usb cable to connect the phone to your computer. Open a command line shell and go to your android-sdk tools folder and then do the following (thanks to Thomas Kälin for this easier version):
# Copy the config file from the phone to your computer:
adb pull /data/misc/wifi/wpa_supplicant.conf C:/MyFolder
# Now Edit your wpa_supplicant.conf with your favorite editor and load it back to your phone:
adb push C:/MyFolder/wpa_supplicant.conf /data/misc/wifi/wpa_supplicant.conf
Now go to the wifi settings in your phone. Turn wifi off and on again. It should successfully connect now. Here some pictures to show how it should look like when working.
android-hsr-secure android-hsr-secure2
I hope this helps some of you to get WPA2-Enterprise working.
Have fun surfing the internet with your phone at work/school .
Click to expand...
Click to collapse
Source: blog.pboos.ch/2009/04/android-using-wpa2-enterprise/
Yes finally got this working using the FULL WIFI App from the market. Thanks for the help I did use some suggestions.
maydin said:
I solved my problem
Source: blog.pboos.ch/2009/04/android-using-wpa2-enterprise/
Click to expand...
Click to collapse
Adding the password line worked perfectly.
Hi there, I am using CM7 RC1v2 on my motorola defy. I am facing a problem which whenever i connect my phone to windows using phone portal the usb tether cnt be checked. But when i connect using "charge only" the things become available again but i still could not connect. Anybody face this problem and can help me to solve it? Thx very much!
Phone portal run on specific IP number and it uses different port and this explain why USB tether won't run.
I'm using it and here's my steps.
AFAIK, the pc required the USB tether driver for it to run properly. It should automatic install of the required driver. Once the driver is installed, you could perform a few steps here. I'm using Windows 7
1) Goto Control Panel - Network and Sharing Center - Change Adaptor settings.
2) Disable any active Local Area Connection if there are any of them running
3) Enable the one USB tether(it might already enabled by default but you could double check it).
4) It will auto verifying and connect once it done verified.
5) Start your internet browser and enjoy(you may need to do: Internet Option - Connections - Lan Settings - Unchecked proxy server .
farsight73 said:
Phone portal run on specific IP number and it uses different port and this explain why USB tether won't run.
I'm using it and here's my steps.
AFAIK, the pc required the USB tether driver for it to run properly. It should automatic install of the required driver. Once the driver is installed, you could perform a few steps here. I'm using Windows 7
1) Goto Control Panel - Network and Sharing Center - Change Adaptor settings.
2) Disable any active Local Area Connection if there are any of them running
3) Enable the one USB tether(it might already enabled by default but you could double check it).
4) It will auto verifying and connect once it done verified.
5) Start your internet browser and enjoy(you may need to do: Internet Option - Connections - Lan Settings - Unchecked proxy server .
Click to expand...
Click to collapse
I have tried following ur steps but it still can't work. My pc was able to install all the driver except that when installing MTP USB driver, it failed.
Ok, i found this tutorial.
ott.net/knowledge/htc-desire-adhoc/
Installed apk and trying to terminal adb shell command and getting error
abd: not found
what is wrong?
this terminal i runned from phone not from pc..
You have to run adb from pc. A guide for installing it can be found in my signature.
TouchPaled from Oxygen with Transparent XDA App
I started adb shell and when enter:
insmod /system/lib/modules/bcm4329.ko
I have this error:
insmod: init_module '/system/lib/modules/bcm4329.ko' failed (Operation not permitted)
atlantisu21 said:
I started adb shell and when enter:
insmod /system/lib/modules/bcm4329.ko
I have this error:
insmod: init_module '/system/lib/modules/bcm4329.ko' failed (Operation not permitted)
Click to expand...
Click to collapse
I have spent some time yesterday trying the exact same thing, I didn't succeed.
For your question:
Try using the command "su" before starting insmod.
Also remember to assign execute permissions to iwconfig, else it will not work either!
I probably did something wrong (or it just doesn't work on my ROM (I'm on redux2)) because i couldnt get it to work.
Also the app ad-hoc (follow the links on his page i think) fails for me. Wifi will go to error state and only reboot makes it work again.
If you succeed please tell us how you did it because I'm veeery interested!
Doesn't work with su command...
I trying to change bcm4329.ko permission with root explorer but nothing happening.
Maybe this is the problem?
And where is located iwconfig file?
Can I change file permission from adb shell and how?
Finaly WORKS!!!!!!!!!!!!!!
Because, I cant enable ad hoc on my Desire (I try many ways and nothinhg...),
I found another way to share wifi internet from pc to android phone.
This is my way:
Download VirtualRouter
Download fresh wifi drivers for Windows 7 64bit/32bit
Disable IP6 (if you have Windows 7 64bit)
After install VirtualRouter, reset your PC and VirtualRouter will start with your Windows in system tray.
In Network Connections, enable Microsoft Virtual WiFi Miniport Adapter if disabled.
Go to Local Area Connection (your default internet connection), properties -> sharing and check all box. Select home network connection -> Microsoft Virtual WiFi Miniport Adapter or Wireless Network Connection 2.
Run cmd as admin and type this:
netsh wlan set hostednetwork mode=allow ssid=Test key=password
netsh wlan start hostednetwork
VR automaticly write ssid and key and starting virtual network.
Desire CAN SEE this network, and you CAN CONNECT!
If you have problems go here.
atlantisu21 said:
Finaly WORKS!!!!!!!!!!!!!!
Because, I cant enable ad hoc on my Desire (I try many ways and nothinhg...),
I found another way to share wifi internet from pc to android phone.
[
Click to expand...
Click to collapse
I work in the same way (with connectify)>
Too bad you couldn't get ad-hoc to work, i would like to have that solution, it is more elegant.
I'm trying to tether my Evo with my HP netbook that's currently running Blackbuntu which is a pen test distro based on Ubuntu 10.10 and using Wicd as my network manager. With the default network manager usb tethering worked "out of the box" but unfortunately I was unable to use WiFi with it which forced me to use Wicd. In order for Wicd to function properly I had to fully remove the original network manager. Now I can't figure out how to configure Wicd to work with tethering. Somewhere I read all I have to do is change the wired interface in Wicd from eth0 to usb0, or something along those lines, so I tried ifconfig to verify and nothing showed up other than eth0, lo, and wlan0 - the 3 that always show up. I can't seem to find the tethering tutorial I read before to double-check it. Any help/ideas would be great.
EDIT: I figured it out on my own. I just had a brain fart for a bit. For anyone wondering how to do it, here's how:
On your Evo open a terminal and do the following.
su
busybox ifconfig
Write down the IP address given.
Connect your phone to your Linux box and start USB Tethering.
On the Linux box open a terminal and type:
sudo ifconfig usb0 up
Open Wicd, click preferences, and change the wired interface to usb0. You may have to set DNS1 to the IP you copied earlier.
Sent from my PC36100 using XDA App
I live on a boat, and wanted to use my phone as a gps source with opencpn ... turns out it wasn't too hard. Thought I'd share with the class.
You'll need com0com or some other virtual com modem. Either that, or send it directly out to a nmea 2.3 network over serial.
com0com 64bit download: available here
com0com 32bit download: available here
2 Scenarios are available, to use with software on your computer:
1. Download and install com0com for your computer architecture, the drivers are not signed by Microsoft so it will warn you of this, just say install anyway.
2. Sideload the xap to your phone
3. Run connector provided with the gpskit attachment.
4. Run the app on the phone, taking care to ensure the device is tethered to the computer being used and Zune is running.
5. Press enable.
6. If everything is running fine, you should see updates from the phone in the connector console window.
7. Running Google Earth:
- Start Google Earth
- Click Tools->GPS
- Select the realtime tab
- Set up options or just use the defaults
7. Setting up OpenCPN
- Start OpenCPN
- Click the wrench icon (toolbox)
- Select the GPS Tab
- type into the NMEA Data source the other com port (if you are using defaults: CNCB0)
8. Track away at your position
To use with an existing NMEA Network:
1. Sideload the xap to the phone
2. Start the gpskit client on the computer, and enter 9060 as the default service port and the com address of the NMEA connector that is connected to the computer.
3. Run the app on the phone ensuring that it is connected to the computer by usb and Zune is running.
And that's it, you can use your WP7 device as an external GPS device.
gpskit command line:
gpskit.exe [-p service port -c serial port] [-v] [-s]
-s must be supplied if -p and -c are provided
-v turns on verbosity and debug messages
Good hunting
Questions
withinboredom said:
I live on a boat, and wanted to use my phone as a gps source with opencpn ... turns out it wasn't too hard. Thought I'd share with the class.
You'll need com0com or some other virtual com modem. Either that, or send it directly out to a nmea 2.3 network over serial.
Simply upload it to your phone, make sure its tethered to the computer via usb, then run the app and push enable.
On your computer run NMEATest and the service port is 9060, and then a com port to write to the nmea data to. Fakegps is a service I wrote that basically uses the defaults of NMEATest and would work whenever the app was running on the phone. However, I cannot guarantee it will work and I wouldn't recommend using it. However, it contains the library that nmeatest requires and I'm not a big fan of copy/paste.
To use it with your application like google earth, opencpn simply download a virtual null modem like com0com and then point it to one of the default com ports it creates. After that, start up the app like normal and with the software running google earth will catch it under tools/gps/live menus
Have a very spledid day, I'm going sailing.
PS. I'm not sure how mono treats the serialport class ... so maybe it'll work on linux? Someone let me know.
Click to expand...
Click to collapse
Hi withinboredom
Could you please recommend null modem software for an x64 machine? Also, the instructions are not that clear.
Thank you very much for putting this together.
Cheers
andrew-in-woking
Just edited the post, that should make it a bit easier.
Uploaded a new version with command line switches
Further instructions needed I think
withinboredom said:
I live on a boat, and wanted to use my phone as a gps source with opencpn ... turns out it wasn't too hard. Thought I'd share with the class.
You'll need com0com or some other virtual com modem. Either that, or send it directly out to a nmea 2.3 network over serial.
com0com 64bit download: available here
com0com 32bit download: available here
2 Scenarios are available, to use with software on your computer:
1. Download and install com0com for your computer architecture, the drivers are not signed by Microsoft so it will warn you of this, just say install anyway.
2. Sideload the xap to your phone
3. Run connector provided with the gpskit attachment.
4. Run the app on the phone, taking care to ensure the device is tethered to the computer being used and Zune is running.
5. Press enable.
6. If everything is running fine, you should see updates from the phone in the connector console window.
7. Running Google Earth:
- Start Google Earth
- Click Tools->GPS
- Select the realtime tab
- Set up options or just use the defaults
7. Setting up OpenCPN
- Start OpenCPN
- Click the wrench icon (toolbox)
- Select the GPS Tab
- type into the NMEA Data source the other com port (if you are using defaults: CNCB0)
8. Track away at your position
To use with an existing NMEA Network:
1. Sideload the xap to the phone
2. Start the gpskit client on the computer, and enter 9060 as the default service port and the com address of the NMEA connector that is connected to the computer.
3. Run the app on the phone ensuring that it is connected to the computer by usb and Zune is running.
And that's it, you can use your WP7 device as an external GPS device.
gpskit command line:
gpskit.exe [-p service port -c serial port] [-v] [-s]
-s must be supplied if -p and -c are provided
-v turns on verbosity and debug messages
Good hunting
Click to expand...
Click to collapse
Hi withinboredom
I'm still can not seem to get this to work. Here is what I did:
Disabled UAC and put Windows 7 into Test Mode to allow unsigned drivers
Installed 64-bit version of com0com
Renamed the two virtual ports to COM17 and COM18 using the com0com graphical setup utility
Sideloaded the App onto my phone, started it and enabled the service
Started GPSKit.exe
In the command line window I set the service port to 9060 and set the Serial Port to COM17
I did not get any information showing up from the phone
Opened Google Earth and set GPS to realtime tracking
When I clicked "Start" it scanned through the ports and stopped at "reading COM17" but did not seem to provide any GPS information.
I followed the same procedure again but this time set the Serial Port to COM18 in the GPSKit.exe command line window which lead to the same result.
Can you please tell me what I have done wrong?
Thanks
andrew-in-woking
Make sure Zune is running and recognizing the phone before starting the service on the computer. Also make sure that pressing enable is the LAST thing you do before starting google earth (if you push it too early, you can press it again to start the connection over again - good for force refreshing the position if the phone decides to stop getting it.)
Yes, working now
withinboredom said:
Make sure Zune is running and recognizing the phone before starting the service on the computer. Also make sure that pressing enable is the LAST thing you do before starting google earth (if you push it too early, you can press it again to start the connection over again - good for force refreshing the position if the phone decides to stop getting it.)
Click to expand...
Click to collapse
Hi withinboredom
Thank you very much. It is now working.
Very good job.
andrew-in-woking
@withinboredom
thank you good job.
Interesting, thanks.
Sent from my ViewPad7 using XDA App
No position with opencpn or maxsea
Hi
this is the perfect solution for me, but i cant get a location with opencpn or maxsea. with google earth it is working. any ideas?
I can see that opencpn recieves data from gps, but cant show position.
I found someone with the same problem at opencpn forums. This problem is fixed in the latest beta of Opencpn.
It may have something to do with this:
"I suspect the NMEA sentences do not have CR/LF line endings. They may have only CR, or only LF.
For instance, GPRMC will be "Unrecognized" if the line endings are not correct, although it looks right to the eye."
Any chance you could check this? if this is fixed i can also use this with maxsea.