Tech Notes · Connectivity & Board Bring-up

Adding a 5G Module to a Rockchip Board — Huawei MH5000 on RK3399ProD

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.

Attribution & source
Original: Toybrick / Rockchip community — "RK3399Pro Getting-Started Tutorial (14): 5G Module Usage on Toybrick RK3399ProD", posted 2020-04-26 on the Toybrick community forum (t.rock-chips.com/forum.php?mod=viewthread&tid=1535). Hardware platform Toybrick RK3399ProD, software platform Debian 10, 5G module Huawei MH5000.
Translated into English and annotated by Bestom. Kernel configuration options, AT commands, and the bring-up sequence are reproduced from the original; identifiers and logic are unchanged. Bestom presents this as a reference walkthrough for engineers adding cellular connectivity to Rockchip-based products — it is a teaching example, and production use needs your own carrier certification and tuning.

Why this walkthrough is worth stealing

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.

Huawei MH5000 (Balong 5000) RK3399ProD board Carrier network ┌────────────────────────┐ ┌──────────────────────┐ ┌──────────────┐ │ DVK board (USB 3.0) │ USB │ USB 3.0 host port │ │ 5G / 4G │ │ SIM slot + RF antenna │ ───▶ │ ttyUSB* (AT port) │ │ NSA / SA │ │ ON_OFF button │ │ eth1 (CDC ECM netdev)│ ───▶ │ │ └────────────────────────┘ │ dhclient → IP │ └──────────────┘ └──────────────────────┘
Bestom note: 5G is the usual "last mile" customers ask for on Rockchip edge gateways and industrial boxes. The RK3588 / RK3576 we build SoM and reference designs around expose USB 3.0 and PCIe that map directly to this same set of standard modem drivers — so a turnkey "RK35xx + 5G modem" BSP is mostly defconfig + AT bring-up, not a driver port. Bestom can deliver an RK3588/RK3576 SoM with a validated 5G modem BSP for your edge / IoT product — see Solutions → Industrial Edge.

1. Hardware connection

The MH5000 ships as a module on a DVK (development kit) board. Bring-up is four physical steps:

StepAction
1.1 USB linkConnect 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 SIMInsert the SIM card into the DVK's SIM slot.
1.3 AntennaConnect the RF antenna to the DVK's antenna port — required for any radio function.
1.4 Power onPress and hold the ON_OFF button for 1 second or more to power up the module.

2. Driver / kernel configuration

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.

2.1 USB serial driver

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
Bestom note: PPP is the fallback path. On any reasonable modern kernel you will not need it — prefer CDC ECM / MBIM (below) for a real network interface. Keep the PPP block only if you must support a legacy 2.6.22-era kernel where ECM/MBIM are unavailable.

2.2 CDC ECM driver

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

2.3 CDC MBIM driver

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
Bestom note: On RK3588 / RK3576 Debian/Ubuntu images, ECM/MBIM "just work" once the kernel options above are set — then a tool like ModemManager + nmcli can manage the connection instead of raw AT commands. We standardize new designs on MBIM for easier field management.

3. Firmware / boot image

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.


4. Bring-up & verification

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).

  1. Confirm the device enumerated — check the loaded VID/PID and the created ports:
    ls -l /dev/ttyUSB*
  2. Fix port permissions for the AT session:
    sudo chmod 777 /dev/ttyUSB*
  3. Query the module — in one terminal watch the response, in another send the AT command:
    # terminal A: watch
    cat /dev/ttyUSB1
    # terminal B: send
    echo -e "ati\r\n" > /dev/ttyUSB1
  4. If no network interface appears, force the module into ECM/network mode:
    echo -e "at^setmode=0\r\n" > /dev/ttyUSB1
  5. Dial up (start the NDIS data call):
    echo -e "at^ndisdup=1,1\r\n" > /dev/ttyUSB1
  6. Acquire a dynamic IP on the ECM netdev (often eth1):
    dhclient -d eth1
  7. Confirm the IPeth1 should now show an address (e.g. 10.246.82.24).
  8. Smoke test — reach the internet:
    ping www.baidu.com
  9. Speed test — open a browser to a speed-test site and run the test.
Bestom note: In production you would not shell out echo 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.

5. Pitfall from the thread: AT-command quotes

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.

SymptomCauseFix (from the thread)
AT command sent to /dev/ttyUSB1 returns an error / is not recognizedThe command string was wrapped in full-width (Chinese-style) quotation marks instead of ASCII quotesRetype the command using plain ASCII double quotes: echo -e "ati\r\n" > /dev/ttyUSB1

Recap