Hide Forgot
Description of problem: ZTE modem often disappears from the system after plugged. It happens because the following rule gets applied: /lib/udev/rules.d/61-option-modem-modeswitch.rules:ATTRS{idVendor}=="19d2", ATTRS{idProduct}=="2000", RUN+="modem-modeswitch -v 0x%s{idVendor} -p 0x%s{idProduct} -t option-zerocd" When the device is initially inserted, it appears as CD-ROM device. While for most modems modem-modeswitch switches them into serial devices, for this one the correct action is to ask the drive to eject the media; modem-modeswitch causes it to disappear completely. The rule for ejecting is already present: /lib/udev/rules.d/61-mobile-action.rules:ACTION=="add", ENV{ID_CDROM}=="1", ENV{ID_VENDOR_ID}=="19d2", ENV{ID_MODEL_ID}=="2000", RUN+="/usr/bin/eject %k" These two rules make up a race, where the device disappears if eject is not fast enough. Version-Release number of selected component (if applicable): udev-147-2.29.el6.i686 Additional information: The device before and after eject: Bus 001 Device 005: ID 19d2:2000 ONDA Communication S.p.A. ZTE MF627/MF628/MF628+/MF636+ HSDPA/HSUPA Bus 001 Device 004: ID 19d2:0031 ONDA Communication S.p.A. ZTE MF636
so where is the patch? a solution might be: remove the rule from /lib/udev/rules.d/61-option-modem-modeswitch.rules and extend the rule in /lib/udev/rules.d/61-mobile-action.rules: ACTION=="add", ENV{ID_CDROM}=="1", \ ENV{ID_VENDOR_ID}=="19d2", ENV{ID_MODEL_ID}=="2000", \ RUN+="/usr/bin/eject %k", \ RUN+="modem-modeswitch -v 0x%s{idVendor} -p 0x%s{idProduct} -t option-zerocd"
Well, sorry for not being clear enough about the fix and abusing [patch] keyword. The fix would be to remove the modeswitch rule completely; it is of no use; the device switches into serial mode right after the eject. (Also, this works well in Fedora, where usb_modeswitch is used)
Already fixed: $ fgrep 19d2 /lib/udev/rules.d/61-option-modem-modeswitch.rules $ rpm -q udev udev-147-2.40.el6.x86_64 http://rhn.redhat.com/errata/RHBA-2011-1649.html *** This bug has been marked as a duplicate of bug 632646 ***