Modify

Opened 7 years ago

Closed 7 years ago

#9422 closed defect (fixed)

Devices ttyUSB0-5 fail to be setup after usb_modeswich is run

Reported by: perazim Owned by: developers
Priority: normal Milestone: Backfire 10.03.1
Component: base system Version: Backfire 10.03.1 RC4
Keywords: Cc:

Description

Devices ttyUSB0-5 fail to be setup after usb_modeswich is run. I have posted this earlier to the forum.

To try and resolve this, I switched to using the prebuilt firmware images from this site. I had been using trunk.

I flashed backfire/10.03.1-rc4/brcm47xx/openwrt-brcm47xx-squashfs.trx to my D-Link DIR-320.

I then installed the following packages:

comgt
kmod-usb-core
kmod-usb-serial
kmod-usb-serial-option
kmod-usb-ohci
kmod-usb-uhci
kmod-usb2
usb_modeswich
usb_modeswich-data
usb-utils

Then rebooted and plugged USB Alcatel X220D 3G modem.

lsusb shows:

root@OpenWrt:~# lsusb
Bus 002 Device 002: ID 1bbb:0017 T & A Mobile Phones
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
root@OpenWrt:~#

This is correct for the Alcatel in modem mode (this works on Fedora 14 with NetworkManager and an updated ModemManager)

Problem is that after modeswich, ttyUSB0-5 do not showup in /dev:

root@OpenWrt:~# ls -l /dev/tty*
crw-rw-rw- 1 root root 5, 0 Jan 1 1970 /dev/tty
crw-rw-rw- 1 root root 4, 64 Jan 1 1970 /dev/ttyS0
crw-rw-rw- 1 root root 4, 65 Jan 1 1970 /dev/ttyS1
root@OpenWrt:~#

This is what the same Alcatel does on Fedora:

[root@travelmate hotplug2-1.0]# ls -l /dev/ttyUSB*
crw-rw----. 1 root dialout 188, 0 May 15 12:46 /dev/ttyUSB0
crw-rw----. 1 root dialout 188, 1 May 15 12:46 /dev/ttyUSB1
crw-rw----. 1 root dialout 188, 2 May 15 12:46 /dev/ttyUSB2
crw-rw----. 1 root dialout 188, 4 May 15 12:48 /dev/ttyUSB4
crw-rw----. 1 root dialout 188, 5 May 15 12:48 /dev/ttyUSB5
[root@travelmate hotplug2-1.0]#

Without the entries in /dev, the rest of the connection scripts fail.

At this point, the only differences between this configuration and the Fedora 14 system is the version on usb_modeswitch-data:

Fedora 14: usb_modeswitch-data-20100817-1
OpenWRT: usb_modeswich-data-20100826-1

I examined the config file for the Alcatel modem in /etc/usb_modeswitch.d on both systems and found them to be idendical.

As asked earlier, hotplug2 is running.

I don't know what else to do?

Has anybody else been able to get a USB 3G modem that requires usb_modeswitch to actually work recently using this image?

Perazim

Attachments (2)

OpenWRT-syslog (1.6 KB) - added by perazim 7 years ago.
pertinent part of syslog
802-usb_serial_option_add_alcatel_x220d.patch (859 bytes) - added by jow 7 years ago.
Adds the Alcatel X220D 3g dongle to option.c

Download all attachments as: .zip

Change History (16)

comment:1 Changed 7 years ago by jow

Would you please attach your syslog?

comment:2 follow-up: Changed 7 years ago by Elphidium

try this in /etc/rc.local

echo "1bbb 0017" > /sys/bus/usb-serial/drivers/option1/new_id

comment:3 Changed 7 years ago by Serjio

I have a similar case:

root@serverochek:/dev# opkg list-installed | grep usb
kmod-usb-acm - 2.6.32.27-1
kmod-usb-core - 2.6.32.27-1
kmod-usb-serial - 2.6.32.27-1
kmod-usb-serial-ftdi - 2.6.32.27-1
kmod-usb-serial-option - 2.6.32.27-1
kmod-usb-storage - 2.6.32.27-1
kmod-usb-uhci - 2.6.32.27-1
kmod-usb2 - 2.6.32.27-1
libusb - 0.1.12-2
usbutils - 0.90-1

but, with attached USB modem

root@serverochek:/dev# lsusb -t
Segmentation fault
root@serverochek:/dev# lsusb -V
lsusb (usbutils) 0.90

root@serverochek:/dev# ls /dev | grep usb returns nothing.

Elphidium, what is the purpose of that line? should I leave 'exit 0' line?

Changed 7 years ago by perazim

pertinent part of syslog

comment:4 follow-up: Changed 7 years ago by anonymous

i installed kmod-usb-ohci instead of uhci and this seemed to help in my case

comment:5 in reply to: ↑ 4 ; follow-up: Changed 7 years ago by anonymous

Replying to anonymous:

i installed kmod-usb-ohci instead of uhci and this seemed to help in my case

I have installed BOTH packages. Could this be the cause of my troubles?

comment:6 in reply to: ↑ 5 Changed 7 years ago by anonymous

Replying to anonymous:

Replying to anonymous:

i installed kmod-usb-ohci instead of uhci and this seemed to help in my case

I have installed BOTH packages. Could this be the cause of my troubles?

I guess it could, you'd better try uninstalling one of those.

comment:7 in reply to: ↑ 2 ; follow-up: Changed 7 years ago by anonymous

Replying to Elphidium:

try this in /etc/rc.local

echo "1bbb 0017" > /sys/bus/usb-serial/drivers/option1/new_id

After adding this, the ttyUSB0-5 devices appear.

It has been suggested that because I have both the kmod-usb-ohci and kmod-usb-uhci packages installed that this could be a side effect of a possible conflict?

comment:8 in reply to: ↑ 7 Changed 7 years ago by anonymous

Replying to anonymous:

Replying to Elphidium:

try this in /etc/rc.local

echo "1bbb 0017" > /sys/bus/usb-serial/drivers/option1/new_id

After adding this, the ttyUSB0-5 devices appear.

It has been suggested that because I have both the kmod-usb-ohci and kmod-usb-uhci packages installed that this could be a side effect of a possible conflict?

I have just tried all possible combinations of kmod-usb-ohci and kmod-usb-uhci. The D-Link DIR-320 I have has USB hardware that needs kmod-usb-ohci. Therefore I removed kmod-usb-uhci but I still need the above script in /etc/rc.local to operate.

comment:9 Changed 7 years ago by perazim

So which module is the culprit in causing this behaviour?

Could it be that something is happening out of order at boot? I would guess not because I get the same behaviour if I plug the modem into an already running system.

I have noticed that the config file 1bbb:f000 in /etc/usb_modeswitch.d does not explicitly define this modem. Could this be a usb_modeswitch bug?

Just thinking because I would like to fix this so that my custom firmware will work out of the box without requiring ssh configuration which the enduser may not be able to complete.

Perazim

comment:10 Changed 7 years ago by jow

I think the simple truth is that the "option" driver in Kernel 2.6.32 does not feel responsible for 0x1bbb:0x0017, which is also the reason why you need the new_id hack to tie the usb device to the driver.

The only Alcatel device listed in .32 is:

{ USB_DEVICE(ALCATEL_VENDOR_ID, ALCATEL_PRODUCT_X060S) },

... which corresponds to 0x1bbb:0x0000 .

In order to properly solve it you have to patch "option" to recognize your unit right away.

comment:11 follow-up: Changed 7 years ago by jow

Attached is a patch for testing, it adds the X220D to option.c. The patch must be placed into target/linux/generic-2.6/patches-2.6.32/ for backfire. Afterwards a rebuild with "make target/linux/clean world" is required.

Changed 7 years ago by jow

Adds the Alcatel X220D 3g dongle to option.c

comment:12 in reply to: ↑ 11 Changed 7 years ago by anonymous

Replying to jow:

Attached is a patch for testing, it adds the X220D to option.c. The patch must be placed into target/linux/generic-2.6/patches-2.6.32/ for backfire. Afterwards a rebuild with "make target/linux/clean world" is required.

This works.

FYI, Something is different about the port enumeration between OpenWRT and Modem-Manager on Fedora 14. On OpenWRT one sees ttyUSB0-4 with 4 being the ppp port whereas on ModemManager ones sees ttyUSB0-5 with 5 being the ppp port. This caused somewhat of a wild goose chase.

When will this patch be part of backfire as downloaded from OpenWRT?

Thanks for the help, I really appreciate it.

Perazim

comment:13 Changed 7 years ago by Elphidium

Jow, could you patch a huawei E173s too, its 0x12d1 0x1c05.

comment:14 Changed 7 years ago by jow

  • Resolution set to fixed
  • Status changed from new to closed

Committed in r26906 and r26907.

Add Comment

Modify Ticket

Action
as closed .
The resolution will be deleted. Next status will be 'reopened'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.