I have a scenario where the LinkIt ONE device is sending GPS data using built-in GPRS functionality to a server while moving from one place to another (geographical locations).
When the device enters a zone where GPRS signals are not available, it tries to reconnect with the server (which is normal). But after some time (5-6 re-connection attempts) it gets stuck in the following function call.
Which can be acceptable, but when the device gets back in zone where GPRS signals are available, it is not proceeding further i.e. it is still stuck in the client.Connect() function call.
Normally, the LinkIt ONE should keep trying to reconnect with the server when the GPRS signals are not available and as soon as it receives the GPRS signals it should successfully reconnect.
So, is there a way to resolve this like checking GPRS status or signals?
Any discussion on this will be helpful.
Here is my sketch
char server ="arduino.cc";
char path ="/asciilogo.txt";
int port = 80; // HTTP
while (!Serial); // wait for serial port to connect.
Serial.println("-- Starting GPRS only --");
// if you get a connection, report back via serial:
if (client.connect(server, port))
// Make a HTTP request:
// if you didn't get a connection to the server:
Serial.println("Waiting for client.available() ...");
while(client.connected() && !client.available()); // wait to read values from client
char ch = client.read();
if (!client.available() && !client.connected())
Serial.println("Connecting to AP ...");
Serial.println("Connected to AP");