Adafruit FONA 800 MiniGSM
Adafruit 2G cellular phone breakout module compatible with mbed. See notes section for setup.
This is a low-cost, quad-band 2G module that can make and receive voice calls using a headset or external speaker and microphone, send and receive SMS messages, send and receive GPRS data, scan and receive FM radio broadcasts, and control a vibrational motor using PWM.
There are several other required accessories to make FONA work, including:
- SIM Card: 2G Mini SIM card (T-Mobile recommended)
- Lipoly Battery: 500 mAh or larger, 3.4 - 4.4 volts
- MicroUSB cable for charging the battery
- External Antenna
Datasheet
https://learn.adafruit.com/adafruit-fona-mini-gsm-gprs-cellular-phone-module/overview
Notes
Wiring for FONA HelloWorld Demo
Battery must be connected!
Adafruit FONA 800 will only work if an external battery is connected and above 3.4v. If battery is rated at low voltage (ex. 3.6v) plug in MicroUSB charger along with the battery. This may be harmful to a battery rated at a low voltage, as the MicroUSB will attempt to charge at 4.2v.
mbed Pinout
mbed | Adafruit FONA |
---|---|
nc | Bat |
GND | GND |
nc | SPKR+ |
nc | SPKR- |
p12 | Rst |
nc | PS |
GND | Key |
p11 | RI |
p14 (Serial RX) | TX |
p13 (Serial TX) | RX |
nc | NS |
Vout (3.3v) | Vio |
Information
Key button is also tied to the key pin with an internal ground. This is used to turn the Adafruit FONA on or off when held for 2 seconds. By grounding it will always be powered on.
External Connections (Mandatory connections italicized)
Connector | Description |
---|---|
JST 2-pin | Battery input connector |
MicroUSB connector | Battery charging port |
Headset jack | TRRS 3.5mm phone headset jack |
Antenna port | Place to plug quad-band GSM/GPRS antenna (Required for any kind of voice or data communications as well as some SIM commands |
SIM Connector | 2G Mini SIM card slot |
Insert the SIM with the gold pads facing up and the notch on the outer corner.
Other Breakout Pins
These pins are not mandatory but they add functionality to the Adafruit FONA 800H.
Pin | Description |
---|---|
Buzzer and PWM | These are tied to the PWM output of the module. PWM is directly output from the module and is 0-2.8Vpp. Buzzer has an NPN drive transistor and can run a small motor. Bz+ is VBat voltage and Bz- is toggled on and off to ground. |
ADC | The SIM800 has an ADC that can read 0-2.8VDC from this pin, referenced to ground. It also has an internal battery ADC so you can use this for a sensor or something. You can query the voltage from the UART. 2.8V max. |
5V | This is the USB 5V from the microUSB connector when its in and powered. Good if you need to know when the microUSB is plugged in and/or want to recharge the battery from an external plug. |
2.8V test point | We have a test point for the 2.8V internal regulator, its off to the right. |
Microphone + and - | This is for connecting an external electret microphone, it will bias the mic with 2V. Most electrets will work just fine. No extra circuitry is required for the mic such as a biaser or amplifier, just wire it up directly! |
FONA LEDs
LED | Description |
---|---|
PWR | Blue! Lit when the module is booted and running. |
NET | Red! You can use this for checking the current state without sending an AT command: |
- 64ms on, 800ms off - the module is running but hasn't made connection to the cellular network yet | |
- 64ms on, 3 seconds off - the module has made contact with the cellular network and can send/receive voice and SMS | |
- 64ms on, 300ms off - the GPRS data connection you requested is active by watching the blinks you can get a visual feedback on whats going on. | |
Charging | Orange! This is next to the microUSB jack. Indicates the onboard lipo charger is charging. |
Done | Green! This is next to the JST jack. Indicates that the battery charging is done and the battery is full. |
Hello World
Import programFONA_CellPhone
Adafruit FONA 800H breakout
Library
Import library
Data Structures |
|
class | EventListener |
Listener for FONA events.
More...
|
|
Public Member Functions |
|
Adafruit_FONA (PinName tx, PinName rx, PinName rst, PinName ringIndicator) | |
Create instance of the
Adafruit_FONA
.
|
|
bool | begin (int baudrate) |
Built-in Test to see if FONA is connected.
|
|
void | setEventListener ( EventListener *eventListener) |
Set the event listener for incoming calls.
|
|
int | readable (void) |
Check if FONA has anything in its output buffer.
|
|
bool | getADCVoltage (uint16_t *v) |
Get ADC voltage from external pin.
|
|
bool | getBattPercent (uint16_t *p) |
Get battery percentage level.
|
|
bool | getBattVoltage (uint16_t *v) |
Get battery voltage level.
|
|
bool | unlockSIM (char *pin) |
Unlock SIM if needed.
|
|
uint8_t | getSIMCCID (char *ccid) |
Get the SIM chip card interface device (CCID)
|
|
uint8_t | getNetworkStatus (void) |
Get the Network Status of FONA.
|
|
uint8_t | getRSSI (void) |
Get the RSSI of the network signal.
|
|
uint8_t | getIMEI (char *imei) |
Get the International Mobile Station Equipment Identity (IMEI)
|
|
bool | setAudio (uint8_t a) |
Set the Audio Output interface.
|
|
bool | setVolume (uint8_t i) |
Set the Audio Volume.
|
|
uint8_t | getVolume (void) |
Get the Audio Volume.
|
|
bool | tuneFMradio (uint16_t station) |
Tune the FM radio.
|
|
bool | FMradio (bool onoff, uint8_t a=FONA_HEADSETAUDIO) |
FM radio set output.
|
|
bool | setFMVolume (uint8_t i) |
Set the FM Radio Volume.
|
|
int8_t | getFMVolume () |
Get the FM Volume.
|
|
int8_t | getFMSignalLevel (uint16_t station) |
Get the FM signal strength.
|
|
bool | setSMSInterrupt (uint8_t i) |
Set the SMS Interrupt.
|
|
uint8_t | getSMSInterrupt (void) |
Get SMS Interrupt Setting.
|
|
int8_t | getNumSMS (void) |
Set the SMS Interrupt.
|
|
bool | readSMS (uint8_t i, char *smsbuff, uint16_t max, uint16_t *readsize) |
Read SMS.
|
|
bool | sendSMS (char *smsaddr, char *smsmsg) |
Send SMS.
|
|
bool | deleteSMS (uint8_t i) |
Delete SMS.
|
|
bool | getSMSSender (uint8_t i, char *sender, int senderlen) |
Send SMS.
|
|
bool | enableNetworkTimeSync (bool onoff) |
Enable FONA to sync time with the cellular network.
|
|
bool | enableNTPTimeSync (bool onoff, const char *ntpserver=0) |
Enable FONA to sync time with the time server.
|
|
bool | getTime (char *buff, uint16_t maxlen) |
Retrieve the current time from the enabled server.
|
|
bool | setPWM (uint16_t period, uint8_t duty=50) |
Control the buzzer capability of the PWM out on the FONA.
|
|
bool | callPhone (char *phonenum) |
Call a phone.
|
|
bool | hangUp (void) |
Hang up a phone call.
|
|
bool | pickUp (void) |
Answer a phone call.
|
|
bool | callerIdNotification (bool enable) |
Enable/disable caller ID.
|
|
bool | incomingCallNumber (char *phonenum) |
Retrieve the incoming call number.
|
Demos
The Hello World main.cpp displays the following on a COM port terminal when FONA is connected and powered on as above: Simply type in the corresponding key to perform the desired function. Some functionality is limited depending on SIM card and which Adafruit FONA chip is in use.
Send and Receive SMS Demo
Send SMS
COM port display
Receive SMS
COM port display
SIM 800 Command Manual
For an extensive list of hardware AT commands for the Adafruit FONA 800, follow the link below: https://www.adafruit.com/datasheets/sim800_series_at_command_manual_v1.01.pdf
1 comment on Adafruit FONA 800 MiniGSM:
Please log in to post comments.
Nice work. I made a few modifications to get GPRS connecting and serial tunnel working. This is tested working with STM32 Nucleo L073RZ. I have attached an updated main and library files. I imported the program, made the changes, then committed them, but I'm not sure if that actually worked.
/media/uploads/michaelVisimid/sim800.zip