Changes required by X-NUCLEO-IDWM01M1 and mbed-os 5.2.2
Dependents: X_NUCLEO_IDW01M1v2-lapi-1
Fork of SPWF01SA by
Revision 10:580379efe167, committed 2016-07-04
- Comitter:
- mridup
- Date:
- Mon Jul 04 13:04:04 2016 +0000
- Parent:
- 9:5314a6659fad
- Child:
- 11:643a8c0f07ea
- Commit message:
- remove sockQ during recv and increasing recv timeout
Changed in this revision
SPWFSA01.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- 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)