Difference between revisions of "Mobile data connection troubleshooting"
m (Protected "Mobile data connection troubleshooting" ([Edit=Allow only administrators] (indefinite) [Move=Allow only administrators] (indefinite))) |
|||
(24 intermediate revisions by one other user not shown) | |||
Line 1: | Line 1: | ||
__TOC__ | __TOC__ | ||
− | + | ---- | |
This is a quick guide to help in the debugging process of a router if encounters issues with mobile data connection. | This is a quick guide to help in the debugging process of a router if encounters issues with mobile data connection. | ||
==Preparation== | ==Preparation== | ||
− | * First, to establish a data connection only through mobile module on RUT, you need connect to router via CLI/SSH (use SSH software such as | + | * First, to establish a data connection only through mobile module on RUT, you need connect to router via CLI/SSH (use SSH software such as Putty): |
CLI/SSH username: root | CLI/SSH username: root | ||
CLI/SSH password: <your router’s password> | CLI/SSH password: <your router’s password> | ||
− | + | ||
* Connect to mobile module of the router: | * Connect to mobile module of the router: | ||
... | ... | ||
Line 18: | Line 18: | ||
+CREG: 1,"008B","012CD17",7 | +CREG: 1,"008B","012CD17",7 | ||
... | ... | ||
− | + | ||
− | * | + | * Most likely you will not see anything and that’s because screen echo might be disabled. '''ATE1''' command will enable it so that you can see what you write. '''at+qcsq=0''' and '''at+creg=0''' command stops showing unnecessary output: |
... | ... | ||
ATE1 | ATE1 | ||
OK | OK | ||
− | |||
− | |||
− | |||
− | |||
at+qcsq=0 | at+qcsq=0 | ||
OK | OK | ||
Line 32: | Line 28: | ||
OK | OK | ||
... | ... | ||
− | + | ||
− | * Check communication (wait for the module to respond | + | * Check communication (wait for the module to respond OK): |
... | ... | ||
AT | AT | ||
OK | OK | ||
... | ... | ||
− | |||
==Debugging process== | ==Debugging process== | ||
− | * If PIN is required, initialize modem with your PIN code: | + | * Query SIM card status: |
− | + | • AT+CPIN? | |
− | + | 5. If PIN is required, initialize modem with your PIN code: | |
− | + | • AT+CPIN="xxxx" | |
− | + | 6. Check SIM card status again (Reboot the module if it fails to identify SIM): | |
− | + | • AT+CPIN? | |
− | + | 7. Check GSM connection (OK means that the module has registered on CS domain service): | |
− | + | • AT+CREG | |
− | + | 8. Check PS Service (OK means that the module has registered in UMTS/LTE network) | |
− | + | • AT+CGREG | |
− | + | 9. Configure APN, user name, password and auth type by AT+QICSGP | |
− | + | • AT+QICSGP=<contextID>[,<context_type>,<APN>[,<username>,<password>)[,<authentication>]]] | |
− | + | <context type> The protocol type (1 – IPV4; 2 – IPv6). | |
− | + | <context id> The range is 1-16. | |
− | + | <authentication> The authentication methods (0 – NONE; 1 – PAP; 2 – CHAP; 3-PAP or CHAP). | |
− | + | Example: AT+QICSGP=1,1,"APN_Name","","",1 | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | Example: | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | + | 10. Activate a PDP context: | |
+ | • AT+QIACT=<contextID> | ||
− | + | 11. Query IP Address of the PDP context: | |
+ | • AT+QIACT? | ||
+ | (*Try and activate a PDP context a few times. If failed, then reboot the module). | ||
+ | 12. Open connection: | ||
+ | • AT+QIOPEN | ||
+ | (*If failed – deactivate PDP context - use command AT+QIDEACT=<context ID> to deactivate PDP context.) | ||
+ | 13. Use AT commands to ping a Remote Server | ||
+ | • AT+QPING=1,"8.8.8.8" | ||
+ | *1 –The context ID. The range is 1-16; | ||
+ | *8.8.8.8 - The host address in string type. The format is a dotted decimal IP address. | ||
+ | Response: | ||
+ | • If ping a remote server successfully, response: OK (means that the module works properly) | ||
+ | • If there is any error, response: ERROR (means the problem is in the module) | ||
− | + | Example fo the provided configuration: | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− |
Revision as of 21:56, 19 May 2020
This is a quick guide to help in the debugging process of a router if encounters issues with mobile data connection.
Preparation
- First, to establish a data connection only through mobile module on RUT, you need connect to router via CLI/SSH (use SSH software such as Putty):
CLI/SSH username: root CLI/SSH password: <your router’s password>
- Connect to mobile module of the router:
... root@Teltonika:~# ifdown ppp root@Teltonika:~# /etc/init.d/gsmd stop root@Teltonika:~# microcom /dev/modem_cmd +QCSQ: "LTE",47,-75,166,-10 +QCSQ: "LTE",47,-75,161,-10 +CREG: 1,"008B","012CD17",7 ...
- Most likely you will not see anything and that’s because screen echo might be disabled. ATE1 command will enable it so that you can see what you write. at+qcsq=0 and at+creg=0 command stops showing unnecessary output:
... ATE1 OK at+qcsq=0 OK at+creg=0 OK ...
- Check communication (wait for the module to respond OK):
... AT OK ...
Debugging process
- Query SIM card status:
• AT+CPIN? 5. If PIN is required, initialize modem with your PIN code: • AT+CPIN="xxxx" 6. Check SIM card status again (Reboot the module if it fails to identify SIM): • AT+CPIN? 7. Check GSM connection (OK means that the module has registered on CS domain service): • AT+CREG 8. Check PS Service (OK means that the module has registered in UMTS/LTE network) • AT+CGREG 9. Configure APN, user name, password and auth type by AT+QICSGP • AT+QICSGP=<contextID>[,<context_type>,<APN>[,<username>,<password>)[,<authentication>]]] <context type> The protocol type (1 – IPV4; 2 – IPv6). <context id> The range is 1-16. <authentication> The authentication methods (0 – NONE; 1 – PAP; 2 – CHAP; 3-PAP or CHAP). Example: AT+QICSGP=1,1,"APN_Name","","",1
10. Activate a PDP context: • AT+QIACT=<contextID>
11. Query IP Address of the PDP context: • AT+QIACT? (*Try and activate a PDP context a few times. If failed, then reboot the module). 12. Open connection: • AT+QIOPEN (*If failed – deactivate PDP context - use command AT+QIDEACT=<context ID> to deactivate PDP context.) 13. Use AT commands to ping a Remote Server • AT+QPING=1,"8.8.8.8"
- 1 –The context ID. The range is 1-16;
- 8.8.8.8 - The host address in string type. The format is a dotted decimal IP address.
Response: • If ping a remote server successfully, response: OK (means that the module works properly) • If there is any error, response: ERROR (means the problem is in the module)
Example fo the provided configuration: