Author Message

<  Setup Discussion  ~  [SOLVED] Huawei E3131: can't use storage command

PostPosted: Fri Mar 28, 2014 5:15 pm Reply with quote
Posts: 4Joined: Fri Mar 28, 2014 2:24 am
Hi all,

I have a Huawei E3131 Mobile Broadband USB stick and a Debian Wheezy OS.
I'm trying to use usb_modeswitch and I've been reading lots of discussions, some of them explicitly referred to the E3131 model. However, all the solutions that have worked so far for the others, do not work for me. I've tried everything.

Here is the main issue:

Code:
# usb_modeswitch -DIc /usr/share/usb_modeswitch/12d1\:14db
Look for target devices ...
 No devices in target mode or class found
Look for default devices ...
   product ID matched
 Found devices in default mode (1)
Access device 011 on bus 001
Get the current device configuration ...
 OK, got current device configuration (1)
Use interface number 0
Error: can't use storage command in MessageContent with interface 0;
       interface class is 2, expected 8. Abort



which is the same output as when I run:

Code:
# usb_modeswitch -v 12d1 -p 14db -V 12d1 -P 14db -M "55534243123456780000000000000a11062000000000000100000000000000"



Here follow some details on the overall context.

(1) dmesg

Code:
#dmesg
[ 1935.904150] usb 1-1.1: new high-speed USB device number 6 using ehci_hcd
[ 1935.997534] usb 1-1.1: New USB device found, idVendor=12d1, idProduct=1f01
[ 1935.997541] usb 1-1.1: New USB device strings: Mfr=2, Product=1, SerialNumber=0
[ 1935.997545] usb 1-1.1: Product: HUAWEI HiLink
[ 1935.997549] usb 1-1.1: Manufacturer: HUAWEI
[ 1936.074549] Initializing USB Mass Storage driver...
[ 1936.074704] scsi6 : usb-storage 1-1.1:1.0
[ 1936.074854] usbcore: registered new interface driver usb-storage
[ 1936.074858] USB Mass Storage support registered.
[ 1936.982749] usb 1-1.1: USB disconnect, device number 6
[ 1938.970421] usb 1-1.1: new high-speed USB device number 7 using ehci_hcd
[ 1939.064459] usb 1-1.1: New USB device found, idVendor=12d1, idProduct=14db
[ 1939.064465] usb 1-1.1: New USB device strings: Mfr=2, Product=1, SerialNumber=0
[ 1939.064470] usb 1-1.1: Product: HUAWEI HiLink
[ 1939.064473] usb 1-1.1: Manufacturer: HUAWEI


(2) lsusb

Code:
#lsusb | grep Huawei
Bus 001 Device 011: ID 12d1:14db Huawei Technologies Co., Ltd.


(3) 12d1\:14db file

I created the file by scratch since it was contained neither in /usr/share/usb_modeswitch/ nor in the usb_modeswitch.d folder of the usb_modeswitch-data package that I downloaded. I paste the following content (after having researched in many other discussions):

Code:
#Huawei E3131

DefaultVendor=  0x12d1
DefaultProduct= 0x14db

TargetVendor=  0x12d1
TargetProduct= 0x1f01

MessageContent="55534243123456780000000000000011062000000101000100000000000000"


(4) udev rule

I edited the file /lib/udev/rules.d/40-usb_modeswitch.rules by adding the following line:

Code:
ATTRS{idVendor}=="12d1", ATTRS{idProduct}=="14db", RUN+="usb_modeswitch '%b/%k'"




As a side note, whenever I do not specify any Message Content while running usb_modeswitch, I get only a warning rather than an error. Still, nothing changes in lsusb, though (same ID):

Code:
# usb_modeswitch -v 12d1 -p 14db -V 12d1 -P 14db
Look for target devices ...
   product ID matched
 Found devices in target mode or class (1)
Look for default devices ...
   product ID matched
 Found devices in default mode (1)
Access device 011 on bus 001
Get the current device configuration ...
 OK, got current device configuration (1)
Use interface number 0

USB description data (for identification)
-------------------------
Manufacturer: HUAWEI
     Product: HUAWEI HiLink
  Serial No.: not provided
-------------------------
Warning: no switching method given. See documentation
-> Run lsusb to note any changes. Bye!


Finally, I also did run the following (I even added it to /etc/init.d/local.startup):

Code:
# modprobe usbserial vendor=12d1 product=14db




If anyone could help me out, I'd be immensely grateful!! Thank you so much!



P.S. I noticed that the file 12d1:1f01 does exist. 1f01 is my product id. indeed, its content states 14db (my product code) as the product id. However, the message content included in it, is the same as the one I (and everyone else in other discussions) have used so far, so I can't see how this dicovery of mine could be of any help. Maybe someone else does, though, do you? :)


Last edited by iammyr on Thu Apr 03, 2014 9:27 pm, edited 1 time in total.

Offline Profile
PostPosted: Fri Mar 28, 2014 8:12 pm Reply with quote
Site AdminPosts: 6269Joined: Sat Nov 03, 2007 12:30 am
I think there may have been a misunderstanding ... It looks like your modem has already switched modes:
Code:
[ 1935.997534] usb 1-1.1: New USB device found, idVendor=12d1, idProduct=1f01
...
[ 1936.982749] usb 1-1.1: USB disconnect, device number 6
[ 1938.970421] usb 1-1.1: new high-speed USB device number 7 using ehci_hcd
[ 1939.064459] usb 1-1.1: New USB device found, idVendor=12d1, idProduct=14db

If you have the usb-modeswitch package installed on Debian, the mode switch will happen automatically - no more need to use usb_modeswitch manually afterwards.

Because your USB device is not in Class 8 (storage) anymore, you get this error.

Your initial ID is 12d1:1f01 and there is a configuration file for that.


Offline Profile
PostPosted: Thu Apr 03, 2014 9:20 pm Reply with quote
Posts: 4Joined: Fri Mar 28, 2014 2:24 am
Hi Josh,

thank you so much for your super-prompt reply! I apologies for my delay indeed in answering back, but I had other unrelated issues with the network provider, which I had to deal with.

Now I can say that by simply installing network-manager and uninstalling wicd (wicd doesn't support mobile broadband as stated in their FAQ) my laptop connected straight away through the USB stick. Network-manager immediately identified it as a new eth0 interface (I previously had only eth1).


Thank you so much Josh for your help, support and great work!
I hope you'll keep it up ;)


Offline Profile

Display posts from previous:  Sort by:

All times are UTC + 1 hour [ DST ]
Page 1 of 1
3 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
cron