Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I installed Kannel in a server, and I want to use a GSM 3G USB modem to send/receive SMS messages, as described in section SMS Centers > GSM Modem of the Kannel User Guide.

I have already installed, configured and tested Kannel on my notebook successfully.

When I plug the modem into my notebook, a device named /dev/ttyUSB0 appears. It acts as a serial port to send commands to the modem.

I have to put this device in the Kannel configuration file.

After some testing, I decided to install Kannel in the production server. The server runs Linux-VServer, and my task is to install Kannel on the host and PlaySMS in one of the guests, which runs Apache.

The problem is that I can't find any device analogous to the ttyUSB0 that is created in my machine (and AFAIK, in all normal Linux boxes).

Here are some diagnostic commands. The modems used are not the same model, but I have already tested Sierra 308 on my notebook and it works, too.

My notebook - Arch Linux

uname -a:

Linux twoflower 3.4.9-1-ARCH #1 SMP PREEMPT Wed Aug 15 18:11:01 UTC 2012 i686 GNU/Linux

dmesg when I plug the modem in (Huawei 156B):

[35328.849886] usb 1-2: new high-speed USB device number 12 using ehci_hcd
[35329.007281] scsi9 : usb-storage 1-2:1.2
[35329.010054] scsi10 : usb-storage 1-2:1.3
[35329.301153] usbcore: registered new interface driver usbserial
[35329.302155] usbcore: registered new interface driver usbserial_generic
[35329.303064] USB Serial support registered for generic
[35329.303221] usbserial: USB Serial Driver core
[35329.368043] usbcore: registered new interface driver option
[35329.368960] USB Serial support registered for GSM modem (1-port)
[35329.369332] option 1-2:1.0: GSM modem (1-port) converter detected
[35329.377484] usb 1-2: GSM modem (1-port) converter now attached to ttyUSB0
[35329.377567] option 1-2:1.1: GSM modem (1-port) converter detected
[35329.378930] usb 1-2: GSM modem (1-port) converter now attached to ttyUSB1
[35330.013635] scsi 9:0:0:0: CD-ROM            HUAWEI   Mass Storage     2.31
PQ: 0 ANSI: 2
[35330.019275] scsi 10:0:0:0: Direct-Access     HUAWEI   MMC Storage      2.31
PQ: 0 ANSI: 2
[35330.028997] sd 10:0:0:0: [sdb] Attached SCSI removable disk
[35330.214473] sr0: scsi-1 drive
[35330.214484] cdrom: Uniform CD-ROM driver Revision: 3.20
[35330.216603] sr 9:0:0:0: Attached scsi CD-ROM sr0

Server - Debian Lenny

uname -a:

Linux macunaima 2.6.26-1-vserver-amd64 #1 SMP Fri Mar 13 20:19:13 UTC 2009 x86_64 GNU/Linux

dmesg when I plug the modem in (Sierra 308):

  [    3.246112] usb 8-4: new high speed USB device using ehci_hcd and address 2
  [    3.381966] usb 8-4: config 1 has an invalid interface number: 9 but
  max is 5
  [    3.382076] usb 8-4: config 1 has an invalid interface number: 7 but
  max is 5
  [    3.382184] usb 8-4: config 1 has no interface number 2
  [    3.382285] usb 8-4: config 1 has no interface number 5
  [    3.384576] usb 8-4: configuration #1 chosen from 1 choice
  [    3.389070] usb 8-4: New USB device found, idVendor=0f3d,
  idProduct=68a3
  [    3.389070] usb 8-4: New USB device strings: Mfr=3, Product=2,
  SerialNumber=4
  [    3.389070] usb 8-4: Product: USB 308
  [    3.389070] usb 8-4: Manufacturer: Sierra Wireless, Incorporated
  [    3.389070] usb 8-4: SerialNumber: 353354045586405

lsusb:

Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 008 Device 002: ID 0f3d:68a3 Airprime, Incorporated
Bus 008 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub

Previous questions

The only previous question with a similar problem that I found here was How do I access a USB serial port without an entry in /dev?.

In his case, dmesg said that ttyUSB0 was created, which does not occur in my case.

Anyway, I have tried the solution posted there, using mknod to create devices manually:

for i in 0 1 2 3 4 5 6 7 8 9; do
    sudo mknod /dev/ttyUSB$i c 188 $i
done

I created all these devices because lsusb says that the device is plugged in Bus 008 Device 002.

It did not work. I tested it with picocom, and this it says (to all these devices, not only ttyUSB0):

$ picocom -
FATAL: cannot open /dev/ttyUSB0: No such device or address

While in my notebook, picocom works fine:

$ picocom -b 9600 /dev/ttyUSB0
Terminal ready
AT                      # my input
OK
share|improve this question
    
This error looks strange, can you try a newer kernel in your server? –  Renan Sep 19 '12 at 19:07

3 Answers 3

I'm with @Renan: it looks like this problem was fixed in newer kernels. (One such thread on LKML.)

The key error is the invalid interface number one. It means the USB driver sees the device, but it's numbering its features (interfaces) in a way the driver doesn't expect, and it can't cope. Googling around, you can find several cases where people are fixing weaknesses in the kernel to cope with these newer devices, and their odd interface numbering behavior.

I'm not 100% certain on this, since I can't find a definitive document that says either that out-of-order interface numbers are wrong, or that it's all been fixed for all USB devices in kernel x.y.z. It appears to be more of a Whac-a-Mole sort of development effort.

Upgrading the kernel on a server is not an easy fix by any means. I would try an intermediate step to check the hypothesis first: put your server's version of Debian in to a VM, make a snapshot, upgrade the kernel there, and see if it will see the USB device after the upgrade. (Obviously you need to be using VM software that will push a USB device into the VM. Most will these days.)

If that doesn't work, you can easily roll back to the snapshot, since this VM should be useful for future testing before you roll something out to the prodouction server.

share|improve this answer

From the information you have given i think the system doesn't have the configuration file of that usb device get the correct conf and add it in /etc/usb_modeswitch.d and activate it then it will be detected as usb device

Refer to this article

http://importgeek.wordpress.com/2012/08/14/how-to-connect-reliance-netconnect-huawei-ec156-in-ubuntu/

share|improve this answer

I have encountered the same problem as you. Try to install the gsm-utils package.

apt-get install gsm-utils

Hope it helps. One year later but it might help others.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.