Huawei e3372h-325 now working - stuck in CDROM only mode with OpenWrt

I have already got a e3372 running for 2 years now and it is working fine in cdc_ether mode.

So now I got a new e3372h-325 stick and I have tried to get this one working on openwrt, but so far have not been very successfull.

The problem is mostly around the fact that mode-switching is not working and I have already followed a lot of hints:

unfortunately these have been quite unsuccessfull.

Fact is:

  • device starts as: a rndis_host with the interface coming up for 1-3 seconds (sometimes I even get the classical IP 192.168.8.101)
  • then it resets
  • and comes up as a USB mass storage - and there is no way forward from there...

The stick works fine on OSX but also on windows...

On ubuntu 22.4 I can get it to work with a different driver when forcing:

rmmod usbserial (and possibly other dependencies)
modprobe usbserial vendor=0x3566 product=0x2001
usb_modprobe -v 3566 -p 2001 -X

(or adding to /etc/modprobe.d/e3372 these parameters as options usbserial vendor=0x3566 product=0x2001)

and then I get 3 ttyUSB devices plus a cdc_ncm device, which then Ubuntu can use via pppd to connect to 4G - and that works...

But unfortunately I have not been successful getting even there with openwrt - not even getting the ttyUSB devices!

So here the system output via logread -f plus a simple logging usb hotplug handler shoing all the events that hotplug is triggering:

Sun Mar  5 17:13:55 2023 kern.info kernel: [  198.909099] usb 1-1.5.2: new high-speed USB device number 9 using dwc_otg
Sun Mar  5 17:13:56 2023 kern.info kernel: [  199.050808] usb 1-1.5.2: New USB device found, idVendor=3566, idProduct=2001, bcdDevice=ff.ff
Sun Mar  5 17:13:56 2023 kern.info kernel: [  199.064717] usb 1-1.5.2: New USB device strings: Mfr=2, Product=3, SerialNumber=4
Sun Mar  5 17:13:56 2023 kern.info kernel: [  199.077586] usb 1-1.5.2: Product: Mobile
Sun Mar  5 17:13:56 2023 kern.info kernel: [  199.084166] usb 1-1.5.2: Manufacturer: Mobile
Sun Mar  5 17:13:56 2023 kern.info kernel: [  199.091188] usb 1-1.5.2: SerialNumber: 123456789ABCD
Sun Mar  5 17:13:56 2023 kern.info kernel: [  199.102302] rndis_host 1-1.5.2:1.0 usb0: register 'rndis_host' at usb-3f980000.usb-1.5.2, RNDIS device, 46:d0:ed:17:e1:c9
Sun Mar  5 17:13:56 2023 user.notice e3372h: 3566/2001/ffff add
Sun Mar  5 17:13:56 2023 user.notice e3372h: 3566/2001/ffff change
Sun Mar  5 17:13:56 2023 user.notice e3372h: 3566/2001/ffff add 224/1/3
Sun Mar  5 17:13:56 2023 user.notice e3372h: 3566/2001/ffff bind 224/1/3
Sun Mar  5 17:13:56 2023 user.notice e3372h: 3566/2001/ffff add 10/0/0
Sun Mar  5 17:13:56 2023 user.notice e3372h: 3566/2001/ffff bind 10/0/0
Sun Mar  5 17:13:56 2023 user.notice e3372h: 3566/2001/ffff bind
Sun Mar  5 17:13:58 2023 kern.info kernel: [  201.116039] usb 1-1.5.2: USB disconnect, device number 9
Sun Mar  5 17:13:58 2023 kern.info kernel: [  201.124169] rndis_host 1-1.5.2:1.0 usb0: unregister 'rndis_host' usb-3f980000.usb-1.5.2, RNDIS device
Sun Mar  5 17:13:58 2023 user.notice e3372h: 3566/2001/ffff unbind 10/0/0
Sun Mar  5 17:13:58 2023 user.notice e3372h: 3566/2001/ffff unbind 224/1/3
Sun Mar  5 17:13:58 2023 user.notice e3372h: 3566/2001/ffff remove 224/1/3
Sun Mar  5 17:13:58 2023 user.notice e3372h: 3566/2001/ffff remove 10/0/0
Sun Mar  5 17:13:58 2023 user.notice e3372h: 3566/2001/ffff unbind
Sun Mar  5 17:13:58 2023 user.notice e3372h: 3566/2001/ffff remove
Sun Mar  5 17:13:58 2023 kern.info kernel: [  201.989065] usb 1-1.5.2: new high-speed USB device number 10 using dwc_otg
Sun Mar  5 17:13:59 2023 kern.info kernel: [  202.130837] usb 1-1.5.2: New USB device found, idVendor=3566, idProduct=2001, bcdDevice=ff.ff
Sun Mar  5 17:13:59 2023 kern.info kernel: [  202.144879] usb 1-1.5.2: New USB device strings: Mfr=2, Product=3, SerialNumber=4
Sun Mar  5 17:13:59 2023 kern.info kernel: [  202.158036] usb 1-1.5.2: Product: Mobile
Sun Mar  5 17:13:59 2023 kern.info kernel: [  202.164883] usb 1-1.5.2: Manufacturer: Mobile
Sun Mar  5 17:13:59 2023 kern.info kernel: [  202.172115] usb 1-1.5.2: SerialNumber: 123456789ABCD
Sun Mar  5 17:13:59 2023 kern.info kernel: [  202.181491] usb-storage 1-1.5.2:1.0: USB Mass Storage device detected
Sun Mar  5 17:13:59 2023 kern.info kernel: [  202.191755] scsi host0: usb-storage 1-1.5.2:1.0
Sun Mar  5 17:13:59 2023 user.notice e3372h: 3566/2001/ffff add
Sun Mar  5 17:13:59 2023 user.notice e3372h: 3566/2001/ffff change
Sun Mar  5 17:13:59 2023 user.notice e3372h: 3566/2001/ffff add 8/6/80
Sun Mar  5 17:13:59 2023 user.notice e3372h: 3566/2001/ffff bind 8/6/80
Sun Mar  5 17:13:59 2023 user.notice e3372h: 3566/2001/ffff bind
Sun Mar  5 17:14:00 2023 kern.notice kernel: [  203.209938] scsi 0:0:0:0: CD-ROM            Linux    File-Stor Gadget 0310 PQ: 0 ANSI: 2
Sun Mar  5 17:14:00 2023 kern.warn kernel: [  203.224578] sr 0:0:0:0: Power-on or device reset occurred
Sun Mar  5 17:14:00 2023 kern.info kernel: [  203.234444] sr 0:0:0:0: [sr0] scsi3-mmc drive: 0x/0x caddy
Sun Mar  5 17:14:00 2023 kern.debug kernel: [  203.246604] sr 0:0:0:0: Attached scsi CD-ROM sr0

There is mention in one of the links above there is supposedly a newer version of the firmware than 3.0.2.61 available: 3.0.2.62.

But unfortunately .62 is - at least for my device/Wireless Operator - not available for download over the WebUI on 192.168.8.1 on OSX/Windows...

So in the hope that someone has solved this issue already!

As a note: ubuntu with this udev rule is working /etc/udev/rules.d/40-huawei.rules:

# 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"
GOTO="modeswitch_rules_end"

LABEL="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"

LABEL="modeswitch_rules_end" 

See: https://www.draisberghof.de/usb_modeswitch/bb/viewtopic.php?f=3&t=3043&p=20026#p20054

and looks like this in dmesg:

[25517.735517] usb 1-1.2: new high-speed USB device number 56 using ehci-pci
[25517.845294] usb 1-1.2: New USB device found, idVendor=3566, idProduct=2001, bcdDevice=ff.ff
[25517.845306] usb 1-1.2: New USB device strings: Mfr=2, Product=3, SerialNumber=4
[25517.845310] usb 1-1.2: Product: Mobile
[25517.845313] usb 1-1.2: Manufacturer: Mobile
[25517.845316] usb 1-1.2: SerialNumber: 123456789ABCD
[25517.849664] rndis_host 1-1.2:1.0 usb0: register 'rndis_host' at usb-0000:00:04.1-1.2, RNDIS device, a6:92:0f:XX:XX:XX
[25518.900520] rndis_host 1-1.2:1.0 usb0: unregister 'rndis_host' usb-0000:00:04.1-1.2, RNDIS device
[25519.011580] usb 1-1.2: reset high-speed USB device number 56 using ehci-pci
[25519.123465] rndis_host 1-1.2:1.0 usb0: register 'rndis_host' at usb-0000:00:04.1-1.2, RNDIS device, a6:92:0f:XX:XX:XX
[25520.141437] rndis_host 1-1.2:1.0 usb0: unregister 'rndis_host' usb-0000:00:04.1-1.2, RNDIS device
[25520.243517] usb 1-1.2: reset high-speed USB device number 56 using ehci-pci
[25520.415919] usb 1-1.2: device firmware changed
[25520.417498] usb 1-1.2: USB disconnect, device number 56
[25521.195520] usb 1-1.2: new high-speed USB device number 57 using ehci-pci
[25521.305613] usb 1-1.2: New USB device found, idVendor=3566, idProduct=2001, bcdDevice=ff.ff
[25521.305625] usb 1-1.2: New USB device strings: Mfr=2, Product=3, SerialNumber=4
[25521.305629] usb 1-1.2: Product: Mobile
[25521.305632] usb 1-1.2: Manufacturer: Mobile
[25521.305635] usb 1-1.2: SerialNumber: 123456789ABCD
[25521.311779] rndis_host 1-1.2:1.0 usb0: register 'rndis_host' at usb-0000:00:04.1-1.2, RNDIS device, a6:92:0f:XX:XX:XX
[25522.375786] rndis_host 1-1.2:1.0 usb0: unregister 'rndis_host' usb-0000:00:04.1-1.2, RNDIS device
[25522.487595] usb 1-1.2: reset high-speed USB device number 57 using ehci-pci
[25522.599926] rndis_host 1-1.2:1.0 usb0: register 'rndis_host' at usb-0000:00:04.1-1.2, RNDIS device, a6:92:0f:XX:XX:XX
[25523.626364] rndis_host 1-1.2:1.0 usb0: unregister 'rndis_host' usb-0000:00:04.1-1.2, RNDIS device
[25523.727574] usb 1-1.2: reset high-speed USB device number 57 using ehci-pci
[25523.839178] rndis_host 1-1.2:1.0 usb0: register 'rndis_host' at usb-0000:00:04.1-1.2, RNDIS device, a6:92:0f:XX:XX:XX
[25523.950857] rndis_host 1-1.2:1.0 enxa6920fXXXXXX: renamed from usb0

For my use case this would be sufficient if there was a way to get this working also on openwrt...

Any ideas how to translate this to OpenWRTs hotplug plus usbmode?

The link from which I took this states that there are some quirks with this arround system reboot(requiring a unplug/replug to reset), so it is not perfect...

According to https://unix.stackexchange.com/questions/733971/usb-lte-modem-brovi-e3372-325-not-working you'd need to do the modeswitch too..

usb_modeswitch -v 3566 -p 2001 -X

Not usb_modprobe, or was that a typo ?

yes, that was a typo - I have tried too many mod... thingies :wink:

anyway: usb_modeswitch itself does not exist with openwrt - only usbmode, so I am looking for a solution here!

So the one thing that made the hilink interface appear was:

  • put the Stick on a USB hub
  • run usbmode -c brovi.json -s; usbreset 05e3:0608 several times (05e3:0608 is the ID of my USB hub)
  • brovi.json looks like this:
{
        "messages" : [ ],
        "devices" : {
                "3566:2001": {
                        "*": {
                                "t_class": 224,
                                "mode": "HuaweiNew",
                                "msg": [  ]
                        }
                }
        }
}

then:

  • I can bring up the interface with: ip link set usb0 up
  • set the address with: ip addr add 192.168.8.10/24 dev usb0

and with that I can ping 192.168.8.1 and I get the interface.

Well, that was working manually - nothing automated yet...

not sure if I need to use the usbmode command really...

The kernel module used is: rndis_host !

Same exact problem here!

I tried the hub trick but it doesn't work. @msperl maybe are you using an external powered usb hub?

I've made it work in arch linux using an udev rule using usb_modeswitch but I cannot avoid the unregister of RNDIS in OpenWRT, it changes to mass storage.

Maybe de e3372h-325 is too new and still haven't specific configurations in openWRT's usb-modeswitch. The vendor and product id 3566:2001 is shown as Mobile Mobile and I saw other posts with people using previous e3372h-320 version that the device is shown as a Huawei device...

Have you made any progress with this?

Thank you!

I am seeing the same on a recently purchased E3372-325 purchased from amazon uk, it has a "zowee" branded landing page at http://192.168.8.1 and presents in exactly the same way. I've tried the hub trick as well and haven't been able to get it to work. When I first plugged it into a windows box it had "Auto Update" enabled, and appeared to have updated shortly after connecting it, perhaps that makes a difference to whether the hub trick works or not.

Hello @msperl

Can you share your logread output when you launch usbmode with the hub trick?
I tried many times but I only see that device disconnects and reconnects again as a mass storage, but no rndis info is shown.

Thu Apr  6 21:36:50 2023 kern.info kernel: [172070.604885] usb 1-1.2: USB disconnect, device number 52
Thu Apr  6 21:36:51 2023 kern.info kernel: [172070.783603] usb 1-1: reset high-speed USB device number 2 using ehci-platform
Thu Apr  6 21:36:51 2023 kern.info kernel: [172071.363594] usb 1-1.2: new high-speed USB device number 53 using ehci-platform
Thu Apr  6 21:36:51 2023 kern.info kernel: [172071.569923] usb-storage 1-1.2:1.0: USB Mass Storage device detected
Thu Apr  6 21:36:51 2023 kern.info kernel: [172071.615246] scsi host0: usb-storage 1-1.2:1.0
Thu Apr  6 21:36:52 2023 kern.notice kernel: [172072.654803] scsi 0:0:0:0: CD-ROM            Linux    File-Stor Gadget 0310 PQ: 0 ANSI: 2

Thanks!

Unfortunately no success - and the USB Hub trick does not work (any longer).

I still have not received the .62 Firmware version and thus I am still running on 3.0.2.61(H057SP5C983) which is supposedly having no troubles...

I can still use it on Ubuntu (using it right now), but unfortunately it does not work with OpenWRT - it is stuck in that CDROM mode!

this is what I get with Ubuntu in dmesg when I plug it in:

[  595.352431] usb 2-2: new high-speed USB device number 4 using ehci-pci
[  595.518189] usb 2-2: New USB device found, idVendor=3566, idProduct=2001, bcdDevice=ff.ff
[  595.518200] usb 2-2: New USB device strings: Mfr=2, Product=3, SerialNumber=4
[  595.518204] usb 2-2: Product: Mobile
[  595.518207] usb 2-2: Manufacturer: Mobile
[  595.518210] usb 2-2: SerialNumber: 123456789ABCD
[  596.704425] usb 2-2: reset high-speed USB device number 4 using ehci-pci
[  598.012444] usb 2-2: reset high-speed USB device number 4 using ehci-pci
[  598.232887] usb 2-2: device firmware changed
[  598.233267] usb 2-2: USB disconnect, device number 4
[  598.248740] usbcore: registered new interface driver cdc_ether
[  598.254822] usbcore: registered new interface driver rndis_host
[  599.048430] usb 2-2: new high-speed USB device number 5 using ehci-pci
[  599.206844] usb 2-2: New USB device found, idVendor=3566, idProduct=2001, bcdDevice=ff.ff
[  599.206856] usb 2-2: New USB device strings: Mfr=2, Product=3, SerialNumber=4
[  599.206860] usb 2-2: Product: Mobile
[  599.206863] usb 2-2: Manufacturer: Mobile
[  599.206866] usb 2-2: SerialNumber: 123456789ABCD
[  599.211012] rndis_host 2-2:1.0 usb0: register 'rndis_host' at usb-0000:00:06.1-2, RNDIS device, 1e:bc:6d:9a:bf:61
[  600.252810] rndis_host 2-2:1.0 usb0: unregister 'rndis_host' usb-0000:00:06.1-2, RNDIS device
[  600.404491] usb 2-2: reset high-speed USB device number 5 using ehci-pci
[  600.564714] rndis_host 2-2:1.0 usb0: register 'rndis_host' at usb-0000:00:06.1-2, RNDIS device, 1e:bc:6d:9a:bf:61
[  601.589286] rndis_host 2-2:1.0 usb0: unregister 'rndis_host' usb-0000:00:06.1-2, RNDIS device
[  601.740432] usb 2-2: reset high-speed USB device number 5 using ehci-pci
[  601.908025] rndis_host 2-2:1.0 usb0: register 'rndis_host' at usb-0000:00:06.1-2, RNDIS device, 1e:bc:6d:9a:bf:61
[  602.008485] rndis_host 2-2:1.0 enx1ebc6d9abf61: renamed from usb0

And this on OpenWRT on a RPI3:

[   96.988801] usb 1-1.5: new high-speed USB device number 4 using dwc_otg
[   97.120509] usb 1-1.5: New USB device found, idVendor=3566, idProduct=2001, bcdDevice=ff.ff
[   97.133607] usb 1-1.5: New USB device strings: Mfr=2, Product=3, SerialNumber=4
[   97.143468] usb 1-1.5: Product: Mobile
[   97.149670] usb 1-1.5: Manufacturer: Mobile
[   97.156275] usb 1-1.5: SerialNumber: 123456789ABCD
[   97.167136] rndis_host 1-1.5:1.0 usb0: register 'rndis_host' at usb-3f980000.usb-1.5, RNDIS device, fa:69:68:3f:91:6d
[   99.256777] usb 1-1.5: USB disconnect, device number 4
[   99.264735] rndis_host 1-1.5:1.0 usb0: unregister 'rndis_host' usb-3f980000.usb-1.5, RNDIS device
[  100.068805] usb 1-1.5: new high-speed USB device number 5 using dwc_otg
[  100.200646] usb 1-1.5: New USB device found, idVendor=3566, idProduct=2001, bcdDevice=ff.ff
[  100.214540] usb 1-1.5: New USB device strings: Mfr=2, Product=3, SerialNumber=4
[  100.224868] usb 1-1.5: Product: Mobile
[  100.231466] usb 1-1.5: Manufacturer: Mobile
[  100.238414] usb 1-1.5: SerialNumber: 123456789ABCD
[  100.247588] usb-storage 1-1.5:1.0: USB Mass Storage device detected
[  100.256764] scsi host0: usb-storage 1-1.5:1.0
[  101.289927] scsi 0:0:0:0: CD-ROM            Linux    File-Stor Gadget 0310 PQ: 0 ANSI: 2

So I now tried to connect the device to an older OpenWRT wifi router running 19.7.

Same issue there:

[64498820.852966] usb 1-1.1: new high-speed USB device number 8 using ehci-platform
[64498821.020853] rndis_host 1-1.1:1.0 usb0: register 'rndis_host' at usb-1b000000.usb-1.1, RNDIS device, 7a:17:cb:35:94:a5
[64498823.115226] usb 1-1.1: USB disconnect, device number 8
[64498823.120951] rndis_host 1-1.1:1.0 usb0: unregister 'rndis_host' usb-1b000000.usb-1.1, RNDIS device
[64498823.922921] usb 1-1.1: new high-speed USB device number 9 using ehci-platform
[64498824.098343] usb-storage 1-1.1:1.0: USB Mass Storage device detected
[64498824.106005] scsi host0: usb-storage 1-1.1:1.0
[64498825.114377] scsi 0:0:0:0: CD-ROM            Linux    File-Stor Gadget 0310 PQ: 0 ANSI: 2
[64498825.126765] sr 0:0:0:0: [sr0] scsi3-mmc drive: 0x/0x caddy
[64498825.132813] cdrom: Uniform CD-ROM driver Revision: 3.20
[64498825.138996] sr 0:0:0:0: Attached scsi CD-ROM sr0
[64498825.144459] sr 0:0:0:0: Attached scsi generic sg0 type 5

Stuck in CDROM mode (after installing all the drivers)

lsusb for the device shows this:

Bus 001 Device 009: ID 3566:2001  
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.10
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0 
  bDeviceProtocol         0 
  bMaxPacketSize0        64
  idVendor           0x3566 
  idProduct          0x2001 
  bcdDevice           ff.ff
  iManufacturer           2 Mobile
  iProduct                3 Mobile
  iSerial                 4 123456789ABCD
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           32
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          0 
    bmAttributes         0xe0
      Self Powered
      Remote Wakeup
    MaxPower                2mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           2
      bInterfaceClass         8 Mass Storage
      bInterfaceSubClass      6 SCSI
      bInterfaceProtocol     80 Bulk-Only
      iInterface              1 Mass Storage
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x01  EP 1 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               1
Binary Object Store Descriptor:
  bLength                 5
  bDescriptorType        15
  wTotalLength           22
  bNumDeviceCaps          2
  USB 2.0 Extension Device Capability:
    bLength                 7
    bDescriptorType        16
    bDevCapabilityType      2
    bmAttributes   0x00000000
      (Missing must-be-set LPM bit!)
  SuperSpeed USB Device Capability:
    bLength                10
    bDescriptorType        16
    bDevCapabilityType      3
    bmAttributes         0x00
    wSpeedsSupported   0x0004
      Device can operate at High Speed (480Mbps)
    bFunctionalitySupport   4
      Lowest fully-functional device speed is at an unknown speed!
    bU1DevExitLat           1 micro seconds
    bU2DevExitLat         500 micro seconds
Device Status:     0x0000
  (Bus Powered)

lsusb is identical on my GL.iNet MT1300 (Beryl) running its latest firmware (using OpenWrt 19.07.8 r11364-ef56c85848)

logread when connecting:

Fri Apr  7 05:56:47 2023 kern.info kernel: [ 3099.018991] usb 1-1: USB disconnect, device number 4
Fri Apr  7 05:57:00 2023 kern.info kernel: [ 3111.733304] usb 1-1: new high-speed USB device number 5 using xhci-mtk
Fri Apr  7 05:57:00 2023 kern.info kernel: [ 3111.920661] rndis_host 1-1:1.0 usb0: register 'rndis_host' at usb-1e1c0000.xhci-1, RNDIS device, [[MACREDACTED]]
Fri Apr  7 05:57:02 2023 kern.info kernel: [ 3113.905117] usb 1-1: USB disconnect, device number 5
Fri Apr  7 05:57:02 2023 kern.info kernel: [ 3113.910416] rndis_host 1-1:1.0 usb0: unregister 'rndis_host' usb-1e1c0000.xhci-1, RNDIS device
Fri Apr  7 05:57:03 2023 kern.info kernel: [ 3114.933347] usb 1-1: new high-speed USB device number 6 using xhci-mtk
Fri Apr  7 05:57:03 2023 kern.info kernel: [ 3115.118832] usb-storage 1-1:1.0: USB Mass Storage device detected
Fri Apr  7 05:57:03 2023 kern.info kernel: [ 3115.127885] scsi host0: usb-storage 1-1:1.0
Fri Apr  7 05:57:04 2023 kern.notice kernel: [ 3116.204112] scsi 0:0:0:0: CD-ROM            Linux    File-Stor Gadget 0310 PQ: 0 ANSI: 2

and the entry in cat /sys/kernel/debug/usb/device after it has loaded (tried to grab it in the second that it is in rndis mode, but Beryl isnt quick enough to catch it):

D:  Ver= 2.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
P:  Vendor=3566 ProdID=2001 Rev=ff.ff
S:  Manufacturer=Mobile
S:  Product=Mobile
S:  SerialNumber=123456789ABCD
C:* #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=  2mA
I:* If#= 0 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=usb-storage
E:  Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=125us

So I did one other thing:

Put on the raspberry pi a raspbian SD-Card and powered up the device:

[   12.029978] usb 1-1.5: new high-speed USB device number 4 using dwc_otg
[   12.057715] [drm] Initialized vc4 0.0.0 20140616 for soc:gpu on minor 0
[   12.064006] vc4-drm soc:gpu: [drm] Cannot find any crtc or sizes
[   12.132095] usb 1-1.5: New USB device found, idVendor=3566, idProduct=2001, bcdDevice=ff.ff
[   12.132145] usb 1-1.5: New USB device strings: Mfr=2, Product=3, SerialNumber=4
[   12.132171] usb 1-1.5: Product: Mobile
[   12.132204] usb 1-1.5: Manufacturer: Mobile
[   12.132227] usb 1-1.5: SerialNumber: 123456789ABCD
[   12.194789] brcmfmac: brcmf_c_preinit_dcmds: Firmware: BCM43430/1 wl0: Jul 19 2021 03:24:18 version 7.45.98 (TOB) (56df937 CY) FWID 01-8e14b897
[   12.770029] hwmon hwmon1: Undervoltage detected!
[   12.804948] usbcore: registered new interface driver cdc_ether
[   12.860233] rndis_host 1-1.5:1.0 usb0: register 'rndis_host' at usb-3f980000.usb-1.5, RNDIS device, ca:11:37:49:c2:38
[   12.860633] usbcore: registered new interface driver rndis_host
[   14.364159] usb 1-1.5: USB disconnect, device number 4
[   14.364507] rndis_host 1-1.5:1.0 usb0: unregister 'rndis_host' usb-3f980000.usb-1.5, RNDIS device
[   14.793499] hwmon hwmon1: Voltage normalised
[   15.105929] usb 1-1.5: new high-speed USB device number 5 using dwc_otg
[   15.220759] usb 1-1.5: New USB device found, idVendor=3566, idProduct=2001, bcdDevice=ff.ff
[   15.220806] usb 1-1.5: New USB device strings: Mfr=2, Product=3, SerialNumber=4
[   15.220832] usb 1-1.5: Product: Mobile
[   15.220855] usb 1-1.5: Manufacturer: Mobile
[   15.220877] usb 1-1.5: SerialNumber: 123456789ABCD
[   15.227231] usb-storage 1-1.5:1.0: USB Mass Storage device detected
[   15.229532] scsi host0: usb-storage 1-1.5:1.0
[   15.839923] 8021q: 802.1Q VLAN Support v1.8
[   15.845514] uart-pl011 3f201000.serial: no DMA platform data
[   16.255264] scsi 0:0:0:0: CD-ROM            Linux    File-Stor Gadget 0310 PQ: 0 ANSI: 2
[   16.517963] scsi 0:0:0:0: Attached scsi generic sg0 type 5
[   16.671883] Adding 102396k swap on /var/swap.  Priority:-2 extents:1 across:102396k SSFS
[   16.693951] sr 0:0:0:0: Power-on or device reset occurred
[   16.699296] sr 0:0:0:0: [sr0] scsi3-mmc drive: 0x/0x caddy
[   16.699342] cdrom: Uniform CD-ROM driver Revision: 3.20
[   16.711561] sr 0:0:0:0: Attached scsi CD-ROM sr0
[   17.753229] smsc95xx 1-1.1:1.0 eth0: hardware isn't capable of remote wakeup
[   17.758116] smsc95xx 1-1.1:1.0 eth0: Link is Up - 100Mbps/Full - flow control off

But if I unplug/replug it looks like this:

[ 5374.750238] usb 1-1.5: USB disconnect, device number 5
[ 5400.574066] usb 1-1.4: new high-speed USB device number 6 using dwc_otg
[ 5400.676181] usb 1-1.4: New USB device found, idVendor=3566, idProduct=2001, bcdDevice=ff.ff
[ 5400.676232] usb 1-1.4: New USB device strings: Mfr=2, Product=3, SerialNumber=4
[ 5400.676258] usb 1-1.4: Product: Mobile
[ 5400.676281] usb 1-1.4: Manufacturer: Mobile
[ 5400.676302] usb 1-1.4: SerialNumber: 123456789ABCD
[ 5400.688601] rndis_host 1-1.4:1.0 usb0: register 'rndis_host' at usb-3f980000.usb-1.4, RNDIS device, 06:8a:8e:f2:02:a8
[ 5402.912029] usb 1-1.4: USB disconnect, device number 6
[ 5402.912226] rndis_host 1-1.4:1.0 usb0: unregister 'rndis_host' usb-3f980000.usb-1.4, RNDIS device
[ 5403.646044] usb 1-1.4: new high-speed USB device number 7 using dwc_otg
[ 5403.747981] usb 1-1.4: New USB device found, idVendor=3566, idProduct=2001, bcdDevice=ff.ff
[ 5403.748008] usb 1-1.4: New USB device strings: Mfr=2, Product=3, SerialNumber=4
[ 5403.748021] usb 1-1.4: Product: Mobile
[ 5403.748032] usb 1-1.4: Manufacturer: Mobile
[ 5403.748043] usb 1-1.4: SerialNumber: 123456789ABCD
[ 5403.749541] usb-storage 1-1.4:1.0: USB Mass Storage device detected
[ 5403.751304] scsi host0: usb-storage 1-1.4:1.0
[ 5404.762939] scsi 0:0:0:0: CD-ROM            Linux    File-Stor Gadget 0310 PQ: 0 ANSI: 2
[ 5404.763984] sr 0:0:0:0: Power-on or device reset occurred
[ 5404.764619] sr 0:0:0:0: [sr0] scsi3-mmc drive: 0x/0x caddy
[ 5404.769028] sr 0:0:0:0: Attached scsi CD-ROM sr0
[ 5404.769606] sr 0:0:0:0: Attached scsi generic sg0 type 5

when /sbin/reboot (ing - with some context):

[   11.792582] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43430-sdio for chip BCM43430/1
[   11.793081] usbcore: registered new interface driver brcmfmac
[   12.026312] usb 1-1.4: new high-speed USB device number 4 using dwc_otg
[   12.118356] brcmfmac: brcmf_c_preinit_dcmds: Firmware: BCM43430/1 wl0: Jul 19 2021 03:24:18 version 7.45.98 (TOB) (56df937 CY) FWID 01-8e14b897
[   12.128463] usb 1-1.4: New USB device found, idVendor=3566, idProduct=2001, bcdDevice=ff.ff
[   12.128509] usb 1-1.4: New USB device strings: Mfr=2, Product=3, SerialNumber=4
[   12.128535] usb 1-1.4: Product: Mobile
[   12.128557] usb 1-1.4: Manufacturer: Mobile
[   12.128579] usb 1-1.4: SerialNumber: 123456789ABCD
[   12.308463] usbcore: registered new interface driver cdc_ether
[   12.333341] rndis_host 1-1.4:1.0 usb0: register 'rndis_host' at usb-3f980000.usb-1.4, RNDIS device, 6e:98:b6:25:3f:0f
[   12.333700] usbcore: registered new interface driver rndis_host
[   12.606467] hwmon hwmon1: Undervoltage detected!
[   14.364206] usb 1-1.4: USB disconnect, device number 4
[   14.364545] rndis_host 1-1.4:1.0 usb0: unregister 'rndis_host' usb-3f980000.usb-1.4, RNDIS device
[   14.622451] hwmon hwmon1: Voltage normalised
[   15.073129] uart-pl011 3f201000.serial: no DMA platform data
[   15.098278] usb 1-1.4: new high-speed USB device number 5 using dwc_otg
[   15.200774] usb 1-1.4: New USB device found, idVendor=3566, idProduct=2001, bcdDevice=ff.ff
[   15.200821] usb 1-1.4: New USB device strings: Mfr=2, Product=3, SerialNumber=4
[   15.200847] usb 1-1.4: Product: Mobile
[   15.200869] usb 1-1.4: Manufacturer: Mobile
[   15.200891] usb 1-1.4: SerialNumber: 123456789ABCD
[   15.202894] usb-storage 1-1.4:1.0: USB Mass Storage device detected
[   15.207346] scsi host0: usb-storage 1-1.4:1.0
[   15.257555] 8021q: 802.1Q VLAN Support v1.8
[   15.700790] Adding 102396k swap on /var/swap.  Priority:-2 extents:1 across:102396k SSFS
[   16.223726] scsi 0:0:0:0: CD-ROM            Linux    File-Stor Gadget 0310 PQ: 0 ANSI: 2
[   16.336524] scsi 0:0:0:0: Attached scsi generic sg0 type 5
[   16.474549] sr 0:0:0:0: Power-on or device reset occurred
[   16.477556] sr 0:0:0:0: [sr0] scsi3-mmc drive: 0x/0x caddy
[   16.477599] cdrom: Uniform CD-ROM driver Revision: 3.20
[   16.490074] sr 0:0:0:0: Attached scsi CD-ROM sr0
[   16.909341] smsc95xx 1-1.1:1.0 eth0: hardware isn't capable of remote wakeup
[   16.912768] smsc95xx 1-1.1:1.0 eth0: Link is Up - 100Mbps/Full - flow control off
[   16.912871] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready

So somehow it is not doing the "right" thing on a Raspberry Pi (or other non intel device)...

As if the modem is not detecting the "OS" correctly when a non-intel device is used.

And On Intel there seems to be a difference between an imac from 2009 with Ubuntu and a Laptop with debian:
I-Mac was working yesterday (with GOOD Signal reception)
laptop is not working (with BAD/No reception)

I am really at a loss - at least with the firmware that I have got on the modem...

So I have tried again a few things:

  • IMac Pro + OSX: works
  • Imac 2009 + Ubuntu: works
  • Thinkpad + Ubuntu: does not work
  • Raspberry Pi 3 + OpenWRT/Raspbian: does not work
  • Raspberry Pi 4 + Ubuntu: does not work

So I did something else (on RPI4 + Ubuntu):

  • Running: while sleep 1; do lsusb -v > /tmp/lsusb.$(date +%s); done
  • plugging in the device
  • this strangely results in an endless Loop of register 'rndis_host'and unregister 'rndis_host'. It also shows errors in the lsof loop: cannot read device status, Resource temporarily unavailable (11)

In the end I get 3 different possible lsof outputs (including the one with CDROM)!

The diff between the RNDIS States looks like this:

--- lsusb.1681459854.filtered	2023-04-14 08:24:05.019776603 +0000
+++ lsusb.1681459855.filtered	2023-04-14 08:24:05.031776440 +0000
@@ -33,7 +33,7 @@
       bFunctionClass        224 Wireless
       bFunctionSubClass       1 Radio Frequency
       bFunctionProtocol       3 RNDIS
-      iFunction               7 RNDIS
+      iFunction               7 (error)
     Interface Descriptor:
       bLength                 9
       bDescriptorType         4
@@ -43,7 +43,7 @@
       bInterfaceClass       224 Wireless
       bInterfaceSubClass      1 Radio Frequency
       bInterfaceProtocol      3 RNDIS
-      iInterface              5 RNDIS Communications Control
+      iInterface              5 (error)
       ** UNRECOGNIZED:  05 24 00 10 01
       ** UNRECOGNIZED:  05 24 01 00 01
       ** UNRECOGNIZED:  04 24 02 00
@@ -67,7 +67,7 @@
       bInterfaceClass        10 CDC Data
       bInterfaceSubClass      0
       bInterfaceProtocol      0
-      iInterface              6 RNDIS Ethernet Data
+      iInterface              6 (error)
       Endpoint Descriptor:
         bLength                 7
         bDescriptorType         5
@@ -88,28 +88,4 @@
           Usage Type               Data
         wMaxPacketSize     0x0200  1x 512 bytes
         bInterval               0
-Binary Object Store Descriptor:
-  bLength                 5
-  bDescriptorType        15
-  wTotalLength       0x0016
-  bNumDeviceCaps          2
-  USB 2.0 Extension Device Capability:
-    bLength                 7
-    bDescriptorType        16
-    bDevCapabilityType      2
-    bmAttributes   0x00000000
-      (Missing must-be-set LPM bit!)
-  SuperSpeed USB Device Capability:
-    bLength                10
-    bDescriptorType        16
-    bDevCapabilityType      3
-    bmAttributes         0x00
-    wSpeedsSupported   0x0004
-      Device can operate at High Speed (480Mbps)
-    bFunctionalitySupport   4
-      Lowest fully-functional device speed is at an unknown speed!
-    bU1DevExitLat           1 micro seconds
-    bU2DevExitLat         500 micro seconds
-Device Status:     0x0000
-  (Bus Powered)

So it flaps between rndis and error.

And for completeness also the diff between RNDIS and CDRom:

--- lsusb.1681459854.filtered	2023-04-14 08:24:05.019776603 +0000
+++ lsusb.1681460564.filtered	2023-04-14 08:24:05.559769254 +0000
@@ -17,57 +17,24 @@
   Configuration Descriptor:
     bLength                 9
     bDescriptorType         2
-    wTotalLength       0x004b
-    bNumInterfaces          2
+    wTotalLength       0x0020
+    bNumInterfaces          1
     bConfigurationValue     1
     iConfiguration          0
     bmAttributes         0xe0
       Self Powered
       Remote Wakeup
     MaxPower                2mA
-    Interface Association:
-      bLength                 8
-      bDescriptorType        11
-      bFirstInterface         0
-      bInterfaceCount         2
-      bFunctionClass        224 Wireless
-      bFunctionSubClass       1 Radio Frequency
-      bFunctionProtocol       3 RNDIS
-      iFunction               7 RNDIS
     Interface Descriptor:
       bLength                 9
       bDescriptorType         4
       bInterfaceNumber        0
       bAlternateSetting       0
-      bNumEndpoints           1
-      bInterfaceClass       224 Wireless
-      bInterfaceSubClass      1 Radio Frequency
-      bInterfaceProtocol      3 RNDIS
-      iInterface              5 RNDIS Communications Control
-      ** UNRECOGNIZED:  05 24 00 10 01
-      ** UNRECOGNIZED:  05 24 01 00 01
-      ** UNRECOGNIZED:  04 24 02 00
-      ** UNRECOGNIZED:  05 24 06 00 01
-      Endpoint Descriptor:
-        bLength                 7
-        bDescriptorType         5
-        bEndpointAddress     0x82  EP 2 IN
-        bmAttributes            3
-          Transfer Type            Interrupt
-          Synch Type               None
-          Usage Type               Data
-        wMaxPacketSize     0x0008  1x 8 bytes
-        bInterval               4
-    Interface Descriptor:
-      bLength                 9
-      bDescriptorType         4
-      bInterfaceNumber        1
-      bAlternateSetting       0
       bNumEndpoints           2
-      bInterfaceClass        10 CDC Data
-      bInterfaceSubClass      0
-      bInterfaceProtocol      0
-      iInterface              6 RNDIS Ethernet Data
+      bInterfaceClass         8 Mass Storage
+      bInterfaceSubClass      6 SCSI
+      bInterfaceProtocol     80 Bulk-Only
+      iInterface              1 Mass Storage
       Endpoint Descriptor:
         bLength                 7
         bDescriptorType         5
@@ -87,7 +54,7 @@
           Synch Type               None
           Usage Type               Data
         wMaxPacketSize     0x0200  1x 512 bytes
-        bInterval               0
+        bInterval               1
 Binary Object Store Descriptor:
   bLength                 5
   bDescriptorType        15

This is shared mostly for documentation purposes - I have no Idea if this helps in any way...

I was able to get it to work on a Pi400 by following the instruction to add the udev rules from here https://www.draisberghof.de/usb_modeswitch/bb/viewtopic.php?f=3&t=3043&p=20054#p20026
and then shortly after it was plugged in while the LED was stil red (before flashing red and green), issue the command usb_modeswitch -v 3566 -p 2001 -W -R again, I modified the release time -w 400 to -w 600 in the udev rule and it now seems to reliably switch mode when plugged in without needing to issue the extra command. Not sure how this translates to openwrt though.

Yes - I totally forgot that on Ubuntu/raspbian you need the switch_usb hack...
So Raspbian works now...

One other thing that you may need when you run a reboot of the node: a full power reset of USB, because it seems it only works when the LED is RED on the modem!

What I used was this: uhubctl --location 1-1 --port 2-5 --action 2
(See: https://github.com/mvp/uhubctl)

You can wrap it in an init script/systemd service.

So that is also something that is needed on openwrt (in addition to the usbmodeswitch) to get it working properly after a system reboot...

Hi i have same problem un RPI4 . i have configured /etc/udev/rules.d/40-huawei.rules as suggested :

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"
GOTO="modeswitch_rules_end"

LABEL="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"

LABEL="modeswitch_rules_end"

when I issue usb_modeswitch -v 3566 -p 2001 -X it results in a cdc_ncm without IP .

Look for default devices ...
Found devices in default mode (1)
Access device 007 on bus 001
Get the current device configuration ...
Current configuration number is 1
Use interface number 0
with class 8
Use endpoints 0x01 (out) and 0x81 (in)
Using alternative Huawei switching message
Looking for active drivers ...
OK, driver detached
Set up interface 0
Use endpoint 0x01 for message sending ...
Trying to send message 1 to endpoint 0x01 ...
OK, message successfully sent
Read the response to message 1 (CSW) ...
Response successfully read (13 bytes), status 0
Reset response endpoint 0x81
Reset message endpoint 0x01
Could not reset endpoint (probably harmless): -99
-> Run lsusb to note any changes. Bye!

Apr 19 10:47:33 zenigata kernel: cdc_ncm 1-1.1:1.5: MAC-Address: e6:9b:f2:81:16:e0
Apr 19 10:47:33 zenigata kernel: cdc_ncm 1-1.1:1.5 usb0: register 'cdc_ncm' at usb-0000:01:00.0-1.1, CDC NCM, e6:9b:f2:81:16:e0
Apr 19 10:47:33 zenigata mtp-probe[2665]: checking bus 1, device 8: "/sys/devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/1-1.1"
Apr 19 10:47:33 zenigata mtp-probe[2665]: bus: 1, device: 8 was not an MTP device
Apr 19 10:47:33 zenigata systemd-udevd[2653]: Using default interface naming scheme 'v240'.
Apr 19 10:47:33 zenigata mtp-probe[2676]: checking bus 1, device 8: "/sys/devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/1-1.1"
Apr 19 10:47:33 zenigata mtp-probe[2676]: bus: 1, device: 8 was not an MTP device
Apr 19 10:47:34 zenigata dhcpcd[862]: usb0: waiting for carrier
Apr 19 10:47:34 zenigata charon[954]: 09[KNL] interface usb0 activated
Apr 19 10:47:34 zenigata kernel: cdc_ncm 1-1.1:1.5 usb0: 425 mbit/s downlink 425 mbit/s uplink

any idea how to solve this ?

Hello to everyone! :slight_smile: I know it has been asked quite often and I've already done a very extensive research. Sometimes it also seems that solutions were found but I find the solutions provided contrasting or at least I couldn't apply them to my case. First of all, many solutions are related to the older 3G models while mine is an HiLink E3372h LTE but what I don't understand the most is the fact that here, for example, the thread opener seems to have solved it on a 4G E3272 (which should be an HiLink model too) by disabling cd-rom mode (as suggested in a section from the Extroot Wiki too).
Maybe I've got everything wrong but I've always been quite certain about the fact that HiLink (so cdc_ether) mode was created to get advantage of 4G speeds while it was no longer possible by the older Mobile Partner (cd-rom mode was indeed necessary to install Mobile Partner) shipped on older 3G sticks so my E3372h shouldn't have a cd-rom mode!
Here is my scenario: I own two routers which are exactly the same in two different and distant places and I get connection to the WAN by the aforementioned stick: right now, I move the stick from a router to another with me but I also need to move the sdcard with extroot configured on it along with its card reader. My goal is having almost the same router (same packages, same configuration etc.), no matter the place I'm at and I've achieved it but, given that the Huawei has a built-in card reader, I wanted to use it instead and this has turned out to be a nightmare! :frowning:
As already explained, I've already done extensive research (I've also found some references that are way beyond my knowledge like this one which seems the only way to send AT commads to an HiLink stick) and understood that the problem is linked with usb-modeswitch making the necessary work to switch the stick (not its fault, clearly) but is there a workaround that can apply to my E3372h or do I need to give up?
Thanks in advance.