This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Failed to create socket, erro code is -12;

Hi team:

    After my device runs normally for more than 10 hours, the issue that THE socket cannot be created occasionally occurs. Once the issue occurs, the socket cannot be created until the device is reset.the error code is -12.

   Once this issue occurs, how can I solve it?I don't want to reset the device.

Parents
  • Hi,

     

        After my device runs normally for more than 10 hours, the issue that THE socket cannot be created occasionally occurs. Once the issue occurs, the socket cannot be created until the device is reset.the error code is -12.

       Once this issue occurs, how can I solve it?I don't want to reset the device.

    How are you handling your socket? -12 is ENOMEM, indicating that you are not closing your sockets properly.

     

    Kind regards,

    Håkon 

  • Thank you very much for your reply!

    The current socket is closed, I can assure you.However, other sockets may not be closed and are in use. The system can only open one socket at a time?Is there any way to check which sockets are not closed?(ncs1.3.0  and modem 1.1.2)

  • Hi,

     

    pengfeilaw said:
    ncs1.3.0  and modem 1.1.2)

    Have you tried this on newer modem fw (currently v1.3.0) and ncs version (v1.6.1)?

     

    pengfeilaw said:
    The current socket is closed, I can assure you.However, other sockets may not be closed and are in use. The system can only open one socket at a time?

    You can have up to 8 sockets if using regular TCP/UDP, while DTLS/TLS sockets are restricted to 3 sockets simultaneously. 

     

    pengfeilaw said:
    Is there any way to check which sockets are not closed?

    No, unfortunately. 

     

    Kind regards,

    Håkon

      

Reply
  • Hi,

     

    pengfeilaw said:
    ncs1.3.0  and modem 1.1.2)

    Have you tried this on newer modem fw (currently v1.3.0) and ncs version (v1.6.1)?

     

    pengfeilaw said:
    The current socket is closed, I can assure you.However, other sockets may not be closed and are in use. The system can only open one socket at a time?

    You can have up to 8 sockets if using regular TCP/UDP, while DTLS/TLS sockets are restricted to 3 sockets simultaneously. 

     

    pengfeilaw said:
    Is there any way to check which sockets are not closed?

    No, unfortunately. 

     

    Kind regards,

    Håkon

      

Children
No Data
Related