Usbmode (Huawei hilink mode to stick mode) support

Hi!

I have a Huawei 8372h LTE dongle. I was able to hook up and have my Openwrt router detect it as eth-2.

However, there are discussions that to unleash the full potential and scripting potential of the dongle it needs to be put into “stick” mode from the current “hi-link” mode.

From linux (debian), this can done using usb_modeswitch command. There is a kmod for that for OpenWRT too but the equivalent “usbmode” isn’t as powerful and limited options.

I need to run a command similar to: “usb_modeswitch -v 12d1 -p 14fe -V 12d1 -P 1506 -M “55534243123456780000000000000011060000000000000000000000000000”

There are no option “p” and capital “V” in usbmode. Can someone give me more information about this?

Sincerely,

Vince

Hi!

I found this as it was suggested to be similar to my problem while I was posting this topic.

Can i just ask, does this mean thw json file replaces the numerour options as seen in the non-openwrt linux version usb_modeswitch?

Regards,

Vince

Correct, you just need to adjust your .json to reflect PID, VID and message required.

Thank you @AndrewZ!

Just in case, do you have knowledge with Huawei dongles specifically e3372 or e8372? :smiley:

Regards,

Vince

Yes, I do :wink:

Pleeeeeeeeeaaaaaaaasssssse share :slightly_smiling_face:

What exactly do you need help with?
Did you manage to check the modem with the modified json?

Hi @AndrewZ ,

Due to lockdown my wife is working from home cannot interrupt router until weekend.

Having said that I’ve been researching on this almost the entire week now and getting ready for implementation this weekend. Apologies in advance but this might be a little long as I have quite a lot of questions, in prepration for my “change weekend”.

To give you context, here are the reasons why I am attaching my e8372h to my Linksys router:

  1. I wanted to be able to send wifi tokens through sms text messages from router.
  2. Although this is a slow compared to my main internet it can serve as a backup internet multiwan. Even in hi-link mode I am able to see and can configure multiwan and failover as OpenWRT already detects and configures the interfaces.

Below are my questions:

  1. Is making the Huawei dongle from Hilink to Stick mode reversible? Meaning I can change this back to hi-link mode when I want to and also when just in case I screw things up?

  2. I was able to install usbutils and got lsusb to work:
    root@OpenWrt-1900:~# lsusb
    Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
    Bus 002 Device 009: ID 12d1:14db Huawei Technologies Co., Ltd. E353/E3131
    Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
    Bus 003 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub

  3. In this website (jtanx.github.io/2018/12/28/huawei-e8372h-a5-v11-notes/)

  • sudo usb_modeswitch -v 12d1 -p 1f01 -M 55534243123456780000000000000011063000000000010000000000000000 <- Does this command universal for all hi-link dongles? Or does this change depending on the model?

  • If it is reversible and related to Q #1:
    sudo usb_modeswitch -v 12d1 -p 155e -M 55534243123456780000000000000011062000000101000100000000000000

  • I am having a hard time translating the usb modeswitch above into json format. I cannot see how I can translate "55534243123456780000000000000011062000000101000100000000000000” into json. TBH I don’t even understand what this long string of number does.

  1. Got a lot of information on making e3372h to stick mode and I found that the documentation is more reliable. This isn’t true for e8372h. However checking on the Huawei website, it looks like they are similar with the exception that e8372h has WIFI. Do you think that I am right in assuming they are applicable to 8372h? I am asking this because, if the answer to Q #1 is “not reversible” then I need to have a great deal of certainty on this.

Got more questions but these are the most pressing ones. Hope you could help me.

Thank you soooo much in advance!

Sincerely,

Vince

That is applicable to e3372, not e8372. With e3372 the change is in firmware (22.x to 21.x), with e8372 you can only temporally change the operating mode by sending the magic message.
If you want to try such a switch you will need to adjust your .json to reflect PID, VID and message required. I believe the right message is 55534243123456780000000000000011063000000000010000000000000000

1 Like

What??? :exploding_head: The string of numbers I sent actually mean something very specific to 3372?

The one you sent just now is the basically the message to TEMPORARILY stick-mode the e8372 dongle?

Since it’s temporary, then it means it is reversible. To revert to hi-link i just need to unplug and plug the dongle again?

Is the string of numbers have a formula or something?

Let me get this straight, to make sure I understand:

usb_modeswitch -v 12d1 -p 155e -M 55534243123456780000000000000011063000000101000100000000000000

The long string of numbers is the “magic” message which allows me to change from 14db to 155e?

The example is available on the site you mentioned - https://jtanx.github.io/2018/12/28/huawei-e8372h-a5-v11-notes/

usb_modeswitch -v 12d1 -p 1f01 -M 55534243123456780000000000000011063000000000010000000000000000

This will switch from 1f01 to 155e instead of 14db

Ok one last question, since it’s temporary. If I unplug and plug it back in, it will be back on hilink mode?

Yes, if you run modeswitch manually.
No, if you modified /etc/usb-mode.json in your router. In this case you will need to revert your modifications first.

Ok ... so somehow i lucked out in getting e8372h then. Co’z I can still use this as a vanilla dongle if I plug in somewhere else. I mean I looked at the instructions to downgrade firmware or e3372h it sounds very bloody and involves visiting sites with cyrillic characters.

How would the router know to take note of usb-mode.json settings? Do i need to make changes to startup/init.d? Or is this automatic?