cancel
Showing results for 
Search instead for 
Did you mean: 

How close socket AT+S.SOCKC?

Viktor Duma
Associate II
Posted on October 19, 2017 at 15:03

Hello! I cant close socket client be command AT+S.SOCKC -  “ERROR: Pending dataâ€� is raised'.  According to UM1695 it should be flushing pending data  (using the AT+S.READ command) is mandatory before closing the socket connection (AT+S.SOCKC). If the buffer is not erased, the “ERROR: Pending dataâ€� is raised. . I cant find description 

AT+S.READ. How can I do that properly?

AT+S.READ

ERROR: Command not found

AT+S.SOCKC=00

ERROR: Pending data

1 ACCEPTED SOLUTION

Accepted Solutions
Posted on October 19, 2017 at 19:20

AT+S.SOCKQ returns the number of bytes of data waiting on socket specified by socket ID argument.

In your case:

AT+S.SOCKQ=00

DATALEN: xxx

View solution in original post

3 REPLIES 3
Elio Cometti
Senior II
Posted on October 19, 2017 at 17:27

There is a typo in the UM, any occurrence of AT+S.READ must be substituted with AT+S.SOCKR

Viktor Duma
Associate II
Posted on October 19, 2017 at 19:15

Thank you for the response. And how can  I know exactly data length?

Posted on October 19, 2017 at 19:20

AT+S.SOCKQ returns the number of bytes of data waiting on socket specified by socket ID argument.

In your case:

AT+S.SOCKQ=00

DATALEN: xxx