Difference between revisions of "Debug Cellular connection"

From Wiki for Dragino Project
Jump to: navigation, search
Line 56: Line 56:
 
  Fri Feb  7 01:20:30 2020 local2.info chat[29485]: send ( ^M)
 
  Fri Feb  7 01:20:30 2020 local2.info chat[29485]: send ( ^M)
 
  Fri Feb  7 01:20:30 2020 daemon.info pppd[29452]: Serial connection established.
 
  Fri Feb  7 01:20:30 2020 daemon.info pppd[29452]: Serial connection established.
 +
 +
<br>
 +
<br>
 +
=Share Cellular Network for WiFi & LAN clients=
 +
By default, the Cellular Network won't be share to the WiFi or LAN clients. If user need to share with them, user can modify the file.
 +
 +
root@dragino-1d25dc:~# cat /etc/config/firewall
 +
 +
config defaults
 +
        option syn_flood '1'
 +
        option input 'ACCEPT'
 +
        option output 'ACCEPT'
 +
        option forward 'REJECT'
 +
config zone
 +
        option name 'lan'
 +
        list network 'lan'
 +
        option input 'ACCEPT'
 +
        option output 'ACCEPT'
 +
        option forward 'REJECT' 
 +
config zone
 +
        option name 'wan'
 +
        list network 'wan'
 +
        list network 'wwan'
 +
        list network 'wan6'
 +
        list network 'cellular'  -----------------> Add this line and reboot
 +
        option input 'REJECT'
 +
        option output 'ACCEPT'
 +
        option forward 'ACCEPT'
 +
        option masq '1'
 +
        option mtu_fix '1'
 +
config forwarding
 +
        option src 'lan'
 +
        option dest 'wan'

Revision as of 09:00, 18 October 2020

How to Debug if Cellualr connection fail

If there is problem for cellular connection. Please check below points:

Do you order the model with cellular option

Make sure you order the model with cellular option. Can check by command:

root@dragino-1bbd90:~# lsusb
Bus 001 Device 004: ID 2c7c:0125      --> This is the Cellular module
Bus 001 Device 002: ID 1a40:0101 Terminus Technology Inc. Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

Do you input the SIM card correctly

Below command can check:

root@dragino-1bbd90:~# comgt -d /dev/ttyUSB3
SIM ready
Waiting for Registration..(120 sec max)
Registered on Home network: "CHN-CT",7
Signal Quality: 23,99

Check dialing info

run "logread -f" in console

Fri Feb  7 01:20:28 2020 daemon.notice pppd[29452]: pppd 2.4.7 started by root, uid 0
Fri Feb  7 01:20:29 2020 user.notice iot_keep_alive: Ping WAN
Fri Feb  7 01:20:29 2020 user.notice iot_keep_alive: Default interface is
Fri Feb  7 01:20:29 2020 user.notice iot_keep_alive: No internet at any interface
Fri Feb  7 01:20:29 2020 local2.info chat[29485]: abort on (BUSY)
Fri Feb  7 01:20:29 2020 local2.info chat[29485]: abort on (NO CARRIER)
Fri Feb  7 01:20:29 2020 local2.info chat[29485]: abort on (ERROR)
Fri Feb  7 01:20:29 2020 local2.info chat[29485]: report (CONNECT)
Fri Feb  7 01:20:29 2020 local2.info chat[29485]: timeout set to 10 seconds
Fri Feb  7 01:20:29 2020 local2.info chat[29485]: send (AT&F^M)
Fri Feb  7 01:20:29 2020 local2.info chat[29485]: expect (OK)
Fri Feb  7 01:20:29 2020 local2.info chat[29485]: AT&F^M^M
Fri Feb  7 01:20:29 2020 local2.info chat[29485]: OK
Fri Feb  7 01:20:29 2020 local2.info chat[29485]:  -- got it
Fri Feb  7 01:20:29 2020 local2.info chat[29485]: send (ATE1^M)
Fri Feb  7 01:20:29 2020 local2.info chat[29485]: expect (OK)
Fri Feb  7 01:20:29 2020 local2.info chat[29485]: ^M
Fri Feb  7 01:20:29 2020 local2.info chat[29485]: ATE1^M^M
Fri Feb  7 01:20:29 2020 local2.info chat[29485]: OK
Fri Feb  7 01:20:29 2020 local2.info chat[29485]:  -- got it
Fri Feb  7 01:20:29 2020 local2.info chat[29485]: send (AT+CGDCONT=1,"IP",""^M)
Fri Feb  7 01:20:30 2020 local2.info chat[29485]: timeout set to 30 seconds
Fri Feb  7 01:20:30 2020 local2.info chat[29485]: expect (OK)
Fri Feb  7 01:20:30 2020 local2.info chat[29485]: ^M
Fri Feb  7 01:20:30 2020 local2.info chat[29485]: AT+CGDCONT=1,"IP",""^M^M
Fri Feb  7 01:20:30 2020 local2.info chat[29485]: OK
Fri Feb  7 01:20:30 2020 local2.info chat[29485]:  -- got it
Fri Feb  7 01:20:30 2020 local2.info chat[29485]: send (ATD*99#^M)      -----> In case the dialling process already reach here. 
Normally problem is with provider, need to check if the SIM card has balance or other requirement from cellular operator
Fri Feb  7 01:20:30 2020 local2.info chat[29485]: expect (CONNECT)
Fri Feb  7 01:20:30 2020 local2.info chat[29485]: ^M
Fri Feb  7 01:20:30 2020 local2.info chat[29485]: ATD*99#^M^M
Fri Feb  7 01:20:30 2020 local2.info chat[29485]: CONNECT
Fri Feb  7 01:20:30 2020 local2.info chat[29485]:  -- got it
Fri Feb  7 01:20:30 2020 local2.info chat[29485]: send ( ^M)
Fri Feb  7 01:20:30 2020 daemon.info pppd[29452]: Serial connection established.



Share Cellular Network for WiFi & LAN clients

By default, the Cellular Network won't be share to the WiFi or LAN clients. If user need to share with them, user can modify the file.

root@dragino-1d25dc:~# cat /etc/config/firewall

config defaults
       option syn_flood '1'
       option input 'ACCEPT'
       option output 'ACCEPT'
       option forward 'REJECT'
config zone
       option name 'lan'
       list network 'lan'
       option input 'ACCEPT'
       option output 'ACCEPT'
       option forward 'REJECT'  
config zone
       option name 'wan'
       list network 'wan'
       list network 'wwan'
       list network 'wan6'
       list network 'cellular'   -----------------> Add this line and reboot
       option input 'REJECT'
       option output 'ACCEPT'
       option forward 'ACCEPT'
       option masq '1'
       option mtu_fix '1'
config forwarding
       option src 'lan'
       option dest 'wan'