Summary: | sys-apps/usb_modeswitch-2.2.3_p20150627: Huawei E3131s-2 needs to be plugged-in twice to provide /dev/ttyUSB* | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Martin Mokrejš <mmokrejs> |
Component: | [OLD] Core system | Assignee: | Rafael Martins (RETIRED) <rafaelmartins> |
Status: | RESOLVED WORKSFORME | ||
Severity: | normal | CC: | alex_y_xu, freedesktop-bugs |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: | Huawei_E3131s-2 as detected during coldboot |
Description
Martin Mokrejš
2015-09-13 18:58:16 UTC
Seems like more of a hardware/kernel problem than a udev problem. Updating summary. some devices present USB "mass storage" so windows users can install drivers. if anything this is a kernel "bug". what sources are you using? (In reply to Alex Xu (Hello71) from comment #2) > some devices present USB "mass storage" so windows users can install drivers. I showed usb_modeswitch kicks in on the second plugin at least. My former USB dongle workes fine. I believe this is more udev or usb_modeswitch issue. > > if anything this is a kernel "bug". what sources are you using? I wrote above: vanilla kernel 4.1.6 Can you try with 2.2.5 version? (In reply to Pacho Ramos from comment #4) > Can you try with 2.2.5 version? Sorry, no change. [ 41.144723] usb 1-1.1: new high-speed USB device number 4 using xhci_hcd [ 41.250324] usb 1-1.1: New USB device found, idVendor=12d1, idProduct=15ca [ 41.250337] usb 1-1.1: New USB device strings: Mfr=1, Product=2, SerialNumber=3 [ 41.250343] usb 1-1.1: Product: HUAWEI Mobile [ 41.250349] usb 1-1.1: Manufacturer: HUAWEI [ 41.250354] usb 1-1.1: SerialNumber: FFFFFFFFFFFFFFFF [ 41.296774] usb-storage 1-1.1:1.0: USB Mass Storage device detected [ 41.297187] scsi host7: usb-storage 1-1.1:1.0 [ 42.310844] scsi 7:0:0:0: CD-ROM HUAWEI Mass Storage 2.31 PQ: 0 ANSI: 2 [ 42.313676] sr 7:0:0:0: [sr1] scsi-1 drive [ 42.314354] sr 7:0:0:0: Attached scsi CD-ROM sr1 [ 42.314608] sr 7:0:0:0: Attached scsi generic sg3 type 5 [ 42.317279] scsi 7:0:0:1: Direct-Access HUAWEI TF CARD Storage 2.31 PQ: 0 ANSI: 2 [ 42.317896] sd 7:0:0:1: Attached scsi generic sg4 type 0 [ 42.322195] sd 7:0:0:1: [sdc] Attached SCSI removable disk [ 63.061668] systemd-udevd[3843]: inotify_add_watch(9, /dev/sdc, 10) failed: No such file or directory [ 63.065476] systemd-udevd[3837]: inotify_add_watch(9, /dev/sdc, 10) failed: No such file or directory [USB DONGLE UNPLUG] [ 118.314414] usb 1-1.1: USB disconnect, device number 4 [USB DONGLE PLUG-IN] [ 128.032461] usb 1-1.1: new high-speed USB device number 5 using xhci_hcd [ 128.137799] usb 1-1.1: New USB device found, idVendor=12d1, idProduct=15ca [ 128.137813] usb 1-1.1: New USB device strings: Mfr=1, Product=2, SerialNumber=3 [ 128.137819] usb 1-1.1: Product: HUAWEI Mobile [ 128.137825] usb 1-1.1: Manufacturer: HUAWEI [ 128.137830] usb 1-1.1: SerialNumber: FFFFFFFFFFFFFFFF [ 128.183970] usb-storage 1-1.1:1.0: USB Mass Storage device detected [ 128.184145] scsi host8: usb-storage 1-1.1:1.0 [ 128.823685] usb 1-1.1: USB disconnect, device number 5 [ 129.824712] usb 1-1.1: new high-speed USB device number 6 using xhci_hcd [ 129.929938] usb 1-1.1: New USB device found, idVendor=12d1, idProduct=1506 [ 129.929951] usb 1-1.1: New USB device strings: Mfr=1, Product=2, SerialNumber=0 [ 129.929957] usb 1-1.1: Product: HUAWEI Mobile [ 129.929962] usb 1-1.1: Manufacturer: HUAWEI [ 130.339062] huawei_cdc_ncm 1-1.1:1.1: MAC-Address: 82:a9:4a:09:84:2e [ 130.361976] huawei_cdc_ncm 1-1.1:1.1: cdc-wdm0: USB WDM device [ 130.362830] huawei_cdc_ncm 1-1.1:1.1 wwan0: register 'huawei_cdc_ncm' at usb-0000:0b:00.0-1.1, Huawei CDC NCM device, 82:a9:4a:09:84:2e [ 130.364203] usb-storage 1-1.1:1.4: USB Mass Storage device detected [ 130.364440] scsi host9: usb-storage 1-1.1:1.4 [ 130.364982] usb-storage 1-1.1:1.5: USB Mass Storage device detected [ 130.365652] scsi host10: usb-storage 1-1.1:1.5 [ 131.372386] scsi 10:0:0:0: Direct-Access HUAWEI TF CARD Storage 2.31 PQ: 0 ANSI: 2 [ 131.373073] scsi 9:0:0:0: CD-ROM HUAWEI Mass Storage 2.31 PQ: 0 ANSI: 2 [ 131.373469] sd 10:0:0:0: Attached scsi generic sg3 type 0 [ 131.375269] sr 9:0:0:0: [sr1] scsi-1 drive [ 131.376059] sr 9:0:0:0: Attached scsi CD-ROM sr1 [ 131.376374] sr 9:0:0:0: Attached scsi generic sg4 type 5 [ 131.377048] sd 10:0:0:0: [sdc] Attached SCSI removable disk [ 132.531748] huawei_cdc_ncm 1-1.1:1.1 wwp11s0u1u1i1: renamed from wwan0 [ 132.563563] sr 9:0:0:0: [sr1] FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE [ 132.563567] sr 9:0:0:0: [sr1] Sense Key : Medium Error [current] [ 132.563569] sr 9:0:0:0: [sr1] Add. Sense: Unrecovered read error [ 132.563572] sr 9:0:0:0: [sr1] CDB: Read(10) 28 00 00 00 ff fe 00 00 02 00 [ 132.563587] blk_update_request: critical medium error, dev sr1, sector 262136 [ 132.570418] sr 9:0:0:0: [sr1] FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE [ 132.570421] sr 9:0:0:0: [sr1] Sense Key : Medium Error [current] [ 132.570423] sr 9:0:0:0: [sr1] Add. Sense: Unrecovered read error [ 132.570425] sr 9:0:0:0: [sr1] CDB: Read(10) 28 00 00 00 ff fe 00 00 02 00 [ 132.570426] blk_update_request: critical medium error, dev sr1, sector 262136 [ 132.570445] Buffer I/O error on dev sr1, logical block 32767, async page read [ 132.582415] systemd-udevd[4094]: Process 'net.sh wwan0 start' failed with exit code 1. [ 132.605627] usbcore: registered new interface driver option [ 132.606035] usbserial: USB Serial support registered for GSM modem (1-port) [ 132.606155] option 1-1.1:1.0: GSM modem (1-port) converter detected [ 132.606852] usb 1-1.1: GSM modem (1-port) converter now attached to ttyUSB0 [ 132.606983] option 1-1.1:1.2: GSM modem (1-port) converter detected [ 132.607272] usb 1-1.1: GSM modem (1-port) converter now attached to ttyUSB1 [ 132.607312] option 1-1.1:1.3: GSM modem (1-port) converter detected [ 132.607580] usb 1-1.1: GSM modem (1-port) converter now attached to ttyUSB2 [ 132.622464] sr 9:0:0:0: [sr1] FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE [ 132.622470] sr 9:0:0:0: [sr1] Sense Key : Medium Error [current] [ 132.622472] sr 9:0:0:0: [sr1] Add. Sense: Unrecovered read error [ 132.622474] sr 9:0:0:0: [sr1] CDB: Read(10) 28 00 00 00 ff fc 00 00 02 00 [ 132.622477] blk_update_request: critical medium error, dev sr1, sector 262128 [ 132.631228] sr 9:0:0:0: [sr1] FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE [ 132.631232] sr 9:0:0:0: [sr1] Sense Key : Medium Error [current] [ 132.631234] sr 9:0:0:0: [sr1] Add. Sense: Unrecovered read error [ 132.631237] sr 9:0:0:0: [sr1] CDB: Read(10) 28 00 00 00 ff fc 00 00 02 00 [ 132.631240] blk_update_request: critical medium error, dev sr1, sector 262128 [ 132.631242] Buffer I/O error on dev sr1, logical block 32766, async page read # /etc/init.d/net.ppp0 start * Bringing up interface ppp0 * Starting pppd in ppp0 ... [ ok ] * Backgrounding ... # Created attachment 415234 [details]
Huawei_E3131s-2 as detected during coldboot
If I have the Huawei E3131s-2 USB dongle plugged into my laptop and startup linux-4.1.6 I can immediately start pppd because /dev/ttyUSB0 already exists.
I did a few more updates (mostly unrelated apps) but from inspecting emerge.log I bet one of these did help: sys-apps/dbus-1.8.16 -> sys-apps/dbus-1.8.20 sys-fs/udev-224-r2 -> sys-fs/udev-225 sys-apps/openrc-0.17 -> sys-apps/openrc-0.18.3 (In reply to Martin Mokrejš from comment #7) > I did a few more updates (mostly unrelated apps) but from inspecting > emerge.log I bet one of these did help: No, it happens still. I have now 4.3.0 kernel and these: [ebuild R ] net-dialup/ppp-2.4.7-r2:0/2.4.7::gentoo USE="dhcp gtk ipv6 pam -activefilter -atm -eap-tls -libressl -radius" 0 KiB [ebuild R ] dev-libs/libgudev-230::gentoo USE="-debug -introspection -static-libs" ABI_X86="32 (64) (-x32)" 0 KiB [ebuild R ] sys-apps/dbus-1.8.20::gentoo USE="X -debug -doc (-selinux) -static-libs -systemd {-test}" ABI_X86="32 (64) (-x32)" 0 KiB [ebuild U ] sys-fs/udev-228::gentoo [225::gentoo] USE="kmod static-libs -acl (-selinux)" ABI_X86="32 (64) (-x32)" 3940 KiB [ebuild R ] sys-fs/udev-init-scripts-30::gentoo 0 KiB [ebuild R ] sys-apps/usb_modeswitch-2.2.6::gentoo USE="-jimtcl" 0 KiB Let close this bug. Although it still happens it is probably a firmware issue of the dongle. When it is "not detected" I just execute # usb_modeswitch -J -v 0x12d1 -p 0x15ca Look for default devices ... product ID matched Found devices in default mode (1) Access device 005 on bus 002 Get the current device configuration ... Current configuration number is 1 Use interface number 0 Use endpoints 0x01 (out) and 0x81 (in) USB description data (for identification) ------------------------- Manufacturer: HUAWEI Product: HUAWEI Mobile Serial No.: FFFFFFFFFFFFFFFF ------------------------- Using standard Huawei switching message Looking for active driver ... No active driver found. Detached before or never attached Set up interface 0 Use endpoint 0x01 for message sending ... Trying to send message 1 to endpoint 0x01 ... OK, message successfully sent Read the response to message 1 (CSW) ... Response successfully read (13 bytes), status 0 Reset response endpoint 0x81 Reset message endpoint 0x01 -> Run lsusb to note any changes. Bye! # I after about 1 second I can do '/etc/init.d/net.ppp0 start' which uses the /dev/ttyUSB0 interface. Although usb_modeswitch should have been run automatically (and I think it does somehwere) maybe for some crappy devices it needs to be eventually re-executed. Probably some wrapper script could check better whether usb_modeswitch actually did any change and if not, call usb_modeswitch again after say 1-2 seconds. For completeness, currently I have: [ebuild R ] sys-apps/usb_modeswitch-2.4.0::gentoo USE="-jimtcl" 0 KiB thanks for feedback |