usb_modeswitch@.service fails

Bug #1431179 reported by Damon Lynch
54
This bug affects 8 people
Affects Status Importance Assigned to Milestone
usb-modeswitch (Ubuntu)
Fix Released
High
Martin Pitt

Bug Description

I lack the technical knowledge to know if this is a bug in udev, systemd or another component.

After the switch to systemd, my 4G Huawei USB modem no longer functions as a modem unless I run usb_modeswitch to flip its state from USB mass storage. The command I issue and its output is below, which also show the Vendor and Product ID.

Strangely, it does not do this every time. Yesterday when I updated using apt-get dist-upgrade upon reboot the modem worked as expected. But from a cold boot this morning it did not.

$ sudo usb_modeswitch -v 0x12d1 -p 0x1f01 -J
[sudo] password for damon:
Look for default devices ...
   product ID matched
 Found devices in default mode (1)
Access device 003 on bus 003
Current configuration number is 1
Use interface number 0
Use endpoints 0x01 (out) and 0x81 (in)

USB description data (for identification)
-------------------------
Manufacturer: HUAWEI Technology
     Product: HUAWEI Mobile
  Serial No.: FFFFFFFFFFFFFFFF
-------------------------
Using standard Huawei switching message
Looking for active driver ...
 OK, driver detached
Set up interface 0
Use endpoint 0x01 for message sending ...
Trying to send message 1 to endpoint 0x01 ...
 OK, message successfully sent
Reset response endpoint 0x81
 Could not reset endpoint (probably harmless): -99
Reset message endpoint 0x01
 Could not reset endpoint (probably harmless): -99
 Device is gone, skip any further commands
-> Run lsusb to note any changes. Bye!

ProblemType: Bug
DistroRelease: Ubuntu 15.04
Package: udev 219-4ubuntu5
ProcVersionSignature: Ubuntu 3.19.0-8.8-generic 3.19.1
Uname: Linux 3.19.0-8-generic x86_64
NonfreeKernelModules: nvidia
ApportVersion: 2.16.2-0ubuntu2
Architecture: amd64
CurrentDesktop: Unity
CustomUdevRuleFiles: 60-ssd-scheduler.rules
Date: Thu Mar 12 11:37:06 2015
InstallationDate: Installed on 2015-02-05 (34 days ago)
InstallationMedia: Kubuntu 15.04 "Vivid Vervet" - Alpha amd64 (20150205)
MachineType: LENOVO 427637U
ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-3.19.0-8-generic root=UUID=eb18ef51-a2d0-4372-8eb9-ae009a05d4f6 ro quiet splash
SourcePackage: systemd
UpgradeStatus: No upgrade log present (probably fresh install)
dmi.bios.date: 07/26/2013
dmi.bios.vendor: LENOVO
dmi.bios.version: 8BET62WW (1.42 )
dmi.board.asset.tag: Not Available
dmi.board.name: 427637U
dmi.board.vendor: LENOVO
dmi.board.version: Not Available
dmi.chassis.asset.tag: No Asset Information
dmi.chassis.type: 10
dmi.chassis.vendor: LENOVO
dmi.chassis.version: Not Available
dmi.modalias: dmi:bvnLENOVO:bvr8BET62WW(1.42):bd07/26/2013:svnLENOVO:pn427637U:pvrThinkPadW520:rvnLENOVO:rn427637U:rvrNotAvailable:cvnLENOVO:ct10:cvrNotAvailable:
dmi.product.name: 427637U
dmi.product.version: ThinkPad W520
dmi.sys.vendor: LENOVO

Revision history for this message
Damon Lynch (dlynch3) wrote :
Revision history for this message
Martin Pitt (pitti) wrote :

You should have some unit usb_modeswitch@<something>.service in

  systemctl --all | grep usb_modeswitch

When you have a boot where it was *not* enabled automatically, can you please get me the output of

  systemctl status -l usb_modeswitch@<something>.service

?

Note keeping for myself: /lib/udev/rules.d/40-usb_modeswitch.rules matches on the device and calls /lib/udev/usb_modeswitch which should then run systemctl --no-block start usb_modeswitch@$1.service.

affects: systemd (Ubuntu) → usb-modeswitch (Ubuntu)
Changed in usb-modeswitch (Ubuntu):
status: New → Incomplete
Revision history for this message
Martin Pitt (pitti) wrote :

Also, when this happens please do

  udevadm info --export-db > /tmp/udev.txt

and attach /tmp/udev.txt here. The automatically attached on e from above is already from a situation where you manually started the modem. Thanks!

tags: added: systemd-boot
Revision history for this message
Damon Lynch (dlynch3) wrote :

$ systemctl status -l usb_modeswitch@-3-1.2:1.0.service
● usb_modeswitch@-3-1.2:1.0.service - USB_ModeSwitch
   Loaded: loaded (/lib/systemd/system/usb_modeswitch@.service; static; vendor preset: enabled)
   Active: failed (Result: exit-code) since Thu 2015-03-12 12:34:56 TJT; 1min 5s ago
  Process: 892 ExecStart=/usr/sbin/usb_modeswitch_dispatcher --switch-systemd %I (code=exited, status=1/FAILURE)
 Main PID: 892 (code=exited, status=1/FAILURE)

Mar 12 12:34:56 damon-W520 systemd[1]: Starting USB_ModeSwitch...
Mar 12 12:34:56 damon-W520 systemd[1]: usb_modeswitch@-3-1.2:1.0.service: main process exited, code=exited, status=1/FAILURE
Mar 12 12:34:56 damon-W520 systemd[1]: Failed to start USB_ModeSwitch.
Mar 12 12:34:56 damon-W520 systemd[1]: Unit usb_modeswitch@-3-1.2:1.0.service entered failed state.
Mar 12 12:34:56 damon-W520 systemd[1]: usb_modeswitch@-3-1.2:1.0.service failed.

Revision history for this message
Martin Pitt (pitti) wrote :

Thanks. The "-3-1.2:1.0" instance name looks fishy. Can you please check whether this enables the modem?

  sudo systemctl start usb_modeswitch@3-1.2:1.0.service

? I'm not entirely sure what usb-modeswitch expects here, but perhaps you can give me the output of "ls -l /var/lib/usb_modeswitch"? That should have some existing IDs.

summary: - USB 4G modem detected as USB mass storage
+ usb_modeswitch@.service fails sometimes
Revision history for this message
Martin Pitt (pitti) wrote : Re: usb_modeswitch@.service fails sometimes

@OdyX, do you know what's going on here? I'm afraid I'm not familiar with usb-modeswitch at all..

Revision history for this message
Damon Lynch (dlynch3) wrote :

@pitti command output as requested

Revision history for this message
Martin Pitt (pitti) wrote :

OK, it was a stab in the dark, thanks for trying. I'm afraid I need someone familiar with usb-modeswitch to explain how this is supposed to work..

Revision history for this message
Muelli (ubuntu-bugs-auftrags-killer) wrote :
Download full text (3.2 KiB)

FWIW: I have the same problem.

Running the usb_modeswitch_dispatcher results in the following:

/usr/sbin/usb_modeswitch_dispatcher --switch-systemd "%I"
*** buffer overflow detected ***: /usr/sbin/usb_modeswitch_dispatcher terminated
======= Backtrace: =========
/lib/x86_64-linux-gnu/libc.so.6(+0x7879f)[0x7fbac2f0c79f]
/lib/x86_64-linux-gnu/libc.so.6(__fortify_fail+0x5c)[0x7fbac2fa02fc]
/lib/x86_64-linux-gnu/libc.so.6(+0x10a350)[0x7fbac2f9e350]
/lib/x86_64-linux-gnu/libc.so.6(__stpncpy_chk+0x0)[0x7fbac2f9d7b0]
/usr/sbin/usb_modeswitch_dispatcher[0x401af5]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf5)[0x7fbac2eb5ec5]
/usr/sbin/usb_modeswitch_dispatcher[0x40310b]
======= Memory map: ========
00400000-0040a000 r-xp 00000000 fc:01 1058264 /usr/sbin/usb_modeswitch_dispatcher
00609000-0060a000 r--p 00009000 fc:01 1058264 /usr/sbin/usb_modeswitch_dispatcher
0060a000-0060b000 rw-p 0000a000 fc:01 1058264 /usr/sbin/usb_modeswitch_dispatcher
01278000-01299000 rw-p 00000000 00:00 0 [heap]
7fbac2c7e000-7fbac2c94000 r-xp 00000000 fc:01 11796495 /lib/x86_64-linux-gnu/libgcc_s.so.1
7fbac2c94000-7fbac2e93000 ---p 00016000 fc:01 11796495 /lib/x86_64-linux-gnu/libgcc_s.so.1
7fbac2e93000-7fbac2e94000 rw-p 00015000 fc:01 11796495 /lib/x86_64-linux-gnu/libgcc_s.so.1
7fbac2e94000-7fbac304e000 r-xp 00000000 fc:01 11800995 /lib/x86_64-linux-gnu/libc-2.19.so
7fbac304e000-7fbac324e000 ---p 001ba000 fc:01 11800995 /lib/x86_64-linux-gnu/libc-2.19.so
7fbac324e000-7fbac3252000 r--p 001ba000 fc:01 11800995 /lib/x86_64-linux-gnu/libc-2.19.so
7fbac3252000-7fbac3254000 rw-p 001be000 fc:01 11800995 /lib/x86_64-linux-gnu/libc-2.19.so
7fbac3254000-7fbac3259000 rw-p 00000000 00:00 0
7fbac3259000-7fbac3266000 r-xp 00000000 fc:01 1057734 /usr/lib/x86_64-linux-gnu/libpipeline.so.1.4.0
7fbac3266000-7fbac3465000 ---p 0000d000 fc:01 1057734 /usr/lib/x86_64-linux-gnu/libpipeline.so.1.4.0
7fbac3465000-7fbac3466000 r--p 0000c000 fc:01 1057734 /usr/lib/x86_64-linux-gnu/libpipeline.so.1.4.0
7fbac3466000-7fbac3467000 rw-p 0000d000 fc:01 1057734 /usr/lib/x86_64-linux-gnu/libpipeline.so.1.4.0
7fbac3467000-7fbac348a000 r-xp 00000000 fc:01 11800682 /lib/x86_64-linux-gnu/ld-2.19.so
7fbac366a000-7fbac366d000 rw-p 00000000 00:00 0
7fbac3686000-7fbac3689000 rw-p 00000000 00:00 0
7fbac3689000-7fbac368a000 r--p 00022000 fc:01 11800682 /lib/x86_64-linux-gnu/ld-2.19.so
7fbac368a000-7fbac368b000 rw-p 00023000 fc:01 11800682 /lib/x86_64-linux-gnu/ld-2.19.so
7fbac368b000-7fbac368c000 rw-p 00000000 00:00 0
7fff2c09a000-7fff2c0bb000 rw-p 00000000 00:00 0 [stack]
7fff2c130000-7fff2c132000 r--p 00000000 00:00 0 [vvar]
7fff2c132000-7fff2c134000 r-xp 00000000 00:00 0 [vdso]
ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0 [vsyscall]
fish...

Read more...

Revision history for this message
Martin Pitt (pitti) wrote :

Muelli, did you literally call it with "%I"? In a unit that gets replaced with the unescaped instance name, i. e. something like "3-1.2:1.0". I. e. did you get this backtrace from the journal or so, or did you call usb_modeswitch_dispatcher on the command line? In that case it needs a proper argument, not literally "%I". Thanks for investigating!

Revision history for this message
Muelli (ubuntu-bugs-auftrags-killer) wrote :
Download full text (3.2 KiB)

FWIW: I have the same problem.

Running the usb_modeswitch_dispatcher results in the following:

/usr/sbin/usb_modeswitch_dispatcher --switch-systemd "%I"
*** buffer overflow detected ***: /usr/sbin/usb_modeswitch_dispatcher terminated
======= Backtrace: =========
/lib/x86_64-linux-gnu/libc.so.6(+0x7879f)[0x7fbac2f0c79f]
/lib/x86_64-linux-gnu/libc.so.6(__fortify_fail+0x5c)[0x7fbac2fa02fc]
/lib/x86_64-linux-gnu/libc.so.6(+0x10a350)[0x7fbac2f9e350]
/lib/x86_64-linux-gnu/libc.so.6(__stpncpy_chk+0x0)[0x7fbac2f9d7b0]
/usr/sbin/usb_modeswitch_dispatcher[0x401af5]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf5)[0x7fbac2eb5ec5]
/usr/sbin/usb_modeswitch_dispatcher[0x40310b]
======= Memory map: ========
00400000-0040a000 r-xp 00000000 fc:01 1058264 /usr/sbin/usb_modeswitch_dispatcher
00609000-0060a000 r--p 00009000 fc:01 1058264 /usr/sbin/usb_modeswitch_dispatcher
0060a000-0060b000 rw-p 0000a000 fc:01 1058264 /usr/sbin/usb_modeswitch_dispatcher
01278000-01299000 rw-p 00000000 00:00 0 [heap]
7fbac2c7e000-7fbac2c94000 r-xp 00000000 fc:01 11796495 /lib/x86_64-linux-gnu/libgcc_s.so.1
7fbac2c94000-7fbac2e93000 ---p 00016000 fc:01 11796495 /lib/x86_64-linux-gnu/libgcc_s.so.1
7fbac2e93000-7fbac2e94000 rw-p 00015000 fc:01 11796495 /lib/x86_64-linux-gnu/libgcc_s.so.1
7fbac2e94000-7fbac304e000 r-xp 00000000 fc:01 11800995 /lib/x86_64-linux-gnu/libc-2.19.so
7fbac304e000-7fbac324e000 ---p 001ba000 fc:01 11800995 /lib/x86_64-linux-gnu/libc-2.19.so
7fbac324e000-7fbac3252000 r--p 001ba000 fc:01 11800995 /lib/x86_64-linux-gnu/libc-2.19.so
7fbac3252000-7fbac3254000 rw-p 001be000 fc:01 11800995 /lib/x86_64-linux-gnu/libc-2.19.so
7fbac3254000-7fbac3259000 rw-p 00000000 00:00 0
7fbac3259000-7fbac3266000 r-xp 00000000 fc:01 1057734 /usr/lib/x86_64-linux-gnu/libpipeline.so.1.4.0
7fbac3266000-7fbac3465000 ---p 0000d000 fc:01 1057734 /usr/lib/x86_64-linux-gnu/libpipeline.so.1.4.0
7fbac3465000-7fbac3466000 r--p 0000c000 fc:01 1057734 /usr/lib/x86_64-linux-gnu/libpipeline.so.1.4.0
7fbac3466000-7fbac3467000 rw-p 0000d000 fc:01 1057734 /usr/lib/x86_64-linux-gnu/libpipeline.so.1.4.0
7fbac3467000-7fbac348a000 r-xp 00000000 fc:01 11800682 /lib/x86_64-linux-gnu/ld-2.19.so
7fbac366a000-7fbac366d000 rw-p 00000000 00:00 0
7fbac3686000-7fbac3689000 rw-p 00000000 00:00 0
7fbac3689000-7fbac368a000 r--p 00022000 fc:01 11800682 /lib/x86_64-linux-gnu/ld-2.19.so
7fbac368a000-7fbac368b000 rw-p 00023000 fc:01 11800682 /lib/x86_64-linux-gnu/ld-2.19.so
7fbac368b000-7fbac368c000 rw-p 00000000 00:00 0
7fff2c09a000-7fff2c0bb000 rw-p 00000000 00:00 0 [stack]
7fff2c130000-7fff2c132000 r--p 00000000 00:00 0 [vvar]
7fff2c132000-7fff2c134000 r-xp 00000000 00:00 0 [vdso]
ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0 [vsyscall]
fish...

Read more...

Revision history for this message
Michał Fułat (anidatte) wrote :

Hi!

Same problem on Ubuntu 14.10 with kernel 3.19.3 (64-bit). All system packages are up-to-date, and I'm able to switch my device manually, but automatically doesn't work.

Revision history for this message
Michał Fułat (anidatte) wrote :
Revision history for this message
Michał Fułat (anidatte) wrote :
Revision history for this message
Michał Fułat (anidatte) wrote :
Revision history for this message
Michał Fułat (anidatte) wrote :
Revision history for this message
Michał Fułat (anidatte) wrote :
Revision history for this message
Martin Pitt (pitti) wrote :

I found an USB 3G stick and can reproduce this.

Changed in usb-modeswitch (Ubuntu):
assignee: nobody → Martin Pitt (pitti)
importance: Undecided → Medium
status: Incomplete → In Progress
Revision history for this message
Martin Pitt (pitti) wrote :

This seems to work fine with the tcl version, so this is an Ubuntu specific bug with the dispatcher C rewrite.

Martin Pitt (pitti)
summary: - usb_modeswitch@.service fails sometimes
+ usb_modeswitch@.service fails
Changed in usb-modeswitch (Ubuntu):
importance: Medium → High
Revision history for this message
Martin Pitt (pitti) wrote :

I uploaded a couple of fixes which seem to work here. However, my USB 3G stick works even without switching, so it would be nice if you could confirm that usb-modeswitch 2.2.0+repack0-2ubuntu2 fixes your devices, too. Thanks!

Changed in usb-modeswitch (Ubuntu):
status: In Progress → Fix Committed
Revision history for this message
Michał Fułat (anidatte) wrote :

Yey, I installed fixed package and works great with my Huawei E173 modem. Thanks! :-)

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package usb-modeswitch - 2.2.0+repack0-2ubuntu2

---------------
usb-modeswitch (2.2.0+repack0-2ubuntu2) vivid; urgency=medium

  * dispatcher-c-rewrite.patch:
    - Fix broken length calculation, resulting in segfaults.
    - For --switch-systemd, trim leading '/-' characters and replace '/' with
      '-' in the device argument, like in the tcl equivalent.
    - LP: #1431179
 -- Martin Pitt <email address hidden> Fri, 10 Apr 2015 09:57:19 +0200

Changed in usb-modeswitch (Ubuntu):
status: Fix Committed → Fix Released
Revision history for this message
quiricada (raraland) wrote :

zte mf-193a works now!

previously, when it was plugged in, lubuntu vivid would pop the new disk mount dialog.

ty martin

Revision history for this message
Harald (hschmitt) wrote :

My Huawei E220 works if I do not insert a microSD card in the stick.

Revision history for this message
atimonin (atimonin) wrote :
Download full text (5.2 KiB)

Still not working with Huawei E3372:

Jul 30 16:35:11 m-api2 kernel: [ 1472.901499] usb 3-3: new high-speed USB device number 4 using ehci-pci
Jul 30 16:35:11 m-api2 kernel: [ 1473.034553] usb 3-3: New USB device found, idVendor=12d1, idProduct=1f01
Jul 30 16:35:11 m-api2 kernel: [ 1473.034564] usb 3-3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
Jul 30 16:35:11 m-api2 kernel: [ 1473.034569] usb 3-3: Product: HUAWEI_MOBILE
Jul 30 16:35:11 m-api2 kernel: [ 1473.034573] usb 3-3: Manufacturer: HUAWEI_MOBILE
Jul 30 16:35:11 m-api2 kernel: [ 1473.034577] usb 3-3: SerialNumber: 0123456789ABCDEF
Jul 30 16:35:11 m-api2 kernel: [ 1473.035513] usb-storage 3-3:1.0: USB Mass Storage device detected
Jul 30 16:35:11 m-api2 kernel: [ 1473.038949] scsi host8: usb-storage 3-3:1.0
Jul 30 16:35:11 m-api2 systemd[1]: Starting USB_ModeSwitch...
Jul 30 16:35:11 m-api2 systemd[1]: usb_modeswitch@3-3-3-3:1.0.service: main process exited, code=exited, status=1/FAILURE
Jul 30 16:35:11 m-api2 systemd[1]: Failed to start USB_ModeSwitch.
Jul 30 16:35:11 m-api2 systemd[1]: Unit usb_modeswitch@3-3-3-3:1.0.service entered failed state.
Jul 30 16:35:11 m-api2 systemd[1]: usb_modeswitch@3-3-3-3:1.0.service failed.
Jul 30 16:35:12 m-api2 kernel: [ 1474.037905] scsi 8:0:0:0: CD-ROM HUAWEI Mass Storage 2.31 PQ: 0 ANSI: 2
Jul 30 16:35:12 m-api2 kernel: [ 1474.038365] scsi 8:0:0:1: Direct-Access HUAWEI TF CARD Storage 2.31 PQ: 0 ANSI: 2
Jul 30 16:35:12 m-api2 kernel: [ 1474.044459] sr 8:0:0:0: [sr0] scsi-1 drive
Jul 30 16:35:12 m-api2 kernel: [ 1474.045757] sr 8:0:0:0: Attached scsi CD-ROM sr0
Jul 30 16:35:12 m-api2 kernel: [ 1474.045987] sr 8:0:0:0: Attached scsi generic sg1 type 5
Jul 30 16:35:12 m-api2 kernel: [ 1474.046975] sd 8:0:0:1: Attached scsi generic sg2 type 0
Jul 30 16:35:12 m-api2 kernel: [ 1474.053341] sd 8:0:0:1: [sdb] Attached SCSI removable disk
Jul 30 16:35:12 m-api2 systemd-udevd[258]: error: /dev/sdb: No medium found
Jul 30 16:35:12 m-api2 kernel: [ 1474.763724] sr 8:0:0:0: [sr0] FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
Jul 30 16:35:12 m-api2 kernel: [ 1474.763746] sr 8:0:0:0: [sr0] Sense Key : Medium Error [current]
Jul 30 16:35:12 m-api2 kernel: [ 1474.763757] sr 8:0:0:0: [sr0] Add. Sense: Unrecovered read error
Jul 30 16:35:12 m-api2 kernel: [ 1474.763765] sr 8:0:0:0: [sr0] CDB:
Jul 30 16:35:12 m-api2 kernel: [ 1474.763772] Read(10): 28 00 00 00 0f fe 00 00 02 00
Jul 30 16:35:12 m-api2 kernel: [ 1474.763798] blk_update_request: critical medium error, dev sr0, sector 16376
Jul 30 16:35:12 m-api2 kernel: [ 1474.774706] sr 8:0:0:0: [sr0] FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
Jul 30 16:35:12 m-api2 kernel: [ 1474.774721] sr 8:0:0:0: [sr0] Sense Key : Medium Error [current]
Jul 30 16:35:12 m-api2 kernel: [ 1474.774727] sr 8:0:0:0: [sr0] Add. Sense: Unrecovered read error
Jul 30 16:35:12 m-api2 kernel: [ 1474.774730] sr 8:0:0:0: [sr0] CDB:
Jul 30 16:35:12 m-api2 kernel: [ 1474.774735] Read(10): 28 00 00 00 0f fe 00 00 02 00
Jul 30 16:35:12 m-api2 kernel: [ 1474.774749] blk_update_request: critical medium error, dev sr0, sector 16376
Jul 30 16:35:12 m-api2 kernel: [ 1474.774838] Buffer I/O error...

Read more...

Revision history for this message
atimonin (atimonin) wrote :

usb-modeswitch version^
root@m-api2:~# dpkg -s usb-modeswitch
Package: usb-modeswitch
Status: install ok installed
Priority: extra
Section: comm
Installed-Size: 202
Maintainer: Ubuntu Developers <email address hidden>
Architecture: amd64
Version: 2.2.0+repack0-2ubuntu2
Depends: libc6 (>= 2.14), libpipeline1 (>= 1.0.0), libusb-1.0-0 (>= 2:1.0.8), usb-modeswitch-data (>= 20140529)
Suggests: comgt, wvdial
Breaks: usb-modeswitch-data (<< 20100127)
Conffiles:
 /etc/init/usb-modeswitch-upstart.conf 8972963f876f7717c4c0f267de97b278
 /etc/usb_modeswitch.conf b8fcd7f4e9e0173139b36cb56469377f
Description: mode switching tool for controlling "flip flop" USB devices
 Several new USB devices have their proprietary Windows drivers onboard,
 especially WAN dongles. When plugged in for the first time, they act
 like a flash storage and start installing the driver from there. If
 the driver is already installed, the storage device vanishes and
 a new device, such as an USB modem, shows up. This is called the
 "ZeroCD" feature.
 .
 On Debian, this is not needed, since the driver is included as a
 Linux kernel module, such as "usbserial". However, the device still
 shows up as "usb-storage" by default. usb-modeswitch solves that
 issue by sending the command which actually performs the switching
 of the device from "usb-storage" to "usbserial".
 .
 This package contains the binaries and the brother scripts.
Homepage: http://www.draisberghof.de/usb_modeswitch/
Original-Maintainer: Didier Raboud <email address hidden>

Revision history for this message
atimonin (atimonin) wrote :

BTW,
usb_modeswitch@3-3-3-3:1.0.service seems to me erroneus
The propper should look like
usb_modeswitch@3-3:1.0.service

Revision history for this message
Paul Annekov (paul.annekov) wrote :
Download full text (3.9 KiB)

Still not working for me too for Huawei E1550 on Ubuntu 15.04.

bla@bla-bla:~$ dpkg -s usb-modeswitch
Package: usb-modeswitch
Status: install ok installed
Priority: extra
Section: comm
Installed-Size: 202
Maintainer: Ubuntu Developers <email address hidden>
Architecture: amd64
Version: 2.2.0+repack0-2ubuntu2
Depends: libc6 (>= 2.14), libpipeline1 (>= 1.0.0), libusb-1.0-0 (>= 2:1.0.8), usb-modeswitch-data (>= 20140529)
Suggests: comgt, wvdial
Breaks: usb-modeswitch-data (<< 20100127)
Conffiles:
 /etc/init/usb-modeswitch-upstart.conf 8972963f876f7717c4c0f267de97b278
 /etc/usb_modeswitch.conf b8fcd7f4e9e0173139b36cb56469377f
Description: mode switching tool for controlling "flip flop" USB devices
 Several new USB devices have their proprietary Windows drivers onboard,
 especially WAN dongles. When plugged in for the first time, they act
 like a flash storage and start installing the driver from there. If
 the driver is already installed, the storage device vanishes and
 a new device, such as an USB modem, shows up. This is called the
 "ZeroCD" feature.
 .
 On Debian, this is not needed, since the driver is included as a
 Linux kernel module, such as "usbserial". However, the device still
 shows up as "usb-storage" by default. usb-modeswitch solves that
 issue by sending the command which actually performs the switching
 of the device from "usb-storage" to "usbserial".
 .
 This package contains the binaries and the brother scripts.
Homepage: http://www.draisberghof.de/usb_modeswitch/
Original-Maintainer: Didier Raboud <email address hidden>

syslog:
Sep 25 22:45:40 sr-server kernel: [ 9318.686831] usb 1-7.4: new high-speed USB device number 9 using xhci_hcd
Sep 25 22:45:40 sr-server kernel: [ 9318.786227] usb 1-7.4: New USB device found, idVendor=12d1, idProduct=1446
Sep 25 22:45:40 sr-server kernel: [ 9318.786232] usb 1-7.4: New USB device strings: Mfr=2, Product=1, SerialNumber=0
Sep 25 22:45:40 sr-server kernel: [ 9318.786234] usb 1-7.4: Product: HUAWEI Mobile
Sep 25 22:45:40 sr-server kernel: [ 9318.786236] usb 1-7.4: Manufacturer: HUAWEI Technology
Sep 25 22:45:40 sr-server kernel: [ 9318.790650] usb-storage 1-7.4:1.0: USB Mass Storage device detected
Sep 25 22:45:40 sr-server kernel: [ 9318.790755] scsi host14: usb-storage 1-7.4:1.0
Sep 25 22:45:40 sr-server kernel: [ 9318.790984] usb-storage 1-7.4:1.1: USB Mass Storage device detected
Sep 25 22:45:40 sr-server kernel: [ 9318.791387] scsi host15: usb-storage 1-7.4:1.1
Sep 25 22:45:40 sr-server systemd[1]: Starting USB_ModeSwitch...
Sep 25 22:45:40 sr-server systemd[1]: usb_modeswitch@1-7.4-1-7.4:1.0.service: main process exited, code=exited, status=1/FAILURE
Sep 25 22:45:40 sr-server systemd[1]: Failed to start USB_ModeSwitch.
Sep 25 22:45:40 sr-server systemd[1]: Unit usb_modeswitch@1-7.4-1-7.4:1.0.service entered failed state.
Sep 25 22:45:40 sr-server systemd[1]: usb_modeswitch@1-7.4-1-7.4:1.0.service failed.
Sep 25 22:45:41 sr-server kernel: [ 9319.796060] scsi 14:0:0:0: CD-ROM HUAWEI Mass Storage 2.31 PQ: 0 ANSI: 2
Sep 25 22:45:41 sr-server kernel: [ 9319.798274] scsi 15:0:0:0: Direct-Access HUAWEI MMC Storage 2.31 PQ: 0 ANSI: 2
Sep 25 22:45:41 s...

Read more...

Revision history for this message
Paul Annekov (paul.annekov) wrote :

BTW,
It's Ubuntu Server 15.04

Revision history for this message
Duncan Bayne (dhgbayne) wrote :
Revision history for this message
hackeron (hackeron) wrote :

I'm having the same issue. Ubuntu tries to start service usb_modeswitch@1-1.4-1-1.4:1.0 -- this fails.

If I start service: usb_modeswitch@1-1.4:1.0 manually, running systemctl start usb_modeswitch@1-1.4:1.0 - that works fine and my 3g modem starts working.

Anyone have a permanent solution?

Revision history for this message
Alfonso (alfonso-martone) wrote :

I have the same problem in Ubuntu 16.04 with an Huawei E122.

My workaround is to execute manually the switch using "Huawei newmode" parameter:

    /usr/sbin/usb_modeswitch --default-vendor 0x12d1 --default-product 0x1446 -J

Revision history for this message
Anand Kumria (wildfire) wrote :

@pitti, whilst you have a fix released as noted in the latest comment - and the duplicate there is a class of modems (Huawei, which I also have) where this still continues to fail.

Revision history for this message
R (rprots) wrote :

"sudo /usr/sbin/usb_modeswitch --default-vendor 0x12d1 --default-product 0x1446 -J" worked for Huawei E1550 on Ubuntu 16.04.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.