Skip to main content

Device Debugging

Navigation bar

Check the EC25-AF status and SIM card slots 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 (usually)
/dev/ttyUSB3AT commands / Modem (backup)

After the EC25 is switched to ECM mode, the serial ports remain available, so debugging requires no USB composition change.

Test note: The AT port is commonly /dev/ttyUSB2, but it may become /dev/ttyUSB3 after replugging the module. If you are not sure, send ATI to each of ttyUSB0 through ttyUSB3; the one returning Quectel is the AT port.

Starting minicom​

minicom -D /dev/ttyUSB2 -b 115200

If the AT port is actually /dev/ttyUSB3, just replace the port in the command.

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.

Checking the SIM Card Slots​

Checking the SIM Insertion Status​

AT+CPIN?
+CPIN: READY

AT+QSIMSTAT?
+QSIMSTAT: 0,1

AT+QSIMDET?
+QSIMDET: 0,0
ResponseMeaning
+CPIN: READYSIM card recognized
+CME ERROR: 10SIM not inserted (no card, or the slot is not connected)
+QSIMSTAT: 0,1Detection disabled; a card is currently inserted
+QSIMDET: 0,0SIM card detection not enabled

Checking the Card Information​

AT+CIMI
460001234567890

AT+QCCID
+QCCID: 89860012345678901234

AT+CNUM
+CNUM: "My Number","+8613800000000",145

Being able to read the IMSI / CCID / own number means the SIM card and the card slot path are working.

Logical SIM Channels​

AT+QUIMSLOT?
ERROR

AT+QCFG="simslot"
ERROR

The current EC25-AF firmware does not support the commands above, so SIM1 / SIM2 cannot be switched in software. In testing, both the module card slot and the USB base board card slot recognized the same SIM card (identical IMSI / CCID), and the two holders map to the same USIM path (SIM1). For details, see Quick Install - Linux / OpenWrt.


Common AT Commands​

Basic Information​

CommandDescriptionExample response
ATTest communicationOK
ATIModule model and firmware versionQuectel / EC25-AF(D) / Revision: EC25AFFDR07A08M4G
AT+QGMRFull firmware versionEC25AFFDR07A08M4G_01.002.01.002
AT+CPIN?SIM card status+CPIN: READY
AT+CSQSignal quality+CSQ: 24,99
AT+CFUN?RF status+CFUN: 1
AT+QTEMPModule temperature+QTEMP: 38,36,35

The first value of AT+CSQ is the signal strength (0~31, higher is better; 99 means unknown).

After a reset and reboot, the module needs 1~2 minutes to search for a network again; during this period +CSQ: 99,99 and +CEREG: 0,2 are normal.

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","ims",...
+CGDCONT: 3,"IPV4V6","",...

AT+CGDCONT=1,"IPV4V6","cmnet"
OK

AT+CFUN=1,1

After a factory reset the APN for cid=1 is empty and must be set again; in ECM mode the module dials automatically using cid=1.

Registration and Data Status​

CommandDescription
AT+CEREG?EPS registration status
AT+CGREG?GPRS registration status
AT+COPS?Current operator
AT+QNWINFOCurrent network standard and frequency band
AT+QCSQDetailed signal strength
AT+QENG="servingcell"Current serving cell information
AT+CGACT?PDP activation status
AT+CGPADDRIP address assigned to the PDP context

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

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 the APN is cleared, so both must be reconfigured.


Complete Check Sequence​

AT
OK

ATI
Quectel
EC25-AF(D)
Revision: EC25AFFDR07A08M4G

OK

AT+CPIN?
+CPIN: READY

OK

AT+CSQ
+CSQ: 24,99

OK

AT+CEREG?
+CEREG: 0,1

OK

AT+COPS?
+COPS: 0,0,"CHN-CT",7

OK

AT+QENG="servingcell"
+QENG: "servingcell","NOCONN","LTE","FDD",460,11,D103518,265,2452,5,3,3,754B,-92,-10,-65,13,27

OK

AT+CGPADDR
+CGPADDR: 1,"10.2.120.182,..."

OK

+CEREG: 0,1 together with a +CSQ value other than 99 means the module has registered successfully; a value other than 0.0.0.0 for cid=1 in AT+CGPADDR means the data link has been established.


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 and the APN.


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 for cid=1 in AT+CGDCONT? matches the SIM carrier
+CSQ: 99,99 persists for a whileThe module is searching for a network; check the antenna, and use AT+QENG="servingcell" to confirm the camped state
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 →