-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Description
Hello, I have an issue.. I've added a command ad handlers to shut gprs. The AT response is "SHUT OK", on the same line.
void handleSHUT(char* result);
GsmHandler SHUTHandler = {"SHUT ", handleSHUT}; // gprs shut
gsmAsync.registerHandler(&SHUTHandler);
gsmAsync.addCommand("AT+CIPSHUT"); // CIPSHUT will close *all* open connections
my handle function is as follows:
void handleSHUT(char* result) {
if (strcmp(result, "OK") == 0) {
Serial.println("GPRS IS : SHUT");
} else {
Serial.println("GPRS IS : NOT SHUT");
}
}
and it gets called as expected. Here is the debug output:
132.66 GSM CMD: AT+CIPSHUT
SHUT
132.67 Calling handler for 'SHUT ' with argument 'OK'.
GPRS IS : SHUT
134.66 Timeout for 'AT+CIPSHUT' (2000 ms).
134.67 GSM CMD: AT+CIPSHUT
which shows that even if the response is handled, triggers the timeout and eventually the
Retries exceeded.
GSM not responding
I suspect it is because it treats the OK in the "SHUT OK" response as an argument and expects another OK, but I am not able to correct this in the code. Can I please have some help?
Metadata
Metadata
Assignees
Labels
No labels