Skip to main content

Device Debugging

Navigation bar

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
PortPurpose
/dev/ttyUSB0Diagnostics (DM)
/dev/ttyUSB1NMEA
/dev/ttyUSB2AT commands
/dev/ttyUSB3AT / 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.

Tip
  • The AT port baud rate measured on this device is 115200; if another firmware does not respond, try 9600.
  • Commands end with a carriage return; in minicom just press Enter.

Common AT Commands​

Basic Information​

CommandDescriptionExample response
ATTest communicationOK
ATIModule model and firmware versionQuectel / EC20F / Revision: EC20CEHCLGR06A04M1G
AT+CPIN?SIM card status+CPIN: READY
AT+CSQSignal quality+CSQ: 29,99
AT+CFUN?RF status+CFUN: 1
AT+QTEMPModule temperature+QTEMP: 0,40,0

The first value of AT+CSQ is 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
ParameterModeHost-side driver
0QMI / RMNETkmod-usb-net-qmi-wwan + uqmi (factory default)
1ECMkmod-usb-net-cdc-ether
2MBIMkmod-usb-net-cdc-mbim + umbim
3RNDISkmod-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​

CommandFunctionDescription
AT+CFUN=1,1Software rebootMost commonly used; the module re-registers automatically after rebooting
AT&FRestore default AT command settingsDoes not affect user data
AT+QPRTPARA=3Restore factory NV configurationClears settings such as APN and USB mode
AT+QPOWD=1Power offRequires power cycling to start again
Note

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:

ResponseMeaning
+CEREG: 0,1Registered (home network)
+CEREG: 0,5Registered (roaming)
+CEREG: 0,2Searching
+CEREG: 0,3Registration denied
+CEREG: 0,0Not registered, not searching

+CEREG: 0,1 together with a +CSQ value 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​

SymptomTroubleshooting
No response to AT commandsConfirm the port is /dev/ttyUSB2 and the baud rate is 115200 (or 9600)
Command returns ERRORCheck the spelling; some commands require the SIM to be ready or the RF to be enabled
USB disappears after a commandNormal; the module is rebooting, wait for re-enumeration
+CPIN: READY but no IPCheck the usbnet mode and whether the interface proto is dhcp
Has an IP but no Internet accessCheck whether the APN in AT+CGDCONT? matches the SIM carrier
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 →