GPRSState function

Adafruit cellular platform - SMS and IoT over celluar

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
davilox
 
Posts: 2
Joined: Thu May 17, 2018 6:53 am

GPRSState function

Post by davilox »

Hi,

I would like to know what are the meaning of each GPRSstate() function response.

I've used it in the following way:


uint8_t p = fona.GPRSstate();

if (p == 0){
Serial.println(F("GPRS Disabled"));
// turn GPRS on
if (!fona.enableGPRS(true)) {
Serial.println(F("Error al iniciar el GPRS..."));
//return;
}
}
if (p == 1) Serial.println(F("GPRS Enabled"));


¿Is this correct?

Thanks in advance.

User avatar
adafruit_support_mike
 
Posts: 67446
Joined: Thu Feb 11, 2010 2:51 pm

Re: GPRSState function

Post by adafruit_support_mike »

There are three possible output values:

1: GPRS is attached
0: GPRS is not attached
-1: there was a problem in the connection between the microcontroller and the FONA.

Locked
Please be positive and constructive with your questions and comments.

Return to “FONA”