# LTE - Modem Works But Cannot Ping

Source: https://forum.modalai.com/topic/401/lte-modem-works-but-cannot-ping
Category: ESCs, Sensors and Accessories (https://forum.modalai.com/category/15/escs-sensors-and-accessories)
Tags: cellular
Posted: 2021-08-18 03:46:17 UTC by derrick0799
Replies: 26 · Views: 7456

## derrick0799 · 2021-08-18 03:46:17 UTC

Looks like everything initialized correctly but I am unable to gain access to the internet.  I cannot ping a site.  Am I missing something?

yocto:~$ systemctl status -l voxl-modem
● voxl-modem.service - Modem Initialization
   Loaded: loaded (/etc/systemd/system/voxl-modem.service; enabled; vendor preset: enabled)
   Active: inactive (dead) since Thu 1970-01-01 00:03:37 UTC; 43s ago
  Process: 3914 ExecStart=/usr/bin/voxl-modem-start.sh (code=exited, status=0/SUCCESS)
  Process: 3913 ExecStartPre=/bin/sleep 2 (code=exited, status=0/SUCCESS)
 Main PID: 3914 (code=exited, status=0/SUCCESS)

Jan 01 00:03:37 apq8096 voxl-modem-start.sh[3914]: ]
Jan 01 00:03:37 apq8096 voxl-modem-start.sh[3914]: Successfully registered with the network
Jan 01 00:03:37 apq8096 voxl-modem-start.sh[3914]: Starting network
Jan 01 00:03:37 apq8096 voxl-modem-start.sh[3914]: Checking connection status
Jan 01 00:03:37 apq8096 voxl-modem-start.sh[3914]: Connection is up
Jan 01 00:03:37 apq8096 voxl-modem-start.sh[3914]: Using the DHCP client to get an IP address
Jan 01 00:03:37 apq8096 voxl-modem-start.sh[3914]: udhcpc (v1.23.2) started
Jan 01 00:03:37 apq8096 voxl-modem-start.sh[3914]: Sending discover...
Jan 01 00:03:37 apq8096 voxl-modem-start.sh[3914]: Sending select for 100.82.158.240...
Jan 01 00:03:37 apq8096 voxl-modem-start.sh[3914]: Lease of 100.82.158.240 obtained, lease time 7200

## Reply by vmassague · 2021-08-18 12:09:45 UTC

I am getting the exact same issue, with the same log output. 

```
adb shell systemctl status -l voxl-modem
● voxl-modem.service - Modem Initialization
   Loaded: loaded (/etc/systemd/system/voxl-modem.service; enabled; vendor preset: enabled)
   Active: inactive (dead) since Thu 1970-01-01 00:00:57 UTC; 2s ago
  Process: 3178 ExecStart=/usr/bin/voxl-modem-start.sh (code=exited, status=0/SUCCESS)
  Process: 2312 ExecStartPre=/bin/sleep 2 (code=exited, status=0/SUCCESS)
 Main PID: 3178 (code=exited, status=0/SUCCESS)

Jan 01 00:00:57 apq8096 voxl-modem-start.sh[3178]: ]
Jan 01 00:00:57 apq8096 voxl-modem-start.sh[3178]: Successfully registered with the network
Jan 01 00:00:57 apq8096 voxl-modem-start.sh[3178]: Starting network
Jan 01 00:00:57 apq8096 voxl-modem-start.sh[3178]: Checking connection status
Jan 01 00:00:57 apq8096 voxl-modem-start.sh[3178]: Connection is up
Jan 01 00:00:57 apq8096 voxl-modem-start.sh[3178]: Using the DHCP client to get an IP address
Jan 01 00:00:57 apq8096 voxl-modem-start.sh[3178]: udhcpc (v1.23.2) started
Jan 01 00:00:57 apq8096 voxl-modem-start.sh[3178]: Sending discover...
Jan 01 00:00:57 apq8096 voxl-modem-start.sh[3178]: Sending select for 10.107.157.92...
Jan 01 00:00:57 apq8096 voxl-modem-start.sh[3178]: Lease of 10.107.157.92 obtained, lease time 7200
```
I validated that the SIM works and has data with a cellphone. 
I am using an m500 with LTE v2 modem for Europe.

## Reply by derrick0799 · 2021-08-18 14:00:30 UTC

Ok.  I wasn’t sure if I was missing a step in setting this up.  I too have verified that the SIM card works and receives data in a different device.  I have the V2-Modem, WP7610 Sierra Wireless. I am also connecting to the Verizon “vzwinternet” APN if this detail would further help understand my issue.

## Reply by Chad Sweet (ModalAI staff) · 2021-08-18 14:06:12 UTC

This type of issue is typically related to APN mismatch with the carrier's specific APN. For "vzwinternet" the carrier is Verizon

Double checking folks see this doc as well https://docs.modalai.com/lte-v2-modem-manual/

## Reply by vmassague · 2021-08-18 15:13:46 UTC

In my case, I double-checked with the cellphone to have the same APN since I am using a custom one, but still no success. I tried with two different modules and VOXL boards. 

FYI, I am connecting the LTE antennas one in Antenna (main) and the other to Antenna (diversity)

## Reply by tom (ModalAI staff) · 2021-08-18 17:02:29 UTC (in reply to derrick0799)

@derrick0799 Are you using the [LTE V2 Add-on](https://docs.modalai.com/lte-modem-and-usb-add-on-v2-datasheet/) or [Stand Alone](https://docs.modalai.com/lte-modem-v2-dongle-datasheet/)?

## Reply by tom (ModalAI staff) · 2021-08-18 17:02:42 UTC

@vmassague Are you using the [LTE V2 Add-on](https://docs.modalai.com/lte-modem-and-usb-add-on-v2-datasheet/) or [Stand Alone](https://docs.modalai.com/lte-modem-v2-dongle-datasheet/)? And you're using the Sierra 7607 modem correct?

## Reply by derrick0799 · 2021-08-18 17:21:38 UTC (in reply to tom)

@tom, I am using the add-on

## Reply by vmassague · 2021-08-18 17:39:38 UTC (in reply to tom)

@tom I'm using the Add-on also and I'm using the Sierra 7607

## Reply by tom (ModalAI staff) · 2021-08-18 17:58:44 UTC (in reply to derrick0799)

@derrick0799 Can you disable the `voxl-modem` service from running with `systemctl disable voxl-modem` and reboot your voxl.

Then run `voxl-modem-start.sh` manually so I can see the full output?

## Reply by tom (ModalAI staff) · 2021-08-18 17:58:55 UTC (in reply to vmassague)

@vmassague Can you disable the `voxl-modem` service from running with `systemctl disable voxl-modem` and reboot your voxl.

Then run `voxl-modem-start.sh` manually so I can see the full output?

## Reply by derrick0799 · 2021-08-18 18:23:47 UTC (in reply to tom)

@tom, sure.  It will be later this evening before I am able to do so.

## Reply by tom (ModalAI staff) · 2021-08-18 19:40:09 UTC (in reply to derrick0799)

@derrick0799 @vmassague Another thing for both of you to check is to see if the APN is indeed set correctly, you can do this with the following command:

```
/ # echo -ne "AT+CGDCONT?\r" | busybox microcom -t 1000 /dev/ttyUSB2
AT+CGDCONT?
+CGDCONT: 1,"IP","h2g2","0.0.0.0",0,0,0,0
+CGDCONT: 2,"IPV4V6","ims","0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0",0,0,0,0
+CGDCONT: 3,"IPV4V6","sos","0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0",0,0,0,1
```

In this case, my APN is `h2g2` for GoogleFi

## Reply by derrick0799 · 2021-08-18 22:42:50 UTC (in reply to tom)

@tom I ran 'systemctl disable voxl-modem' and reboot voxl then...
yocto:~$ voxl-modem-start.sh

VOXL detected...

Initializing v2 modem...

Waiting for ttyUSB2...
ttyUSB2

Initalizing cellular connection...
Configuring GPIO to pull modem out of reset
Waiting for the diag serial port(/dev/ttyUSB0) to activate
    checking for serial port: /dev/ttyUSB0
    /dev/ttyUSB0 is available
Verifying existence of QMI port(/dev/cdc-wdm0)
    checking for serial port: /dev/cdc-wdm0
    /dev/cdc-wdm0 is available
Unstick QMI countdown: 10
Unstick QMI countdown: 9
Unstick QMI countdown: 8
Unstick QMI countdown: 7
Unstick QMI countdown: 6
"12253379280"
Checking for system registration
   Attempt: 1
{
	"registration": "registered",
	"plmn_mcc": 311,
	"plmn_mnc": 480,
	"plmn_description": "Verizon ",
	"roaming": false
}

response: [{
	"registration": "registered",
	"plmn_mcc": 311,
	"plmn_mnc": 480,
	"plmn_description": "Verizon ",
	"roaming": false
}
]
    Successfully registered with the network
Starting network
"No effect"
    Checking connection status
        Connection is up
Using the DHCP client to get an IP address
udhcpc (v1.23.2) started
Sending discover...
Sending select for 100.68.239.240...
Lease of 100.68.239.240 obtained, lease time 7200

## Reply by derrick0799 · 2021-08-18 22:49:48 UTC (in reply to tom)

@tom said in [LTE \- Modem Works But Cannot Ping](/post/1923):
> echo -ne "AT+CGDCONT?\r" | busybox microcom -t 1000 /dev/ttyUSB2

yocto:~$ echo -ne "AT+CGDCONT?\r" | busybox microcom -t 1000 /dev/ttyUSB2
AT+CGDCONT?
+CGDCONT: 1,"IP","vzwinternet","0.0.0.0",0,0,0,0
+CGDCONT: 2,"IPV4V6","ims","0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0",0,0,0,0
+CGDCONT: 3,"IPV4V6","sos","0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0",0,0,0,1

OK

## Reply by tom (ModalAI staff) · 2021-08-18 22:51:20 UTC

@derrick0799 Do you have WiFi connected? If so, try disabling it with `ifconfig wlan0 down` and seeing if you can then ping.

Also, can I see the output of `route -n`?

Same for you @vmassague something to try.

## Reply by tom (ModalAI staff) · 2021-08-18 22:51:39 UTC (in reply to derrick0799)

@derrick0799 Looks like APN is setting correctly so that's good

## Reply by derrick0799 · 2021-08-18 23:05:59 UTC (in reply to tom)

@tom after disabling wlan0,
/ # ping 8.8.8.8
connect: Network is unreachable

/ # route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
172.17.0.0      0.0.0.0         255.255.0.0     U     0      0        0 docker0
/ #

## Reply by tom (ModalAI staff) · 2021-08-18 23:07:52 UTC

@derrick0799 What does `ifconfig` show?

## Reply by derrick0799 · 2021-08-18 23:08:37 UTC (in reply to tom)

@tom 
/ # ifconfig
docker0   Link encap:Ethernet  HWaddr 02:42:77:DF:4E:80  
          inet addr:172.17.0.1  Bcast:0.0.0.0  Mask:255.255.0.0
          inet6 addr: fe80::42:77ff:fedf:4e80/64 Scope:Link
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:2 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:0 (0.0 B)  TX bytes:140 (140.0 B)

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:609376 errors:0 dropped:0 overruns:0 frame:0
          TX packets:609376 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:65142775 (62.1 MiB)  TX bytes:65142775 (62.1 MiB)

/ #

## Reply by tom (ModalAI staff) · 2021-08-18 23:24:26 UTC

@derrick0799 Is that the output after running `voxl-modem-start.sh`?

## Reply by tom (ModalAI staff) · 2021-08-18 23:28:20 UTC

At that point, you should be seeing something similar to:

```
wwan0     Link encap:UNSPEC  HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00  
          inet addr:30.60.23.115  P-t-P:30.60.23.115  Mask:255.255.255.248
          UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1500  Metric:1
          RX packets:33 errors:0 dropped:0 overruns:0 frame:0
          TX packets:55 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:3214 (3.1 KiB)  TX bytes:4672 (4.5 KiB)
```

## Reply by derrick0799 · 2021-08-18 23:32:49 UTC (in reply to tom)

@tom I think my problem was that the wifi was connected when I ran the voxl-modem-start.sh
Now that I am connect with adb everything started working when I re-ran voxl-modem-start.sh.  It is pinging as it should.

## Reply by derrick0799 · 2021-08-18 23:35:40 UTC (in reply to tom)

@tom 
/ # ifconfig
docker0   Link encap:Ethernet  HWaddr 02:42:77:DF:4E:80  
          inet addr:172.17.0.1  Bcast:0.0.0.0  Mask:255.255.0.0
          inet6 addr: fe80::42:77ff:fedf:4e80/64 Scope:Link
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:2 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:0 (0.0 B)  TX bytes:140 (140.0 B)

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:1472332 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1472332 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:155328799 (148.1 MiB)  TX bytes:155328799 (148.1 MiB)

wwan0     Link encap:UNSPEC  HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00  
          inet addr:100.76.95.21  P-t-P:100.76.95.21  Mask:255.255.255.252
          UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1500  Metric:1
          RX packets:2 errors:0 dropped:0 overruns:0 frame:0
          TX packets:2713 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:612 (612.0 B)  TX bytes:1304344 (1.2 MiB)

/ # ping 8.8.8.8
PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
64 bytes from 8.8.8.8: icmp_req=1 ttl=113 time=34.3 ms
64 bytes from 8.8.8.8: icmp_req=2 ttl=113 time=35.1 ms
64 bytes from 8.8.8.8: icmp_req=3 ttl=113 time=34.0 ms
64 bytes from 8.8.8.8: icmp_req=4 ttl=113 time=27.1 ms
64 bytes from 8.8.8.8: icmp_req=5 ttl=113 time=31.1 ms
64 bytes from 8.8.8.8: icmp_req=6 ttl=113 time=36.5 ms
64 bytes from 8.8.8.8: icmp_req=7 ttl=113 time=24.0 ms

Thanks @Tom

## Reply by tom (ModalAI staff) · 2021-08-18 23:36:17 UTC

@derrick0799 Great to hear!

## Reply by vmassague · 2021-08-19 08:15:06 UTC

Problem solved for me too! I think it was also the wlan0 being up. Thanks a lot for the support @tom

## Reply by tom (ModalAI staff) · 2021-08-20 17:51:48 UTC (in reply to vmassague)

@vmassague Awesome!
