I have tried the following with both a Raspberry Pi 1 and RPi 3, using Resin OS 2.
My goal is to get the Raspberry Pi to use a SIM800 GSM module to get internet for Resin.io to work.
I tried two methods as described below. In both cases I enabled the UART on the RPi’s gpio header, and disabled the Linux console on the UART. The SIM800 module is connected and powered correctly. The hardware setup was proven to work using PPPd under a Raspbian install.
Method 1:
Resin OS 2 makes use of Network Manager, and therefore Modem Manager for PPP connections. I tried configuring modem manager to us the modem on the uart of the RPi. This however seems impossible as the RPi’s UART is blacklisted in Modem Manager. Any udev configs to force modem manager to scan the uart was fruitless.
After this I tried connecting the SIM800 via a USB-uart module to the RPi. In this case the modem was detected by modem manager, but only after a manual scan. This is because the USB-uart is graylisted in modem manager.
There is no way I know of to convince modem manager to automatically use the modem on either the RPi’s uart, or the USB-uart during headless bootup of the RPi.
Method 2:
Then I decided to try the same method I used to get internet under Raspbian, by following this tutorial: https://learn.adafruit.com/fona-tethering-to-raspberry-pi-or-beaglebone-black/setup
After this tutorial, it seems like the /etc/network/interfaces file is ignored by ResinOS, so I added the pppd to systemd to start my gprs connection at startup. This seems to provide an internet connection to ResinOS at startup of the RPi.
However the Pi does not show up on resin.io. After plugging in ethernet, I ssh’d in and saw that the gprs/ppp connection was up. I removed the default route via ethernet, while the default route via the ppp connection was still in place. I was able to ping towards the internet, and resin.io suddenly started seeing the Pi.
It seems that the resin.io service on the Pi is only started when Network Manager says there is an internet connection. The gprs connection that is set up using pppd does not trigger the resin services.
Sy my question is two fold:
- How can I convince Modem Manager to use my gsm modem that is connected to the UART?
- How should I get the resin services to start after my ppp connection is up?