Automatic Activation, Hotplug and UDEV, Configuration
Post Reply
lauhub
Posts: 1
Joined: 05 Oct 2017, 13:40

Huawei E398 : "interface class is 255, expected 8. Abort"

Post by lauhub » 05 Oct 2017, 14:15

I have a 4G key that sometimes stop working (no more connexion possible using sakis3g script). This happens after several days (10, 15 days).

I can't reset it easily by unplugging it because it is located in a place that is far away from my working place. Every day, the computer reboots (unattend mode) in order to reset the connection if necessary. But I still experience modem malfunction.

When reseting modem manually (on another computer using MacOS e.g.), everything works again... for some time.

So I use usb_modeswitch command (v2.5.1) :

Code: Select all

$ sudo /usr/sbin/usb_modeswitch -W -v 12d1 -p 1506 -J
Take all parameters from the command line


 * usb_modeswitch: handle USB devices with multiple modes
 * Version 2.5.1 (C) Josua Dietze 2017
 * Based on libusb1/libusbx

 ! PLEASE REPORT NEW CONFIGURATIONS !

DefaultVendor=  0x12d1
DefaultProduct= 0x1506
HuaweiNewMode=1

Look for default devices ...
  found USB ID 1d6b:0002
  found USB ID 1d6b:0001
  found USB ID 1d6b:0002
  found USB ID 12d1:1506
   vendor ID matched
   product ID matched
  found USB ID 1d6b:0001
  found USB ID 1d6b:0002
 Found devices in default mode (1)
Access device 003 on bus 001
Get the current device configuration ...
Current configuration number is 1
Use interface number 0
 with class 255
Error: can't use storage command in MessageContent with interface 0; interface class is 255, expected 8. Abort
Using other parameters give the same finale message:

Code: Select all

-X
Only the -H parameter gives no error but I am not sure it is suficient.

I have little experience on 4G modem so what command should I use to put my modem in a state where it does not work (to check that the usb_modeswitch parameter I use is correct).

Are there such commands (to make to modem fail to work) ?

And is the "interface class is 255, expected 8" message normal ?

As a file attachment, I put the following output:

Code: Select all

lsusb -vd 12d1:1506
lsusb.log
output of lsusb -vd 12d1:1506
(9.24 KiB) Downloaded 659 times

Code: Select all

usb_modeswitch -W -v 12d1 -p 1506 -H
usb_modeswitch-H.log
output of usb_modeswitch -W -v 12d1 -p 1506 -H
(969 Bytes) Downloaded 687 times

Josh
Site Admin
Posts: 6570
Joined: 03 Nov 2007, 00:30

Re: Huawei E398 : "interface class is 255, expected 8. Abort

Post by Josh » 06 Oct 2017, 07:17

What you are trying to do can only be done once after the modem is inserted. If you read the first paragraph of the usb_modeswitch documentation (see link at top) it may become clearer. Once the device is switched from install mode to modem mode, it stays there until the power stops, either by plugging it off or by shutting the computer down (and cutting power to it).

Bottom line: you can't mode-switch your modem again when it's already in modem mode.

The error you see indicates that the switching method you are trying is depending on the device being in install mode (immediately after powering up). At that moment, it acts as a storage device which by definition has USB device class 8.

Unless you have a way to toggle power on the USB port (some chipsets and drivers may allow this), you can only fully re-initialize the modem by unplugging/re-plugging.

However, there is an official USB RESET command which usb_modeswitch can issue. You can try if it helps in your case. Try

Code: Select all

$ sudo /usr/sbin/usb_modeswitch (-W) -v 12d1 -p 1506 -R

Post Reply