Activation Codes and Methods, Hardware Details, Sniffing
Tester
Posts: 16
Joined: Wed May 02, 2018 8:45 pm

Huawei E3276s-150 confusion

Post by Tester » Wed May 02, 2018 9:01 pm

Hello,

I managed to get hold of an E3276s-150 (the non-HiLink version).
Now, I really want it to perform as well.

OS:
Raspbian strech lite. 2018-04-18 (not yet needed any update installs).
USB_modeswitch comes with the distro.

Plugging the dongle in, (USB HUB with separate power) and writing "LSUSB" give me a Huawei product 12d1:157c.

usb_modeswitch -v 12d1 -p 157c -V 12d1 -P 1506 -M 55534243123456780000000000000011062000000100000000000000000000

lsusb

gives me what I want - the 12d1:1506 device. (I can also find the ttyUSB0 device which is indicating that I do have what I need for next activities.

My question:
How do I make that modem mode permanent at every boot (including cold boot)? I've looked around and found several variants but, none which seems to work. Since I am a Linux Noob, it MIGHT be a case where I have not understood permissions for files - so, if someone could issue a very detailed step by step guide, I'd be most happy for the assistance.

Kindly/Am Bestem,
Tester

Josh
Site Admin
Posts: 6534
Joined: Sat Nov 03, 2007 12:30 am

Re: Huawei E3276s-150 confusion

Post by Josh » Wed May 02, 2018 10:17 pm

usb_modeswitch should work during a cold boot.

Which version is included with the Raspbian distro?

Tester
Posts: 16
Joined: Wed May 02, 2018 8:45 pm

Re: Huawei E3276s-150 confusion

Post by Tester » Thu May 03, 2018 9:35 am

Hello,

I believe it's 2.4 or higher.

Looking inside the .tar.gz with all the config files, I do recognize the 12d1:157c device in there. (Don't remember the location of the config package file off the top of my head.)

Kindly/Am Bestem,
Tester

LOM
Posts: 1292
Joined: Wed Jul 11, 2012 3:14 pm
Location: Koh Samui, TH

Re: Huawei E3276s-150 confusion

Post by LOM » Thu May 03, 2018 2:25 pm

Tester wrote:Hello,

I believe it's 2.4 or higher.
No need to believe, just type usb_modeswitch without any arguments on the cmdline and it will among other things display the version.

Tester
Posts: 16
Joined: Wed May 02, 2018 8:45 pm

Re: Huawei E3276s-150 confusion

Post by Tester » Thu May 03, 2018 5:49 pm

Hi - well Believe is the best I could do when being in office and not having the info "at my fingertips".

Anyhow, I should add that Raspbian Stretch LITE is what I run, released in above date and the version of USB_modeswitch included is 2.5.0 when checking on the physical machine.

Kindly/Am Bestem,
Tester

Tester
Posts: 16
Joined: Wed May 02, 2018 8:45 pm

Re: Huawei E3276s-150 confusion

Post by Tester » Mon May 07, 2018 5:48 pm

Hi,

As previously stated:

Setup:

Modem - E3276s-150 Non-HiLink. starting VID 12d1, starting PID 157c
computer: Rpi running Raspbian Stretch Lite 2018-04-18 Out of "box" - image downloaded off the official raspbian download site. /usr/share/usb_modeswitch/configxxxxxx.tar.gz contains file for 12d1:157c.

Currently working:

Manual modeswitch using sudo usb_modeswitch -v 12d1 -p 157c -V 12d1 -P 1506 -M 55534243123456780000000000000011062000000100000000000000000000

VID still 12d1, PID becomes 1506. ttyUSB0 etc shows up.

Warm reboot keeps the 1506 PID.

Currently NOT working:

Getting the 12d1:1506 directly on first cold boot and persistant.

Any ideas what goes wrong?

Kindly/Am Bestem,
Tester

Josh
Site Admin
Posts: 6534
Joined: Sat Nov 03, 2007 12:30 am

Re: Huawei E3276s-150 confusion

Post by Josh » Wed May 09, 2018 7:55 am

Did you try to get usb_modeswitch's log during boot?

See /etc/usb_modeswitch.conf if you haven't already done so.

Tester
Posts: 16
Joined: Wed May 02, 2018 8:45 pm

Re: Huawei E3276s-150 confusion

Post by Tester » Thu May 10, 2018 1:46 pm

Hi,

Below is the content of /var/log/usb_modeswitch_1-1.3.3 from my setup.

Kindly,
Tester

USB_ModeSwitch log from Thu May 10 13:34:24 CEST 2018

Use global config file: /etc/usb_modeswitch.conf
Raw parameters: {--switch-mode} {1-1.3.3:1.0}
Use top device dir /sys/bus/usb/devices/1-1.3.3
Check class of first interface ...
Interface 0 class is 08.

----------------
USB values from sysfs:
manufacturer HUAWEI Technology
product HUAWEI Mobile
serial FFFFFFFFFFFFFFFF
----------------
Found packed config collection /usr/share/usb_modeswitch/configPack.tar.gz
ConfigList: pack/12d1:157c pack/12d1:#linux
SCSI attributes not needed, move on
Check config: pack/12d1:157c
! matched. Read config data
Extract config 12d1:157c from collection /usr/share/usb_modeswitch/configPack.t$
Device may have an MBIM configuration, check driver ...
driver for MBIM devices is available
Find MBIM configuration number ...
Command line:
usb_modeswitch -W -D -b 1 -g 7 -v 12d1 -p 157c -f $flags(config)

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.5.0 (C) Josua Dietze 2017
* Based on libusb1/libusbx

! PLEASE REPORT NEW CONFIGURATIONS !

DefaultVendor= 0x12d1
DefaultProduct= 0x157c
Configuration=0x02
System integration mode enabled

Use given bus/device number: 001/007 ...
Look for default devices ...
bus/device number matched
found USB ID 12d1:157c
vendor ID matched
product ID matched
Get the current device configuration ...
device configuration 1 not matching target
count device
Found devices in default mode (1)
Get the current device configuration ...
Current configuration number is 1
Use interface number 0
with class 8

USB description data (for identification)
-------------------------
Manufacturer: HUAWEI Technology
Product: HUAWEI Mobile
Serial No.: FFFFFFFFFFFFFFFF
-------------------------
Change configuration to 2 ...
Device is busy, try to detach kernel driver
Looking for active driver ...
OK, driver detached
Device is busy, try to detach kernel driver
Looking for active driver ...
No active driver found. Detached before or never attached
Device is busy, try to detach kernel driver
Looking for active driver ...
No active driver found. Detached before or never attached
Device is busy, try to detach kernel driver
Looking for active driver ...
No active driver found. Detached before or never attached
Changing the configuration failed (error -6). Try to continue
ok:busdev
--------------------------------
(end of usb_modeswitch output)

Check success of mode switch for max. 20 seconds ...
Read attributes ...
Read attributes ...
Read attributes ...
Read attributes ...
Read attributes ...
Read attributes ...
Read attributes ...
Read attributes ...
Read attributes ...
Read attributes ...
Read attributes ...
Read attributes ...
Read attributes ...
Read attributes ...
Read attributes ...
Read attributes ...
Read attributes ...
Read attributes ...
Read attributes ...
Read attributes ...

Target config not matching - current values are
1-1.3.3:1.0/bInterfaceClass: 08
bConfigurationValue: 1
bNumConfigurations: 2
busnum: 1
devnum: 7
idProduct: 157c
idVendor: 12d1
manufacturer: HUAWEI Technology
product: HUAWEI Mobile
serial: FFFFFFFFFFFFFFFF

Mode switching may have failed. Exit

Josh
Site Admin
Posts: 6534
Joined: Sat Nov 03, 2007 12:30 am

Re: Huawei E3276s-150 confusion

Post by Josh » Fri May 11, 2018 9:43 pm

There we can see a problem - "device busy".

I'm not sure what to do with that though. It's possible that the current way of switching the configuration is the culprit. Devices are first reset by selecting configuration "-1" as per recommendation in the libusb docs.

There were cases where this seemed to be a problem. I will prepare a test version on my Raspi tomorrow that uses the 'official' configuration "0" for resetting.

Josh
Site Admin
Posts: 6534
Joined: Sat Nov 03, 2007 12:30 am

Re: Huawei E3276s-150 confusion

Post by Josh » Sun May 13, 2018 11:41 am

Here you go - with a little delay ...

Just unzip and drop in to replace your version (rename your's to usb_modeswitch.off or something).
Attachments
usb_modeswitch-2.5.2-test-arm.zip
(20.07 KiB) Downloaded 113 times

Tester
Posts: 16
Joined: Wed May 02, 2018 8:45 pm

Re: Huawei E3276s-150 confusion

Post by Tester » Sun May 13, 2018 7:57 pm

Hi,

Since I am a bit of Linux and USB_modeswitch noob - where does this go in the filesystem of my RpI installation?

Kindly,
Tester

Josh
Site Admin
Posts: 6534
Joined: Sat Nov 03, 2007 12:30 am

Re: Huawei E3276s-150 confusion

Post by Josh » Sun May 13, 2018 10:05 pm

The binary program should be in "/usr/sbin".

If I do a test like this, I rename the original program 'in place':

# mv usb_modeswitch usb_modeswitch.orig

Then I copy the test version into the same folder. To roll back the change, just delete the test version and rename the original back.

BTW, I'm using "mc", the file manager "Midnight Commander". Much more comfort there ...

Tester
Posts: 16
Joined: Wed May 02, 2018 8:45 pm

Re: Huawei E3276s-150 confusion

Post by Tester » Mon May 14, 2018 2:24 pm

Excellent! Will try later tonight. :)

Yeah - MC is a convenience tool in the Command Prompt of Linux. :)

Kindly,
Tester

Tester
Posts: 16
Joined: Wed May 02, 2018 8:45 pm

Re: Huawei E3276s-150 confusion

Post by Tester » Mon May 14, 2018 9:42 pm

Hi,

Did as you said - still no switch of the device. Any log files I should be sending in?

Kindly,
Tester

Josh
Site Admin
Posts: 6534
Joined: Sat Nov 03, 2007 12:30 am

Re: Huawei E3276s-150 confusion

Post by Josh » Tue May 15, 2018 7:34 am

Yes, I'd like to see the log from a cold boot with modem, with the new test version in place.

Post Reply