Fumbling With OpenWrt and RM500U-CN

Just in case anyone else finds this dead end, the instructions provided are correct, but a little more would help, so I will document how I got it working in a logical order here as this is where I ended up first, I tried RNDIS (got DHCP IP assigned but no external connection), NCM (Openwrt just kept asking the modem for the modem manufacturer id, which the modem duly returned, rinse and repeat) and ECM, ECM is the only one that worked. Apparently later versions of firmware can do MBIM, mine can't. I used an MT1300 running 23.05.0 just because it was to hand. Much of the info came from https://openwrt.org/docs/guide-user/network/wan/wwan/ethernetoverusb_cdc

  1. Plug your modem with sim into your Openwrt device USB port, mine seems to have plenty of USB power (USB3) but the manufacturer warns of low power USB causing issues, there is a seperate USB-C power input on the modem, the switch on the side switches between router USB power and local USB connector power.

  2. Your OpenWrt device will need a working internet connection, I just pulled the LAN cable from the back of my PC and plugged into the device WAN port, then cabled my PC back into a LAN port on the device so I could ssh in, noting that my LAN subnet is different to the openWrt device subnet, this is important, the opkg commands will probably fail if they are the same. ssh as root into your openwrt device and run:-

opkg update
opkg install kmod-usb-net-cdc-ether usb-modeswitch kmod-usb-serial-option picocom

Not sure if usb-modeswitch and kmod-usb-serial-option are actually required but they're there anyway.

  1. run

picocom -D /dev/ttyUSB2

this gets you talking directly to the modem so you can set it to the correct mode, this came from the RM500-CN manual https://www.waveshare.com/wiki/RM500U-CN_5G_HAT

  1. run

ATE1
AT+CPIN?
AT+QCFG="usbnet",1
AT+QNETDEVCTL=2,3,1
AT+CFUN=1,1

The last line reboots the modem, from what I've read it may also actually be saving the config before it reboots as well. Use CTRL-A then X to exit minicom.

  1. I did the following in luci simply because I don't know how to in the cli, the commands are probably in the linked instructions:-

Network -> Interfaces -> "Add new interface"

Name it, it's a DHCP client, the Device is "usb0", in the Firewall Settings tab "Create/Assign firewall zone" select the wan zone.

Save, Save and apply. Leave it a bit, you should get an IPv4 upstream device appear on the overview page with the "Device" Ethernet adaptor: "usb0", it should have lovely ip addresses populated in the ip address fields

Hopefully works, mine does, both 3 and EE in the UK. I did suffer initially with really slow download speeds, but I think I was just using AT+QCFG="usbnet",1 to set ECM mode without the other commands from the manual (noting AT+QENG="serving cell" from the manual doesn't work)

Interesting if it works for anyone else. It's been power cycled a few times and seems to be holding.

1 Like