Bring up a 5G cellular modem on the Toybrick RK3399ProD running Debian 10 — using standard kernel drivers (USB serial, CDC ECM, CDC MBIM, PPP) plus AT-command dial-up, with no out-of-tree code. Translated and annotated from the Toybrick / Rockchip community.
The original tutorial shows how to attach Huawei's MH5000 5G module — built on the Balong 5000 chipset — to an RK3399ProD over USB 3.0 and get a working 5G data connection on Debian 10. The part worth taking away is that every driver you need is already in the mainline-style kernel config: USB serial, CDC ECM, CDC MBIM, and PPP. There is no vendor blob to port — the work is kernel defconfig selection plus an AT-command bring-up. That pattern carries straight over to other Rockchip parts with USB 3.0 or PCIe.
The MH5000 ships as a module on a DVK (development kit) board. Bring-up is four physical steps:
| Step | Action |
|---|---|
| 1.1 USB link | Connect the DVK to the RK3399ProD over a USB 3.0 cable through the board's USB port — this is the data + control channel. |
| 1.2 SIM | Insert the SIM card into the DVK's SIM slot. |
| 1.3 Antenna | Connect the RF antenna to the DVK's antenna port — required for any radio function. |
| 1.4 Power on | Press and hold the ON_OFF button for 1 second or more to power up the module. |
Each function of the Huawei module is exposed through a standard, already-mainline kernel driver — you only enable the config options and rebuild; no source changes.
The module's AT / diagnostic ports appear as USB serial devices. Huawei modules bind to the generic USB serial option driver, so just enable the serial options:
CONFIG_USB_SERIAL=y
CONFIG_USB_SERIAL_OPTION=y
CONFIG_USB_SERIAL_WWAN=y
For data service over a traditional PPP modem, also enable PPP:
CONFIG_PPP=y
CONFIG_PPP_MULTILINK=y
CONFIG_PPP_FILTER=y
CONFIG_PPP_ASYNC=y
CONFIG_PPP_SYNC_TTY=y
CONFIG_PPP_DEFLATE=y
CONFIG_PPP_BSDCOMP=y
ECM presents the modem as a standard USB Ethernet device. Supported on kernels after 2.6.22:
CONFIG_USB_USBNET=y
CONFIG_NETDEVICES=y
CONFIG_USB_NET_CDCETHER=y
MBIM is the modern mobile-broadband management interface (used by ModemManager / libmbim). Same enable pattern:
CONFIG_USB_USBNET=y
CONFIG_NETDEVICES=y
CONFIG_USB_NET_CDC_MBIM=y
ModemManager + nmcli can manage the connection instead of raw AT commands. We standardize new designs on MBIM for easier field management.
The tutorial points at the Debian 10 firmware for the RK3399ProD and notes that the boot_linux.img must be replaced with the 5G-enabled build (the thread links a Baidu Pan download for that image, and the wiki flashing guide for Debian 10). The practical takeaway: make sure your BSP's kernel actually carries the options from section 2 — if you built your own kernel, that is the step that matters; if you flash a vendor image, confirm the image is the 5G-enabled one.
After the module is powered and the drivers are present, the bring-up is a short AT-command sequence. Use ASCII double quotes in the commands (see the pitfall in section 5).
ls -l /dev/ttyUSB*sudo chmod 777 /dev/ttyUSB*# terminal A: watch
cat /dev/ttyUSB1
# terminal B: send
echo -e "ati\r\n" > /dev/ttyUSB1echo -e "at^setmode=0\r\n" > /dev/ttyUSB1echo -e "at^ndisdup=1,1\r\n" > /dev/ttyUSB1eth1):
dhclient -d eth1eth1 should now show an address (e.g. 10.246.82.24).ping www.baidu.comecho at^... by hand. Wrap the dial-up in ModemManager / NetworkManager (MBIM bearer) or a systemd service so the connection comes up on boot and recovers on drop. The AT sequence above is the debugging baseline that tells you the hardware and drivers are good before you automate it.
A reply in the original thread reports a real, easy-to-miss failure: the AT commands as pasted from some sources use full-width (Chinese-style) quotation marks around the string, and the serial port returns an error. The fix is to use plain ASCII double quotes: echo -e "ati\r\n", not echo -e "ati\r\n" with curly quotes.
| Symptom | Cause | Fix (from the thread) |
|---|---|---|
AT command sent to /dev/ttyUSB1 returns an error / is not recognized | The command string was wrapped in full-width (Chinese-style) quotation marks instead of ASCII quotes | Retype the command using plain ASCII double quotes: echo -e "ati\r\n" > /dev/ttyUSB1 |
ON_OFF), insert SIM, attach antenna, then verify enumeration with ls -l /dev/ttyUSB*.at^ndisdup=1,1, get an IP with dhclient on the ECM netdev, then ping to confirm.