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

Calling socket connect() triggers errno=95

Hello,

I am offloading sockets in config.  I instantiate a socket, set the send/recv timeouts, and then call connect().  It's returning a 95 which is EOPNOTSUPP.  I was able to step via debug all the way down to a nrf_connect().  But that was it.

Anyone have any ideas of what I'm doing wrong?

/Loren

Parents
  • Hi Loren,

    Is this a customize board? Did you test with a TLS connection? If the connection is lost during data transmission, there can be an error thrown (for TLS, it is normally -95). Could you check if the signal strength (via AT+CESQ) is good when this occurs?

    If the problem still exists, could you provide your current modem firmware version and a modem trace when the failure happens? 

    Best regards,

    Charlie

  • Hi Charlie,

    It is the standard nrf9160 dk board.  I'm not going to lie.  I am totally lost and pretty overwhelmed.  Especially when it comes to what CONFIG options I need.  All I want is an application that will create and connect to a TLS socket (443) to ANY server I choose (not just nRF Cloud) and be able to call the http_client_req() method with my particular REST method and an url.  I come from the iOS/Android world where there are libraries that do this automatically.  Could you please let me know what CONFIG options I need and some source code on how to set this up?

    The other thing that I find infuriating is that I can't seem to reliably debug this thing.  I'll tap 'step over' and it jumps to some other place I have no clue about.  And I believe I've set the NO_OPTIMIZATIONS configuration but I still can't see some local variables.

    Thanks!

    /Loren

  • Hi Loren,

    Welcome to the embedded world! You are not alone as a beginner struggling with this new field, even me can not fully understand every part of NCS. I suggest you do not bother with CONFIG too much at the beginning, the existing samples and applications and satisfy most of your needs already. nRF9160: HTTPS Client sounds like a good start for you, can you make sure this sample can work on your setup first?

    The network-related applications are quite time-sensitive, so the "step and stop" debug is not fit this condition. You can use nRF Connect Trace Collector to log the communication process and analysis the issue.

    Best regards,

    Charlie

Reply
  • Hi Loren,

    Welcome to the embedded world! You are not alone as a beginner struggling with this new field, even me can not fully understand every part of NCS. I suggest you do not bother with CONFIG too much at the beginning, the existing samples and applications and satisfy most of your needs already. nRF9160: HTTPS Client sounds like a good start for you, can you make sure this sample can work on your setup first?

    The network-related applications are quite time-sensitive, so the "step and stop" debug is not fit this condition. You can use nRF Connect Trace Collector to log the communication process and analysis the issue.

    Best regards,

    Charlie

Children
Related