Introducing XDA:DevCon – A Conference For Developers By Developers
XDA Developers Android and Mobile Development Forum
Forgot your password?
 
Post Reply+
Tip us?
 
MagicVie
Old
(Last edited by MagicVie; 1st April 2012 at 11:22 AM.) Reason: updated / corrected errors
#1  
Junior Member - OP
Thanks Meter 6
Posts: 14
Join Date: Aug 2011
Default [Guide] USB Tether Phone to XOOM (ICS)

Disclaimer: I am not responsible for any damage you do to yourself or your device by following this guide (Although it seems very unlikely to happen).

USB Tether Phone to XOOM Guide.

I could not find a guide for this anywhere and it took me quite a while to figure out how it works so I thought I'll post a guide for other noobs like me, who want to share their phones data plan with their XOOM via USB tethering.

Since I only got a Wifi XOOM because I didn't want to spend money on a second data plan I used to wifi-tether my phone to my XOOM for internet connection. Unfortunately, Wifi-tethering drains the battery of my phone quite fast and the battery gets extremely hot so I was looking for an alternative.

Finally, I managed to share my phones internet connection with my XOOM via USB tether. Here is how it goes:

What you need:

* USB OTG cable (micro! not mini) - can be found at amazon, ebay, etc. for $5
* Phone that is capable of USB tethering (e.g. Xperia X8 \w miniCM7 / nAa kernel)
* XOOM running Team EOS ICS
* Tegra Development Overlay Rev 4 [link]
* Terminal Emulator (can be found in the play store)

I wont cover how to install Team EOS ICS since this can be found elsewhere.

What to do:

Step One - Install and Load the Drivers Needed


After you downloaded the Tegra Development overlay, flash it using eg. CMW over your existing Team EOS ICS. This will ad a whole bunch of extra modules (drivers) and a couple of init files to your system. Including the modules needed to USB tether your phone to the XOOM.

I don't know what would happen if you flashed the Development Overlay over any other ROM/Kernel than the one provided by Team EOS. But I would not recommend it!

[ADDITIONAL REMARK]
Note: If you really dont know anything about working with adb just ignore the following lines and go straight to Step Two. This is not necessary to get USB tethering working.

The Tegra Development Overlay contains the modules (drivers) needed for USB tethering a phone to the XOOM (and loads of others). The modules needed are: rndis_wlan.ko and rndis_host.ko.

After you flash the Dev Overlay, there will be a file called 06modules at /system/etc/init.d/. This file loads all 99 modules found at /system/lib/modules/. Since you actually just need 1 of those modules you might want to delete the "06modules" file and load the module needed manually by typing the following into your terminal emulator:

Code:
modprobe rndis_wlan
modprobe rndis_host
This should load the module. You can check if the module was loaded successfully by using the following command:
Code:
lsmod
This will list all currently loaded modules.

Step Two - Connecting Your Phone

Switch on USB tethering on your phone and connect it to your XOOM via the OTG cable.

In the Terminal Emulator type:
Code:
dmesg
the output should look something like this:
Code:
[...]
<6>[  150.829115] usb 2-1: new high speed USB device number 2 using tegra-ehci
<3>[  154.608633] usb 2-1: device not accepting address 2, error -71
<3>[  154.667257] hub 2-0:1.0: unable to enumerate USB device on port 1
<6>[  154.945974] usb 2-1: new high speed USB device number 4 using tegra-ehci
<6>[  155.002843] usb 2-1: New USB device found, idVendor=0fce, idProduct=812e
<6>[  155.003359] usb 2-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
<6>[  155.004103] usb 2-1: Product: SEMC HSUSB Device
<6>[  155.004388] usb 2-1: Manufacturer: SEMC
<6>[  155.004658] usb 2-1: SerialNumber: CB511N60A1
<6>[  155.066353] rndis_host 2-1:1.0: usb0: register 'rndis_host' at usb-tegra-ehci.0-1, RNDIS device, 4e:7e:5d:7e:b9:1d
This indicates that your phone was successfully connected to your XOOM and the respective modules were loaded. Note the last line, right where it says rndis_host 2-1:1.0: usb0. Don't worry if it does not say "usb0" but e.g. "usb1" just keep it in mind for later.

Step Three - Assigning an IP Adress and Setting up the DNS server

Now that your phone is connected and registered the xoom needs to get an ip adress and a DNS server. This is done by typing the following into the Terminal Emulator:
Code:
su
dhcpcd usb0
setprop net.dns1 8.8.8.8
"su" grants the terminal emulator SuperUser rights which are needed for the next step.

"dhcpcd usb0" starts an DHCP client for the interface "usb0" and asks for an IP adress. Now if you did not get "usb0" in step two but e.g. "usb1" then change the command accordingly.

"setprop net.dns1 8.8.8.8" sets the DNS server to Google's DNS Server (8.8.8.8), but you can, of course, use any DNS server you like.

If you write "ifconfig" in the Terminal Emulator you now should get an output like
Code:
usb0   Link encap:Ethernet  HWaddr 4E:7E:5D:7E:B9:1D
         inet addr:192.168.42.187  Bcast:192.168.42.255  Mask:255.255.255.0
         inet6 addr: fe80::4c7e:5dff:fe7e:b91d/64 Scope:Link
         UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
         RX packets:295 errors:0 dropped:0 overruns:0 frame:0
         TX packets:420 errors:0 dropped:0 overruns:0 carrier:0
         collisions:0 txqueuelen:1000
         RX bytes:108787 (106.2 KiB)  TX bytes:81153 (79.2 KiB)
Indicating that an IP adress has been successfully assigned to your XOOM.

And voilà. Now you have a working internet connection via USB tethering from your phone to your XOOM.

Unfortunately there are a couple of downsides:

* There seems to be a glitch in the rndis_wlan.ko or rndis_host.ko module causing a reboot of the XOOM whenever you disconnect your phone from your XOOM after USB tether or force unload the module after you tethered your phone. This issue is known and I hope it will be fixed in the future.

* The procedure described will only enable internet for your Browser, not for your mail apps (confirmed) and possibly not for any other app (did not try yet). Apparently you need to alter some settings (like adding the DNS server for the Browser) to make those apps work properly. Now, this might be very easy but since I'm a linux/android noob I did not yet figure out how.

TO DO

* The modules need to be fixed to solve the reboot issue. However, I am likely not skilled enough to do so, so this is up to Team EOS.
* Settings need to be passed to mail apps. Now this should be fairly easy and I'll try to figure that out.
* A one click app to configure the internet connection would be great. I never did any linux/android coding, but I'll give it a shot.

Thanks a lot to bigrushdog for helping with the rndis_host.ko bugs!!!

Any suggestions or thanks are welcome!
The Following 6 Users Say Thank You to MagicVie For This Useful Post: [ Click to Expand ]
 
bigrushdog
Old
(Last edited by bigrushdog; 30th March 2012 at 05:47 PM.)
#2  
bigrushdog's Avatar
Recognized Developer
Thanks Meter 4248
Posts: 2,451
Join Date: Apr 2007
Location: Fontana, CA

 
DONATE TO ME
I'm gonna grab this spot cause you are gonna need some help on this one. Good post.

I have a lot of info on this, and will post what I got shortly. LTE devices use usb0 to facilitate radio operations. So rndis host assigns usb1 in this case. I'm not sure about the other builds. Also, ill take a fresh look at the hard reboot issue. I know something causes a kernel panic, but I'm not sure where the fail lies.

modprobe rndis_host

The rndis_wlan is not needed. That's for a rare build of wireless dongles.
 
playya
Old
#3  
playya's Avatar
Senior Member
Thanks Meter 1273
Posts: 4,221
Join Date: Jan 2007
Location: Florida

 
DONATE TO ME
I just tried to use USB tethering a couple days ago and had an issue... Thanks for this I was hoping it would be implemented in an updated kernel...
DeBloat your AOKP/CM10 fast and pain free click here
---------------------------------------------------
"Hey if you can type it you can search it" - Google is your friend - Let me Google that for you
--------------------------------------------------
Proud owner of a Nexus 4 on LiquidSmooth 2.2/Samsung Galaxy S2(AT&T)and Wifi Only Xoom
 
bigrushdog
Old
#4  
bigrushdog's Avatar
Recognized Developer
Thanks Meter 4248
Posts: 2,451
Join Date: Apr 2007
Location: Fontana, CA

 
DONATE TO ME
Quote:
Originally Posted by playya View Post
I just tried to use USB tethering a couple days ago and had an issue... Thanks for this I was hoping it would be implemented in an updated kernel...
I'm about 100% sure it won't be in the release versions of the tiamat kernel. Rndis is just too unstable and wonky to be in a distro kernel. We need the distro kernel to be as stable as possible. That's why I do the overlay. Also, I use overlay users a guinea pigs to see what works and what don't. My test build with a new rndis driver doesn't work. Ill keep at it.
 
MagicVie
Old
#5  
Junior Member - OP
Thanks Meter 6
Posts: 14
Join Date: Aug 2011
Quote:
Originally Posted by bigrushdog View Post
I'm gonna grab this spot cause you are gonna need some help on this one. Good post.

I have a lot of info on this, and will post what I got shortly. LTE devices use usb0 to facilitate radio operations. So rndis host assigns usb1 in this case. I'm not sure about the other builds. Also, ill take a fresh look at the hard reboot issue. I know something causes a kernel panic, but I'm not sure where the fail lies.

modprobe rndis_host

The rndis_wlan is not needed. That's for a rare build of wireless dongles.
Thanks a lot for your help on this!
 
Zacky32
Old
#6  
Senior Member
Thanks Meter 3
Posts: 145
Join Date: Apr 2010
Location: Singapore
Wow! Awesome this really works , thanks for sharing this mate, and I hope the reboot problem will be fix.
 
theoner1
Old
#7  
Senior Member
Thanks Meter 29
Posts: 463
Join Date: Oct 2008
just curious, if your phone have support by cm7, you can also use bluetooth tethering which is less of a work. My wife's htc hero doesn't support infrastructure mode but her phone run cm7 and in there I can bluetooh tether to the xoom without a single problem. Just thought I'd ask.
 
dragonstalker
Old
(Last edited by dragonstalker; 5th April 2012 at 04:09 AM.)
#8  
dragonstalker's Avatar
Recognized Contributor
Thanks Meter 488
Posts: 977
Join Date: Jan 2008
Location: Grovetown, Ga

 
DONATE TO ME
dumb question. why use usb tether. wifi tether works just fine on my tbolt using opengarden wi-tether. dont think the battery drains any different since data pull is more. Also what device do you have that the battery is getting hot?
 
--Galaxy Note II
-Recovery: TWRP
-OS: Android 4.1.2
-ROM: Jedi XV12

--HTC REZOUND
-Recovery: Amon RA 3.15
-OS: Android 4.2.2
-ROM: Infection-2.1
--XOOM
-OS: JellyBean 4.2
-ROM: EOS 4 Nightlies
-Recovery: CWM Rogue Touch Recovery v1.5.0

Blog: MobileEscape.blogspot.com

Retired: Behold, G1, MT Fender, MT3G Slide, Vibrant, N1, HD2 (android-Froyo), Viewsonic G-Tablet, AT&T SE Xperia X10i, Samsung Galaxy Tab; HTC Inspire, HTC Sensation, Droid Charge, MYTOUCH4G , Thunderbolt, Droid DNA (traded)
 
MagicVie
Old
#9  
Junior Member - OP
Thanks Meter 6
Posts: 14
Join Date: Aug 2011
I got an Xperia X8 running MiniCM7. The X8 doesnt offer any kinder of tethering from stock and miniCM7/nAa kernel only offers usb or wifi tether. So bluetooth tether is no option for me.

And my phone is draining a large amount of battery when wifi AP and 3G is enabled. This also results in the phone getting hot. It needs excessive amounts of power and this heats up the battery.

Using USB tethering has a couple of advantages. First it is safer since you dont use wireless connections apart from 3G, second you consume less battery (wifi AP does need a lot of power) and third I actually charge my battery while sharing my internet connection with my XOOM.

Also I really just like the idea of USB tethering my phone to my XOOM...
 
theoner1
Old
(Last edited by theoner1; 7th April 2012 at 01:50 AM.)
#10  
Senior Member
Thanks Meter 29
Posts: 463
Join Date: Oct 2008
Quote:
Originally Posted by MagicVie View Post
I got an Xperia X8 running MiniCM7. The X8 doesnt offer any kinder of tethering from stock and miniCM7/nAa kernel only offers usb or wifi tether. So bluetooth tether is no option for me.

And my phone is draining a large amount of battery when wifi AP and 3G is enabled. This also results in the phone getting hot. It needs excessive amounts of power and this heats up the battery.

Using USB tethering has a couple of advantages. First it is safer since you dont use wireless connections apart from 3G, second you consume less battery (wifi AP does need a lot of power) and third I actually charge my battery while sharing my internet connection with my XOOM.

Also I really just like the idea of USB tethering my phone to my XOOM...
Fair enough but according to Cyanogenmod site your x8 can run cm7.1. In CM7.1 when you paired the xoom and your x8, and going into the xoom bluetooth properties there's an option to share internet from your paired phone (x8).

Just thought I'd give you an alternative option from usb tether that's all. Take care!

 
Post Reply+
Tags
rndis_host, usb tether, xoom
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Go to top of page...

XDA PORTAL POSTS

Boot Animation Paradise for your Android Device

The default boot animations on any device, no matter whichmanufacturer, are generally pretty … more

Flash Custom ROM and Recovery to Samsung Galaxy S 4

After reading about Dan Rosenberg’s bootloader exploit for the Samsung Galaxy S 4,I … more

Windows-Based Multi-Tool for the Sony Xperia U

If you are a flashaholic and an owner of the Sony Xperia U, you may be interested in the … more

XDA University: Crafting Recovery-Flashable Packages

Those of us who use Linux on a day to day basis don’t think twice about sinking … more