NRF9160 https_client does not connect to example.com

1. am currently using the nrf9161_dk. and have not modified the modem FW in anyway. 

2. I am using the vscode extension provided by nordic to build/run this sample

        a, i am using version v2.4.1 for the SDK

3. this is my build config.  with this configuration  get the err 111 which when i look it up means   #define ECONNREFUSED 111   /* Connection refused */

this is the output:

*** Booting Zephyr OS build v3.3.99-ncs1-2 ***
HTTPS client sample started
Certificate mismatch
Provisioning certificate
Waiting for network.. PDP context 0 activated
OK
Looking up example.com
Resolved 93.184.216.34 (AF_INET)
Connecting to example.com:443
connect() failed, err: 111
PDP context 0 network detached

So then i tried adding mbed tools as well: 

build config with mbed tool: 

and i get this errno 22 #define  EINVAL 22   /* Invalid argument */ 

So then i has a thingy91 and decided to test that dev kit out, i uploaded that modem with mfw_nrf9160_1.3.5.zip  and i am running the exact same configurations and i am getting the same errors. 
does anyone have any ideas of what might be happening here and why the sample is not working, any input is appreciated. 
thanks, 
Parents
  • In case this is still relevant, I was experiencing the same issue as   with SDK v2.4.2 and nRF9160DK. I found that swapping the certificate for the one provided in this answer resolved the issue and I was able to get the expected result with the new cert:

    *** Booting Zephyr OS build v3.3.99-ncs1-2 ***
    HTTPS client sample started
    Certificate mismatch
    Provisioning certificate
    Waiting for network.. PDP context 0 activated
    PDP context 0 error, PDN type IPv4 only allowed
    OK
    Waiting for IPv6..
    IPv6 not available
    Looking up example.com
    Resolved 93.184.215.14 (AF_INET)
    Connecting to example.com:443
    Sent 61 bytes
    Received 354 bytes

    > HTTP/1.1 200 OK

    Finished, closing socket.
    PDP context 0 deactivated
    PDP context 0 network detached

  • Hi  ,

    Thank you for providing the link to the answer that solved your problem. 

    Best regards,
    Dejan

Reply Children
No Data
Related