Failed to start PPP / Failed to connect to cell network

I’m having trouble with the Nova connection on a Raspberry Pi Zero W.

I run hologram network connect -v which fails with

INFO: Detected modem NovaM
INFO: found working port at ttyUSB1
INFO: chatscript file: /usr/local/lib/python2.7/dist-packages/Hologram/Network/Modem/chatscripts/default-script
INFO: Instantiated a NovaM interface with device name of /dev/ttyUSB1
INFO: Connecting to cell network with timeout of 200 seconds
INFO: Checking for existing PPP sessions
INFO: Starting pppd
ERROR: Modem hangup - possibly due to an unregistered SIM
INFO: Failed to connect to cell network
Failed to start PPP

I have a Python script

hologram = HologramCloud(credentials, network='cellular')
result = hologram.network.connect()
if result == False:
    print 'Failed to connect to cell network'

recv = hologram.sendMessage(
                            data,
                            topics = ["textdata"],
                            timeout = 3
                            )

print hologram.getResultString(recv)
hologram.network.disconnect()

Which fails with

No handlers could be found for logger "Hologram.Network.Modem.ModemMode.pppd"
Failed to connect to cell network
Unknown response code

but sometimes with

Exceptions.HologramError.SerialError: Unable to detect a usable serial port

The dashboard says the status is Connected.

hologram send --cloud 'message' sometimes works and the message appears in the dashboard, but it sometimes fails ERROR: Unable to detect a usable serial port.
EDIT: now it’s always failing RESPONSE MESSAGE: Unknown response code.

I am connected to another wifi network. Is this causing a problem?

I have not configured any APN settings.

The blue and red lights on the modem are on.


ip route returns

default via 192.168.0.1 dev wlan0 src 192.168.0.73 metric 302
169.254.0.0/16 dev wwan0 proto kernel scope link src [ip removed] metric 203
192.168.0.0/24 dev wlan0 proto kernel scope link src 192.168.0.73 metric 302

and ifconfig is

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1000  (Local Loopback)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

wlan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.0.73  netmask 255.255.255.0  broadcast 192.168.0.255
        inet6 fe80::32b7:2975:deca:7eb8  prefixlen 64  scopeid 0x20<link>
        ether b8:27:eb:38:3a:ce  txqueuelen 1000  (Ethernet)
        RX packets 1785  bytes 193690 (189.1 KiB)
        RX errors 0  dropped 60  overruns 0  frame 0
        TX packets 789  bytes 130292 (127.2 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

wwan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet [ip removed]  netmask 255.255.0.0  broadcast 169.254.255.255
        inet6 fe80::9898:c389:157b:93f6  prefixlen 64  scopeid 0x20<link>
        ether 8a:7e:07:11:07:60  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

I’ve had no problems connecting until now. I was sending dozens of messages a couple days ago.

The only thing I changed recently is upgrading to the Professional Plan from the free one.

1 Like

Ok, so after a quick reinstall of the Python packages it seems to connect.

After doing hologram network connect, ifconfig shows a new interface, ppp0

ppp0: flags=4305<UP,POINTOPOINT,RUNNING,NOARP,MULTICAST>  mtu 1500
        inet [ip removed]  netmask 255.255.255.255  destination [ip removed]
        ppp  txqueuelen 3  (Point-to-Point Protocol)
        RX packets 64  bytes 7036 (6.8 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 69  bytes 70733 (69.0 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

My script fails with Exceptions.HologramError.SerialError: Unable to detect a usable serial port.
If I do hologram network connect before running the script it fails. If I connected, hologram network disconnect causes the script to work normally. What’s causing this?

Bump.

Now the PPP connection isn’t in ifconfig, it only creates wwan0.

I am running into the same issue wondering if you figured it out.

The lack of Hologram support is strange.

Anyway, I’ve found how to manually connect the modem without the Python SDK or cli.


Using resources on their Github I replaced /etc/ppp/options with this pppd settings file and /etc/chatscripts/nova-m with this chatscript and then ran the command /usr/sbin/pppd.

It failed and it looked like pppd couldn’t connect to the modem. I dug around in /dev and found that the modem is acually /dev/ttyUSB1, not /dev/ttyUSB2 or whatever Hologram installed it as. I think this is the problem that was preventing the CLI/SDK from doing its thing, but in my first post it does try to connect to `/dev/ttyUSB1, so I dunno.

Now the modem connects, the ppp0 interface is created and appears in ifconfig, and the cli connects.

To find you serial port, try screen /dev/ttyUSBx, with x being the number of one of the terminals from ls /dev/ttyUSB*. Then type at in the terminal (if you can’t type at all just disconnect) and if the device responds with ok that’s your modem port.


Here’s my /etc/ppp/options, just to be completly clear:

# PPP configuration for Hologram Nova modem using Hologram SIM card
# For more information see hologram.io

connect "/usr/sbin/chat -v -f /etc/chatscripts/nova-m "

# Serial device to which the modem is connected.
/dev/ttyUSB1

# Speed of the serial line.
115200

# Assumes that your IP address is allocated dynamically by the ISP.
noipdefault
# Try to get the name server addresses from the ISP.
usepeerdns
# Use this connection as the default route.
defaultroute

# Makes pppd "dial again" when the connection is lost.
persist

# Do not ask the remote to authenticate.
noauth

Does any of the support staff know why this might be happening?

Hey, let me see if I can help you out here.
First off, mounting a few serial ports is normal for the modem. The one that doesn’t respond is a debug port for the Qualcomm chipset I believe. Sometimes they don’t mount in the same order so it can be necessary to change the peers file if you’re using that method.
The SDK detects the port dynamically by doing the same thing you discovered. It figures out all the ports associated with that USB ID and then checks which one it can write AT to and get a response.
The error you posted above means that it couldn’t find any ports it could write to. That might mean that another process was already tying it up.
Another helpful tip: I don’t recommend renaming the files like you did. If you leave them with their current names and copy the appropriate ones into the peers and chatscripts directories then you can start and stop ppp by doing sudo pon nova-m and sudo poff nova-m

Anyway, I don’t have a good answer for you on why the CLI couldn’t find the port besides potentially some other process tying it up. Try running with -vv and paste the output from that.

You can also try running the disconnect command to see if that frees it up and fixes it.

I remember -vv had, what I though as, no useful information. I think it just froze until I ctrl+c ed it, then it would spit out the error Failed to start PPP. If I have the problem again I’ll post the output.

Is /etc/ppp/options supposed to be modified by the installer? It was the default file when I went to modify it, and the serial device address was commented out. Also, /etc/chatscripts/nova-m didn’t exist.

No, the SDK doesn’t touch those files. It starts PPP a different way.

Now it’s no longer connecting, and I purged pppd and reinstalled. What should I do?

I’ve noticed if I fix it will stop working in a couple days or so.

What error are you getting?

DEBUG: checking for vid_pid: ('12d1', '1506')
DEBUG: checking for vid_pid: ('12d1', '1001')
DEBUG: checking for vid_pid: ('05c6', '90b2')
INFO: Detected modem NovaM
DEBUG: checking port ttyUSB0
DEBUG: checking port ttyUSB1
DEBUG: [AT]
DEBUG: {AT}
DEBUG: {OK}
INFO: found working port at ttyUSB1
INFO: chatscript file: /usr/local/lib/python2.7/dist-packages/Hologram/Network/Modem/chatscripts/default-script
DEBUG: [ATE0]
DEBUG: {ATE0}
DEBUG: {OK}
DEBUG: [AT+CMEE=2]
DEBUG: {}
DEBUG: {OK}
DEBUG: [AT+CPIN?]
DEBUG: {}
DEBUG: {+CPIN: READY}
DEBUG: {}
DEBUG: {OK}
DEBUG: [AT+CPMS="ME","ME","ME"]
DEBUG: {}
DEBUG: {+CPMS: 0,23,0,23,0,23}
DEBUG: {}
DEBUG: {OK}
DEBUG: [AT+CMGF=0]
DEBUG: {}
DEBUG: {OK}
DEBUG: [AT+CNMI=2,1]
DEBUG: {}
DEBUG: {OK}
DEBUG: [AT+CEREG=2]
DEBUG: {}
DEBUG: {OK}
INFO: Instantiated a NovaM interface with device name of /dev/ttyUSB1
DEBUG: [AT+CGMM]
DEBUG: {}
DEBUG: {SARA-R410M-02B}
DEBUG: {}
DEBUG: {OK}
INFO: Connecting to cell network with timeout of 200 seconds
INFO: Checking for existing PPP sessions
INFO: Starting pppd
DEBUG: Killing pppd
INFO: Failed to connect to cell network
Failed to start PPP

EDIT: did disconnect first. Also wwan0 interface is always online.

Does running a sudo hologram modem reset help anything? (You may need to wait 20 seconds or so for it to come back up)

Also, have you seen the Cat-M thread? Nova R410 (Cat-M) Issues (Troubleshooting tips and tricks and known issues on the R410 Nova + user feedback on issues) - #37 by aokun

Might be some helpful stuff in there.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.