Struggling with authentication using FONA on either Raspberry Pi 2 and 3 even while strictly following the Adafruit FONA setup instructions, the following steps helped me to get it work on both Pi's - based on a freshly installed raspbian/debian stretch OS. Adopt the following to your BBB:
update OS:
sudo apt-get update
sudo apt-get dist-upgrade
install neccessary packages:
sudo apt-get install ppp screen
- connect FONA board to Pi/BBB as described within Adafruit FONA setup instructions
ensure you disabled kernel's use of hardware serial connection!
Pi2: follow Adafruit description
Pi3: "sudo raspi-config" > "Interfacing Options" > "Serial"
> "...login shell... over serial?" NO
> "...serial port hardware enabled?" YES
- exit/finish raspi config and
check
sudo nano /boot/config.txt
if line enable_uart=1 is included. If not, add this as new line and save
[Ctrl]+[x], [y], [Enter] > reboot!
find the correct serial port for your Pi/BBB. This command might help - it shows all available ports:
ls /dev
Examples:
Pi2: "/dev/ttyAMA0"
Pi3: "/dev/serial0"
BBB: "/dev/tty04" (as stated at Adafruit)
Ensure that the FONA is answering on the corresponding serial port - in this example on Pi3:
screen /dev/serial0 115200
A black screen (terminal window) should occur. Write
AT [Enter]
and you should get OK as response. If you don't get the "OK", just disconnect the battery, reconnect it afterwards and give it another try! You can exit the terminal window at any time through
[Ctrl]+[A]
:quit [Enter]
As soon as the FONA board is answering over serial connection, the cellular connection (especially authentication) is the target.
Changing noauth to auth within "fona" did not help me, neither editing "chap-secrets" and/or "pap-secrets". Have the 3 APN values included within the "fona" file:
sudo -i
cd /etc/ppp/peers
nano fona
Enter the correct APN name within the "connect" line, like Adafruit mentioned:
connect "/usr/sbin/chat ... -T T-Mobile"
and replace "T-Mobile" with your APN name. Ensure to uncomment only one line within the next block, having the exact same serial port included as above when successfully testing the serial connection (in this example again the Pi3 port)
/dev/serial0
Now add the following section at the end of the file for fona-file authentication:
#Authentication
user abcd@efgh.dom << here goes the providers APN user name
password 1a2b3d4e << here goes the providers APN password
Save and exit the file and exit the superuser mode
[Ctrl]+[x], [Y], [Enter]
exit [Enter]
At least give it a try, as stated at Adafruit
sudo pon fona
If the red LED starts blinking twice every second you're done! If not, please follow the Adafruit troubleshooting section, which should solve the missing bits and pieces.
The essential parts are propper serial connection and - as soon as that works - the authentication within the "fona" file!
Especially the cellular connection and authentication should be adoptable to BBB, once the serial connection is established.