Device Debugging

Check the EC20 status over the USB serial port, switch operating modes, and perform a factory reset.
Serial Connection
Checking the Serial Ports
root@OpenWrt:~# ls /dev/ttyUSB*
/dev/ttyUSB0 /dev/ttyUSB1 /dev/ttyUSB2 /dev/ttyUSB3
| Port | Purpose |
|---|---|
/dev/ttyUSB0 | Diagnostics (DM) |
/dev/ttyUSB1 | NMEA |
/dev/ttyUSB2 | AT commands |
/dev/ttyUSB3 | AT / Modem (backup) |
After the EC20 is switched to ECM mode, the serial ports remain available, so debugging requires no USB composition change.
Starting minicom
minicom -D /dev/ttyUSB2 -b 115200
Send AT; a reply of OK means communication is working:
AT
OK
To exit: press Ctrl + A, then X, and select Yes.
- The AT port baud rate measured on this device is
115200; if another firmware does not respond, try9600. - Commands end with a carriage return; in minicom just press Enter.
Common AT Commands
Basic Information
| Command | Description | Example response |
|---|---|---|
AT | Test communication | OK |
ATI | Module model and firmware version | Quectel / EC20F / Revision: EC20CEHCLGR06A04M1G |
AT+CPIN? | SIM card status | +CPIN: READY |
AT+CSQ | Signal quality | +CSQ: 29,99 |
AT+CFUN? | RF status | +CFUN: 1 |
AT+QTEMP | Module temperature | +QTEMP: 0,40,0 |
The first value of
AT+CSQis the signal strength (0~31, higher is better; 99 means unknown).If the signal is good but there is no Internet access, focus on whether the SIM has sufficient balance and whether the APN is correct.
USB Operating Mode
AT+QCFG="usbnet"
+QCFG: "usbnet",0
OK
| Parameter | Mode | Host-side driver |
|---|---|---|
| 0 | QMI / RMNET | kmod-usb-net-qmi-wwan + uqmi (factory default) |
| 1 | ECM | kmod-usb-net-cdc-ether |
| 2 | MBIM | kmod-usb-net-cdc-mbim + umbim |
| 3 | RNDIS | kmod-usb-net-rndis |
Switching modes (ECM as an example):
AT+QCFG="usbnet",1
OK
AT+CFUN=1,1
The module must be restarted after the change; USB re-enumerates.
APN Configuration
AT+CGDCONT?
+CGDCONT: 1,"IPV4V6","ctnet",...
+CGDCONT: 2,"IPV4V6","ctwap",...
AT+CGDCONT=1,"IPV4V6","cmnet"
OK
AT+CFUN=1,1
In ECM mode the module dials automatically using the APN with
cid=1.
Reset and Reboot
| Command | Function | Description |
|---|---|---|
AT+CFUN=1,1 | Software reboot | Most commonly used; the module re-registers automatically after rebooting |
AT&F | Restore default AT command settings | Does not affect user data |
AT+QPRTPARA=3 | Restore factory NV configuration | Clears settings such as APN and USB mode |
AT+QPOWD=1 | Power off | Requires power cycling to start again |
AT+QPRTPARA=3 is a factory reset operation; run AT+CFUN=1,1 afterwards to reboot.
After the reboot, usbnet returns to the default 0 and must be reconfigured to ECM (usbnet=1).
Complete Check Sequence
AT
OK
ATI
Quectel
EC20F
Revision: EC20CEHCLGR06A04M1G
OK
AT+CPIN?
+CPIN: READY
OK
AT+CSQ
+CSQ: 29,99
OK
AT+CGREG?
+CGREG: 0,1
OK
AT+CEREG?
+CEREG: 0,1
OK
AT+COPS?
+COPS: 0,0,"CHN-CT",7
OK
Meaning of the registration status:
| Response | Meaning |
|---|---|
+CEREG: 0,1 | Registered (home network) |
+CEREG: 0,5 | Registered (roaming) |
+CEREG: 0,2 | Searching |
+CEREG: 0,3 | Registration denied |
+CEREG: 0,0 | Not registered, not searching |
+CEREG: 0,1together with a+CSQvalue other than 99 means the module has registered successfully.
Complete Reset Sequence
AT
OK
AT&F
OK
AT+QPRTPARA=3
OK
AT+CFUN=1,1
OK
Wait 30~60 seconds for the module to re-enumerate, then follow Quick Install - Linux / OpenWrt to configure ECM mode.
FAQ
| Symptom | Troubleshooting |
|---|---|
| No response to AT commands | Confirm the port is /dev/ttyUSB2 and the baud rate is 115200 (or 9600) |
Command returns ERROR | Check the spelling; some commands require the SIM to be ready or the RF to be enabled |
| USB disappears after a command | Normal; the module is rebooting, wait for re-enumeration |
+CPIN: READY but no IP | Check the usbnet mode and whether the interface proto is dhcp |
| Has an IP but no Internet access | Check whether the APN in AT+CGDCONT? matches the SIM carrier |