Huawei / Browi E3372-325 modeswitch not working


I am running a TP-Link TL-WDR4300 with current stable aka 22.03. I have a HiLink G4 stick that works perfecty under Windows 11. But with OpenWRT I only get

Sun Jul  9 00:34:00 2023 kernel: [156186.358532] usb 1-1.2: new high-speed USB device number 12 using ehci-platform
Sun Jul  9 00:34:02 2023 kernel: [156188.623326] usb 1-1.2: USB disconnect, device number 12
Sun Jul  9 00:34:03 2023 kernel: [156189.428537] usb 1-1.2: new high-speed USB device number 13 using ehci-platform
Sun Jul  9 00:34:03 2023 kernel: [156189.624153] usb-storage 1-1.2:1.0: USB Mass Storage device detected
Sun Jul  9 00:34:03 2023 kernel: [156189.660832] scsi host1: usb-storage 1-1.2:1.0
Sun Jul  9 00:34:04 2023 kern.notice kernel: [156190.669857] scsi 1:0:0:0: CD-ROM            Linux    File-Stor Gadget 0310 PQ: 0 ANSI: 2

The output from lsusb contains Bus 001 Device 011: ID 3566:2001 Mobile Mobile

This is a E3372-325, which seems to be a new model, different from E3372-320.

I have been looking at this page (Brovi E3372 (manufactured by Huawei) - USB_ModeSwitch) and trying to figure out what to do.

There is no /etc/usb_modeswitch.d/ in OpenWRT and I wonder, if I created one, would it matter at all. Seems like the /sbin/usbmode binary in usb-modeswitch - 2022-02-24-3c8595a4-1 package only expects a JSON configuration file, which happens to be /etc/usb-mode.json by default.

It seems usbmode -l should list all the devices it recognizes as capable of a modeswitch, but that doesn't seem to be happening here. So I should somehow add this to /etc/usb-mode.json, if I only knew what to add.

Please refer to the existing topic Huawei e3372h-325 now working - stuck in CDROM only mode with OpenWrt

I don't see anything useful there. Neither do I see any answers there to my questions or any explanations that would give me more understanding about this problem. So what is it that you expect me to do there?

My dongle has firmware and WebUI version, which seem equal and more recent than the ones mentioned there. But this did not solve the problem.

By adding the mention of 3356:2001 into /etc/usb-mode.json I got /sbin/usbmode to see it, but not change it in any way.

By installing the kmod-usb-net-rndis I got it to cycle endlessly between RNDIS and storage device.

I am studying this and this (from Pavel Piatruk' tech & personal blog) now. But here again they're creating udev rules and I don't see udev in OpenWRT. Also, the usbmode and usb_modeswitch seem like completely different binaries that accept completely different options, so what you can do with usb_modeswitch you can not do with OpenWRT's usbmode.

My versions of the firmware and WebUI are actually a bit older than the ones mentioned in the other discussion. I have SP5 and SP3, versus SP7 and SP4 mentioned there.

My version of the stick works in Debian Bookworm on my laptop if I create /etc/udev/rules.d/40-huawei.rules with contents:

# This is part of USB_ModeSwitch version 1.x.x
ACTION!="add", GOTO="modeswitch_rules_end"
SUBSYSTEM!="usb", GOTO="modeswitch_rules_end"

# All known install partitions are on interface 0
ATTRS{bInterfaceNumber}!="00", GOTO="modeswitch_rules_end"

# only storage class devices are handled; negative
# filtering here would exclude some quirky devices
ATTRS{bDeviceClass}=="e0", GOTO="modeswitch_rules_begin"
ATTRS{bInterfaceClass}=="e0", GOTO="modeswitch_rules_begin"

# Huawei E3372-325
ATTRS{idVendor}=="3566", ATTRS{idProduct}=="2001", RUN+="/sbin/usb_modeswitch -v 3566 -p 2001 -W -R -w 400"
ATTRS{idVendor}=="3566", ATTRS{idProduct}=="2001", RUN+="/sbin/usb_modeswitch -v 3566 -p 2001 -W -R"


Of course I have the /etc/usb_modeswitch.d/3566:2001 that contains:

# Brovi E3372-325

It regisers as rndis, unregisters, registers, unregisters, disconnects, reconnects, registers, unregisters, registers, unregisters and then registers for the final time and appears as /dev/usb0 that is instantly renamed in my Debian Bookworm into some cryptic string. Something then runs dhclient automatically and Xfce NetworkManager Applet announces that you have teh Internets.

So the key to the whole thing seems to be to act immediately after it is inserted. Now I must take a long hard look if I can make it work with OpenWRT in the few days I have left to try to get my money back if I fail. The TP-Link this is for is supposed to serve computer-illiterate family members and relatives. The previous dongle and router only required them to plug it in and wait a minute or two. But then the router got physically damaged, the dongle was 3G only and 3G service was turned off earlier this summer.

Did you make any progress? It seems I can male mine connect, at least according to the LED. By creating these two files:

but it does not pop up under /dev/ so I'm stuck there.

I need to try those instructions out when I have time. As far as I know, the stick will connect with the cellular tower no matter what you do, as long as the SIM is unlocked.

What do your logfiles look like?

Hm, I remember that without the files, it stays in cycling the LED. Don't have the router with me right now, and might not be able to access it in the nex three weeks, holidays... Will reply as soon as possible.

I am in the same situation, please if there is any progress, I would like to know, I have Openwrt/Ofmodemandmen firmware, :slight_smile: )

Okay I took some time to tinker with it. No success, but some observations.
If I use the /etc/hotplug.d/usb/10-brovi from the link above, with 10s inbetween, then the modem connects to the internet, but I don't have a device I can use in openwrt. If I send a usbmode command in the first 2.5s I have a rndis device (USB0) but the modem keeps blinking and I don't see any Internet connection.

Any Ideas?