-
Notifications
You must be signed in to change notification settings - Fork 21
Part 3. Cellular Setup
Now we're going to configure the Point-to-Point Protocol (PPP) so that we can use the Fona's cellular connection.
First we need to act as root and place a configuration file inside of a specific directory:
sudo -i
cd /etc/ppp/peers/
wget https://raw.githubusercontent.com/adafruit/FONA_PPP/master/fona
Open that file to view PPPD settings when "fona" is called.
nano fona
You should see this:
# Example PPPD configuration for FONA GPRS connection on Debian/Ubuntu.
# MUST CHANGE: Change the -T parameter value **** to your network's APN value.
# For example if your APN is 'internet' (without quotes), the line would look like:
# connect "/usr/sbin/chat -v -f /etc/chatscripts/gprs -T internet"
connect "/usr/sbin/chat -v -f /etc/chatscripts/gprs -T ****"
# MUST CHANGE: Uncomment the appropriate serial device for your platform below.
# For Raspberry Pi use /dev/ttyAMA0 by uncommenting the line below:
#/dev/ttyAMA0
# For BeagleBone Black use /dev/ttyO4 by uncommenting the line below:
#/dev/ttyO4
# 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 to the internet.
defaultroute
# Makes PPPD "dial again" when the connection is lost.
persist
# Do not ask the remote to authenticate.
noauth
# No hardware flow control on the serial link with FONA
nocrtscts
# No modem control lines with FONA.
local
You'll notice two sections at the top that say "MUST CHANGE" - you guessed it, we're going to edit these. The first part is asking for the APN associated with your SIM card. Since I was using a Particle SIM card, I replaced "****" with "spark.telefonica.com". For the second section, just uncomment the line that says "#/dev/ttyAMA0" by removing the "#". Save and exit with Ctrl-X.
If your SIM card has a pin or you want to read more about customizing the GPRS connection, go here.
Be sure to exit the root shell with exit.
<< Part 3: Using the Cellular Connection - Part 3: Cellular Testing >>
Initial State (https://www.initialstate.com)
(c) 2018 Initial State Technologies, Inc.