# usb0 interface not showing up while tethering Android phone

## guest1297

Hi!

I am trying to tether my HTC Hero (Android 2.1, not rooted, and without any sort of tethering app) into my gentoo laptop, with kernel 2.6.34-gentoo-r12. Yes, old kernel, I know.

The problem is that the interface usb0 is not showing up.

I have followed the following links:

http://wiki.gentoo.org/wiki/Android_USB_Tethering

https://forums.gentoo.org/viewtopic-t-843255-postdays-0-postorder-asc-start-0.html

https://forums.gentoo.org/viewtopic-t-901542.html

http://tomatousb.org/forum/t-259025/usb-android-tethering-modules

http://www.linuxquestions.org/questions/gentoo-87/tethering-displays-sit0-interface-913105/

Still, I can't seem to make this work.

I can tell, from everywhere on the internet, that I should see a line like this on dmesg:

```
[250278.078911] rndis_host 2-1.2:1.0: usb0: register 'rndis_host' at usb-0000:00:1d.0-1.2, RNDIS device
```

and indeed, when I tried it on a Debian Squeeze machine, that's the output I got, and the interface usb0 showed up.

However, on my gentoo box, this is the output of dmesg:

```

[ 2815.154060] usb 2-3: new high speed USB device using ehci_hcd and address 5

[ 2815.206321] ehci_hcd 0000:00:1d.7: port 3 high speed

[ 2815.206328] ehci_hcd 0000:00:1d.7: GetStatus port 3 status 001005 POWER sig=se0 PE CONNECT

[ 2815.276240] usb 2-3: default language 0x0409

[ 2815.282242] usb 2-3: udev 5, busnum 2, minor = 132

[ 2815.282245] usb 2-3: New USB device found, idVendor=0bb4, idProduct=0ff9

[ 2815.282247] usb 2-3: New USB device strings: Mfr=3, Product=2, SerialNumber=1

[ 2815.282250] usb 2-3: Product: Android Phone

[ 2815.282261] usb 2-3: Manufacturer: HTC

[ 2815.282263] usb 2-3: SerialNumber: HT#########

[ 2815.282371] usb 2-3: usb_probe_device

[ 2815.282376] usb 2-3: configuration #1 chosen from 1 choice

[ 2815.286373] usb 2-3: adding 2-3:1.0 (config #1, interface 0)

[ 2815.288279] usb-storage 2-3:1.0: usb_probe_interface

[ 2815.288287] usb-storage 2-3:1.0: usb_probe_interface - got id

[ 2815.288420] scsi7 : usb-storage 2-3:1.0

[ 2815.288546] drivers/usb/core/inode.c: creating file '005'

[ 2816.292771] scsi 7:0:0:0: Direct-Access     HTC      Android Phone    0100 PQ: 0 ANSI: 2

[ 2816.292957] sd 7:0:0:0: Attached scsi generic sg2 type 0

[ 2816.307034] sd 7:0:0:0: [sdb] Attached SCSI removable disk

[ 2822.240593] hub 2-0:1.0: state 7 ports 6 chg 0000 evt 0008

[ 2822.240605] ehci_hcd 0000:00:1d.7: GetStatus port 3 status 001002 POWER sig=se0 CSC

[ 2822.240614] hub 2-0:1.0: port 3, status 0100, change 0001, 12 Mb/s

[ 2822.240617] usb 2-3: USB disconnect, address 5

[ 2822.240619] usb 2-3: unregistering device

[ 2822.240621] usb 2-3: usb_disable_device nuking all URBs

[ 2822.240629] usb 2-3: unregistering interface 2-3:1.0

[ 2822.348728] ehci_hcd 0000:00:1d.7: GetStatus port 3 status 001803 POWER sig=j CSC CONNECT

[ 2822.452049] hub 2-0:1.0: debounce: port 3: total 200ms stable 100ms status 0x501

[ 2822.503288] ehci_hcd 0000:00:1d.7: port 3 high speed

[ 2822.503293] ehci_hcd 0000:00:1d.7: GetStatus port 3 status 001005 POWER sig=se0 PE CONNECT

[ 2822.554053] usb 2-3: new high speed USB device using ehci_hcd and address 6

[ 2822.606291] ehci_hcd 0000:00:1d.7: port 3 high speed

[ 2822.606299] ehci_hcd 0000:00:1d.7: GetStatus port 3 status 001005 POWER sig=se0 PE CONNECT

[ 2822.674200] usb 2-3: skipped 4 descriptors after interface

[ 2822.676198] usb 2-3: default language 0x0409

[ 2822.682189] usb 2-3: udev 6, busnum 2, minor = 133

[ 2822.682191] usb 2-3: New USB device found, idVendor=0bb4, idProduct=0ffe

[ 2822.682194] usb 2-3: New USB device strings: Mfr=3, Product=2, SerialNumber=1

[ 2822.682196] usb 2-3: Product: Android Phone

[ 2822.682198] usb 2-3: Manufacturer: HTC

[ 2822.682200] usb 2-3: SerialNumber: HT##########

[ 2822.682302] usb 2-3: usb_probe_device

[ 2822.682307] usb 2-3: no configuration chosen from 1 choice

[ 2822.682311] drivers/usb/core/inode.c: creating file '006'

[ 2822.682341] hub 2-0:1.0: state 7 ports 6 chg 0000 evt 0008

```

as opposed to Debian's:

```

[250272.189970] usb 2-1.2: new high speed USB device using ehci_hcd and address 15

[250272.295416] usb 2-1.2: New USB device found, idVendor=0bb4, idProduct=0ff9

[250272.295420] usb 2-1.2: New USB device strings: Mfr=3, Product=2, SerialNumber=1

[250272.295422] usb 2-1.2: Product: Android Phone

[250272.295424] usb 2-1.2: Manufacturer: HTC

[250272.295425] usb 2-1.2: SerialNumber: HT#########

[250272.295562] usb 2-1.2: configuration #1 chosen from 1 choice

[250272.300137] scsi7 : SCSI emulation for USB Mass Storage devices

[250272.300215] usb-storage: device found at 15

[250272.300217] usb-storage: waiting for device to settle before scanning

[250277.297602] usb-storage: device scan complete

[250277.302319] scsi 7:0:0:0: Direct-Access     HTC      Android Phone    0100 PQ: 0 ANSI: 2

[250277.303082] sd 7:0:0:0: Attached scsi generic sg3 type 0

[250277.313552] sd 7:0:0:0: [sdc] Attached SCSI removable disk

[250277.465727] usb 2-1.2: USB disconnect, address 15

[250277.683332] usb 2-1.2: new high speed USB device using ehci_hcd and address 16

[250277.789363] usb 2-1.2: New USB device found, idVendor=0bb4, idProduct=0ffe

[250277.789368] usb 2-1.2: New USB device strings: Mfr=3, Product=2, SerialNumber=1

[250277.789372] usb 2-1.2: Product: Android Phone

[250277.789374] usb 2-1.2: Manufacturer: HTC

[250277.789376] usb 2-1.2: SerialNumber: HT#########

[250277.789530] usb 2-1.2: configuration #1 chosen from 1 choice

[250278.009080] usbcore: registered new interface driver cdc_ether

[250278.078911] rndis_host 2-1.2:1.0: usb0: register 'rndis_host' at usb-0000:00:1d.0-1.2, RNDIS device, ##:##:##:##:##:##

[250278.078993] usbcore: registered new interface driver rndis_host

[250278.165659] usbcore: registered new interface driver rndis_wlan

[250305.248005] usb 2-1.2: USB disconnect, address 16

[250305.248076] rndis_host 2-1.2:1.0: usb0: unregister 'rndis_host' usb-0000:00:1d.0-1.2, RNDIS device

[250490.971995] usb 2-1.2: new high speed USB device using ehci_hcd and address 17

[250491.076508] usb 2-1.2: New USB device found, idVendor=0bb4, idProduct=0ff9

[250491.076512] usb 2-1.2: New USB device strings: Mfr=3, Product=2, SerialNumber=1

[250491.076515] usb 2-1.2: Product: Android Phone

[250491.076516] usb 2-1.2: Manufacturer: HTC

[250491.076518] usb 2-1.2: SerialNumber: HT##########

[250491.076639] usb 2-1.2: configuration #1 chosen from 1 choice

[250491.081325] scsi8 : SCSI emulation for USB Mass Storage devices

[250491.081424] usb-storage: device found at 17

[250491.081426] usb-storage: waiting for device to settle before scanning

[250496.079377] usb-storage: device scan complete

[250496.081871] scsi 8:0:0:0: Direct-Access     HTC      Android Phone    0100 PQ: 0 ANSI: 2

[250496.083141] sd 8:0:0:0: Attached scsi generic sg3 type 0

[250496.092601] sd 8:0:0:0: [sdc] Attached SCSI removable disk

[250648.143289] usb 2-1.2: USB disconnect, address 17

[250648.366569] usb 2-1.2: new high speed USB device using ehci_hcd and address 18

[250648.478903] usb 2-1.2: New USB device found, idVendor=0bb4, idProduct=0ffe

[250648.478908] usb 2-1.2: New USB device strings: Mfr=3, Product=2, SerialNumber=1

[250648.478911] usb 2-1.2: Product: Android Phone

[250648.478913] usb 2-1.2: Manufacturer: HTC

[250648.478916] usb 2-1.2: SerialNumber: HT############

[250648.479073] usb 2-1.2: configuration #1 chosen from 1 choice

[250648.500852] rndis_host 2-1.2:1.0: usb0: register 'rndis_host' at usb-0000:00:1d.0-1.2, RNDIS device, ##:##:##:##:##:##

```

(MAC address and serial number masked)

The lines from rndis_host and usbcore are what matters the most, here.

The phone has no problem, or it wouldn't work on Debian. The problem has to be in my configuration.

Debian Squeeze's kernel is 2.6.32. It's the vanilla kernel from Debian.

My gentoo kernel was compiled by me.

I activated every module recommended in the above links:

```

CONFIG_USB_NET_RNDIS_WLAN=m

CONFIG_USB_NET_RNDIS_HOST=m

CONFIG_USB_ETH=m

CONFIG_USB_ETH_RNDIS=y

CONFIG_USB_ETH_EEM=y

CONFIG_USB_GADGET=m

CONFIG_USB_SERIAL=m

CONFIG_USB_SERIAL_OPTION=m

```

I rebooted, I had to modprobe the modules manually because they didn't fire up when I connected the phone, and even then, they did nothing.

I don't know how at a deeper level what it is in the kernel that makes this happen:

```
[250278.078911] rndis_host 2-1.2:1.0: usb0: register 'rndis_host' at usb-0000:00:1d.0-1.2, RNDIS device, ##:##:##:##:##:##
```

what is it in the kernel that calls rndis_host? Whatever it is, it isn't happening in my gentoo machine, and I don't know what to look for now.

I thought about udev, and this is the output of udevadm monitor, on

gentoo:

```

KERNEL[1353810927.830500] add      /devices/pci0000:00/0000:00:1d.7/usb2/2-3 (usb)

UDEV  [1353810927.832554] add      /devices/pci0000:00/0000:00:1d.7/usb2/2-3 (usb)

```

Debian:

```

KERNEL[1353810440.047321] add      /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.2 (usb)

KERNEL[1353810440.052508] add      /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.2/2-1.2:1.0 (usb)

KERNEL[1353810440.068302] add      /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.2/2-1.2:1.0/net/usb0 (net)

KERNEL[1353810440.071529] add      /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.2/2-1.2:1.1 (usb)

UDEV  [1353810440.092191] add      /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.2 (usb)

UDEV  [1353810440.093078] add      /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.2/2-1.2:1.1 (usb)

UDEV  [1353810440.097496] add      /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.2/2-1.2:1.0 (usb)

UDEV  [1353810440.104283] add      /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.2/2-1.2:1.0/net/usb0 (net)

```

(I can post more, but I think this is the relevant part)

I think this is enough information for someone who understands how things work at a deeper level. Unfortunately, I can't seem to move on from here by myself anymore.

Thank you for your attention!

----------

## cach0rr0

looks like it's being picked up as storage

try:

```

* sys-apps/usb_modeswitch

     Available versions:  1.2.3_p20120531-r1 (~)1.2.3_p20120531-r2 (~)1.2.4_p20120815

     Homepage:            http://www.draisberghof.de/usb_modeswitch/ http://www.draisberghof.de/usb_modeswitch/device_reference.txt

     Description:         USB_ModeSwitch is a tool for controlling 'flip flop' (multiple devices) USB gear like UMTS sticks

```

----------

## guest1297

 *cach0rr0 wrote:*   

> looks like it's being picked up as storage
> 
> try:
> 
> ```
> ...

 

I'm sorry, but I have no idea what am I supposed to do with it.

```

Usage: usb_modeswitch [<params>] [-c filename]

 -h, --help                    this help

 -e, --version                 print version information and exit

 -v, --default-vendor NUM      vendor ID of original mode (mandatory)

 -p, --default-product NUM     product ID of original mode (mandatory)

 -V, --target-vendor NUM       target mode vendor ID (optional)

 -P, --target-product NUM      target mode product ID (optional)

 -C, --target-class NUM        target mode device class (optional)

 -b, --busnum NUM              system bus number of device (for hard ID)

 -g, --devnum NUM              system device number (for hard ID)

 -m, --message-endpoint NUM    direct the message transfer there (optional)

 -M, --message-content <msg>   message to send (hex number as string)

 -2 <msg>, -3 <msg>            additional messages to send (-n recommended)

 -n, --need-response           read response to the message transfer (CSW)

 -r, --response-endpoint NUM   read response from there (optional)

 -d, --detach-only             detach the active driver, no further action

 -H, --huawei-mode             apply a special procedure

 -S, --sierra-mode             apply a special procedure

 -O, --sony-mode               apply a special procedure

 -G, --gct-mode                apply a special procedure

 -N, --sequans-mode            apply a special procedure

 -A, --mobileaction-mode       apply a special procedure

 -T, --kobil-mode              apply a special procedure

 -L, --cisco-mode              apply a special procedure

 -B, --qisda-mode              apply a special procedure

 -R, --reset-usb               reset the device after all other actions

 -Q, --quiet                   don't show progress or error messages

 -W, --verbose                 print all settings and debug output

 -D, --sysmode                 specific result and syslog message

 -s, --success <seconds>       switching result check with timeout

 -I, --no-inquire              do not get SCSI attributes (default on)

 -c, --config-file <filename>  load long configuration from file

 -t, --stdinput                read long configuration from stdin

 -f, --long-config <text>      get long configuration from string

 -i, --interface NUM           select initial USB interface (default 0)

 -u, --configuration NUM       select USB configuration

 -a, --altsetting NUM          select alternative USB interface setting

 * usb_modeswitch: handle USB devices with multiple modes

 * Version 1.2.3 (C) Josua Dietze 2012

 * Based on libusb0 (0.1.12 and above)

 ! PLEASE REPORT NEW CONFIGURATIONS !

```

 :Neutral: 

----------

