Raspberry Pi B
| RPi Pin | RPi GPIO | FONA |
|---|---|---|
| 1 | 3.3V | Vio |
| 6 | Ground | Ground |
| 8 | GPIO14 (TXD) | RX |
| 10 | GPIO15 (RXD) | TX |
rpi-serial-console script provided in this directory.
sudo bash
rpi-serial-console disable
apt-get update
apt-get install-y ppp screen elinks minicom
Connect RPi to FONA once it's wired:
screen /dev/ttyAMA0 115200
or
minicom -c on -D /dev/ttyAMA0 -b 115200
Make sure to turn off hardware flow control.
Still as root:
cat > /etc/ppp/peers/fona <<EOF
connect "/usr/sbin/chat -v -f /etc/chatscripts/gprs.fona -T internet
115200
noipdefault
usepeerdns
defaultroute
persist
noauth
nocrtscts
local
EOF
cat > /etc/ppp/chat/gprs.fona <<EOF
# You can use this script unmodified to connect to cellular networks.
# The APN is specified in the peers file as the argument of the -T command
# line option of chat(8).
# For details about the AT commands involved please consult the relevant
# standard: 3GPP TS 27.007 - AT command set for User Equipment (UE).
# (http://www.3gpp.org/ftp/Specs/html-info/27007.htm)
ABORT BUSY
ABORT VOICE
ABORT "NO CARRIER"
ABORT "NO DIALTONE"
ABORT "NO DIAL TONE"
ABORT "NO ANSWER"
ABORT "DELAYED"
ABORT "ERROR"
# cease if the modem is not attached to the network yet
ABORT "+CGATT: 0"
"" AT
TIMEOUT 12
OK ATH
OK ATE1
# +CPIN provides the SIM card PIN
#OK "AT+CPIN=1234"
# +CFUN may allow to configure the handset to limit operations to
# GPRS/EDGE/UMTS/etc to save power, but the arguments are not standard
# except for 1 which means "full functionality".
#OK AT+CFUN=1
OK AT+CGDCONT=1,"IP","\T","",0,0
OK ATD*99#
TIMEOUT 22
CONNECT ""
EOF
pon fona
Still as root:
cat > /etc/network/interfaces.d/fona <<EOF
auto fona
iface fona inet ppp
provider fona