As I've previously mentioned, I am trying to get a Novatel EVDO modem to work consistently on a particular laptop. Sometimes it works, mostly it doesn't.
After much experimentation I have discovered that it apparently takes about five minutes for the machine to realize that it has a modem, after which it works.
See this from /var/log/messages on one of my computers:
Nov 26 12:20:09 mutt kernel: usb 7-2: new full speed USB device using uhci_hcd and address 2 Nov 26 12:20:09 mutt kernel: usb 7-2: configuration #1 chosen from 1 choice Nov 26 12:20:09 mutt kernel: usb 7-2: New USB device found, idVendor=1410, idProduct=5010 Nov 26 12:20:09 mutt kernel: usb 7-2: New USB device strings: Mfr=1, Product=2, SerialNumber=4 Nov 26 12:20:09 mutt kernel: usb 7-2: Product: Novatel Wireless CDMA Nov 26 12:20:09 mutt kernel: usb 7-2: Manufacturer: Novatel Wireless Inc. Nov 26 12:20:09 mutt kernel: usb 7-2: SerialNumber: 091087439150000 Nov 26 12:20:10 mutt kernel: Initializing USB Mass Storage driver... Nov 26 12:20:10 mutt kernel: scsi6 : SCSI emulation for USB Mass Storage devices Nov 26 12:20:10 mutt kernel: usbcore: registered new interface driver usb-storage Nov 26 12:20:10 mutt kernel: USB Mass Storage support registered. Nov 26 12:20:15 mutt kernel: scsi 6:0:0:0: CD-ROM Novatel Mass Storage 1.00 PQ: 0 ANSI: 2 Nov 26 12:20:15 mutt kernel: sr1: scsi-1 drive Nov 26 12:20:15 mutt kernel: sr 6:0:0:0: Attached scsi generic sg2 type 5 Nov 26 12:20:16 mutt kernel: sr1: CDROM (ioctl) error, command: Get configuration 46 00 00 00 00 00 00 00 20 00 Nov 26 12:20:16 mutt kernel: sr: Sense Key : No Sense [current] Nov 26 12:20:16 mutt kernel: sr: Add. Sense: No additional sense information Nov 26 12:20:17 mutt kernel: sr1: CDROM (ioctl) error, command: Get configuration 46 00 00 00 00 00 00 00 20 00 Nov 26 12:20:17 mutt kernel: sr: Sense Key : No Sense [current] Nov 26 12:20:17 mutt kernel: sr: Add. Sense: No additional sense information Nov 26 12:20:17 mutt kernel: sr1: CDROM (ioctl) error, command: Get configuration 46 00 00 28 00 00 00 00 10 00 Nov 26 12:20:17 mutt kernel: sr: Sense Key : No Sense [current] Nov 26 12:20:17 mutt kernel: sr: Add. Sense: No additional sense information Nov 26 12:20:17 mutt kernel: sr1: CDROM (ioctl) error, command: Get configuration 46 00 00 20 00 00 00 00 18 00 Nov 26 12:20:17 mutt kernel: sr: Sense Key : No Sense [current] Nov 26 12:20:17 mutt kernel: sr: Add. Sense: No additional sense information Nov 26 12:20:17 mutt kernel: sr1: CDROM (ioctl) error, command: Get configuration 46 00 00 00 00 00 00 00 20 00 Nov 26 12:20:17 mutt kernel: sr: Sense Key : No Sense [current] Nov 26 12:20:17 mutt kernel: sr: Add. Sense: No additional sense information Nov 26 12:20:17 mutt gnome-keyring-daemon[2986]: adding removable location: volume_label_Novatel_Mobilink at /media/Novatel Mobilink Nov 26 12:20:17 mutt hald: mounted /dev/sr1 on behalf of uid 500 Nov 26 12:23:23 mutt ntpd[2242]: kernel time sync status change 4001 Nov 26 12:26:53 mutt kernel: usb 7-2: USB disconnect, address 2 Nov 26 12:26:53 mutt hald[2073]: forcibly attempting to lazy unmount /dev/sr1 as enclosing drive was disconnected Nov 26 12:26:53 mutt kernel: scsi 6:0:0:0: rejecting I/O to dead device Nov 26 12:26:53 mutt gnome-keyring-daemon[2986]: removing removable location: volume_label_Novatel_Mobilink Nov 26 12:26:53 mutt hald: unmounted /dev/sr1 from '/media/Novatel Mobilink' on behalf of uid 0 Nov 26 12:26:54 mutt kernel: usb 7-2: new full speed USB device using uhci_hcd and address 3 Nov 26 12:26:55 mutt kernel: usb 7-2: configuration #1 chosen from 1 choice Nov 26 12:26:55 mutt kernel: scsi7 : SCSI emulation for USB Mass Storage devices Nov 26 12:26:55 mutt kernel: usb 7-2: New USB device found, idVendor=1410, idProduct=4100 Nov 26 12:26:55 mutt kernel: usb 7-2: New USB device strings: Mfr=1, Product=2, SerialNumber=4 Nov 26 12:26:55 mutt kernel: usb 7-2: Product: Novatel Wireless CDMA Nov 26 12:26:55 mutt kernel: usb 7-2: Manufacturer: Novatel Wireless Inc. Nov 26 12:26:55 mutt kernel: usb 7-2: SerialNumber: 091087439151000 Nov 26 12:26:55 mutt kernel: usbcore: registered new interface driver usbserial Nov 26 12:26:55 mutt kernel: usbserial: USB Serial support registered for generic Nov 26 12:26:55 mutt kernel: usbcore: registered new interface driver usbserial_generic Nov 26 12:26:55 mutt kernel: usbserial: USB Serial Driver core Nov 26 12:26:55 mutt kernel: usbserial: USB Serial support registered for GSM modem (1-port) Nov 26 12:26:55 mutt kernel: option 7-2:1.0: GSM modem (1-port) converter detected Nov 26 12:26:55 mutt kernel: usb 7-2: GSM modem (1-port) converter now attached to ttyUSB0 Nov 26 12:26:55 mutt kernel: option 7-2:1.1: GSM modem (1-port) converter detected Nov 26 12:26:55 mutt kernel: usb 7-2: GSM modem (1-port) converter now attached to ttyUSB1 Nov 26 12:26:55 mutt kernel: option 7-2:1.2: GSM modem (1-port) converter detected Nov 26 12:26:55 mutt kernel: usb 7-2: GSM modem (1-port) converter now attached to ttyUSB2 Nov 26 12:26:55 mutt kernel: option 7-2:1.3: GSM modem (1-port) converter detected Nov 26 12:26:55 mutt kernel: usb 7-2: GSM modem (1-port) converter now attached to ttyUSB3 Nov 26 12:26:55 mutt kernel: usbcore: registered new interface driver option Nov 26 12:26:55 mutt kernel: option: USB Driver for GSM modems: v0.7.2 Nov 26 12:27:00 mutt kernel: scsi 7:0:0:0: Direct-Access Novatel MMC Storage 2.31 PQ: 0 ANSI: 2 Nov 26 12:27:00 mutt kernel: sd 7:0:0:0: [sdb] Attached SCSI removable disk Nov 26 12:27:00 mutt kernel: sd 7:0:0:0: Attached scsi generic sg2 type 0 Nov 26 12:29:54 mutt kernel: usb 7-2: USB disconnect, address 3 Nov 26 12:29:54 mutt kernel: option1 ttyUSB0: GSM modem (1-port) converter now disconnected from ttyUSB0 Nov 26 12:29:54 mutt kernel: option 7-2:1.0: device disconnected Nov 26 12:29:54 mutt kernel: option1 ttyUSB1: GSM modem (1-port) converter now disconnected from ttyUSB1 Nov 26 12:29:54 mutt kernel: option 7-2:1.1: device disconnected Nov 26 12:29:54 mutt kernel: option1 ttyUSB2: GSM modem (1-port) converter now disconnected from ttyUSB2 Nov 26 12:29:54 mutt kernel: option 7-2:1.2: device disconnected Nov 26 12:29:54 mutt kernel: option1 ttyUSB3: GSM modem (1-port) converter now disconnected from ttyUSB3 Nov 26 12:29:54 mutt kernel: option 7-2:1.3: device disconnected
As you can see, it took six minutes before the device somehow reset itself and the machine realized that it had a modem attached.
What's going on here?
On Wed, 26 Nov 2008 13:08:36 -0600 Frank Cox wrote:
As you can see, it took six minutes before the device somehow reset itself and the machine realized that it had a modem attached.
I have now discovered what changes when the five minute delay is up. As mentioned before, the modem takes 5 minutes before it creates the /tty/USB? devices.
Somehow, the modem changes its identity after being plugged in for 5 minutes.
When the modem is first plugged in, this is what is created in /proc/bus/usb/devices:
T: Bus=04 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 3 Spd=12 MxCh= 0 D: Ver= 1.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1 P: Vendor=1410 ProdID=5010 Rev= 0.00 S: Manufacturer=Novatel Wireless Inc. S: Product=Novatel Wireless CDMA S: SerialNumber=091087439150000 C:* #Ifs= 1 Cfg#= 1 Atr=a0 MxPwr=500mA I:* If#= 0 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=usb-storage E: Ad=87(I) Atr=02(Bulk) MxPS= 64 Ivl=0ms E: Ad=08(O) Atr=02(Bulk) MxPS= 64 Ivl=0ms
After five minutes, this is what I find in /proc/bus/usb/devices:
T: Bus=04 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 4 Spd=12 MxCh= 0 D: Ver= 1.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1 P: Vendor=1410 ProdID=4100 Rev= 0.00 S: Manufacturer=Novatel Wireless Inc. S: Product=Novatel Wireless CDMA S: SerialNumber=091087439151000 C:* #Ifs= 5 Cfg#= 1 Atr=a0 MxPwr=500mA I:* If#= 0 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=option E: Ad=81(I) Atr=03(Int.) MxPS= 16 Ivl=128ms E: Ad=82(I) Atr=02(Bulk) MxPS= 64 Ivl=0ms E: Ad=02(O) Atr=02(Bulk) MxPS= 64 Ivl=0ms I:* If#= 1 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option E: Ad=84(I) Atr=02(Bulk) MxPS= 64 Ivl=0ms E: Ad=04(O) Atr=02(Bulk) MxPS= 64 Ivl=0ms I:* If#= 2 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option E: Ad=89(I) Atr=02(Bulk) MxPS= 64 Ivl=0ms E: Ad=09(O) Atr=02(Bulk) MxPS= 64 Ivl=0ms I:* If#= 3 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option E: Ad=8a(I) Atr=02(Bulk) MxPS= 64 Ivl=0ms E: Ad=0a(O) Atr=02(Bulk) MxPS= 64 Ivl=0ms I:* If#= 4 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=usb-storage E: Ad=85(I) Atr=02(Bulk) MxPS= 64 Ivl=0ms E: Ad=06(O) Atr=02(Bulk) MxPS= 64 Ivl=0ms
Notice that the product id has magically changed from 5010 to 4100. This is the point at which the modem begins working and the /tty/USB? devices are created.
I put this same modem on a machine running Centos 5 and found the exact same behaviour, though I have to use a modprobe command to make it recognize the modem on Centos 5 (modprobe usbserial vendor=0x1410 product=0x4100) and the modprobe is not required to make it recognize the modem on Fedora 10. The product id changes in the same way in /proc/bus/usb/devices, after the same five minute wait.
https://bugzilla.redhat.com/show_bug.cgi?id=473166
On Wed, 2008-12-03 at 01:34 -0600, Frank Cox wrote:
Somehow, the modem changes its identity after being plugged in for 5 minutes.
Is that a delay while the WAN side of the modem syncs up with the ISP?
e.g. With ADSL, it can take a few minutes for some modems to connect up.
On Wed, 03 Dec 2008 20:47:37 +1030 Tim wrote:
On Wed, 2008-12-03 at 01:34 -0600, Frank Cox wrote:
Somehow, the modem changes its identity after being plugged in for 5 minutes.
Is that a delay while the WAN side of the modem syncs up with the ISP?
e.g. With ADSL, it can take a few minutes for some modems to connect up.
Good thought, but no. It's not syncing up with anything external. In order to get it online you have to dial out, just like with an old-fashioned telephone modem (Hayes and US Robotics and the like). This is long before we get to that point because we can't even find the modem until it changes its identity and sets up the /dev/ttyUSB0 device.
Frank Cox wrote:
On Wed, 03 Dec 2008 20:47:37 +1030 Tim wrote:
On Wed, 2008-12-03 at 01:34 -0600, Frank Cox wrote:
Somehow, the modem changes its identity after being plugged in for 5 minutes.
Is that a delay while the WAN side of the modem syncs up with the ISP?
e.g. With ADSL, it can take a few minutes for some modems to connect up.
Good thought, but no. It's not syncing up with anything external. In order to get it online you have to dial out, just like with an old-fashioned telephone modem (Hayes and US Robotics and the like). This is long before we get to that point because we can't even find the modem until it changes its identity and sets up the /dev/ttyUSB0 device.
Dumb question - are you using the USB Y cable? If so, try plugging in the power-only plug first, then the data/power plug. If you are not using the USB Y cable, see if using it helps.
Mikkel
On Sun, 07 Dec 2008 10:48:22 -0600 Mikkel L. Ellertson wrote:
Dumb question - are you using the USB Y cable? If so, try plugging in the power-only plug first, then the data/power plug. If you are not using the USB Y cable, see if using it helps.
USB Y cable? Power plug?
I'm lost. This modem has no external power connector. It plugs directly into the onboard USB port that's built into the motherboard in the computer.
It looks like these:
http://www.novatelwireless.com/index.php?option=com_content&view=categor...
I've tried this on different computers with both Centos and Fedora and always see the same five minute delay.
On Wed, 3 Dec 2008 01:34:56 -0600 Frank Cox wrote:
As you can see, it took six minutes before the device somehow reset itself and the machine realized that it had a modem attached.
I have now discovered what changes when the five minute delay is up. As mentioned before, the modem takes 5 minutes before it creates the /tty/USB? devices.
Somehow, the modem changes its identity after being plugged in for 5 minutes.
Jamie Bernstein is also using a Novatel EVDO modem and he sent me a work-around for this bug yesterday:
This command will cause the modem to immediately do its thing (reset?) and create the /dev/ttyUSB? devices.
eject /dev/cdrom
After entering this command at a terminal prompt (or putting it into /etc/rc.local if the modem is connected on boot-up) the modem immediately starts working. No 5 minute wait required.
Therefore, if there is some way that the kernel driver for this modem can issue a similar "reset" command, the problem may go away.
I have added a note about this to the bug report at:
https://bugzilla.redhat.com/show_bug.cgi?id=473166
Frank Cox wrote:
On Wed, 3 Dec 2008 01:34:56 -0600 Frank Cox wrote:
As you can see, it took six minutes before the device somehow reset itself and the machine realized that it had a modem attached.
I have now discovered what changes when the five minute delay is up. As mentioned before, the modem takes 5 minutes before it creates the /tty/USB? devices.
Somehow, the modem changes its identity after being plugged in for 5 minutes.
Jamie Bernstein is also using a Novatel EVDO modem and he sent me a work-around for this bug yesterday:
This command will cause the modem to immediately do its thing (reset?) and create the /dev/ttyUSB? devices.
eject /dev/cdrom
After entering this command at a terminal prompt (or putting it into /etc/rc.local if the modem is connected on boot-up) the modem immediately starts working. No 5 minute wait required.
Therefore, if there is some way that the kernel driver for this modem can issue a similar "reset" command, the problem may go away.
I have added a note about this to the bug report at:
I am glad to hear you have it working.
Maybe a HAL rule to eject the SCSI device the Novatel as soon as it is detected? Or a udev rule that does the same thing? Just as a temporary fix? If I remember right, it has different device IDs in drive and modem modes.
Mikkel
On Sat, 20 Dec 2008 11:33:19 -0600 Mikkel L. Ellertson wrote:
I am glad to hear you have it working.
I'm very pleased about that, myself.
Maybe a HAL rule to eject the SCSI device the Novatel as soon as it is detected? Or a udev rule that does the same thing? Just as a temporary fix? If I remember right, it has different device IDs in drive and modem modes.
That sounds like a great idea, but I haven't a clue how to go about writing that. I did put the eject command into /etc/rc.local so it will work right away if the modem is attached when the machine boots, but of course that does nothing for me if it's attached afterward.
Frank Cox wrote:
On Sat, 20 Dec 2008 11:33:19 -0600 Mikkel L. Ellertson wrote:
I am glad to hear you have it working.
I'm very pleased about that, myself.
Maybe a HAL rule to eject the SCSI device the Novatel as soon as it is detected? Or a udev rule that does the same thing? Just as a temporary fix? If I remember right, it has different device IDs in drive and modem modes.
That sounds like a great idea, but I haven't a clue how to go about writing that. I did put the eject command into /etc/rc.local so it will work right away if the modem is attached when the machine boots, but of course that does nothing for me if it's attached afterward.
Well, I am not too good with HAL rules yet, but you could try a udev rule something like this:
ACTION=="add", ATTR{idVendor}=="1410", ATTR{idProduct}=="5010", run="/usr/sbin/eject $DEVPATH", OPTIONS="last_rule"
The rule may need some tweaking - I can not remember is $DEVPATH includes the device name, or only the path...
Mikkel
On Sat, 20 Dec 2008 15:50:36 -0600 Mikkel L. Ellertson wrote:
Well, I am not too good with HAL rules yet, but you could try a udev rule something like this:
ACTION=="add", ATTR{idVendor}=="1410", ATTR{idProduct}=="5010", run="/usr/sbin/eject $DEVPATH", OPTIONS="last_rule"
The rule may need some tweaking - I can not remember is $DEVPATH includes the device name, or only the path...
I will save this and try it the next time I have that modem in my possession.