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

  • Hi Charlie!

    Thanks for the welcome.  HTTPS Client definitely can connect, send the data and receive.  However I cannot get any captures in Connect Trace Collector.  In the https_client prj.conf I definitely have the line: CONFIG_NRF_MODEM_LIB_TRACE_ENABLED=y.  I've updated the board itself.  But every time I capture either with trace collector or trace collector v2, I get 0 packets captured.  Please help.

    /Loren

  • Hi Loren,

    I just test with Trace Collector V2 preview v0..0.11, PCAP seems not to work, please use RAW and convert the log data later.

    Also, remember to try with a different serial port if it still does not work.

    Best regards,

    Charlie

  • Hi Charlie,

    I seem to be able to now capture.  But every time I try to convert to pcap I get:

    2021-09-29T13:22:58.931Z ERROR Failed conversion to pcap: end of file reached while searching db uid plugin path: C:\Users\lrogers\.nrfconnect-apps\node_modules\pc-nrfconnect-tracecollector-preview\node_modules\nrf-monitor-lib-js\Release\win32-ia32\nrfml-insight-source.nrfml
    2021-09-29T13:22:58.931Z DEBUG Full error: {"error_code":100,"message":"end of file reached while searching db uid plugin path: C:\\Users\\lrogers\\.nrfconnect-apps\\node_modules\\pc-nrfconnect-tracecollector-preview\\node_modules\\nrf-monitor-lib-js\\Release\\win32-ia32\\nrfml-insight-source.nrfml","origin":"Error when running nrfml operation worker."}

    I really wish Nordic's stuff worked reliably.  This is frustrating.

  • What about the size of your trace bin file? Can you share it with me?

    I suggest you recording raw format with Trace Collector and monitoring the log through the serial terminal at the same time, this can make sure the whole process is recorded.

    Trace Collector V2 preview is still under preview, so do not expect to hight to it now.

    Best regards,

    Charlie

Reply Children
Related