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

Re: Huawei E3276s-150 confusion

Post by Tester » Tue May 15, 2018 9:08 pm

Guten Abend,

Finally I had the chance to get the log. :)


USB_ModeSwitch log from Mon May 14 21:43:17 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 ...
Error when trying to find MBIM configuration, switch to legacy modem mode
Command line:
usb_modeswitch -W -D -b 1 -g 6 -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)
--------------------------------
couldn't exec "/usr/sbin/usb_modeswitch"
--------------------------------
(end of usb_modeswitch output)
Core program reported switching failure. Exit

I guess I need to set some parameters on the file but, have no idea what parms I would need to set to make it an executable... :/

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 16, 2018 7:13 am

Hmm, try to run the test binary manually - just

# usb_modeswitch

I suspect a problem with it.

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

Re: Huawei E3276s-150 confusion

Post by Tester » Wed May 16, 2018 8:32 pm

Guten Abend,

I tried the "# usb_modeswitch" and just got new prompt ready for new command.

I tried the "usb_modeswitch" and got:

-bash: /usr/sbin/usb_modeswitch: Permission denied

doing "sudo usb_modeswitch" gave me:

sudo: usb_modeswitch: command not found

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 16, 2018 11:53 pm

O.K., that's Linux (rather Unix) 101, or "Grundkurs" ...

To make that test program executable, you have to modify its permissions first:

# chmod a+x /usr/sbin/usb_modeswitch

Still, try to run it manually after doing this, to make sure it does not crash.

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

Re: Huawei E3276s-150 confusion

Post by Tester » Thu May 17, 2018 9:19 pm

Hi,

My main fiddling with linux up til now have not required chmod... :) And I have not exactly studied the OS as such on a more detailed level. :( Probably something I will have to do when time will permit. :)

Anyhow: /var/log shows:

USB_ModeSwitch log from Thu May 17 21:05:31 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 6 -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.2 (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/006 ...
Look for default devices ...
bus/device number matched
found USB ID 12d1:157c
vendor ID matched
product ID matched
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 ...
Looking for active drivers ...
OK, driver detached
OK, driver detached
OK, configuration set
Get the current device configuration ...
The configuration was set successfully
ok:busdev
--------------------------------
(end of usb_modeswitch output)


Check success of mode switch for max. 20 seconds ...
Read attributes ...
All attributes matched
Mode switching was successful, found 12d1:157c (HUAWEI Technology: HUAWEI Mobil$
Logger is /usr/bin/logger
Check for AVOID_RESET_QUIRK kernel attribute
AVOID_RESET_QUIRK activated

All done, exit

Am Bestem,
Tester

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

Re: Huawei E3276s-150 confusion

Post by Josh » Fri May 18, 2018 10:07 pm

As you can probably see yourself, the previous error of not being able to set the configuration is gone.

I'm not 100% sure this is due to the test program - so you might want to watch if the process is stable (working every time) now.

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

Re: Huawei E3276s-150 confusion

Post by Tester » Sun May 20, 2018 6:52 pm

Hi,

Indeed - I can see the error gone - but, the device still does not switch from 157c to the new 1506.

Kindly,
Tester

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

Re: Huawei E3276s-150 confusion

Post by LOM » Mon May 21, 2018 3:39 am

Tester wrote:Hi,

Indeed - I can see the error gone - but, the device still does not switch from 157c to the new 1506.

Kindly,
Tester
12d1:157c contains two configurations, #1 is the virtual cd-rom with win drivers and connection manager - this is also called "install mode".
Config #2 is MBIM and this is the preferred mode in linux when it is available in the dongle, usb_modeswitch will select this configuration if cdc_mbim drivers are available in the kernel.
There is no change of USB Id when selecting another config so it is correct that your dongle still has the Id 12d1:157c.

If cdc_mbim drivers are not present in the kernel then usb_modeswitch will instead send a switch message to the dongle which will make it change from install mode to old windows (win xp/win 7) mode and that will also change its USB Id.

Are you looking for serial interfaces so you can use the dongle with the SpamU (Gammu) software?

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

Re: Huawei E3276s-150 confusion

Post by Tester » Mon May 21, 2018 5:11 pm

Hello,

Yes - I am looking for the serial capabilities - the ttyUSB0 for more specifics.

Irritatingly enough - with the "config 2" I am now in, the old and trusted

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

string, no longer makes my device ttyUSB0 appear like it did in the past.

so, for my needs, I still need to get the device from "config1", either directly to "1506" mode above which gives ttyUSB0 (if I am not in "config2" mode) or somehow going via "config2".

Kindly,
Tester

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

Re: Huawei E3276s-150 confusion

Post by LOM » Tue May 22, 2018 5:18 am

Either disable the mbim preference in usb_modeswitch.conf by setting
DisableMBIMGlobal=1

or

copy the 12d1:157c config file from the /usr/share/usb_modeswitch folder to the /etc/usb_modeswitch.d folder, then edit the copy by adding NoMBIMCheck=1
to it.

The first way disables mbim for all modems while second way disables mbim for this specific modem.

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

Re: Huawei E3276s-150 confusion

Post by Tester » Wed May 23, 2018 7:07 pm

Hello,

Perfect! :) We have a winner.

One final question though.

I am now running a modified usb_modeswitch - version 2.5.2.

Will that modification which it has, become "standard" in the future? I mean, I like to keep me updates using the public repositories and I guess the version I have is not there - at least not yet.

In any case I'd like to thank both of you with the patience with me and support on the situation.

Kindly,
Tester

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

Re: Huawei E3276s-150 confusion

Post by LOM » Thu May 24, 2018 5:24 am

Tester wrote:
I am now running a modified usb_modeswitch - version 2.5.2.

Will that modification which it has, become "standard" in the future? I mean, I like to keep me updates using the public repositories and I guess the version I have is not there - at least not yet.
I'm sure Josh will incorporate the config selection mod in 2.5.3 when it is due.
You can continue using the test version or you can revert to what you used before, either will work for you since you have disabled MBIM detection and MBIM config selection.

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

Re: Huawei E3276s-150 confusion

Post by Josh » Thu May 24, 2018 8:14 am

Indeed, I will change the configuration selection sequence in the next release, now that I have confirmation that the current sequence can cause problems.

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

Re: Huawei E3276s-150 confusion

Post by Tester » Thu May 24, 2018 8:45 am

Hello,

That is great news.
So, all I have to do in the future (once you've updated the public repositories that is) is to make apt-get install and the new version will show up there?

Really many thanks from all of you, with the patience, help and support guidance.
I've managed to make the proof-of-concept of my coming "toy" for my home, yesterday and wife is, to say the least, both confused but yet surprised happy. :)

Kindly,
Tester

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

Re: Huawei E3276s-150 confusion

Post by LOM » Thu May 24, 2018 9:33 am

Tester wrote: So, all I have to do in the future (once you've updated the public repositories that is) is to make apt-get install and the new version will show up there?
Each linux distro maintainer is responsible for his repositories and the update of them,
Source code for new versions are posted here http://www.draisberghof.de/usb_modeswitch/ for the distro maintainers to pick up and integrate when they feel for doing it..

Post Reply