This section shows how to create a PPP Internet connection using the SARA-R5 on the OzzMaker LTE-M GPS IMU 10DOF.
When creating a connection, it is best to use multiplexing between the Raspberry Pi and SARA-R5 on the LTE-M GPS IMU 10DOF .
You can follow this guide to enable this.
Update apt-get and then install PPP
pi@raspberrypi ~ $ sudo apt-get install ppp
We now need to create a chat script. A chat script defines the conversation needed between the Pi and the LTE modem to create a PPP session.
Create a new directory
Create a new script
Copy this content into the empty file;
ABORT 'NO CARRIER'
ABORT 'NO DIALTONE'
ABORT 'NO DIAL TONE'
ABORT 'NO ANSWER'
REPORT CONNECT"" AT
Configure the settings used by PPP;
Locate the below line;
connect "/usr/sbin/chat -v -f /etc/chatscripts/pap -T ********"
Delete it or comment it out by placing a '#' at the start of the line.
And then add this line just below;
connect "/usr/sbin/chat -v -f /etc/ppp/chatscripts/mobile-modem.chat -T hologram"
Place your APN at the end, here we are using hologram. If you are not using a Hologram SIM, you would need to use the APN for your provider.
You now need to add the serial device used by the GSM modem. This should be /dev/ttyGSM1
Just below this line;
To manually start a PPP connection, use;
And to close a PPP connection, use;
Verification can by done by seeing if the Pi has a ppp0 interface and it has an IP.
Below is the output from the above command, with ppp0 highlighted showing an active connection.
You can also monitor the syslog while bringing up ppp
Start PPP on boot
Add the user Pi to the dialup group;
Create a new script to start ppp;
copy in the below lines;
#!/bin/bash sleep 5 pon
The pause above is there to give the Pi time to boot before we try and make a PPP connection.
Make the script executable;
We will use cron to start the script every time the Pi boots;
Add the below line to the bottom
@reboot /home/pi/pppStart.sh &