Dear Nordic Team,
I am currently working on a project that utilizes your HTTPS client sample, specifically on the nRF5340 with the 7002EK. The main difference from the sample is that I am using the http_client_req
function. Initially, I followed the same workflow as the sample: opening a socket, connecting, sending data, receiving a response, and then closing the socket. However, I encountered an issue where the connect function occasionally returned a negative value and set errno
to 2.
Since I frequently communicate with my server, I modified the workflow to keep the socket open after connecting, allowing me to exchange requests continuously before closing the socket when finished. This change resolved the "errno 2" issue, but I still occasionally receive a -5 return value from http_client_req
, indicating an I/O error. I have implemented a workaround by waiting briefly and then retrying, but I would like to know if there is a better solution.
Additionally, could you clarify the exact meanings of the error values I am encountering with the connect function and http_client_req
? Is there a way to determine whether these errors are caused by the server or are local issues? Could there be a hardware problem or an issue within the networking/Wi-Fi stack? I know that error nr 2 means "No such file or directory" and error 5 " I/O error", but unfortunately, this does help me to understand the situation.
I am using SDK version 2.6.1.
Thank you for your assistance!