Skip to main content

Device Debugging

Navigation bar

minicom operations, network mode settings and reboot commands, integrated with the earlier SIM card management and temperature query commands into a complete reference document. It comes in two versions:

  • 📋 Simplified version (quick reference): a ready-to-use list of concise commands.
  • 📖 Detailed version (with meanings and usage): explains each item's function, parameters, scenarios and precautions.

📋 Simplified Version (Quick Reference)​

1. Serial Connection and Exit​

# Enter the minicom terminal (assuming the AT serial port is /dev/ttyUSB2)
minicom -D /dev/ttyUSB2

# To exit: Ctrl + A, then X, select Yes

2. Basic Test​

AT                # Test communication; a reply of OK means normal

3. SIM Card Management​

AT+QUIMSLOT=?          # Query the number of supported card slots
AT+QSIMDET? # Query the current SIM card insertion status
AT+QUIMSLOT=1 # Switch to card slot 1 (or 2)

4. Temperature Query​

AT+QTEMP               # View the temperature of each module component (focus on ambient and cpuss)

5. Network Mode Switching (USB network adapter type)​

AT+QCFG="usbnet",0     # NDIS/QMI (commonly used on Windows)
AT+QCFG="usbnet",1 # ECM (commonly used on Linux)
AT+QCFG="usbnet",2 # MBIM (commonly used on OpenWrt)

6. Module Reboot​

AT+CFUN=1,1            # Software reset (RF restart)
AT+QPOWD=1 # Graceful power-off (requires power cycling)
AT+QRST=1 # Hard reset (immediate reset)

📖 Detailed Version (with Meanings and Usage)​

🔌 Serial Tool Operations (minicom)​

OperationCommand/KeyDescription
Connect to the moduleminicom -D /dev/ttyUSB2Connects through the specified serial device; the baud rate defaults to 115200 (use -b 115200 to specify it)
Send AT commandsType the command and press EnterThe module returns OK when the command succeeds; ERROR means you need to check the syntax or state
Exit the terminalCtrl + A, release, then X, select YesExits minicom and closes the session

Common AT serial ports: /dev/ttyUSB2 (usually USB2 for the RM520N-GL), possibly also ttyUSB0 or ttyUSB1; feel free to try them.


📡 SIM Card Commands​

AT+QUIMSLOT=?​

  • Function: queries the number of physical SIM card slots supported by the module.
  • Response: +QUIMSLOT: (1,2) means two card slots are supported.
  • Note: query only, does not switch.

AT+QSIMDET?​

  • Function: detects whether the current SIM card is inserted and ready.
  • Response: common format +QSIMDET: <slot>,<status>.
    <slot>: card slot number (1 or 2); <status>: 1 = ready, 0 = not inserted/abnormal.
  • Use: confirm whether the new card is usable after switching slots.

AT+QUIMSLOT=<slot>​

  • Function: activates the specified SIM card slot (requires dual-SIM support in the module).
  • Parameter: <slot> is 1 or 2 (according to the =? query result).
  • Correct usage: AT+QUIMSLOT=1 (not =1/2).
  • Note: the module may need a few seconds to initialize after switching; some firmware requires a reboot (AT+CFUN=1,1) to take effect.

🌡️ Temperature Query Command​

AT+QTEMP​

  • Function: reads the temperature of each internal sensor of the module (unit: ℃).
  • Example response (selected key entries):
    +QTEMP:"modem-ambient-usr","30"   # Ambient temperature
    +QTEMP:"cpuss-0-usr","31" # Main CPU temperature
    +QTEMP:"modem-lte-sub6-pa1","30" # PA power amplifier temperature
    +QTEMP:"modem-mmw0","-273" # Millimeter wave (not enabled, ignore)
  • What to watch: focus on the ambient and cpuss values; the normal range is 25~60℃. If it stays above 85℃, improve cooling.
  • Note: -273 or 0 means the corresponding sensor is not connected/enabled; this is not a fault.

🌐 Network Mode Settings (USB virtual network adapter type)​

AT+QCFG="usbnet",<mode>​

  • Function: switches the USB network adapter operating mode of the module, which determines the kind of network interface the operating system sees.
  • Parameters:
    • <mode>=0: NDIS/QMI – commonly used on Windows; requires a driver and provides a QMI protocol interface.
    • <mode>=1: ECM (Ethernet Control Model) – natively supported by Linux, appears as ethX or usbX; simple and reliable.
    • <mode>=2: MBIM – supported by modern Windows/Linux, widely used on OpenWrt, with better performance.
  • Example usage: AT+QCFG="usbnet",1 switches to ECM mode.
  • Note: after the change, the module usually must be restarted (AT+CFUN=1,1 or power-cycled) for it to take effect.

🔄 Module Reboot Commands​

CommandFunctionUse casePrecautions
AT+CFUN=1,1Software reset: restarts the RF function and re-registers on the networkRe-attach after changing network parameters; try to recover from abnormal signalEquivalent to AT+CFUN=0 to power off and then =1 to power on, retaining SIM initialization
AT+QPOWD=1Graceful power-off: cuts module power; requires power cycling to startWhen a full power-cycle restart is needed, or to save powerAfter power-off the module no longer responds to commands; you must replug USB or reset the hardware
AT+QRST=1Hard reset: immediately resets the whole module (like a hardware watchdog)Forced recovery when the module hangs or does not respondResets all state and is equivalent to a hardware reboot; use with caution

Recommended order: prefer AT+CFUN=1,1 (the mildest); if that fails, try AT+QRST=1; consider AT+QPOWD=1 (power-off) last.


✅ Comprehensive Example Workflow (Switch Slots and Verify)​

minicom -D /dev/ttyUSB2          # Connect
AT # Test
AT+QUIMSLOT=? # Check the supported slots, assume it returns (1,2)
AT+QUIMSLOT=2 # Switch to card slot 2
AT+QSIMDET? # Confirm whether slot 2 is ready; 1 means success
AT+CFUN=1,1 # Restart the network to apply the switch
AT+QTEMP # Check whether the module temperature is normal

📌 Important Notes​

  • All AT commands end with \r\n (carriage return + line feed); in minicom just press Enter.
  • Different firmware versions of the module support the commands slightly differently; refer to the official manual.
  • After changing the usbnet mode, the system may need to re-enumerate USB; restarting the module or replugging is recommended.

The content above has been organized for you; you can copy and save it as a note. If other commands need to be added, just let us know.

AI Translation Notice

This page was translated into English by AI and is provided for reference only. The original document is written in Chinese. If there is any discrepancy, the Chinese version prevails.

本页英文内容由 AI 自动翻译生成,仅供参考;原文为中文,如有差异请以中文原文为准。

查看中文原文 / View the Chinese original →