I am writing a json client that makes a lot of json POSTs and receives json data back from a server. I have had a lot of problems getting the stack to perform reliably for any lengthy time so I decided to see what was going on.
To make a (very) long story short it seems that I suddenly get a SEND reply with the status set to -1. Looking in the code I could see that this is not handled at all and leaves the system with interrupts disabled and unresponsive. It seems the stack handles -57 as ERROR_SOCKET_INACTIVE in the evnt_handler so I decided to try and handle -1 the same way and low and behold that seem to have solved most of my problems.
pArg = M_BSD_RESP_PARAMS_OFFSET(event_hdr); STREAM_TO_UINT32(pArg, BSD_RSP_PARAMS_STATUS_OFFSET,status); if (ERROR_SOCKET_INACTIVE == status || -1 == status) // My changed line { // The only synchronous event that can come from SL device in form of // command complete is "Command Complete" on data sent, in case SL device
The system still hangs (much less though) but this looks like it is another problem. I will dig into that next.
I am running 1.11.1 on host and module (1.24).
It would be great to have some sort of confirmation or comment from TI guys on this. I'm not sure if this is a bug in the FW, the host software or if I am doing something else incorrectly.
/P