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

NRF9160 & freeRTOS nrf_connect() always times out

Hello,
I am working on a project which requires using FreeRTOS with the nrf9160.

Setup:
- Boards tested on:actinius icarus, Thingy91)
- VS-Code with Ceedling as build tool.
- J-Link base
- bsdlib version 0.8.1
- Swisscom SIM

I ported the the Zephry example https_example to both the bare-metal and freeRTOS version.

My issue arises with the nrf_connect() API call which does always return -1, with NRF_ETIMEDOUT (60).

I am doing my developpment on two version:
- A bare-metal version where every thing works.
- A freeRTOS version which does always timeout on nrf_connect(fd, res->ai_addr, sizeof(struct nrf_sockaddr_in));

Attempting to fix this issue, I used the example https_example from the nrf sdk.
Both are identical to the Zephry version with exception of calling directly the nrf9160 bsdlib API.
The bare-metal works a treat, the freeRTOS does not.


Some things I tried:
- I used the bare-metal bsd_os.c in my freertos version, to ensure the issue does not come from there. The error is still there.
- I used a blocking only version (from the sdk porting guide template) of bsd_os.c The error is still there.
- I used the same security tag & certificates for the bare-metal and freertos versions. I can assure the certificate is correct in both applications.
- I know the network is connected, because the app is able to resolve google.com and other websites (to ensure they are not in a cache on the device) before opening the TLS.

Could freeRTOS alter configurations with are done by bsdlib, or alter timings in a significant way?
Does someone have experience with freeRTOS on nrf9160?
Do you have any hints ?

If I get this to work, I'll happily share the freeRTOS implementation.

Sincerly,
Manu

Parents Reply Children
Related