Ppp connection in base OS; not container - having issues connecting using pon / NimbeLink (Cinterion/Gemalto) Skywire LTE CAT1

Greetings,

I am attempting to establish a ppp connection in the base resin OS. My company has forked the resin OS repo and we have added some cellular modem power management layers that are specific to our usage.

We are using a NimbeLink (Cinterion/Gemalto) Skywire LTE CAT1 modem. The modem plugs into a custom hardware board (using RaspberryPi Compute Module 3) via a Zigbee-style socket running resin OS. I have spent lots of time trying to establish connections using NetworkManager/ModemManager, however, success rate is about 25% at best. The vendor has advised not to use ModemManger as their firmware is “not 100% compatible”. They suggest using pon commands directly and a dialer script. (This modem is booted and initialized using a handful of GPIO pins; no issue here.)

The dialer script via pon works great on a bare-bones Raspian build running on the same hardware. Using picocom works as expected to interact with the modem as well as establishing the PPP connection.

On ResinOS it’s a different story. NetworkManager/ModemManger continually disconnects and reconnects the modem causing the usb device to come and go (modem ultimately will register as /dev/serial0 --> /dev/ttyAMA0). Manually stopping these 2 services by-hand in Resin OS prevents the disconnect/reconnect dance as noted by the modem vendor. However, pon always fails to connect. When using picocom to interact with the modem, issued commands hang or partially complete.

Ideally, we want to use ModemManager, but with this specific modem, it’s not looking possible. We want to establish the connection at the OS-level, not from within a container. Our container application will simply pick up and use the connection established at the OS-level. Previously, we did have some luck managing power state for the modem when using a container and we had to set ‘UDEV off’ in the Dockerfile (env var). Success rate still very low.

I am looking for any guidance on making successful ppp/pon connections in the base Resin OS level - not via a container. I have full access to tweaking the Yocto builds, so that is not an issue for testing.

(NOTE: Resin Agent is disabled and we have injected our own Agent via the Yocto build. Running 2.13.0-rev1 in disconnected state. This is informational and has nothing to do with the above.)

Please let me know what other information I can provide.

Help is greatly appreciated.

Thank you.

Hi. Do you systemctl stop NM / MM at runtime or do you mask them at build time?
Also, you could set-up udev rules to either make MM ignore specific ports of your device (using ENV{ID_MM_PORT_IGNORE}="1") or ignore the device altogether (using ENV{ID_MM_DEVICE_IGNORE}="1").
Have a look in the generated rootfs under /lib/udev/rules.d udev rules. 77-mm-usb-device-blacklist.rules exemplifies device ignore while port ignore you can find in 77-mm-ublox-port-types.rules for example.

Thank you. I will add udev ignore scripts to start.

Any thoughts why basic pon/ppp chat scripts fail on resin vs raspbian?

Currently, I am simply stopping MM and NM using a startup bash script and then I manually try to establish the ppp connection before automating it.

floion - could you help me out with an example of how to properly mask the ModemManager service from within the resin yocto build? I’ve tried numerous things, but nothing is working so far. Thank you.

It’s looking like this may be related to me using a dev build of resinos vs. production. This thread really helped:

Hi @jesse.beard You can see an example on masking at build time here:

As for the pon/ppp scripts I haven’t used them before. Guess you can try to add some debug to ppp to see if there’s something there?

Much appreciated. I actually found this yesterday in your source and used it as an example. Worked perfectly. Thank you.