Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Discussion & Documentation Documentation, Tips & Tricks
  • Search

Android 2.2 USB Tethering Tips

Unofficial documentation for various parts of Gentoo Linux. Note: This is not a support forum.
Post Reply
Advanced search
39 posts
  • 1
  • 2
  • Next
Author
Message
comprookie2000
Retired Dev
Retired Dev
User avatar
Posts: 925
Joined: Sun Jul 25, 2004 5:39 am
Location: Sun City Center, Florida
Contact:
Contact comprookie2000
Website

Android 2.2 USB Tethering Tips

  • Quote

Post by comprookie2000 » Sun Sep 05, 2010 2:01 pm

With an Android 2.2 (Froyo) it is easy to tether your phone to your Gentoo box.
First enable the modules you need;
Device Drivers
USB Network Adaptors

Code: Select all

Device Drivers --->
  [*] Network device support --->
    USB Network Adapters --->
      [*] Multi-purpose USB Networking Framework
        <*> CDC Ethernet support
        <*> CDC EEM support
        <*> Simple USB Network Links (CDC Ethernet subset)
          [*] Embedded ARM Linux links
  [*] USB Support --->
    <*> USB Modem (CDC ACM) support
    <*> USB Wireless Device Management support

Code: Select all

lsmod
Module                  Size  Used by
rndis_host              5868  0 
cdc_ether               4265  1 rndis_host
usbnet                 16196  2 rndis_host,cdc_ether
mii                     4038  1 usbnet
The interface shows up as usb0

Code: Select all

usb0      Link encap:Ethernet  HWaddr fa:c6:01:4c:4b:71  
          BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
dmesg

Code: Select all

scsi 10:0:0:0: Direct-Access     Google,  Inc.Nexus One         PQ: 0 ANSI: 2
sd 10:0:0:0: Attached scsi generic sg3 type 0
sd 10:0:0:0: [sdc] Attached SCSI removable disk
usb 1-7: USB disconnect, address 10
usb 1-7: new high speed USB device using ehci_hcd and address 11
usbcore: registered new interface driver cdc_ether
rndis_host 1-7:1.0: usb0: register 'rndis_host' at usb-0000:00:02.1-7, RNDIS device, fa:c6:01:4c:4b:71
usbcore: registered new interface driver rndis_host
Next on your phone or device enable USB Tethering.
That is when you can see from dmesg that the device changed from a usb storage device to new interface driver.
Then it is as simple as;

Code: Select all

dhcpcd usb0
Thanks to bugmenot :D
http://forums.gentoo.org/viewtopic-t-84 ... ering.html
Last edited by comprookie2000 on Thu May 05, 2011 12:37 am, edited 1 time in total.
http://dev.gentoo.org/~dabbott/
Top
likewhoa
l33t
l33t
Posts: 778
Joined: Wed Oct 04, 2006 12:28 pm
Location: Brooklyn, New York
Contact:
Contact likewhoa
Website

  • Quote

Post by likewhoa » Sun Sep 05, 2010 3:16 pm

thanks for this.
Top
andriy155
n00b
n00b
Posts: 65
Joined: Sun Feb 05, 2006 1:00 am
Location: Kyiv, Ukraine

  • Quote

Post by andriy155 » Mon Dec 13, 2010 10:47 am

Thanks a lot! This really helped me with my Nokia N900. Apparently, you need the same driver (enable the same module in kernel) for N900 and it works.
Top
NeddySeagoon
Administrator
Administrator
User avatar
Posts: 56094
Joined: Sat Jul 05, 2003 9:37 am
Location: 56N 3W

  • Quote

Post by NeddySeagoon » Mon Jan 17, 2011 7:34 pm

comprookie2000,

Thanks - I was trying to use the USB Gadget Interface, which always failed to load.
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Top
billium
Apprentice
Apprentice
Posts: 185
Joined: Sat Mar 22, 2003 11:22 am

  • Quote

Post by billium » Sat Mar 12, 2011 1:19 am

Thanks comprookie2000 .. this also worked for me on a Nexus One, Gingerbread. :)
Top
stemer
n00b
n00b
User avatar
Posts: 31
Joined: Sat Jul 23, 2005 9:42 pm
Location: Poznań
Contact:
Contact stemer
Website

  • Quote

Post by stemer » Tue Mar 22, 2011 2:50 pm

What about reverse USB tethering? Have anyone tried to do that with Network Manager? I.e. I want to share my wire connected laptop with my Android 2.2 phone through USB cable. I have HTC Desire Z and USB tethering works flawlessly, but I cannot do it in the other way.

PS. Sorry for my bad english ;)
"Lubię dostawać listy. W listach są różne wyrazy."
Top
tbD
n00b
n00b
Posts: 1
Joined: Thu Jun 16, 2011 9:36 pm
Location: new york city
Contact:
Contact tbD
Website

having trouble tethering

  • Quote

Post by tbD » Thu Jun 16, 2011 9:58 pm

I have enabled all the kernel option mentioned. I first did them inline as the post showed * not M.
I also tried modules since the post showed lsmod.

In both cases the usb interface was not established (I did make the net.usb0-->net.lo symlink).

When I tell the phone to connect as a disk, that works perfectly. But when I tell it to support mobile broadband, I do not get the dmesg output shown and dhcpcd usb0 fails. I believe this is all due to my not getting the usb0 interface. I am running 2.6.39 on a ~amd64 gentoo system.

My phone is an htc droid incredible.

Any help would be greatly appreciated.
allan
Top
Gusar
Advocate
Advocate
Posts: 2665
Joined: Sat Apr 09, 2005 10:19 pm
Location: Slovenia

  • Quote

Post by Gusar » Fri Jun 17, 2011 5:52 pm

Ah, so that's how this works with Android - rndis_host (with it's dependencies cdc_ether and usbnet). Good to know in case I'll need it. On my old Nokia phone you'd instead use usbserial, which would give you a /dev/ttyUSB0 and then you'd use ppp with that. Worked with bluetooth to, except the device was /dev/rfcomm0 in that case.

Quite funny, considering the text in the kernel config says rndis shouldn't be used because it's some evil Microsoft thingy.
Top
swathe
n00b
n00b
User avatar
Posts: 73
Joined: Mon Jul 04, 2011 5:11 am
Contact:
Contact swathe
Website

  • Quote

Post by swathe » Thu Jul 07, 2011 9:41 am

I normally use the wifi tether but I will definitely give this a go, thanks.
Top
Martux
Veteran
Veteran
User avatar
Posts: 1917
Joined: Fri Feb 04, 2005 9:09 pm

  • Quote

Post by Martux » Thu Jul 07, 2011 6:22 pm

Very nice, thanks. I also compiled everything into the kernel but usb0 isn't showing up.
Dmesg is not showing any switch when tethering is enabled.
Android 2.3.4 CM7 and gentoo-sources-2.6.39-r2 ~amd64 here.
Anything missing?
"Coincidence is God's way of remaining anonymous."
Albert Einstein
"The road to success is always under construction"
Top
stelth
n00b
n00b
User avatar
Posts: 45
Joined: Thu May 25, 2006 2:06 pm

  • Quote

Post by stelth » Mon Jul 11, 2011 5:38 pm

Martux wrote:Very nice, thanks. I also compiled everything into the kernel but usb0 isn't showing up.
Dmesg is not showing any switch when tethering is enabled.
Android 2.3.4 CM7 and gentoo-sources-2.6.39-r2 ~amd64 here.
Anything missing?
I had enabled all of the modules in the original post and couldn't get usb0 to show up either. I slimmed it down to just:

Code: Select all

CONFIG_USB_USBNET=m
CONFIG_USB_NET_CDCETHER=m
CONFIG_USB_NET_RNDIS_HOST=m
and it came right up.

They're the options under:

Code: Select all

│     -> Device Drivers                                                            
│       -> Network device support (NETDEVICES [=y])
│         -> USB Network Adapters
EDIT:
If you get the choice on the phone for either Mac OSX or Windows tethering, choose Windows tethering.
And on the 3rd day, God created the Remington bolt-action rifle; so that man could fight the dinosaurs and the homosexuals. AMEN.
Top
Martux
Veteran
Veteran
User avatar
Posts: 1917
Joined: Fri Feb 04, 2005 9:09 pm

  • Quote

Post by Martux » Fri Jul 15, 2011 8:07 am

Thanks!
Even if I compile in as modules, everything loads fine except rndis_host.
I cannot seem to find this one. Even a grep over the kernel config file showed no result.
Where is this little bugger hidden?
"Coincidence is God's way of remaining anonymous."
Albert Einstein
"The road to success is always under construction"
Top
Gusar
Advocate
Advocate
Posts: 2665
Joined: Sat Apr 09, 2005 10:19 pm
Location: Slovenia

  • Quote

Post by Gusar » Fri Jul 15, 2011 11:48 am

Martux wrote:Where is this little bugger hidden?

Code: Select all

-> Device Drivers
  -> Network device support
    -> USB Network Adapters
      -> Multi-purpose USB Networking Framework
        -> Host for RNDIS and ActiveSync devices (EXPERIMENTAL)
Top
Martux
Veteran
Veteran
User avatar
Posts: 1917
Joined: Fri Feb 04, 2005 9:09 pm

  • Quote

Post by Martux » Sat Jul 16, 2011 2:52 am

There is no such option under my 2.6.39-gentoo-r2 kernel :(
"Coincidence is God's way of remaining anonymous."
Albert Einstein
"The road to success is always under construction"
Top
comprookie2000
Retired Dev
Retired Dev
User avatar
Posts: 925
Joined: Sun Jul 25, 2004 5:39 am
Location: Sun City Center, Florida
Contact:
Contact comprookie2000
Website

  • Quote

Post by comprookie2000 » Sat Jul 16, 2011 8:25 am

How about this;
http://linuxcrazy.com/downloads/Screens ... -linux.png
http://dev.gentoo.org/~dabbott/
Top
SlashBeast
Retired Dev
Retired Dev
User avatar
Posts: 2922
Joined: Tue May 23, 2006 11:50 am
Contact:
Contact SlashBeast
Website

  • Quote

Post by SlashBeast » Sat Jul 16, 2011 1:32 pm

Click '/' in menuconfig and type what you are looking for, like RNDIS_HOST then look at 'depends on' line, here you see what you need to enable to have it, sometimes option may be not visiable in menuconfig until you enable some deps. Very common.
Top
phd
n00b
n00b
Posts: 70
Joined: Wed Oct 12, 2005 8:19 pm
Location: Warszawa (Poland)
Contact:
Contact phd
Website

  • Quote

Post by phd » Sat Jul 23, 2011 12:58 pm

I confirm that the usb tethering from HTC WildFire works.
For a new udev I have a symlink net.lo to net.enp0s29f7u2 . I activate internet by means

Code: Select all

dhcpcd enp0s29f7u2
By the way, in my case the following options are not essential
[] USB Support --->
<> USB Modem (CDC ACM) support
<> USB Wireless Device Management support
Last edited by phd on Thu May 02, 2013 7:43 pm, edited 3 times in total.
Top
Martux
Veteran
Veteran
User avatar
Posts: 1917
Joined: Fri Feb 04, 2005 9:09 pm

  • Quote

Post by Martux » Sat Aug 06, 2011 4:53 pm

Back from vacation.
Well, I can search the kernel config for
CONFIG_USB_NET_RNDIS_HOST
and it will show where to find it:

Code: Select all

Symbol: USB_NET_RNDIS_HOST [=n]                                            │   
  │ Type  : tristate                                                           │   
  │ Prompt: Host for RNDIS and ActiveSync devices (EXPERIMENTAL)               │   
  │   Defined at drivers/net/usb/Kconfig:277                                   │  
  │   Depends on: NETDEVICES [=y] && USB [=y] && NET [=y] && USB_USBNET [=y] & │   
  │   Location:                                                                │   
  │     -> Device Drivers                                                      │   
  │       -> Network device support (NETDEVICES [=y])                          │   
  │         -> USB Network Adapters                                            │   
  │           -> Multi-purpose USB Networking Framework (USB_USBNET [=y])      │   
  │   Selects: USB_NET_CDCETHER [=y]                                           │   
  │   Selected by: USB_NET_RNDIS_WLAN [=n] && NETDEVICES [=y] && WLAN [=y] 
But when I browse there, it isn't there :(
I suppose my config is somewhat broken, I always generate a new kernel config with "make oldconfig".
Is there any way to repair it, without having to configure the whole kernel?
"Coincidence is God's way of remaining anonymous."
Albert Einstein
"The road to success is always under construction"
Top
comprookie2000
Retired Dev
Retired Dev
User avatar
Posts: 925
Joined: Sun Jul 25, 2004 5:39 am
Location: Sun City Center, Florida
Contact:
Contact comprookie2000
Website

  • Quote

Post by comprookie2000 » Sat Aug 06, 2011 5:47 pm

Are you sure you are satisfying;
"Depends on: NETDEVICES [=y] && USB [=y] && NET [=y] && USB_USBNET [=y] "
http://dev.gentoo.org/~dabbott/
Top
Martux
Veteran
Veteran
User avatar
Posts: 1917
Joined: Fri Feb 04, 2005 9:09 pm

  • Quote

Post by Martux » Sat Aug 06, 2011 5:53 pm

Seems so:
cat/usr/src/linux/.config gave this:

Code: Select all

CONFIG_USB_USBNET=y
CONFIG_NET=y
CONFIG_NETDEVICES=y
"Coincidence is God's way of remaining anonymous."
Albert Einstein
"The road to success is always under construction"
Top
Martux
Veteran
Veteran
User avatar
Posts: 1917
Joined: Fri Feb 04, 2005 9:09 pm

  • Quote

Post by Martux » Sat Aug 06, 2011 5:55 pm

A grep for CONFIG_USB_NET_RNDIS_HOST gives nothing.
"Coincidence is God's way of remaining anonymous."
Albert Einstein
"The road to success is always under construction"
Top
comprookie2000
Retired Dev
Retired Dev
User avatar
Posts: 925
Joined: Sun Jul 25, 2004 5:39 am
Location: Sun City Center, Florida
Contact:
Contact comprookie2000
Website

  • Quote

Post by comprookie2000 » Sat Aug 06, 2011 6:36 pm

try;
<M> Multi-purpose USB Networking Framework
that should then open up so you can see;
<M> Host for RNDIS and ActiveSync devices (EXPERIMENTAL)

This is from 3.0.0
http://dev.gentoo.org/~dabbott/
Top
Martux
Veteran
Veteran
User avatar
Posts: 1917
Joined: Fri Feb 04, 2005 9:09 pm

  • Quote

Post by Martux » Sat Aug 06, 2011 6:43 pm

Yes, I believe you that it should be there, but it isn't :(
This is all I get to see under "USB Network Adapters ":

Code: Select all

<M> Multi-purpose USB Networking Framework                                                           │ │   
  │ │                               < >   ASIX AX88xxx Based USB 2.0 Ethernet Adapters                                                   │ │   
  │ │                               <M>   CDC Ethernet support (smart devices such as cable modems)                                      │ │   
  │ │                               <M>   CDC NCM support                                                                                │ │   
  │ │                               < >   Davicom DM9601 based USB 1.1 10/100 ethernet devices                                           │ │   
  │ │                               < >   SMSC LAN75XX based USB 2.0 gigabit ethernet devices                                            │ │   
  │ │                               < >   SMSC LAN95XX based USB 2.0 10/100 ethernet devices                                             │ │   
  │ │                               < >   GeneSys GL620USB-A based cables                                                                │ │   
  │ │                               < >   NetChip 1080 based cables (Laplink, ...)                                                       │ │   
  │ │                               < >   MosChip MCS7830 based Ethernet adapters                                                        │ │   
  │ │                               <M>   Simple USB Network Links (CDC Ethernet subset)                                                 │ │   
  │ │                               [ ]     ALi M5632 based 'USB 2.0 Data Link' cables                                                   │ │   
  │ │                               [ ]     AnchorChips 2720 based cables (Xircom PGUNET, ...)                                           │ │   
  │ │                               [*]     eTEK based host-to-host cables (Advance, Belkin, ...)                                        │ │   
  │ │                               [*]     Embedded ARM Linux links (iPaq, ...)                                                         │ │   
  │ │                               [ ]     Epson 2888 based firmware (DEVELOPMENT)                                                      │ │   
  │ │                               < >   Sharp Zaurus (stock ROMs) and compatible                                                       │ │   
  │ │                               < >   Conexant CX82310 USB ethernet port                                                             │ │   
  │ │                               < >   Samsung Kalmia based LTE USB modem                                                             │ │   
  │ └───────────────────────────────v(+)───────────────────────────────────────────────────────────
< >   Samsung Kalmia based LTE USB modem                                                             │ │   
  │ │                               < > Option USB High Speed Mobile Devices                                                             │ │   
  │ │                               < > Intellon PLC based usb adapter                                                                   │ │   
  │ │                               < > Apple iPhone USB Ethernet driver                                                                 │ │   
  │ │                               < > USB-to-WWAN Driver for Sierra Wireless modems                                                    │ │   
  │ │                               < > LG VL600 modem dongle            
Probably my config is really messed, this is from 3.9 too... Is there a way to insert those options manually in the configuration file?
"Coincidence is God's way of remaining anonymous."
Albert Einstein
"The road to success is always under construction"
Top
comprookie2000
Retired Dev
Retired Dev
User avatar
Posts: 925
Joined: Sun Jul 25, 2004 5:39 am
Location: Sun City Center, Florida
Contact:
Contact comprookie2000
Website

  • Quote

Post by comprookie2000 » Sat Aug 06, 2011 8:48 pm

do any (EXPERIMENTAL) drivers show up, maybe there is an option to open them up not sure
http://dev.gentoo.org/~dabbott/
Top
Martux
Veteran
Veteran
User avatar
Posts: 1917
Joined: Fri Feb 04, 2005 9:09 pm

  • Quote

Post by Martux » Sun Aug 07, 2011 6:49 pm

There are only those options available that are shown in my last post :(
"Coincidence is God's way of remaining anonymous."
Albert Einstein
"The road to success is always under construction"
Top
Post Reply

39 posts
  • 1
  • 2
  • Next

Return to “Documentation, Tips & Tricks”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic