GSM modem and USB serial port issue with UDEV
Posted: Thu Apr 21, 2016 9:22 am
Been struggling with this for 2 days and cant seem to get around it. I have 2 devices 1) Dlink DWM-157 3g modem and 2) Trendnet TU-S9 usb to serial. The dlink modem came with a udev script which works fine when the usb-to-serial is NOT plugged in from boot. So if the modem is on its own from boot, it works and is assigned /dev/ttyUSB0-3 (3 devices) if you plug in the usb-to-serial after boot then its assigned /dev/ttyUSB4 and everything works fine. The minute you reboot with them both plugged in the modem does not come up and the usb-to-serial then takes /dev/ttyUSB0.
I have had a look at the udev script and i cant see whats wrong. I have tried all forms of variants including trying to get this script to run first before the usb-to-serial, blacklisting the usb-serial, renaming the ports etc. I even thought it maybe a power issue and tried a external powered hub.
Here is the UDEV script that came with the modem.
Its really strange how this is acting. Both devices hate each other 
Any pointers would be hugely appreciated
thanks
I have had a look at the udev script and i cant see whats wrong. I have tried all forms of variants including trying to get this script to run first before the usb-to-serial, blacklisting the usb-serial, renaming the ports etc. I even thought it maybe a power issue and tried a external powered hub.
Here is the UDEV script that came with the modem.
Code: Select all
ACTION!="add", GOTO="end"
ATTRS{idVendor}=="2001",ATTRS{idProduct}=="7600",GOTO="begin"
GOTO="end"
LABEL="begin"
KERNEL=="sr*", GOTO="switch"
SUBSYSTEM=="usb",GOTO="modprobe"
KERNEL=="ttyUSB*", SUBSYSTEMS=="usb",ATTRS{bInterfaceProtocol}=="00",GOTO="symlink"
GOTO="end"
LABEL="switch"
ATTRS{bNumInterfaces}==" 1",RUN+="/usr/sbin/usb_modeswitch -V 0x2001 -P 0x7600 -v 0x2001 -p 0x7600 -u 2"
GOTO="end"
LABEL="modprobe"
ATTRS{bNumInterfaces}!=" 1", RUN+="/sbin/modprobe usbserial vendor=0x2001 product=0x7600"
GOTO="end"
LABEL="symlink"
ATTRS{bInterfaceNumber}=="00", SYMLINK:="ttyUSB_sprd_extension"
ATTRS{bInterfaceNumber}=="01", SYMLINK:="ttyUSB_sprd_modem"
ATTRS{bInterfaceNumber}=="02", SYMLINK:="ttyUSB_sprd_control"
ATTRS{bInterfaceNumber}=="04", SYMLINK:="ttyUSB_sprd_service"
GOTO="end"
LABEL="end"Any pointers would be hugely appreciated
thanks