Comment 30 for bug 875441

Revision history for this message
Dr. Amr Osman (dr3mro) wrote :

actually it's a workaround that using udev rules to execute a patch when connecting the modem
the patch delete /dev/ttyUSB2
and symlink /dev/ttyUSB3 to /dev/ttyUSB2

the dev rules
/etc/udev/rules.d/90-zte.rules

######################################################
ACTION!="add", GOTO="ZTE_End"

# Is this the ZeroCD device?
SUBSYSTEM=="block", ATTR{idProduct}=="2000",
ATTRS{idVendor}=="19d2", GOTO="ZTE_ZeroCD"

# Is this the actual modem?
SUBSYSTEM=="usb", ATTR{idProduct}=="0033",
ATTR{idVendor}=="19d2", GOTO="ZTE_Modem"

LABEL="ZTE_ZeroCD"
# This is the ZeroCD part of the card, remove
# the usb_storage kernel module so
# it does not get treated like a storage device
RUN+="/usr/bin/eject /media/ZTEMODEM"

LABEL="ZTE_Modem"
# This is the Modem part of the card, let's
# load usbserial with the correct vendor
# and product ID's so we get our usb serial devices
RUN+="/sbin/modprobe usbserial vendor=0x19d2 product=0x0033",
# Make users belonging to the dialout group
# able to use the usb serial devices.
MODE="666", GROUP="dialout"
RUN+="/usr/bin/fix-zte-mf190.sh"
LABEL="ZTE_End"

####################################################
 the patch

/usr/bin/fix-zte-mf190.sh
#####################################################
#!/bin/bash
sudo rm /dev/ttyUSB2
sudo ln -s /dev/ttyUSB3 /dev/ttyUSB2

#########################################################