<< Summary

Cell Shield (FONA)
from the Raspberry PI, in Java Raspberry PI

Through an Arduino Uno

The Raspberry PI talks to the Arduino where the FONA is connected.

 pi@raspi-dev ~/raspberry-pi4j-samples/FONA $ ./run.ard
 Serial Communication.
  ... connect using settings: 115200, N, 8, 1.
  ... data received on serial port should be displayed below.
 Opening port [/dev/ttyACM0:115200]
 Port is opened.
 Hit 'Q' to quit.

 Commands are case-sensitive.
 [?] Display menu
 [Q] to quit
 [a] ADC
 [b] Battery
 [C] Read SIM Card #
 [i] Read RSSI
 [n] Network status
 [N] Number of messages
 [r] Read message
 [d] Delete message
 [s] Send message
 Command [FONA Oliv's test
 Initializing....(May take 3 seconds)] unknown.
 Good to go
 >> FONA OK

 So? > 

      
To run this, start the script named run.ard.
It can send and receive SMSs.
The class fona.arduino.sample.SampleClient shows how to interact with the FONA from any java application through fona.arduino.ReadWriteFONA.

Directly from the Raspberry PI, the coolest.

 pi@raspi-dev ~/raspberry-pi4j-samples/FONA $ ./run
 Serial Communication.
  ... connect using port /dev/ttyAMA0 : 9600
  ... data received on serial port should be displayed below.
 Hit 'Q' to quit.
 Hit 'V' to toggle verbose on/off.
 Hit [return] when ready to start.
 Opening port [/dev/ttyAMA0:9600]
 Port is opened.
 Establishing connection (can take up to 3 seconds).
 FONA Connected!
 Connection established.
 > Commands are case-sensitive.
 Verbose is off
 -- Q to Quit, V for Verbose --
 [?] Print this menu
 [D] Turn DEBUG on
 [M] Module name and revision
 [b] Read the battery V
 [C] Read the SIM CCID
 [I] Network Status
 [i] Read RSSI (signal strength)
 [n] Get network name
 [N] Number of SMSs
 [r] Read SMS #
 [R] Read All SMSs
 [d] Delete SMS #
 [s] Send SMS
 ------------------------------
 FONA>

      
The wiring is in the comments of the code of the FONAManager.
/**
 * Important: Makes sure you've run
 * Prompt> rpi-serial-console disable
 * and re-booted.
 * =====================================
 * Wiring:
 * -------
 * FONA --- RPi
 * ---------------
 *  Vio --- 3V3 #1, or 5V #2
 *  
 *  Rx  --- TX  #8
 *  Tx  --- RX  #10
 *  
 *  Key -+
 *       |
 *  GND -+- GND #6
 * ----------------
 * 
 * See https://learn.adafruit.com/adafruit-fona-mini-gsm-gprs-cellular-phone-module?view=all
 */ 
      

To run this, start the script named run.
It can send and receive SMSs.
The class fona.manager.sample.InteractiveFona shows how to interact with the FONA from any java application through fona.manager.FONAManager.


Oliv did it