Sigfox library with integration of ATParser
Diff: Sigfox.cpp
- Revision:
- 10:8ff45b9e136b
- Parent:
- 8:b10abac6a42e
- Child:
- 11:7e21590031dd
diff -r 7b18b2817eba -r 8ff45b9e136b Sigfox.cpp --- a/Sigfox.cpp Tue Jun 06 20:23:50 2017 +0000 +++ b/Sigfox.cpp Tue Aug 01 11:03:17 2017 +0000 @@ -13,15 +13,8 @@ _at->send("AT$SF=%s,1", data); // Wait response from sigfox after send if(_at->recv("OK")) { - char message[20]; // Wait return - // TODO add loop to load data - if(_at->recv("+RX%s", &message)) { - // Check if message received is equal to " OK" - if(strcmp(message, " OK") == 0) { - return true; - } - } + return _at->recv("RX=%[^\r]", response); } return false; } else {