jose1975 / android-wired-tether

Automatically exported from code.google.com/p/android-wired-tether
1 stars 0 forks source link

Can't connect in Linux - usb0 interface never shows up #13

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Start wired-tether
2. Plug phone into usb port of computer
3. sudo ifconfig

What is the expected output? What do you see instead?

Instead of seeing usb0 listed as an available interface I only see wlan0 
which is my wireless card.

What version of the product are you using? On what operating system?

I'm using wired-tether 1.2 on a Sprint Hero running DamageControl 1.0 ROM, 
which is an Android 2.1 ROM.

Please provide any additional information below.

I'm using arch linux, and I've also tried using xubuntu with the same 
result.  I believe the rndis module is loaded.  I've added "rndis_host" to 
my modules list in rc.conf.  I've also done modprobe rndis_host and then 
plugged the phone in.  Still no usb0 interface.

Original issue reported on code.google.com by klun...@gmail.com on 17 Mar 2010 at 1:06

GoogleCodeExporter commented 8 years ago
Here is my dmesg output when I plug the phone in.

usb 1-2: new high speed USB device using ehci_hcd and address 10                

usb 1-2: config 1 has 2 interfaces, different from the descriptor's value: 4    

usb 1-2: Duplicate descriptor for config 1 interface 0 altsetting 0, skipping   

usb 1-2: Duplicate descriptor for config 1 interface 1 altsetting 0, skipping   

usb 1-2: configuration #1 chosen from 1 choice                                  

scsi10 : SCSI emulation for USB Mass Storage devices                            

usb-storage: device found at 10                                                 

usb-storage: waiting for device to settle before scanning                       

scsi 10:0:0:0: Direct-Access     HTC      Android Phone    0100 PQ: 0 ANSI: 2   

sd 10:0:0:0: Attached scsi generic sg1 type 0                                   

usb-storage: device scan complete                                               

sd 10:0:0:0: [sdb] Attached SCSI removable disk

Original comment by klun...@gmail.com on 17 Mar 2010 at 1:10

GoogleCodeExporter commented 8 years ago
You see the SCSI device which means you did not enable the tethering properly.

My Hero shows the SCSI interface when not sharing the connection and as soon as
sharing turns on, the SCSI interface disappears and an RNDIS interface appears.

Original comment by cyberwizzard on 18 Apr 2010 at 12:11

GoogleCodeExporter commented 8 years ago
As an addition: I am talking about the stock tether functionality of the Hero, I
assume this goes for all wired tethering techniques (as the phone can only play 
one
role at a time). Ergo: seeing SCSI is bad.

Original comment by cyberwizzard on 18 Apr 2010 at 12:13

GoogleCodeExporter commented 8 years ago
I get a similar dmesg when I connect the USB cable:

usb 2-2: new high speed USB device using ehci_hcd and address 28
usb 2-2: config 1 has 2 interfaces, different from the descriptor's value: 4
usb 2-2: Duplicate descriptor for config 1 interface 0 altsetting 0, skipping
usb 2-2: Duplicate descriptor for config 1 interface 1 altsetting 0, skipping
usb 2-2: configuration #1 chosen from 1 choice
scsi29 : SCSI emulation for USB Mass Storage devices
usb-storage: device found at 28
usb-storage: waiting for device to settle before scanning
usb-storage: device scan complete
scsi 29:0:0:0: Direct-Access     HTC      Android Phone    0100 PQ: 0 ANSI: 2
sd 29:0:0:0: Attached scsi generic sg2 type 0
sd 29:0:0:0: [sdb] Attached SCSI removable disk

It complains about only finding 2 interface descriptors while it was expecting 
4 from
the configuration descriptor. Then it also says that duplicate descriptors for
interfaces 0 and 1 were found, and it is ignoring these.

Doing a "lsusb -v" shows the problem:

Bus 002 Device 028: ID 0bb4:0c02 High Tech Computer Corp. 
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass            2 Communications
  bDeviceSubClass         0 
  bDeviceProtocol         0 
  bMaxPacketSize0        64
  idVendor           0x0bb4 High Tech Computer Corp.
  idProduct          0x0c02 
  bcdDevice            1.00
  iManufacturer           3 
  iProduct                2 
  iSerial                 1 
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength          113
    bNumInterfaces          4
    bConfigurationValue     1
    iConfiguration          0 
    bmAttributes         0x80
      (Bus Powered)
    MaxPower              256mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           2
      bInterfaceClass         8 Mass Storage
      bInterfaceSubClass      6 SCSI
      bInterfaceProtocol     80 Bulk (Zip)
      iInterface              4 
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x01  EP 1 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       0
      bNumEndpoints           2
      bInterfaceClass       255 Vendor Specific Class
      bInterfaceSubClass     66 
      bInterfaceProtocol      1 
      iInterface              5 
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x02  EP 2 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x82  EP 2 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass         2 Communications
      bInterfaceSubClass      2 Abstract (modem)
      bInterfaceProtocol    255 Vendor Specific (MSFT RNDIS?)
      iInterface              6 
      CDC Header:
        bcdCDC               1.10
      CDC Call Management:
        bmCapabilities       0x00
        bDataInterface          1
      CDC ACM:
        bmCapabilities       0x00
      CDC Union:
        bMasterInterface        0
       bSlaveInterface         1 
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x86  EP 6 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0040  1x 64 bytes
        bInterval               9
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       0
      bNumEndpoints           2
      bInterfaceClass        10 CDC Data
      bInterfaceSubClass      0 Unused
      bInterfaceProtocol      0 
      iInterface              6 
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x05  EP 5 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x87  EP 7 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0

The first two interface descriptors (0 and 1) are there when wired tether is
disabled. The last two appear when wired tether is enabled. However, instead of
appearing as interface descriptors 2 and 3, it reuses 0 and 1, and linux thinks 
these
are duplicate descriptors and ignores them. I think the way to fix this is to 
find
out how many interfaces the phone is exposing without wireless tether, and 
increment
the interface descriptor numbers accordingly.

Original comment by pen...@gmail.com on 14 May 2010 at 11:13

GoogleCodeExporter commented 8 years ago
I get this problem with my Evo 4G. When I disabled usb storage and USB 
Debugging, the tethering app works. 

Original comment by tonybc...@gmail.com on 13 Jun 2010 at 11:42

GoogleCodeExporter commented 8 years ago
It seems the program can't override the usb mass storage default.  Therefore 
windows can't load the rndis drivers.  Once the usb storage is disabled the Evo 
tethers fine.  A reboot is needed for usb storage to work again.

Original comment by agent...@gmail.com on 14 Jun 2010 at 3:48

GoogleCodeExporter commented 8 years ago
With htc tattoo, i cannot see usb0 interface in linux machine (which is still 
recognizing the phone as storage disk  ?) 
In linux -> output of dmesg 

scsi 33:0:0:0: Direct-Access     HTC      Android Phone    0100 PQ: 0 ANSI: 2
sd 33:0:0:0: Attached scsi generic sg2 type 0
sd 33:0:0:0: [sdb] Attached SCSI removable disk

however i am able to see usb0 interface in phone (via adb shell).

# busybox ifconfig
lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:24769 errors:0 dropped:0 overruns:0 frame:0
          TX packets:24769 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:9399579 (8.9 MiB)  TX bytes:9399579 (8.9 MiB)

usb0      Link encap:Ethernet  HWaddr 0A:E6:45:39:F7:2D  
          inet addr:192.168.1.254  Bcast:192.168.1.255  Mask:255.255.255.252
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:24 errors:256 dropped:0 overruns:0 frame:0
          TX packets:3 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:8098 (7.9 KiB)  TX bytes:1372 (1.3 KiB)

Original comment by sz...@yahoo.com on 11 Aug 2010 at 6:04

GoogleCodeExporter commented 8 years ago
Has anyone figured out how to resolve this issue? I'm still having the same 
problem on Epic 4G running RandomROM EI22 Thunderhawk.

As for the client, I'm using Linux Mint 11 x64 and a fresh install of Ubuntu 
11.10 x64, and I'm still stuck in scsi. I tried disabling USB Debug mode and 
rebooting (both phone and computer) with no luck.

It was working fine before with Mint, but I'm not sure which change made it 
stop working. I'm pretty sure this is a configuration issue with Linux, as I 
just tethered my phone to my Windows desktop without issue last night. Also, 
using a terminal emulator, I ran ifconfig and also noticed the usb0 interface 
in the phone.

Suggestions/solution?

Original comment by jerm1...@gmail.com on 24 Nov 2011 at 5:31