[SOLVED] Huawei E3131 and usb_modeswitch

Getting your soundcard to work, using Debian on non-i386 hardware, etc

[SOLVED] Huawei E3131 and usb_modeswitch

Postby iammyr » 2014-03-28 15:11

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: Select all
# 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
[b]Error: can't use storage command in MessageContent with interface 0;
       interface class is 2, expected 8. Abort[/b]



which is the same output as when I run:

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



Here follow some details on the overall context.


(1) dmesg

Code: Select all
#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: Select all
#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: Select all
#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: Select all
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: Select all
# 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: Select all
# 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 2014-04-03 19:27, edited 1 time in total.
iammyr
 
Posts: 17
Joined: 2008-06-14 08:39

Re: Huawei E3131 and usb_modeswitch

Postby aplistir » 2014-03-29 10:58

Strange.
In my 32bit Wheezy, the huawei E3131 worked out of the box.
Kernel version is 3.2.0-4-686-pae

All I had to do was just selecting the country and operator from the NM.

Sorry. cant be of more help. (are there internally different versions of E3131 ?)
aplistir
 
Posts: 131
Joined: 2014-03-26 22:11

Re: [SOLVED] Huawei E3131 and usb_modeswitch

Postby iammyr » 2014-04-03 19:26

Hi aplistir,

thank you so much for your reply!
Apparently there was no problem to solve (see http://www.draisberghof.de/usb_modeswit ... f=4&t=1945 )

14db as a product id meant that it had already been recognized as an ethernet modem.
the only reason why it didn't connect straight away was that I was using wicd rather than network-manager, and wicd doesn't support mobile broadband (as stated in their FAQ)
iammyr
 
Posts: 17
Joined: 2008-06-14 08:39


Return to Hardware

Who is online

Users browsing this forum: No registered users and 8 guests

fashionable