Mobile data connection troubleshooting: Difference between revisions

From Teltonika Networks Wiki
(Created page with "This is a quick guide to help engineers in the debugging process of a router if they encounter issues with mobile data connection. 1. Connect to router via CLI/SSH (use SSH so...")
 
m (Protected "Mobile data connection troubleshooting" ([Edit=Allow only administrators] (indefinite) [Move=Allow only administrators] (indefinite)))
 
(34 intermediate revisions by one other user not shown)
Line 1: Line 1:
This is a quick guide to help engineers in the debugging process of a router if they encounter issues with mobile data connection.
__TOC__
1. Connect to router via CLI/SSH (use SSH software such as Putty):
• CLI/SSH login: root
• CLI/SSH password: <your router’s password>


2. Connect to mobile module of the router:
==Summary==
• ifdown ppp
This is a quick guide to help in the debugging process of a router if encounters issues with mobile data connection.
• /etc/init.d/gsmd stop
• microcom /dev/modem_cmd
• ATE1
• at+qcsq=0
(*most likely you will not see anything and that’s because screen echo might be disabled. ATE1 will enable it so that you can see what you write. at+qcsq=0 command stops showing unnecessary output)
3. Check communication (wait for the module to respond OK):
• AT
4. 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:
==Preparation==
• AT+QIACT=<contextID>
* 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 client):
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
...
----
* You probably won't see anything when you type commands, and that’s because the screen echo may be disabled. '''ATE1''' command will enable it so that you can see what you write.
...
ATE1
OK
...
----
* Use commands '''AT+QCSQ=0''' and '''AT+CREG=0''' to stop showing unnecessary output:
...
at+qcsq=0
OK
at+creg=0
OK
...
----
* Check communication (wait for the module to respond '''OK'''):
...
AT
OK
...
----


11. Query IP Address of the PDP context:
==Debugging process==
AT+QIACT?
* If PIN is required, initialize modem with your PIN code:
(*Try and activate a PDP context a few times. If failed, then reboot the module).
...
12. Open connection:
AT+CPIN="xxxx"
• 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
* Use command '''AT+CPIN''' to query SIM card status:
AT+QPING=1,"8.8.8.8"
...
*1 –The context ID. The range is 1-16;
AT+CPIN?
*8.8.8.8 - The host address in string type. The format is a dotted decimal IP address.
+CPIN: READY
Response:
...
• If ping a remote server successfully, response: OK (means that the module works properly)
'''Note:''' reboot the module if it fails to identify SIM
• If there is any error, response: ERROR (means the problem is in the module)
----
*Use command '''AT+CREG''' to check GSM connection:
...
AT+CREG?
+CREG: 0,1
OK
...
'''Note:''' OK means that the module has registered on CS domain service
----
* Use command '''AT+CGREG''' to check PS Service:
...
AT+CGREG?
+CGREG: 0,1
OK
...
'''Note:''' OK means that the module has registered in UMTS/LTE network
----
* Use command '''AT+QICSGP''' to configure APN, user name, password and auth type:
AT+QICSGP=<contextID>[,<context_type>,<APN>[,<username>,<password>)[,<authentication>]]]


Example fo the provided configuration:
''<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'''
...
AT+QICSGP=1,1"bangapro","","",1
OK
...
----
* Use command '''AT+QIACT=<contextID>''' to activate a PDP context:
...
AT+QIACT=1
OK
...
----
* Use command '''AT+QIACT?''' to query IP Address of the PDP context:
...
AT+QIACT?
+QIACT: 1,1,1,"88.77.66.55"
OK
...
'''Note:''' try and activate a PDP context a few times. If failed, then reboot the module.
----
* Use command '''AT+QIOPEN''' to open connection:
...
AT+QIOPEN
OK
...
'''Note:''' if failed – deactivate PDP context - use command '''AT+QIDEACT=<context ID>''' to deactivate PDP context.
----
* Use command '''AT+QPING''' to ping a Remote Server:
...
AT+QPING=1,"8.8.8.8"
OK
+QPING: 0,"8.8.8.8",32,54,255
+QPING: 0,"8.8.8.8",32,30,255
+QPING: 0,"8.8.8.8",32,35,255
+QPING: 0,"8.8.8.8",32,34,255
+QPING: 0,4,4,0,30,54,37
...
 
''1'' –The context ID. The range is 1-16;
 
''8.8.8.8'' - The host address in string type.
 
'''Note:''' if ping a remote server successfully, response is '''OK''' (means that the module works properly). If there is any error, response is '''ERROR''' (means the problem is in the module).
 
==Example for the provided configuration==
...
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
+QCSQ: "LTE",47,-75,156,-10
+CREG: 1,"008B","012CD17",7
AT+QCSQ=0
OK
+CREG: 1,"008B","012CD0D",7
+CREG: 1,"008B","012CD17",7
AT+CREG=0
OK
AT
OK
...
 
...
AT+CPIN?
+CPIN: READY
OK
AT+CREG
OK
AT+CREG?
+CREG: 0,1
OK
AT+CREG
OK
AT+CGREG?
+CGREG: 0,1
OK
AT+QICSGP=1,1"bangapro","","",1
OK
AT+QIACT=1
OK
AT+QIACT?
+QIACT: 1,1,1,"88.77.66.55"
OK
...
 
...
AT+QIOPEN
OK
AT+QPING=1,"8.8.8.8"
OK
+QPING: 0,"8.8.8.8",32,54,255
+QPING: 0,"8.8.8.8",32,30,255
+QPING: 0,"8.8.8.8",32,35,255
+QPING: 0,"8.8.8.8",32,34,255
+QPING: 0,4,4,0,30,54,37
...

Latest revision as of 14:59, 22 May 2020

Summary

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 client):
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
...

  • You probably won't see anything when you type commands, and that’s because the screen echo may be disabled. ATE1 command will enable it so that you can see what you write.
...
ATE1
OK
...

  • Use commands AT+QCSQ=0 and AT+CREG=0 to stop showing unnecessary output:
... 
at+qcsq=0
OK
at+creg=0
OK
...

  • Check communication (wait for the module to respond OK):
... 
AT
OK
...

Debugging process

  • If PIN is required, initialize modem with your PIN code:
...
AT+CPIN="xxxx"
...

  • Use command AT+CPIN to query SIM card status:
...
AT+CPIN?
+CPIN: READY
...

Note: reboot the module if it fails to identify SIM


  • Use command AT+CREG to check GSM connection:
...
AT+CREG?
+CREG: 0,1
OK
...

Note: OK means that the module has registered on CS domain service


  • Use command AT+CGREG to check PS Service:
...
AT+CGREG?
+CGREG: 0,1
OK
...

Note: OK means that the module has registered in UMTS/LTE network


  • Use command AT+QICSGP to configure APN, user name, password and auth type:
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

...
AT+QICSGP=1,1"bangapro","","",1
OK
...

  • Use command AT+QIACT=<contextID> to activate a PDP context:
...
AT+QIACT=1
OK
...

  • Use command AT+QIACT? to query IP Address of the PDP context:
...
AT+QIACT?
+QIACT: 1,1,1,"88.77.66.55"
OK
...

Note: try and activate a PDP context a few times. If failed, then reboot the module.


  • Use command AT+QIOPEN to open connection:
...
AT+QIOPEN
OK
...

Note: if failed – deactivate PDP context - use command AT+QIDEACT=<context ID> to deactivate PDP context.


  • Use command AT+QPING to ping a Remote Server:
...
AT+QPING=1,"8.8.8.8"
OK
+QPING: 0,"8.8.8.8",32,54,255
+QPING: 0,"8.8.8.8",32,30,255
+QPING: 0,"8.8.8.8",32,35,255
+QPING: 0,"8.8.8.8",32,34,255
+QPING: 0,4,4,0,30,54,37
...

1 –The context ID. The range is 1-16;

8.8.8.8 - The host address in string type.

Note: if ping a remote server successfully, response is OK (means that the module works properly). If there is any error, response is ERROR (means the problem is in the module).

Example for the provided configuration

...
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
+QCSQ: "LTE",47,-75,156,-10
+CREG: 1,"008B","012CD17",7
AT+QCSQ=0
OK
+CREG: 1,"008B","012CD0D",7
+CREG: 1,"008B","012CD17",7
AT+CREG=0
OK
AT
OK
...
...
AT+CPIN?
+CPIN: READY
OK
AT+CREG
OK
AT+CREG?
+CREG: 0,1
OK
AT+CREG
OK
AT+CGREG?
+CGREG: 0,1
OK
AT+QICSGP=1,1"bangapro","","",1
OK
AT+QIACT=1
OK
AT+QIACT?
+QIACT: 1,1,1,"88.77.66.55"
OK
...
...
AT+QIOPEN
OK
AT+QPING=1,"8.8.8.8"
OK
+QPING: 0,"8.8.8.8",32,54,255
+QPING: 0,"8.8.8.8",32,30,255
+QPING: 0,"8.8.8.8",32,35,255
+QPING: 0,"8.8.8.8",32,34,255
+QPING: 0,4,4,0,30,54,37
...