Device Debugging

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
| Port | Purpose |
|---|---|
/dev/ttyUSB0 | Diagnostics (DM) |
/dev/ttyUSB1 | NMEA |
/dev/ttyUSB2 | AT commands (usually) |
/dev/ttyUSB3 | AT 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/ttyUSB3after replugging the module. If you are not sure, sendATIto each ofttyUSB0throughttyUSB3; the one returningQuectelis 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.
- 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.
Checking the SIM Card Slots
Checking the SIM Insertion Status
AT+CPIN?
+CPIN: READY
AT+QSIMSTAT?
+QSIMSTAT: 0,1
AT+QSIMDET?
+QSIMDET: 0,0
| Response | Meaning |
|---|---|
+CPIN: READY | SIM card recognized |
+CME ERROR: 10 | SIM not inserted (no card, or the slot is not connected) |
+QSIMSTAT: 0,1 | Detection disabled; a card is currently inserted |
+QSIMDET: 0,0 | SIM 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
| Command | Description | Example response |
|---|---|---|
AT | Test communication | OK |
ATI | Module model and firmware version | Quectel / EC25-AF(D) / Revision: EC25AFFDR07A08M4G |
AT+QGMR | Full firmware version | EC25AFFDR07A08M4G_01.002.01.002 |
AT+CPIN? | SIM card status | +CPIN: READY |
AT+CSQ | Signal quality | +CSQ: 24,99 |
AT+CFUN? | RF status | +CFUN: 1 |
AT+QTEMP | Module temperature | +QTEMP: 38,36,35 |
The first value of
AT+CSQis 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,99and+CEREG: 0,2are normal.
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","ims",...
+CGDCONT: 3,"IPV4V6","",...
AT+CGDCONT=1,"IPV4V6","cmnet"
OK
AT+CFUN=1,1
After a factory reset the APN for
cid=1is empty and must be set again; in ECM mode the module dials automatically usingcid=1.
Registration and Data Status
| Command | Description |
|---|---|
AT+CEREG? | EPS registration status |
AT+CGREG? | GPRS registration status |
AT+COPS? | Current operator |
AT+QNWINFO | Current network standard and frequency band |
AT+QCSQ | Detailed signal strength |
AT+QENG="servingcell" | Current serving cell information |
AT+CGACT? | PDP activation status |
AT+CGPADDR | IP address assigned to the PDP context |
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 |
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 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,1together with a+CSQvalue other than 99 means the module has registered successfully; a value other than0.0.0.0forcid=1inAT+CGPADDRmeans 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
| 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 for cid=1 in AT+CGDCONT? matches the SIM carrier |
+CSQ: 99,99 persists for a while | The module is searching for a network; check the antenna, and use AT+QENG="servingcell" to confirm the camped state |