Author Message

<  Setup Discussion  ~  Huawei E398 : "interface class is 255, expected 8. Abort"

PostPosted: Thu Oct 05, 2017 2:15 pm Reply with quote
Posts: 1Joined: Thu Oct 05, 2017 1:40 pm
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:
$ 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:
-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:
lsusb -vd 12d1:1506
Attachment:
File comment: output of lsusb -vd 12d1:1506
lsusb.log [9.24 KiB]
Downloaded 4 times



Code:
usb_modeswitch -W -v 12d1 -p 1506 -H
Attachment:
File comment: output of usb_modeswitch -W -v 12d1 -p 1506 -H
usb_modeswitch-H.log [969 Bytes]
Downloaded 6 times



Offline Profile
PostPosted: Fri Oct 06, 2017 7:17 am Reply with quote
Site AdminPosts: 6275Joined: Sat Nov 03, 2007 12:30 am
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:
$ sudo /usr/sbin/usb_modeswitch (-W) -v 12d1 -p 1506 -R


Offline Profile

Display posts from previous:  Sort by:

All times are UTC + 1 hour [ DST ]
Page 1 of 1
2 posts
Users browsing this forum: No registered users and 2 guests
Search for:
Post new topic  Reply to topic
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum