nRF7002DK HTTPS Client Sample Not Connecting to AP 100% of the times when it does and it tries to connect to HTTP server it fails with error code 113

Hi,

I'm facing two issues when trying out the HTTPS Client sample from NCS 2.5.2 with build target nrf7002dk_nrf5340_cpuapp. After calling function conn_mgr_all_if_connect(true) and then waiting for the semaphore to be given once the  on_net_event_l4_connected is called, the program never gets it. I've waited for over 1 minute and I also don't get a timeout error which would happen if the credentials are wrong (i've tested this). The weird thing is that it sometimes works. If I keep resetting the board it will connect eventually but then I face the second problem.

When try connect tp "example.com" I get two types of errors:

  • getaddrinfo() failed, err 0
  • connect() failed, err: 113

I get the second one more often that the first one. The error code 113 is defined as ECONNABORTED with description "Software caused connection abort". What does this mean? Attached is the logs of when I got this issue. I've tried other sites like the "nytimes.com" or "google.com" and I don't get this error. With other sites I sometimes get the error 116 (ETIMEDOUT). I've only gotten this sample to work with the "nytimes.com" hostname. 

I have also tried the sample out-of-the-box in NCS 2.5.0 and I get the same issues. Can you please help me with this issue? Thanks

Best,

Ale

[00:00:00.536,224] <inf> fs_nvs: 6 Sectors of 4096 OK
bytes
[00:00:00.536,254] <inf> fs_nvs: alloc wra: 0, fe8
[00:00:00.536,254] <inf> fs_nvs: data wra: 0, 0
*** Booting nRF Connect SDK v2.5.2 ***
HTTPS client sample started
Bringing network interface up
Provisioning certificate
Connecting to the network
[00:00:01.854,309] <inf> wifi_mgmt_ext: Connection requested
Network connectivity established and IP address assigned
Looking up example.com
Resolved 93.184.216.34 (AF_INET)
Connecting to example.com:443
connect() failed, err: 113
OK
Network connectivity lost
Disconnected from the network

Parents Reply Children
  • Hi,

    The new certificate worked! I'm not getting the ECONNABORTED error anymore and have gotten the sample to work out of the box. I'm still getting the other issues ocassionally . Is there any idea on what might be happening? Here are the logs of when I get the getaddrinfo() error:

    *** Booting nRF Connect SDK v2.5.2 ***
    HTTPS client sample started
    Bringing network interface up
    Provisioning certificate
    Connecting to the network
    [00:00:01.839,324] <inf> wifi_mgmt_ext: Connection requested
    Network connectivity established and IP address assigned
    Looking up example.com
    getaddrinfo() failed, err 0
    OK
    Network connectivity lost
    Disconnected from the network

  • Hi,

    Can you check what getaddrinfo() returns? In your logs, errno is 0, but since you get that getaddrinfo() fails, the function must return something other than 0.

    Best regards,
    Marte

Related