This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Compiler/CC3200: [SOCK ERROR] - close socket (241) operation failed to transmit all queued packets and post status -112.

Part Number: CC3200

Tool/software: TI C/C++ Compiler

Hi,

There are two issues. I am facing in my device.

I am receiving this error continuously and my device is getting hang every time. Can I know what can be reason for this and How can i resolve this?

I have found the error -241 means in socket.h #define SL_ESEC_LENGTH_ERROR                  (-241)  /* record layer length error */  but not 241.

Second thing, I am continuously getting the post status from server -112 also. I have found this error in httpcli.h "Response recieved is not HTTP/1.1 response". Why am I getting this one for some devices, not all?

Please let me know useful details about it.

Thanks

  • Hi,

    Do you always get '241' in the async socket error handler? That number is actually not an error number, but it refers to the socket handle which had the error. Are you performing an sl_Close() right before getting that error? It typically occurs if you try to close a non-blocking socket before the network processor has time to send out all of the data queued from an sl_Send(). Try putting a small delay before closing your socket and see if that fixes things.

    As for the HTTP error, what do you mean when you say that you are getting this for some devices but not all? Are you testing with multiple CC3200 devices? If so, I would make sure that all of the CC3200 boards have the latest servicepack flashed on them. Another thing to try is to perform your POST to another server, and seeing if it also fails with the same error. If it doesn't fail when POSTing to another server, then the problem might lie on the server side.

    Regards,
    Michael
  • Hi,

    Yes, I am getting always '241' in the async socket error handler. No, I am not performing any sl_close() function. I am using to the function HTTPCli_construct(httpClient)  and HTTPCli_connect(httpClient, (struct sockaddr *)&addr, 0, NULL); and I am using HTTPCli_disconnect(&httpClient); HTTPCli_destruct(&httpClient); HTTPCli_delete(&httpClient); for closing. I have given the small delay between connection and dis-connection.

    I am not using any sl_Send() and sl_Close() function.

    Please let me know "how can I rectify this issue" because my device is hanging after this socket error.

    Thanks

  • Hi Black_Robot,

    The underlying implementation of HTTPCli_connect() will perform sl_Send() and likewise the implementation of HTTPCli_disconnect() will perform a sl_Close().

    Just to clarify, are you performing many HTTP requests in your application before the error occurs, or does it happen immediately on the first request you try to perform? Also, can you please clarify the following from your previous posts:

    1. What do you mean when you say that you are getting this for some devices but not all?
    2. Are you testing with multiple CC3200devices? If so, I would make sure that all of the CC3200 boards have the latest servicepack flashed on them.
    3. Have you tried performing your POST to another server, and seeing if it also fails with the same error? If it doesn't fail when POSTing to another server, then the problem might lie on the server side.

    Regards,
    Michael R

  • Hi Black _Robot,

    I assume that you have resolved your issue since I have not heard back from you. If not, feel free to post a response to this thread, or open a new thread regarding this issue.

    Regards,
    Michael
  • Hi,

    Yes, I have resolved my issue. There was only issue with service pack. I was using the old one. Now, I have updated.

    Thanks