1

I have a serial device that should be exposed as two serial ports: /dev/ttyACM0 and /dev/ttyACM1.

Currently I only get the first one despite the same unit under Windows exposes as the expected two serials. My dmesg reports this:

[ 2738.788150] usb 2-1.2: new full-speed USB device number 3 using ehci-pci
[ 2738.876575] usb 2-1.2: New USB device found, idVendor=152a, idProduct=8230
[ 2738.876584] usb 2-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[ 2738.876590] usb 2-1.2: Product: Septentrio USB Device
[ 2738.876594] usb 2-1.2: Manufacturer: Septentrio
[ 2738.941229] cdc_acm 2-1.2:1.0: ttyACM0: USB ACM device
[ 2738.942171] usbcore: registered new interface driver cdc_acm
[ 2738.942174] cdc_acm: USB Abstract Control Model driver for USB modems and ISDN 

While lsusb -vvv says this.

The relevant part from /sys/kernel/debug/usb/devices is this:

T:  Bus=01 Lev=02 Prnt=02 Port=02 Cnt=02 Dev#=  4 Spd=12   MxCh= 0
D:  Ver= 1.10 Cls=02(comm.) Sub=00 Prot=00 MxPS= 8 #Cfgs=  2
P:  Vendor=152a ProdID=8230 Rev= 1.10
S:  Manufacturer=Septentrio  
S:  Product=Septentrio USB Device
C:  #Ifs= 4 Cfg#= 2 Atr=c0 MxPwr=  2mA
I:  If#= 0 Alt= 0 #EPs= 0 Cls=02(comm.) Sub=02 Prot=ff Driver=
I:  If#= 1 Alt= 0 #EPs= 2 Cls=0a(data ) Sub=00 Prot=ff Driver=
E:  Ad=01(O) Atr=02(Bulk) MxPS=  64 Ivl=0ms
E:  Ad=82(I) Atr=02(Bulk) MxPS=  64 Ivl=0ms
I:  If#= 2 Alt= 0 #EPs= 0 Cls=02(comm.) Sub=02 Prot=ff Driver=
I:  If#= 3 Alt= 0 #EPs= 2 Cls=0a(data ) Sub=00 Prot=ff Driver=
E:  Ad=04(O) Atr=02(Bulk) MxPS=  64 Ivl=0ms
E:  Ad=85(I) Atr=02(Bulk) MxPS=  64 Ivl=0ms
C:* #Ifs= 2 Cfg#= 1 Atr=c0 MxPwr=  2mA
I:* If#= 0 Alt= 0 #EPs= 1 Cls=02(comm.) Sub=02 Prot=01 Driver=cdc_acm
E:  Ad=83(I) Atr=03(Int.) MxPS=  64 Ivl=1ms
I:* If#= 1 Alt= 0 #EPs= 2 Cls=0a(data ) Sub=00 Prot=00 Driver=cdc_acm
E:  Ad=01(O) Atr=02(Bulk) MxPS=  64 Ivl=0ms
E:  Ad=82(I) Atr=02(Bulk) MxPS=  64 Ivl=0ms

Here my device (a GPS modem) is Bus 001 Device 004: ID 152a:8230 Thesycon Systemsoftware & Consulting GmbH.

I thought that the cdc_acm module had some option to be used with modprobe/insmod, but it seems it's not easy to find anything about it.

How can I have both serial ports recognized/created/enabled under Ubuntu? TIA.

[UPDATE] I have also found another question tightly linked to mine. But have no idea on how to implement the suggested changes.

  • Please edit your question and add output of lsusb terminal command. – Pilot6 Sep 15 '15 at 10:49
  • Also please add output of sudo cat /sys/kernel/debug/usb/devices | awk '/8230/' RS= – Pilot6 Sep 15 '15 at 15:51
  • The device is mounted inside a crane and I need to book an hour in order to disconnect the unit from Windows controller and run that command from Linux. Maybe next week. Anyway, under Windows 7 I get those two serial ports (COM15 and COM16), under Linux just one (ttyACM0). – EnzoR Sep 15 '15 at 16:27
1

The solution requires you to load of a kernel module, namely drivers/usb/serial/option.ko and to ask udev to apply some changes as soon as the device gets recognized (switch to the second configuration and enable the serial driver for the specific device). So:

  1. Have the option.ko module loaded at boot
  2. Create a brand new udev rule like this very one:

    SUBSYSTEMS=="usb", ATTRS{product}=="Septentrio USB Device", ATTR{bConfigurationValue}="2", PROGRAM+="/bin/bash -c \"/bin/echo $VENDOR $PRODUCT > /sys/bus/usb-serial/drivers/option1/new_id\""
    
  • udev only. This of course won't work with other software. – EnzoR Oct 19 '15 at 6:46
  • Yeah, but it is still a partial solution for others, atleast they know that option.ko module should be loaded somehow. – user.dz Oct 19 '15 at 7:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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