Samsung Galaxy S Android 2.3.4 tethering does not work any longer

Bug #796006 reported by Markus Kolb on 2011-06-11
106
This bug affects 19 people
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Undecided
Unassigned

Bug Description

When upgrading my Samsung Galaxy S to Android 2.3.4 the USB tehering does not work any longer.
There was no problem with Android 2.2.1

Is there any workaround to get this working again?

ProblemType: Bug
DistroRelease: Ubuntu 11.04
Package: linux-image-2.6.38-8-generic 2.6.38-8.42
ProcVersionSignature: Ubuntu 2.6.38-8.42-generic 2.6.38.2
Uname: Linux 2.6.38-8-generic x86_64
NonfreeKernelModules: nvidia
AlsaVersion: Advanced Linux Sound Architecture Driver Version 1.0.23.
AplayDevices:
 **** List of PLAYBACK Hardware Devices ****
 card 0: Intel [HDA Intel], device 0: ALC268 Analog [ALC268 Analog]
   Subdevices: 1/1
   Subdevice #0: subdevice #0
Architecture: amd64
ArecordDevices:
 **** List of CAPTURE Hardware Devices ****
 card 0: Intel [HDA Intel], device 0: ALC268 Analog [ALC268 Analog]
   Subdevices: 1/1
   Subdevice #0: subdevice #0
AudioDevicesInUse:
 USER PID ACCESS COMMAND
 /dev/snd/controlC0: makolb 1399 F.... pulseaudio
CRDA: Error: [Errno 2] Datei oder Verzeichnis nicht gefunden
Card0.Amixer.info:
 Card hw:0 'Intel'/'HDA Intel at 0xf8300000 irq 47'
   Mixer name : 'Realtek ALC268'
   Components : 'HDA:10ec0268,10280275,00100003'
   Controls : 12
   Simple ctrls : 7
Date: Sat Jun 11 20:21:25 2011
HibernationDevice: RESUME=UUID=ae9261d8-4373-4212-b4a5-2c18fc57bc15
InstallationMedia: Ubuntu 11.04 "Natty Narwhal" - Release amd64 (20110427.1)
MachineType: Dell Inc. Vostro1710
ProcEnviron:
 LANGUAGE=de_DE:en
 PATH=(custom, user)
 LANG=de_DE.UTF-8
 SHELL=/bin/bash
ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-2.6.38-8-generic root=UUID=8c3136dd-666b-4ba9-9acb-3b9eff47adba ro quiet splash vt.handoff=7
RelatedPackageVersions:
 linux-restricted-modules-2.6.38-8-generic N/A
 linux-backports-modules-2.6.38-8-generic N/A
 linux-firmware 1.52
SourcePackage: linux
UpgradeStatus: No upgrade log present (probably fresh install)
dmi.bios.date: 10/09/2008
dmi.bios.vendor: Dell Inc.
dmi.bios.version: A10
dmi.board.name: 0X805C
dmi.board.vendor: Dell Inc.
dmi.chassis.type: 8
dmi.chassis.vendor: Dell Inc.
dmi.chassis.version: N/A
dmi.modalias: dmi:bvnDellInc.:bvrA10:bd10/09/2008:svnDellInc.:pnVostro1710:pvrNull:rvnDellInc.:rn0X805C:rvr:cvnDellInc.:ct8:cvrN/A:
dmi.product.name: Vostro1710
dmi.product.version: Null
dmi.sys.vendor: Dell Inc.

Markus Kolb (mkolb) wrote :
Brad Figg (brad-figg) on 2011-06-11
Changed in linux (Ubuntu):
status: New → Confirmed
Markus Kolb (mkolb) wrote :

I add the lsusb output with tether switch enabled in phone menu.
Then the settings are different.
I've had a look in the kernel sources for the cdc_error message and maybe the kernel
driver has only problems with the correct detection.
Is there a precompiled ubuntu kernel with dev_dbg printk output?

Markus Kolb (mkolb) wrote :

This is the DEBUG output...

[ 659.660272] usb 1-4: new high speed USB device using ehci_hcd and address 6
[ 659.812616] rndis_host 1-4:1.0: master #4/ (null) slave #5/
 (null)
[ 659.812624] usb 1-4: bad CDC descriptors
[ 659.812851] rndis_wlan 1-4:1.0: master #4/ (null) slave #5/
 (null)
[ 659.812858] usb 1-4: bad CDC descriptors

And this the corresponding code...

/* we need a master/control interface (what we're
 * probed with) and a slave/data interface; union
 * descriptors sort this all out.
 */
info->control = usb_ifnum_to_if(dev->udev,
                        info->u->bMasterInterface0);
info->data = usb_ifnum_to_if(dev->udev,
                        info->u->bSlaveInterface0);
if (!info->control || !info->data) {
        dev_dbg(&intf->dev,
                "master #%u/%p slave #%u/%p\n",
                info->u->bMasterInterface0,
                info->control,
                info->u->bSlaveInterface0,
                info->data);
        goto bad_desc;
}

Any ideas what to do next?

Could the problem be that the bInterfaceNumber starts with 0.
So there is 0 and 1.
And the ifnum for master is 4 and for slave 5.
So that usb_ifnum_to_if doesn't find the configuration...
Is the condition bInterfaceNumber == ifnum the bug?

Markus Kolb (mkolb) wrote :

I write this comment via USB tethering fixed with attached patch.
Consider this patch as a workaround.
My knowledge of coding for Linux kernel, USB and the tether hardware is close to be zero.
It works currently but it is no real solution. There should be a "correct" way to get the true interface numbers of master and slave.
E.g. there is a bFirstInterface. I think this might be the information to start with. But how to get this from the USB stack? I don't know up to now.

Oscar Tiderman (oscar-tiderman) wrote :

I experience the same thing, no tethering for Android 2.3.4 on Samsung Galaxy S with Ubuntu 11.04.

No replies what so ever for 2 months?? Will there be an update to fix this or are we left alone with manual patching?

tags: added: patch
Oscar Tiderman (oscar-tiderman) wrote :

This is still a problem in Oneiric, can someone please have a look at this and apply a fix? I really need USB tethering.

gpothier (gpothier) wrote :

Same problema here. It can be solved by manually invoking dhcp client:
sudo dhclient usb0

Oscar Tiderman (oscar-tiderman) wrote :

sudo dhclient usbX is not doing it for me, "Cannot find device usbX".

Oscar Tiderman (oscar-tiderman) wrote :

These are the lines from my /var/log/syslog regarding this matter. Please tell me if there is anything else I can provide to get this sorted.

Markus Kolb (mkolb) wrote :

The problem with dhclient ist a different problem.
Here the kernel driver does not detect and support the tether hw device and so there is no network interface usbX.

I don't know if this is really a bug in Linux kernel driver. Maybe the USB standard says the master interface need to start with 0.
Then the bug is in Android OS.
Newer Android versions >= 2.3.7 has switched back the master interface nr to 0 and there it works again...

Nevertheless I am disappointed that there is no comment by Ubuntu or Google developers for over 4 months about this although I've provided a patch to show the problem.

Is the kernel supported, Mr. Mark Shuttleworth!?

Brad Figg (brad-figg) wrote :

@Markus

Since this bug was originally filed there have been a couple kernel updates put out. Is this still an issue for you?

@brad-figg : Yes it's still an issue. Workaround remains : "tether" via wifi if applicable

Here on Samsung Galaxy S GT-I9000, carrier Bouygues Telecom, last official update is 2.3.3.
2.3.4 is mentioned here is probably "naked" (no-carrier) update as users wrote http://android-france.fr/2011/07/05/samsung-galaxy-s-gingerbread/

Testing right now.
Kernel on phone : 2.6.35.7-I9000XWJVH-CL184813 root@DELL101 #2
Firmware version on phone : GINGERBREAD.XWJVH

Plugging on a AMD64 based PC running natty and enabling USB modem mode on the phone.

No new network interface appears on PC.
Problem still present. Here is log on PC :
[21055.280112] usb 2-1: new high speed USB device using ehci_hcd and address 5
[21055.490422] usbcore: registered new interface driver cdc_ether
[21055.493505] usb 2-1: bad CDC descriptors
[21055.493723] usbcore: registered new interface driver rndis_host
[21055.502201] usb 2-1: bad CDC descriptors
[21055.502623] usbcore: registered new interface driver rndis_wlan

Thank you for your attention.

Brad Figg (brad-figg) wrote :

@gouri,

I'm only talking about Ubuntu kernels and there being new versions. There is nothing I can do about fixing the kernel on your Samsung Galaxy S.

Brad Figg (brad-figg) on 2012-01-03
Changed in linux (Ubuntu):
status: Confirmed → Invalid

@brad-figg : Yes, of course here is Ubuntu side. As testing should be done with latest available version on all sides, I was mentioning version on the phone side, too.

To further answer your question, I've installed Oneiric on the PC and tested it right now. Same error.

[88593.264170] usb 2-2: new high speed USB device number 7 using ehci_hcd
[88593.802963] usbcore: registered new interface driver cdc_ether
[88593.805488] usb 2-2: bad CDC descriptors
[88593.805512] usbcore: registered new interface driver rndis_host
[88593.841720] usb 2-2: bad CDC descriptors
[88593.841757] usbcore: registered new interface driver rndis_wlan

Here is "uname -a" on PC side :
Linux sgon 3.0.0-14-generic #23-Ubuntu SMP Mon Nov 21 20:28:43 UTC 2011 x86_64 x86_64 x86_64 GNU/Linux

I kept both Natty and Oneiric on the PC and can run further tests, at your disposal.

Wifi workaround works for me, so I guess @oscar-tiderman will be more motivated than me to go further.

@brad-figg :
What do you mean "invalid" ? Do you consider proven that the fault lies on phone side ?
I'm not disputing this choice, just trying to keep the bug-report useful for people that read it after us.

Markus Kolb (mkolb) wrote :

Are you joking with "invalid"?
This is a upstream bug, which is discussed in the linux kernel ml!

Changed in linux (Ubuntu):
status: Invalid → New
status: New → Confirmed

Indeed there seems to be a thread currently discussing it, refs
* Debian bug 655387 ( http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=655387 )
* debian-kernel ML ( http://lists.debian.org/debian-kernel/2012/01/threads.html#00296 )

They seem to have working implementations of a fix and are discussing it.

Regards,

If anyone wants to patch their kernel, building just the cdc_ether.ko from the kernel sources and replacing the module provided in the Live CD with this one would suffice.

iponeverything (cookema) wrote :

Here's a precompiled cdc_ether.ko for 2.6.38-13-generic.

Is it for 32 or 64 bit targets?

iponeverything (cookema) wrote :

oppps - 64 bit targets

Bug affecting me with ICS and Galaxy Tab:

[11825.919729] usb 2-1.1: new high-speed USB device number 8 using ehci_hcd
[11826.059824] usbcore: registered new interface driver cdc_ether
[11826.069500] usb 2-1.1: bad CDC descriptors
[11826.069574] usbcore: registered new interface driver rndis_host
[11886.527156] usb 2-1.1: USB disconnect, device number 8
[11886.726002] usb 2-1.1: new high-speed USB device number 9 using ehci_hcd
[11886.820178] scsi11 : usb-storage 2-1.1:1.0
[11887.817221] scsi 11:0:0:0: Direct-Access SAMSUNG GT-P1000 Card PQ: 0 ANSI: 2
[11887.817760] scsi 11:0:0:1: Direct-Access SAMSUNG GT-P1000 Card PQ: 0 ANSI: 2
[11887.819437] sd 11:0:0:0: Attached scsi generic sg2 type 0
[11887.820664] sd 11:0:0:1: Attached scsi generic sg3 type 0
[11887.824957] sd 11:0:0:0: [sdb] 62325760 512-byte logical blocks: (31.9 GB/29.7 GiB)
[11887.826565] sd 11:0:0:0: [sdb] Write Protect is off
[11887.826575] sd 11:0:0:0: [sdb] Mode Sense: 0f 00 00 00
[11887.826941] sd 11:0:0:1: [sdc] 26910656 512-byte logical blocks: (13.7 GB/12.8 GiB)
[11887.827474] sd 11:0:0:0: [sdb] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[11887.828693] sd 11:0:0:1: [sdc] Write Protect is off
[11887.828704] sd 11:0:0:1: [sdc] Mode Sense: 0f 00 00 00
[11887.829422] sd 11:0:0:1: [sdc] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[11887.844849] sdb:
[11887.852062] sdc:
[11887.886460] sd 11:0:0:0: [sdb] Attached SCSI removable disk
[11887.891195] sd 11:0:0:1: [sdc] Attached SCSI removable disk
[11894.702807] usb 2-1.1: USB disconnect, device number 9
[11894.708017] sd 11:0:0:0: [sdb] Synchronizing SCSI cache
[11894.708092] sd 11:0:0:0: [sdb] Result: hostbyte=DID_NO_CONNECT driverbyte=DRIVER_OK
[11894.716174] sd 11:0:0:1: [sdc] Synchronizing SCSI cache
[11894.716242] sd 11:0:0:1: [sdc] Result: hostbyte=DID_NO_CONNECT driverbyte=DRIVER_OK

Markus Kolb (mkolb) wrote :

The current upstream patch which might have a chance to get merged...
[PATCH net v2] cdc_ether: Ignore bogus union descriptor for RNDIS devices

Herton R. Krzesinski (herton) wrote :

"cdc_ether: Ignore bogus union descriptor for RNDIS devices" is upstream now. As it's Cc: stable, it should land on 3.2 and 3.0 future stable updates, so should automatically land in Oneiric and Precise if everything goes well, as we apply stable updates.

About Natty (11.04), is anyone here still using it with an affected phone? If desired, I'll propose/backport the patch to be included on a Natty kernel update, just someone here will need to test it once the kernel update is in -proposed.

Summary : fixed in Precise.

Precise is currently running on 3.2.0-26-generic.
Trying again.

Plugging a Samsung Galaxy S running Android 2.3.3 with kernel 2.6.35.7-I9000XWJVH-CL184813 .
Setting it for tethering.

Ubuntu kernel says :

[684939.580128] usb 3-2: new high-speed USB device number 4 using xhci_hcd
[684939.601421] usb 3-2: ep 0x8b - rounding interval to 32768 microframes, ep desc says 0 microframes
[684939.601433] usb 3-2: ep 0xa - rounding interval to 32768 microframes, ep desc says 0 microframes
[684939.697387] usbcore: registered new interface driver cdc_ether
[684939.708779] rndis_host 3-2:1.0: usb0: register 'rndis_host' at usb-0000:04:00.0-2, RNDIS device, fa:88:07:27:13:04
[684939.708859] usbcore: registered new interface driver rndis_host
[684939.730474] usbcore: registered new interface driver rndis_wlan

ifconfig reveals automatically found and configured USB-based network interface.

usb0 Link encap:Ethernet HWaddr fa:88:07:27:13:04
          inet adr:192.168.42.98 Bcast:192.168.42.255 Masque:255.255.255.0
          adr inet6: fe80::f888:7ff:fe27:1304/64 Scope:Lien
          UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
          Packets reçus:23 erreurs:0 :0 overruns:0 frame:0
          TX packets:56 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 lg file transmission:1000
          Octets reçus:2142 (2.1 KB) Octets transmis:13649 (13.6 KB)

Routing table confirms tethering includes gateway to the internet.

$ /sbin/route -n
Table de routage IP du noyau
Destination Passerelle Genmask Indic Metric Ref Use Iface
0.0.0.0 192.168.42.129 0.0.0.0 UG 0 0 0 usb0
192.168.42.0 0.0.0.0 255.255.255.0 U 1 0 0 usb0

Can ping the phone, ftp into the phone, transfer files.

Can ssh to external host through tethering.

Verdict : success.

This bug is no longer affecting me.

Fix released in 3.2.0-26-generic kernel update to Precise (12.04).

Changed in linux (Ubuntu):
status: Confirmed → Fix Released

Hi Herton,
Please propose the patch, as you said above, and I will test it and let you know the result.
If it is already in -proposed, please inform me about how can I apply it because this situation is new to me.
Thank you,

PS: I can't upgrade to Precise because I use gretl and other apps which aren't yet supported in this version, and above all I like natty so much!

Herton R. Krzesinski (herton) wrote :

Sorry, but Natty is going end of life this month, and the last Natty kernel is already uploaded, and will get no more updates.

It's too early to send natty to the grave!
Thank you anyway, I'll find a solution :)

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.