USB not working on MikroTik RBM33G with 18.06.1

Hi All,
USB doesn't seem to be working on on a recently purchased MikroTik RBM33G with 18.06.1.
I originally installed a ROOter version of 18.06.1 onto the router and found the USB port didn't work for an external LTE modem. The modem has a USB3 micro-b socket but it would not power up with either USB2 or USB3 cables. Rolling back to the current stable OEM firmware (6.42.7) restored functionality to the USB port and ruled out a hardware issue.
I've now re-flashed with vanilla OpenWrt 18.06.1 and the fault has returned. It seems that the port is unpowered as a small USB2 flashlight does not illuminate when connected to the USB port.
At least one other user (@bnhf) is experiencing the same issue with this target.

From the git comit that adde support for the RBM33G:

==USB==

The board has one external USB 3.0 port at the rear. Additionally PCIe
port 0 has a permanently enabled USB interface. PCIe slot 1 shares its
USB interface with the rear USB port. Thus only either the rear USB port
or the USB interface of PCIe slot 1 can be active at the same time. The
jumper next to the rear USB port controls which one is active:

open: USB on PCIe 1 is active
closed: USB on rear USB port is active

Short version:

  • Removing/replacing the J7 jumper makes no difference - the USB port is still dead.

Long version:

  • The only difference between a working USB port and a dead USB port was the firmware.

  • The text from the git commit is vague because it is only the USB2 functionality that is shared between PCIe slot 1 and the rear USB port. The manufacturer's Quick Guide document for the RBM33G shows that the USB3 hub in the SoC remains connected to the USB port regardless of the position of the J7 jumper so a USB3 device should always work.

Thanks for posting this Keith. Hopefully we can get one of the skilled OpenWRT developers to take a look at this frustrating issue!

I can confirm everything in the original post, and would just like to add that I've been able to get several mPCIe modems to work in mPCIe slot 0 (these modems use USB2 lines, so one would assume the problem is not with USB2. However, the USB port itself is dead, except when one first applies power when the port is powered for an instant. Nothing changes regardless of the position of the USB jumper.

It's been suggested that there may be an issue with the GPIO settings, which includes a GPIO pin that determines whether the USB port is powered or not. I have not been able to determine the status of the relevant GPIO pins, or how one might change the state of one.

Thanks Scott. The suggestion was spot on. The following commands set GPIO12 to a logic "1" and have brought the USB port to life:

echo "12" > /sys/class/gpio/export
echo "out" > /sys/class/gpio/gpio12/direction
echo "1" > /sys/class/gpio/gpio12/value

Instructions for setting GPIO are found here. It should be a simple matter to add these lines to an init script until the problem is resolved in a maintenance release.

any update for this case..?

No idea. I'm using a customized version of OpenWrt (Rooter) that contains the workaround described above.
Note that this is just a forum post - not a formal fault report. If you're affected by this on a current release, could you please raise it as a fault.

I have same issue (current brunch master of OpenWrt) with USB jack in 3.0 mode only. I have connected USB 3.0 modem.
As mentioned, there is onboard jumper for switching USB 2.0 lanes to mPCIe slot / USB jack, but USB 3.0 lanes is always present in USB jack (as MikroTik documentation says). So, i need USB 2.0 lanes in mPCIe and need to connect USB 3.0 modem to the jack. When jumper in close positions (switch USB 2.0 to USB 3.0 jack) , USB 3.0 modem works in super-speed mode:

[    6.679872] kmodloader: loading kernel modules from /etc/modules-boot.d/*
[    6.979915] usbcore: registered new interface driver usbfs
[    6.985551] usbcore: registered new interface driver hub
[    6.991032] usbcore: registered new device driver usb
[    7.004047] xhci-mtk 1e1c0000.xhci: 1e1c0000.xhci supply vbus not found, using dummy regulator
[    7.012777] xhci-mtk 1e1c0000.xhci: 1e1c0000.xhci supply vusb33 not found, using dummy regulator
[    7.021754] xhci-mtk 1e1c0000.xhci: xHCI Host Controller
[    7.027095] xhci-mtk 1e1c0000.xhci: new USB bus registered, assigned bus number 1
[    7.040586] xhci-mtk 1e1c0000.xhci: hcc params 0x01401198 hci version 0x96 quirks 0x0000000000210010
[    7.049755] xhci-mtk 1e1c0000.xhci: irq 21, io mem 0x1e1c0000
[    7.056574] hub 1-0:1.0: USB hub found
[    7.060524] hub 1-0:1.0: 2 ports detected
[    7.065106] xhci-mtk 1e1c0000.xhci: xHCI Host Controller
[    7.070527] xhci-mtk 1e1c0000.xhci: new USB bus registered, assigned bus number 2
[    7.077998] xhci-mtk 1e1c0000.xhci: Host supports USB 3.0  SuperSpeed
[    7.084639] usb usb2: We don't know the algorithms for LPM for this host, disabling LPM.
[    7.093632] hub 2-0:1.0: USB hub found
[    7.097455] hub 2-0:1.0: 1 port detected
[    7.105876] kmodloader: done loading kernel modules from /etc/modules-boot.d/*
[    7.130770] init: - preinit -
[    8.001740] usb 2-1: new SuperSpeed USB device number 2 using xhci-mtk
[    8.032334] usb 2-1: config 1 has an invalid interface number: 8 but max is 3
[    8.039457] usb 2-1: config 1 has no interface number 1

but when move jumper to open state (switch USB 2.0 to mPCIe) - modem is did not recognize:

[    6.673701] kmodloader: loading kernel modules from /etc/modules-boot.d/*
[    6.972723] usbcore: registered new interface driver usbfs
[    6.978305] usbcore: registered new interface driver hub
[    6.983809] usbcore: registered new device driver usb
[    6.996525] xhci-mtk 1e1c0000.xhci: 1e1c0000.xhci supply vbus not found, using dummy regulator
[    7.005290] xhci-mtk 1e1c0000.xhci: 1e1c0000.xhci supply vusb33 not found, using dummy regulator
[    7.014247] xhci-mtk 1e1c0000.xhci: xHCI Host Controller
[    7.019567] xhci-mtk 1e1c0000.xhci: new USB bus registered, assigned bus number 1
[    7.030934] xhci-mtk 1e1c0000.xhci: hcc params 0x01401198 hci version 0x96 quirks 0x0000000000210010
[    7.040104] xhci-mtk 1e1c0000.xhci: irq 21, io mem 0x1e1c0000
[    7.046822] hub 1-0:1.0: USB hub found
[    7.050648] hub 1-0:1.0: 2 ports detected
[    7.055228] xhci-mtk 1e1c0000.xhci: xHCI Host Controller
[    7.060550] xhci-mtk 1e1c0000.xhci: new USB bus registered, assigned bus number 2
[    7.068071] xhci-mtk 1e1c0000.xhci: Host supports USB 3.0  SuperSpeed
[    7.074682] usb usb2: We don't know the algorithms for LPM for this host, disabling LPM.
[    7.083616] hub 2-0:1.0: USB hub found
[    7.087438] hub 2-0:1.0: 1 port detected
[    7.095857] kmodloader: done loading kernel modules from /etc/modules-boot.d/*
[    7.121111] init: - preinit -

I have try to run:

echo "12" > /sys/class/gpio/export
echo "out" > /sys/class/gpio/gpio12/direction
echo "1" > /sys/class/gpio/gpio12/value

but after "echo "12" > /sys/class/gpio/export" i have got:

ash: write error: Resource busy

Seems that OpenWrt did not know, that if USB 2.0 switched to the mPCIe — USB 3.0 is stil in the jack.
I don't know, how to get it works, please - help to resolve it.

p.s.
i have try with USB 3.0 disk instead of modem, same issue.

I have google with this issue, and found that was a same problem in MikroTik OS, and it was fixed a year ago (MikroTik RouterOS v6.42.4):

usb - properly detect USB 3.0 flash on RBM33G when jumper is removed;

So, with open (removed) jumper USB 3.0 MUST work, seems that something need to fix in OpenWrt too, but i don't know, how to find source of problem. :frowning: