Device Debugging

Check the SIM, signal and registration status of the BG95-M3 over the USB serial port, and switch the USB composition.
First: Does the Current Composition Have an AT Port?
| USB composition | AT port | Network interface |
|---|---|---|
modem | Yes (/dev/ttyUSB*) | No |
ecm | No | Yes (eth2 / usb0) |
rmnet | Yes | Yes (QMI) |
rndis | Yes | Yes (usb0) |
When the BG95 is in the ecm composition, only the ECM network adapter is exposed over USB; no AT serial port appears at all (neither /dev/ttyUSB* nor /dev/ttyACM*).
This is a design limitation of the module itself, not a driver issue. To send AT commands, you must either:
- Switch to the
modem/rmnet/rndiscomposition, or - Use the module's
MAIN_RXD/MAIN_TXDmain serial port
Serial Connection (modem Composition)
Installing the Serial Driver
# opkg
opkg install kmod-usb-serial-option
# apk
apk add kmod-usb-serial-option
Checking the Serial Ports
root@OpenWrt:~# ls /dev/ttyUSB*
Starting minicom
minicom -D /dev/ttyUSB2 -b 115200
Send AT; a reply of OK means communication is working:
AT
OK
If you are not sure which port to use, send
ATIto each of/dev/ttyUSB0through/dev/ttyUSB3to identify it.The default baud rate is
115200; try9600if there is no response.
To exit: press Ctrl + A, then X, and select Yes.
Switching the USB Composition
Querying the Current Composition
AT+QCFGEXT="usbnet"
+QCFGEXT: "usbnet","ecm"
OK
Common Compositions
| Command | Composition | Description |
|---|---|---|
AT+QCFGEXT="usbnet","modem" | Modem | DIAG + GNSS + Modem + Modem, with an AT port |
AT+QCFGEXT="usbnet","ecm" | ECM | Direct network adapter, no AT port |
AT+QCFGEXT="usbnet","rmnet" | RMNET | QMI network adapter + AT port |
AT+QCFGEXT="usbnet","rndis" | RNDIS | RNDIS network adapter + AT port |
The module must be restarted after switching:
AT+CFUN=1,1
Checking Registration Status
The following commands must be executed in the
modem/rmnet/rndiscomposition.
Basic Status
| Command | Description | Normal response |
|---|---|---|
AT | Test communication | OK |
ATI | Module model/firmware | Quectel / BG95-M3 / Revision: ... |
AT+CPIN? | SIM card status | +CPIN: READY |
AT+CSQ | Signal quality | +CSQ: 20,99 (0~31, higher is better) |
AT+CFUN? | RF status | +CFUN: 1 |
Network Registration
| Command | Description |
|---|---|
AT+CEREG? | EPS registration status (the main indicator for LTE-M / NB-IoT) |
AT+CGREG? | GPRS registration status |
AT+COPS? | Current operator |
AT+QNWINFO | Current network standard and frequency band |
AT+QCSQ | Detailed signal strength/quality |
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 |
A Complete Check Sequence
AT
OK
ATI
Quectel
BG95-M3
Revision: BG95M3LAR02A04_01.003.01.003
OK
AT+CPIN?
+CPIN: READY
OK
AT+CSQ
+CSQ: 24,99
OK
AT+CEREG?
+CEREG: 0,1
OK
AT+COPS?
+COPS: 0,0,"CHINA MOBILE",7
OK
AT+QNWINFO
+QNWINFO: "LTEM","46000",...
OK
+CEREG: 0,1together with a+CSQvalue other than 99 means the module has registered successfully.If
AT+CPIN?returns+CME ERROR: 10(SIM not inserted), check the card slot orientation.
Data Connection (Optional)
In the ECM/RNDIS composition the module dials automatically, so manual APN configuration is usually unnecessary. If you switch to the modem composition and need to activate the PDP context manually:
AT+QICSGP=1,1,"<APN>","","",1
OK
AT+QIACT=1
OK
AT+QILOCIP
192.168.225.x
<APN>is provided by the carrier, for examplecmnet,ctnet,3gnet.
Reset and Reboot
| Command | Function | Description |
|---|---|---|
AT+CFUN=1,1 | Software reboot | Most commonly used |
AT&F | Restore default AT command settings | Does not affect user data |
AT+QPRTPARA=3 | Restore factory NV configuration | Clears settings such as USB composition/APN |
AT+QPOWD=1 | Power off | Requires power cycling to restart |
After AT+QPRTPARA=3, the module restores the default USB composition (usually modem); run AT+CFUN=1,1 afterwards to reboot.
FAQ
| Symptom | Troubleshooting |
|---|---|
No /dev/ttyUSB* | Currently in the ECM composition, which is normal; switch to the modem composition |
| No response to AT commands | Verify the serial port and baud rate (115200/9600), and try another ttyUSB port |
+CEREG: 0,3 | The SIM does not have Cat M1/NB-IoT enabled, has insufficient balance, or the band is unsupported |
+CSQ: 99,99 | No signal; check the antenna and location |
| Registered but no Internet access | Check the APN, PDP activation status and data plan |
| Module keeps rebooting | Insufficient USB power; use a powered hub |