Adafruit FONA Arduino Library
Adafruit_FONA.h
1 /*
2  * @file Adafruit_FONA.h
3  */
4 #ifndef ADAFRUIT_FONA_H
5 #define ADAFRUIT_FONA_H
6 
7 #include "includes/FONAConfig.h"
8 #include "includes/FONAExtIncludes.h"
9 #include "includes/platform/FONAPlatform.h"
10 
11 #define FONA800L 1
12 #define FONA800H 6
13 
14 #define FONA808_V1 2
15 #define FONA808_V2 3
16 
17 #define FONA3G_A 4
18 #define FONA3G_E 5
19 
20 // Set the preferred SMS storage.
21 // Use "SM" for storage on the SIM.
22 // Use "ME" for internal storage on the FONA chip
23 #define FONA_PREF_SMS_STORAGE "\"SM\""
24 //#define FONA_PREF_SMS_STORAGE "\"ME\""
25 
26 #define FONA_HEADSETAUDIO 0
27 #define FONA_EXTAUDIO 1
28 
29 #define FONA_STTONE_DIALTONE 1
30 #define FONA_STTONE_BUSY 2
31 #define FONA_STTONE_CONGESTION 3
32 #define FONA_STTONE_PATHACK 4
33 #define FONA_STTONE_DROPPED 5
34 #define FONA_STTONE_ERROR 6
35 #define FONA_STTONE_CALLWAIT 7
36 #define FONA_STTONE_RINGING 8
37 #define FONA_STTONE_BEEP 16
38 #define FONA_STTONE_POSTONE 17
39 #define FONA_STTONE_ERRTONE 18
40 #define FONA_STTONE_INDIANDIALTONE 19
41 #define FONA_STTONE_USADIALTONE 20
42 
43 #define FONA_DEFAULT_TIMEOUT_MS 500
44 
45 #define FONA_HTTP_GET 0
46 #define FONA_HTTP_POST 1
47 #define FONA_HTTP_HEAD 2
48 
49 #define FONA_CALL_READY 0
50 #define FONA_CALL_FAILED 1
51 #define FONA_CALL_UNKNOWN 2
52 #define FONA_CALL_RINGING 3
53 #define FONA_CALL_INPROGRESS 4
54 
56 class Adafruit_FONA : public FONAStreamType {
57 public:
58  Adafruit_FONA(int8_t r);
59  bool begin(FONAStreamType &port);
60  uint8_t type();
61 
62  // Stream
63  int available(void);
64  size_t write(uint8_t x);
65  int read(void);
66  int peek(void);
67  void flush();
68 
69  // FONA 3G requirements
70  bool setBaudrate(uint16_t baud);
71 
72  // RTC
73  bool enableRTC(uint8_t mode);
74  bool readRTC(uint8_t *year, uint8_t *month, uint8_t *day, uint8_t *hr,
75  uint8_t *min, uint8_t *sec);
76 
77  // Battery and ADC
78  bool getADCVoltage(uint16_t *v);
79  bool getBattPercent(uint16_t *p);
80  bool getBattVoltage(uint16_t *v);
81 
82  // SIM query
83  uint8_t unlockSIM(char *pin);
84  uint8_t getSIMCCID(char *ccid);
85  uint8_t getNetworkStatus(void);
86  uint8_t getRSSI(void);
87 
88  // IMEI
89  uint8_t getIMEI(char *imei);
90 
91  // set Audio output
92  bool setAudio(uint8_t audio_output);
93  bool setVolume(uint8_t volume_level);
94  uint8_t getVolume(void);
95  bool playToolkitTone(uint8_t t, uint16_t len);
96  bool setMicVolume(uint8_t a, uint8_t level);
97  bool playDTMF(char tone);
98 
99  // FM radio functions.
100  bool tuneFMradio(uint16_t station);
101  bool FMradio(bool onoff, uint8_t a = FONA_HEADSETAUDIO);
102  bool setFMVolume(uint8_t i);
103  int8_t getFMVolume(void);
104  int8_t getFMSignalLevel(uint16_t station);
105 
106  // SMS handling
107  bool setSMSInterrupt(uint8_t i);
108  uint8_t getSMSInterrupt(void);
109  int8_t getNumSMS(void);
110  bool readSMS(uint8_t message_index, char *smsbuff, uint16_t max,
111  uint16_t *readsize);
112  bool sendSMS(char *smsaddr, char *smsmsg);
113  bool deleteSMS(uint8_t message_index);
114  bool getSMSSender(uint8_t message_index, char *sender, int senderlen);
115  bool sendUSSD(char *ussdmsg, char *ussdbuff, uint16_t maxlen,
116  uint16_t *readlen);
117 
118  // Time
119  bool enableNetworkTimeSync(bool onoff);
120  bool enableNTPTimeSync(bool onoff, FONAFlashStringPtr ntpserver = 0);
121  bool getTime(char *time_buffer, uint16_t maxlen);
122 
123  // GPRS handling
124  bool enableGPRS(bool onoff);
125  uint8_t GPRSstate(void);
126  bool getGSMLoc(uint16_t *replycode, char *buff, uint16_t maxlen);
127  bool getGSMLoc(float *lat, float *lon);
128  void setGPRSNetworkSettings(FONAFlashStringPtr apn,
129  FONAFlashStringPtr username = 0,
130  FONAFlashStringPtr password = 0);
131 
132  // GPS handling
133  bool enableGPS(bool onoff);
134  int8_t GPSstatus(void);
135  uint8_t getGPS(uint8_t arg, char *buffer, uint8_t maxbuff);
136  bool getGPS(float *lat, float *lon, float *speed_kph = 0, float *heading = 0,
137  float *altitude = 0);
138  bool enableGPSNMEA(uint8_t enable_value);
139 
140  // TCP raw connections
141  bool TCPconnect(char *server, uint16_t port);
142  bool TCPclose(void);
143  bool TCPconnected(void);
144  bool TCPsend(char *data, uint8_t len);
145  uint16_t TCPavailable(void);
146  uint16_t TCPread(uint8_t *buff, uint8_t len);
147 
148  // HTTP low level interface (maps directly to SIM800 commands).
149  bool HTTP_init();
150  bool HTTP_term();
151  void HTTP_para_start(FONAFlashStringPtr parameter, bool quoted = true);
152  bool HTTP_para_end(bool quoted = true);
153  bool HTTP_para(FONAFlashStringPtr parameter, const char *value);
154  bool HTTP_para(FONAFlashStringPtr parameter, FONAFlashStringPtr value);
155  bool HTTP_para(FONAFlashStringPtr parameter, int32_t value);
156  bool HTTP_data(uint32_t size, uint32_t maxTime = 10000);
157  bool HTTP_action(uint8_t method, uint16_t *status, uint16_t *datalen,
158  int32_t timeout = 10000);
159  bool HTTP_readall(uint16_t *datalen);
160  bool HTTP_ssl(bool onoff);
161 
162  // HTTP high level interface (easier to use, less flexible).
163  bool HTTP_GET_start(char *url, uint16_t *status, uint16_t *datalen);
164  void HTTP_GET_end(void);
165  bool HTTP_POST_start(char *url, FONAFlashStringPtr contenttype,
166  const uint8_t *postdata, uint16_t postdatalen,
167  uint16_t *status, uint16_t *datalen);
168  void HTTP_POST_end(void);
169  void setUserAgent(FONAFlashStringPtr useragent);
170 
171  // HTTPS
172  void setHTTPSRedirect(bool onoff);
173 
174  // PWM (buzzer)
175  bool setPWM(uint16_t period, uint8_t duty = 50);
176 
177  // Phone calls
178  bool callPhone(char *phonenum);
179  uint8_t getCallStatus(void);
180  bool hangUp(void);
181  bool pickUp(void);
182  bool callerIdNotification(bool enable, uint8_t interrupt = 0);
183  bool incomingCallNumber(char *phonenum);
184 
185  // Helper functions to verify responses.
186  bool expectReply(FONAFlashStringPtr reply, uint16_t timeout = 10000);
187  bool sendCheckReply(char *send, char *reply,
188  uint16_t timeout = FONA_DEFAULT_TIMEOUT_MS);
189  bool sendCheckReply(FONAFlashStringPtr send, FONAFlashStringPtr reply,
190  uint16_t timeout = FONA_DEFAULT_TIMEOUT_MS);
191  bool sendCheckReply(char *send, FONAFlashStringPtr reply,
192  uint16_t timeout = FONA_DEFAULT_TIMEOUT_MS);
193 
194 protected:
195  int8_t _rstpin;
196  uint8_t _type;
197 
198  char replybuffer[255];
199  FONAFlashStringPtr apn;
200  FONAFlashStringPtr apnusername;
201  FONAFlashStringPtr apnpassword;
203  FONAFlashStringPtr useragent;
204  FONAFlashStringPtr ok_reply;
205 
206  // HTTP helpers
207  bool HTTP_setup(char *url);
208 
209  void flushInput();
210  uint16_t readRaw(uint16_t read_length);
211  uint8_t readline(uint16_t timeout = FONA_DEFAULT_TIMEOUT_MS,
212  bool multiline = false);
213  uint8_t getReply(char *send, uint16_t timeout = FONA_DEFAULT_TIMEOUT_MS);
214  uint8_t getReply(FONAFlashStringPtr send,
215  uint16_t timeout = FONA_DEFAULT_TIMEOUT_MS);
216  uint8_t getReply(FONAFlashStringPtr prefix, char *suffix,
217  uint16_t timeout = FONA_DEFAULT_TIMEOUT_MS);
218  uint8_t getReply(FONAFlashStringPtr prefix, int32_t suffix,
219  uint16_t timeout = FONA_DEFAULT_TIMEOUT_MS);
220  uint8_t getReply(FONAFlashStringPtr prefix, int32_t suffix1, int32_t suffix2,
221  uint16_t timeout); // Don't set default value or else
222  // function call is ambiguous.
223  uint8_t getReplyQuoted(FONAFlashStringPtr prefix, FONAFlashStringPtr suffix,
224  uint16_t timeout = FONA_DEFAULT_TIMEOUT_MS);
225 
226  bool sendCheckReply(FONAFlashStringPtr prefix, char *suffix,
227  FONAFlashStringPtr reply,
228  uint16_t timeout = FONA_DEFAULT_TIMEOUT_MS);
229  bool sendCheckReply(FONAFlashStringPtr prefix, int32_t suffix,
230  FONAFlashStringPtr reply,
231  uint16_t timeout = FONA_DEFAULT_TIMEOUT_MS);
232  bool sendCheckReply(FONAFlashStringPtr prefix, int32_t suffix,
233  int32_t suffix2, FONAFlashStringPtr reply,
234  uint16_t timeout = FONA_DEFAULT_TIMEOUT_MS);
235  bool sendCheckReplyQuoted(FONAFlashStringPtr prefix,
236  FONAFlashStringPtr suffix, FONAFlashStringPtr reply,
237  uint16_t timeout = FONA_DEFAULT_TIMEOUT_MS);
238 
239  bool parseReply(FONAFlashStringPtr toreply, uint16_t *v, char divider = ',',
240  uint8_t index = 0);
241  bool parseReply(FONAFlashStringPtr toreply, char *v, char divider = ',',
242  uint8_t index = 0);
243  bool parseReplyQuoted(FONAFlashStringPtr toreply, char *v, int maxlen,
244  char divider, uint8_t index);
245 
246  bool sendParseReply(FONAFlashStringPtr tosend, FONAFlashStringPtr toreply,
247  uint16_t *v, char divider = ',', uint8_t index = 0);
248 
249  static bool _incomingCall;
250  static void onIncomingCall();
251 
252  FONAStreamType *mySerial;
253 };
256 
257 public:
263  Adafruit_FONA_3G(int8_t reset_pin) : Adafruit_FONA(reset_pin) {
264  _type = FONA3G_A;
265  }
266 
267  bool getBattVoltage(uint16_t *v);
268  bool playToolkitTone(uint8_t t, uint16_t len);
269  bool hangUp(void);
270  bool pickUp(void);
271  bool enableGPRS(bool onoff);
272  bool enableGPS(bool onoff);
273 
274 protected:
275  bool parseReply(FONAFlashStringPtr toreply, float *f, char divider,
276  uint8_t index);
277 
278  bool sendParseReply(FONAFlashStringPtr tosend, FONAFlashStringPtr toreply,
279  float *f, char divider = ',', uint8_t index = 0);
280 };
281 
282 #endif
bool sendUSSD(char *ussdmsg, char *ussdbuff, uint16_t maxlen, uint16_t *readlen)
Send USSD.
Definition: Adafruit_FONA.cpp:950
bool enableGPRS(bool onoff)
Enable GPRS.
Definition: Adafruit_FONA.cpp:1580
static void onIncomingCall()
On incoming call callback.
Definition: Adafruit_FONA.cpp:673
uint16_t TCPavailable(void)
Check if TCP bytes are available.
Definition: Adafruit_FONA.cpp:1945
bool setBaudrate(uint16_t baud)
Set the baud rate that the module will use.
Definition: Adafruit_FONA.cpp:181
uint16_t readRaw(uint16_t read_length)
Read directly into the reply buffer.
Definition: Adafruit_FONA.cpp:2416
int8_t getFMSignalLevel(uint16_t station)
Gets the current FM signal level.
Definition: Adafruit_FONA.cpp:556
size_t write(uint8_t x)
Serial write.
Definition: Adafruit_FONA.cpp:2376
void setGPRSNetworkSettings(FONAFlashStringPtr apn, FONAFlashStringPtr username=0, FONAFlashStringPtr password=0)
Set the GPRS network settings.
Definition: Adafruit_FONA.cpp:1764
uint8_t getVolume(void)
Get the current volume level.
Definition: Adafruit_FONA.cpp:409
bool getBattVoltage(uint16_t *v)
Get the current batery voltage.
Definition: Adafruit_FONA.cpp:248
FONAFlashStringPtr apn
Access point name.
Definition: Adafruit_FONA.h:199
uint8_t getIMEI(char *imei)
Get the IMEI.
Definition: Adafruit_FONA.cpp:338
bool getTime(char *time_buffer, uint16_t maxlen)
Get the current time.
Definition: Adafruit_FONA.cpp:1058
static bool _incomingCall
Incoming call state var.
Definition: Adafruit_FONA.h:249
bool sendSMS(char *smsaddr, char *smsmsg)
Send an SMS Message from a buffer provided.
Definition: Adafruit_FONA.cpp:876
bool setSMSInterrupt(uint8_t i)
Attach an interrupt for SMS notifications.
Definition: Adafruit_FONA.cpp:751
bool incomingCallNumber(char *phonenum)
Get the number of the incoming call.
Definition: Adafruit_FONA.cpp:707
bool enableNTPTimeSync(bool onoff, FONAFlashStringPtr ntpserver=0)
Enable NTP time sync.
Definition: Adafruit_FONA.cpp:1019
FONAFlashStringPtr apnusername
Access point username.
Definition: Adafruit_FONA.h:200
bool getADCVoltage(uint16_t *v)
Get the current ADC voltage.
Definition: Adafruit_FONA.cpp:284
Adafruit_FONA_3G(int8_t reset_pin)
Construct a new Adafruit_FONA_3G object.
Definition: Adafruit_FONA.h:263
bool enableGPS(bool onoff)
Enable GPS.
Definition: Adafruit_FONA.cpp:1081
bool readRTC(uint8_t *year, uint8_t *month, uint8_t *day, uint8_t *hr, uint8_t *min, uint8_t *sec)
Read the Real Time Clock.
Definition: Adafruit_FONA.cpp:201
bool sendCheckReplyQuoted(FONAFlashStringPtr prefix, FONAFlashStringPtr suffix, FONAFlashStringPtr reply, uint16_t timeout=FONA_DEFAULT_TIMEOUT_MS)
Send data and verify the response matches an expected response.
Definition: Adafruit_FONA.cpp:2764
bool TCPconnected(void)
Check the TCP connection status.
Definition: Adafruit_FONA.cpp:1892
bool TCPclose(void)
Close the TCP connection.
Definition: Adafruit_FONA.cpp:1883
uint8_t readline(uint16_t timeout=FONA_DEFAULT_TIMEOUT_MS, bool multiline=false)
Read a single line or up to 254 bytes.
Definition: Adafruit_FONA.cpp:2439
bool hangUp(void)
End the current call.
Definition: Adafruit_FONA.cpp:641
int peek(void)
Serial peek.
Definition: Adafruit_FONA.cpp:2390
bool HTTP_GET_start(char *url, uint16_t *status, uint16_t *datalen)
Start a HTTP GET request.
Definition: Adafruit_FONA.cpp:2180
bool HTTP_data(uint32_t size, uint32_t maxTime=10000)
Begin sending data via HTTP.
Definition: Adafruit_FONA.cpp:2094
bool HTTP_ssl(bool onoff)
Enable or disable SSL.
Definition: Adafruit_FONA.cpp:2163
bool setPWM(uint16_t period, uint8_t duty=50)
Set the PWM Period and Duty Cycle.
Definition: Adafruit_FONA.cpp:590
uint8_t GPRSstate(void)
Get the GPRS state.
Definition: Adafruit_FONA.cpp:1749
bool setMicVolume(uint8_t a, uint8_t level)
Set the microphone gain.
Definition: Adafruit_FONA.cpp:478
bool sendParseReply(FONAFlashStringPtr tosend, FONAFlashStringPtr toreply, uint16_t *v, char divider=',', uint8_t index=0)
Send data and parse the reply.
Definition: Adafruit_FONA.cpp:2902
char replybuffer[255]
buffer for holding replies from the module
Definition: Adafruit_FONA.h:198
int8_t getFMVolume(void)
Get the current volume level.
Definition: Adafruit_FONA.cpp:541
int read(void)
Serial read.
Definition: Adafruit_FONA.cpp:2384
FONAFlashStringPtr apnpassword
Access point password.
Definition: Adafruit_FONA.h:201
FONAFlashStringPtr useragent
User agent used when making requests.
Definition: Adafruit_FONA.h:203
uint8_t getReplyQuoted(FONAFlashStringPtr prefix, FONAFlashStringPtr suffix, uint16_t timeout=FONA_DEFAULT_TIMEOUT_MS)
Send command prefix and suffix, returning the response length.
Definition: Adafruit_FONA.cpp:2623
bool callerIdNotification(bool enable, uint8_t interrupt=0)
Enable or disable caller ID.
Definition: Adafruit_FONA.cpp:690
uint16_t TCPread(uint8_t *buff, uint8_t len)
Read from a TCP socket.
Definition: Adafruit_FONA.cpp:1963
uint8_t type()
Get the module type.
Definition: Adafruit_FONA.cpp:64
uint8_t getGPS(uint8_t arg, char *buffer, uint8_t maxbuff)
Fill a buffer with the current GPS reading.
Definition: Adafruit_FONA.cpp:1209
void HTTP_POST_end(void)
End an HTTP POST request.
Definition: Adafruit_FONA.cpp:2293
bool parseReply(FONAFlashStringPtr toreply, uint16_t *v, char divider=',', uint8_t index=0)
Parse a string in the response fields using a designated separator and copy the value at the specifie...
Definition: Adafruit_FONA.cpp:2782
bool readSMS(uint8_t message_index, char *smsbuff, uint16_t max, uint16_t *readsize)
Read an SMS message into a provided buffer.
Definition: Adafruit_FONA.cpp:788
bool pickUp(void)
Answer a call.
Definition: Adafruit_FONA.cpp:659
bool HTTP_readall(uint16_t *datalen)
Read all available HTTP data.
Definition: Adafruit_FONA.cpp:2149
void setHTTPSRedirect(bool onoff)
Set the HTTPS redirect flag.
Definition: Adafruit_FONA.cpp:2308
void flush()
Flush the serial data.
Definition: Adafruit_FONA.cpp:2395
int8_t _rstpin
Reset pin.
Definition: Adafruit_FONA.h:195
bool enableRTC(uint8_t mode)
Enable the Real Time Clock.
Definition: Adafruit_FONA.cpp:233
bool TCPsend(char *data, uint8_t len)
Send data via TCP.
Definition: Adafruit_FONA.cpp:1910
bool getSMSSender(uint8_t message_index, char *sender, int senderlen)
Retrieve the sender of the specified SMS message and copy it as a string to the sender buffer...
Definition: Adafruit_FONA.cpp:844
bool httpsredirect
HTTPS redirect state.
Definition: Adafruit_FONA.h:202
bool setAudio(uint8_t audio_output)
Set the audio ouput.
Definition: Adafruit_FONA.cpp:398
uint8_t getNetworkStatus(void)
Gets the current network status.
Definition: Adafruit_FONA.cpp:366
FONAStreamType * mySerial
Serial connection.
Definition: Adafruit_FONA.h:252
uint8_t getSMSInterrupt(void)
Get the current SMS Iterrupt.
Definition: Adafruit_FONA.cpp:736
Definition: Adafruit_FONA.h:56
bool playToolkitTone(uint8_t t, uint16_t len)
Play a toolkit tone.
Definition: Adafruit_FONA.cpp:450
bool callPhone(char *phonenum)
Call a phone number.
Definition: Adafruit_FONA.cpp:607
bool enableGPSNMEA(uint8_t enable_value)
Enable GPS NMEA output.
Definition: Adafruit_FONA.cpp:1554
uint8_t getReply(char *send, uint16_t timeout=FONA_DEFAULT_TIMEOUT_MS)
Send a command and return the reply.
Definition: Adafruit_FONA.cpp:2482
int available(void)
Serial data available.
Definition: Adafruit_FONA.cpp:2369
bool setFMVolume(uint8_t i)
Set the FM Radio Volume.
Definition: Adafruit_FONA.cpp:528
bool HTTP_init()
Initialize HTTP.
Definition: Adafruit_FONA.cpp:1996
bool HTTP_para(FONAFlashStringPtr parameter, const char *value)
Send HTTP parameter.
Definition: Adafruit_FONA.cpp:2053
FONAFlashStringPtr ok_reply
OK reply for successful requests.
Definition: Adafruit_FONA.h:204
bool begin(FONAStreamType &port)
Connect to the cell module.
Definition: Adafruit_FONA.cpp:71
bool playDTMF(char tone)
Play a DTMF/Key tone.
Definition: Adafruit_FONA.cpp:434
uint8_t getCallStatus(void)
Get the current call status.
Definition: Adafruit_FONA.cpp:628
bool setVolume(uint8_t volume_level)
Set the volume.
Definition: Adafruit_FONA.cpp:424
Adafruit_FONA(int8_t r)
Construct a new Adafruit_FONA object.
Definition: Adafruit_FONA.cpp:47
uint8_t getSIMCCID(char *ccid)
Get the SIM CCID.
Definition: Adafruit_FONA.cpp:313
void HTTP_GET_end(void)
End an HTTP GET.
Definition: Adafruit_FONA.cpp:2241
bool HTTP_setup(char *url)
Configure an HTTP request.
Definition: Adafruit_FONA.cpp:2318
Definition: Adafruit_FONA.h:255
uint8_t getRSSI(void)
get the current Received Signal Strength Indication
Definition: Adafruit_FONA.cpp:379
bool HTTP_POST_start(char *url, FONAFlashStringPtr contenttype, const uint8_t *postdata, uint16_t postdatalen, uint16_t *status, uint16_t *datalen)
Start an HTTP POST request.
Definition: Adafruit_FONA.cpp:2256
int8_t GPSstatus(void)
Get teh GPS status.
Definition: Adafruit_FONA.cpp:1147
void setUserAgent(FONAFlashStringPtr useragent)
Set the User Agent for HTTP requests.
Definition: Adafruit_FONA.cpp:2300
uint8_t unlockSIM(char *pin)
Unlock the sim with a provided PIN.
Definition: Adafruit_FONA.cpp:296
bool HTTP_action(uint8_t method, uint16_t *status, uint16_t *datalen, int32_t timeout=10000)
Make an HTTP Request.
Definition: Adafruit_FONA.cpp:2126
bool sendCheckReply(char *send, char *reply, uint16_t timeout=FONA_DEFAULT_TIMEOUT_MS)
Send data and verify the response matches an expected response.
Definition: Adafruit_FONA.cpp:2655
int8_t getNumSMS(void)
Get the number of SMS.
Definition: Adafruit_FONA.cpp:759
uint8_t _type
Module type.
Definition: Adafruit_FONA.h:196
bool FMradio(bool onoff, uint8_t a=FONA_HEADSETAUDIO)
Turn the FM Radio on or off.
Definition: Adafruit_FONA.cpp:497
bool TCPconnect(char *server, uint16_t port)
Start a TCP connection.
Definition: Adafruit_FONA.cpp:1842
bool getBattPercent(uint16_t *p)
Get the percentage charge of battery as reported by sim800.
Definition: Adafruit_FONA.cpp:274
void flushInput()
Read all available serial input to flush pending data.
Definition: Adafruit_FONA.cpp:2400
bool parseReplyQuoted(FONAFlashStringPtr toreply, char *v, int maxlen, char divider, uint8_t index)
Parse a string in the response fields using a designated separator and copy the string (without quote...
Definition: Adafruit_FONA.cpp:2855
bool expectReply(FONAFlashStringPtr reply, uint16_t timeout=10000)
Check if the received reply matches the expectation.
Definition: Adafruit_FONA.cpp:2353
bool HTTP_para_end(bool quoted=true)
Finish sending an HTTP parameter.
Definition: Adafruit_FONA.cpp:2037
bool enableNetworkTimeSync(bool onoff)
Enable network time sync.
Definition: Adafruit_FONA.cpp:998
bool getGSMLoc(uint16_t *replycode, char *buff, uint16_t maxlen)
Get GSM location.
Definition: Adafruit_FONA.cpp:1780
bool HTTP_term()
Terminate HTTP.
Definition: Adafruit_FONA.cpp:2005
void HTTP_para_start(FONAFlashStringPtr parameter, bool quoted=true)
Start sending an HTTP parameter.
Definition: Adafruit_FONA.cpp:2015
bool tuneFMradio(uint16_t station)
Set the FM Radio station.
Definition: Adafruit_FONA.cpp:514
bool deleteSMS(uint8_t message_index)
Delete an SMS Message.
Definition: Adafruit_FONA.cpp:925