Author Message

<  Device Information  ~  Huawei E3131 switch to wrong mode

PostPosted: Sun May 07, 2017 12:47 am Reply with quote
Posts: 3 Joined: Sun May 07, 2017 12:06 am
Hi all,

since few days I am facing troubles with configuration Huawei E3131 modem on my Raspberry Pi.
The modem is recognized as "12d1:14fe" and then it is switched to "12d1:151d", instead to @12d1:1506". And it is still not seen as a modem.

I also added some lines to the config files with the hope that it would help, but it is still not working.

I added this to "40-usb_modeswitch.rules" file.
Code:
# Huawei E3131h-2
ATTRS{idVendor}=="12d1", ATTRS{idProduct}=="151d", RUN+="usb_modeswitch %b/%k"


And such a file in "/etc/usb_modeswitch.d" directory:
Code:
cat /etc/usb_modeswitch.d/12d1\:151d
cat /etc/usb_modeswitch.d/12d1\:151d
#Huawei E3131 (Variant)
TargetVendor= 0x12d1
TargetProductList="1506"
MessageContent="55534243123456780000000000000011062000000100000000000000000000"


And the logs shows:

Code:
USB_ModeSwitch log from Sun May 07 00:17:52 CEST 2017

Use global config file: /etc/usb_modeswitch.conf

Started via systemd
Raw args from udev: /1/1.4:1.0

Use top device dir /sys/bus/usb/devices/1-1.4

----------------
USB values from sysfs:
  manufacturer   HUAWEI
  product   HUAWEI Mobile
  serial   
----------------
bNumConfigurations is 1 - don't check for active configuration
Found packed config collection /usr/share/usb_modeswitch/configPack.tar.gz
ConfigList: /usr/share/usb_modeswitch/12d1:14fe /usr/share/usb_modeswitch/12d1:#linux pack/12d1:14fe pack/12d1:#linux
SCSI attributes not needed, move on
Check config: /usr/share/usb_modeswitch/12d1:14fe
! matched. Read config data
config: TargetVendor set to 12d1
config: TargetProductList set to 1506,150f,151d
Driver module is "option", ID path is /sys/bus/usb-serial/drivers/option1

Command to be run:
usb_modeswitch -W -D -s 20 -u -1 -b 1 -g 30 -v 12d1 -p 14fe -f $configBuffer

Verbose debug output of usb_modeswitch and libusb follows
(Note that some USB errors are to be expected in the process)
--------------------------------

Read long config from command line

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

 ! PLEASE REPORT NEW CONFIGURATIONS !

DefaultVendor=  0x12d1
DefaultProduct= 0x14fe
TargetVendor=   0x12d1
TargetProductList="1506,150f,151d"
HuaweiNewMode=1
NeedResponse=0
Success check enabled, max. wait time 20 seconds
System integration mode enabled

Use given bus/device number: 001/030 ...
Look for default devices ...
 bus/device number matched
  found USB ID 12d1:14fe
   vendor ID matched
   product ID matched
 Found devices in default mode (1)
Use interface number 0
Use endpoints 0x01 (out) and 0x81 (in)

USB description data (for identification)
-------------------------
Manufacturer: HUAWEI
     Product: HUAWEI Mobile
  Serial No.: not provided
-------------------------
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 ...
libusb: error [op_clear_halt] clear_halt failed error -1 errno 71
libusb: error [op_clear_halt] clear_halt failed error -1 errno 71
 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
Bus/dev search active, refer success check to wrapper. Bye!

ok:busdev
--------------------------------
(end of usb_modeswitch output)

Check success of mode switch for max. 20 seconds ...
 Wait for device file system (1 sec.) ...
 Wait for device file system (2 sec.) ...
 Wait for device file system (3 sec.) ...
 Wait for device file system (4 sec.) ...
 Wait for device file system (5 sec.) ...
 Read attributes ...
 All attributes matched
Mode switching was successful, found 12d1:151d (HUAWEI: HUAWEI Mobile)
Logger is /usr/bin/logger
Now check for bound driver ...
 driver has bound, device is known
Check for AVOID_RESET_QUIRK kernel attribute
 AVOID_RESET_QUIRK activated

All done, exit



And the second log:

Code:
USB_ModeSwitch log from Sun May 07 00:44:19 CEST 2017

Use global config file: /etc/usb_modeswitch.conf

Started via systemd
Raw args from udev: /1/1.4:1.1

Use top device dir /sys/bus/usb/devices/1-1.4

----------------
USB values from sysfs:
  manufacturer   HUAWEI
  product   HUAWEI Mobile
  serial   
----------------
bNumConfigurations is 1 - don't check for active configuration
Found packed config collection /usr/share/usb_modeswitch/configPack.tar.gz
ConfigList: /etc/usb_modeswitch.d/12d1:151d /usr/share/usb_modeswitch/12d1:#linux pack/12d1:#linux
SCSI attributes not needed, move on
Check config: /etc/usb_modeswitch.d/12d1:151d
! matched. Read config data
Use config file from override folder /etc/usb_modeswitch.d
Logger is /usr/bin/logger
config: TargetVendor set to 12d1
config: TargetProductList set to 1506
Driver module is "option", ID path is /sys/bus/usb-serial/drivers/option1

Command to be run:
usb_modeswitch -W -D -s 20 -u -1 -b 1 -g 33 -v 12d1 -p 151d -f $configBuffer


I would appreciate if someone could help me with that.

Thank you in advance.

Best regards,
Peter


Offline
PostPosted: Sun May 07, 2017 1:32 am Reply with quote
Posts: 1166 Joined: Wed Jul 11, 2012 3:14 pm Location: Koh Samui, TH
12d1:151d is the id after the dongle has been switched, that id can not be further switched.

There is no rule saying that all versions of E3131 should become 12d1:1506 after switching, the id after switching depends on the internasl firmware which differs depending on market/distributor.
12d1:151d has serial interfaces for dial-up modem and for AT cmds and it also has a direct net interface in the same way as 12d1:1506 so I don't understand what you mean with "not seen as modem".


Offline
PostPosted: Sun May 07, 2017 8:55 am Reply with quote
Posts: 3 Joined: Sun May 07, 2017 12:06 am
Thank you for the fast reply.

I mean, that after switching when I use lsusb command, I still don't see the model od the device but only manufacturer name:
Code:
Bus 001 Device 034: ID 17ef:600e Lenovo
Bus 001 Device 033: ID 12d1:151d Huawei Technologies Co., Ltd.
Bus 001 Device 004: ID 046d:c31c Logitech, Inc. Keyboard K120 for Business
Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp. SMSC9512/9514 Fast Ethernet Adapter
Bus 001 Device 002: ID 0424:9514 Standard Microsystems Corp.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub


The other issue is that when I open sakis 3g, it doens't see the modem on the list. there are only 2 positions: "Interface #0" and "Interface #1", not the modem name.

Best regards,
Peter


Offline
PostPosted: Sun May 07, 2017 9:20 am Reply with quote
Posts: 1166 Joined: Wed Jul 11, 2012 3:14 pm Location: Koh Samui, TH
peterka11 wrote:

I mean, that after switching when I use lsusb command, I still don't see the model od the device but only manufacturer name:
Code:
Bus 001 Device 034: ID 17ef:600e Lenovo
Bus 001 Device 033: ID 12d1:151d Huawei Technologies Co., Ltd.
Bus 001 Device 004: ID 046d:c31c Logitech, Inc. Keyboard K120 for Business
Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp. SMSC9512/9514 Fast Ethernet Adapter
Bus 001 Device 002: ID 0424:9514 Standard Microsystems Corp.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub



The device string displayed by lsusb is completely irrelevant for the modems function.
12d1:1506 for instance is an id used by at least 30 different Huawei models and there is only space for displaying one or two of them.


peterka11 wrote:
The other issue is that when I open sakis 3g, it doens't see the modem on the list. there are only 2 positions: "Interface #0" and "Interface #1", not the modem name.


Sakis3g can obviously not identify the modem model but has found its interfaces and should then be able to dial-up if you select the right one of them.
Not being able to display the model is only a minor cosmetic error.


Offline
PostPosted: Mon May 08, 2017 9:54 am Reply with quote
Posts: 3 Joined: Sun May 07, 2017 12:06 am
Everything is working fine right now.
Thank you :)


Offline

Display posts from previous:  Sort by:

All times are UTC+02:00
Page 1 of 1
5 posts
Users browsing this forum: No registered users and 3 guests
Search for:
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