This is boring
Diff: SPWFSA01.cpp
- Revision:
- 10:580379efe167
- Parent:
- 8:a4425b8dd2e4
- Child:
- 11:643a8c0f07ea
diff -r 5314a6659fad -r 580379efe167 SPWFSA01.cpp --- a/SPWFSA01.cpp Mon Jul 04 12:22:52 2016 +0000 +++ b/SPWFSA01.cpp Mon Jul 04 13:04:04 2016 +0000 @@ -18,7 +18,7 @@ #define SPWFSA01_CONNECT_TIMEOUT 15000 #define SPWFSA01_SEND_TIMEOUT 500 -#define SPWFSA01_RECV_TIMEOUT 1000//some commands like AT&F/W takes some time to get the result back! +#define SPWFSA01_RECV_TIMEOUT 1500//some commands like AT&F/W takes some time to get the result back! #define SPWFSA01_MISC_TIMEOUT 500 SPWFSA01::SPWFSA01(PinName tx, PinName rx, bool debug) @@ -273,9 +273,9 @@ if (!(_parser.recv("+WIND:55:Pending Data:%d:%u", &recv_id, &recv_amount) && recv_id == id - && _parser.send("AT+S.SOCKQ=%d", id)//send a query (will be required for secure sockets) - && _parser.recv(" DATALEN: %u", &recv_amount) - && _parser.recv("OK") + //&& _parser.send("AT+S.SOCKQ=%d", id)//send a query (will be required for secure sockets) + //&& _parser.recv(" DATALEN: %u", &recv_amount) + //&& _parser.recv("OK") && recv_amount <= amount && _parser.send("AT+S.SOCKR=%d,%d", id, recv_amount) && _parser.read((char*)data, recv_amount)