🛠 Passerelle cellulaire 4G/5G : module M.2 B-Key, SIM et failover

Radxa ROCK 3B (Rockchip RK3568) · avance · Schéma : IMG-radxa-rock-3b-avance-3-rock3b-cellulaire-4g.svg — module 4G dans le socket M.2 B-Key 3042 de la Radxa ROCK 3B, carte SIM insérée, failover Ethernet cellulaire vers le réseau

Objectives

Turn the ROCK 3B into a standalone cellular gateway — the M.2 B-Key 3042 socket (USB/PCIe/SATA interfaces) and the embedded SIM port eliminate the need for a carrier board: a 4G LTE (or 5G) module + a SIM card are sufficient. Radxa documents interface usage in the official "interface usage" documentation, and support has confirmed Quectel modules (e.g., EM05) on the forum. Typical use case: failover of a wired connection on an isolated site, with the two GbE ports as backup.

Hardware

Complete code

# 1. Le module est vu en USB (mode QMI/MBIM/ECM selon le module) :
sudo lsusb ; sudo dmesg | grep -i -e qmi -e gsm -e cdc
ls /dev/ttyUSB*                 # ports AT (ttyUSB2 souvent)

# 2. Dialogue AT : statut réseau et enregistrement
sudo apt install minicom
sudo minicom -D /dev/ttyUSB2    # AT+CPIN? -> READY ; AT+CSQ -> qualité signal
                                # AT+CGDCAP=1,"apn" puis AT+CGACT=1,1 selon module

# 3. Connexion données :
sudo apt install network-manager-modemmanager
mcli -t -f DEVICE,STATE device            # wwan0 / cdc-wdm0 attendu
mcli connection add type gsm ifname cdc-wdm0 con-name 4g apn "apn.orange"
mcli connection up 4g ; ping -c3 -I wwan0 1.1.1.1

# 4. Failover simple (métriques) : Ethernet prioritaire, cellulaire de secours
sudo nmcli connection modify "Ethernet-eth0" connection.autoconnect-priority 100
sudo nmcli connection modify "4g" connection.autoconnect-priority 50

Expected verification

AT+CPIN? returns READY (SIM detected), AT+CSQ shows a quality > 10; mcli connection up 4g brings up wwan0/cdc-wdm0 with an IP address; ping -I wwan0 reaches the Internet. When Ethernet is unplugged, traffic switches to the cellular link (lowest metric).

Common errors

Other tutorials for this board

Code examples for this board

← Back to the board 🛠 All tutorials