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

Trouble connecting https socket second time in nrf9160. And connecting debugger issue

We are developing an application that requires the https connection to the server. I am using SDK v1.2.0 and https_client as a sample example. The trouble I am having is that the socket connects the first time and exchanges the data with the server. But next time the MCU tries to connect to the server it keeps waiting forever.

I tried a workaround that is working but not sure is the best way to do so. So basically if the socket id number is 2 I never close it even after the server data exchange and API calls are made, while any other socket created later is closed.

So basically socket num 2 is used one time to make the API calls but is never closed and it stays always open. Next time the call is made to create socket it creates the socket number 3 which works fine and after the API calls are completed the socket 3 is closed. So open close is working on socket 3 but not on socket 2.

The other issue I am having is connecting the debugger to the dev-kit. I am using the latest Segger Embedded studio v4.42a. The segger is unable to download the hex into board. I have to use nrf Connect Programmer to load the hex file.

I have tried different methods 

Debug>>Go

Target >>Connect J Link     Target >>Download File>>Download   Intel Hex file

I tried to connect the debugger after programming by using Target>>Attach debugger and it attaches me to the SPM project and does not allow to put any breakpoint in the main application. I have used the older versions of SES before with SDK v1.1.0 and earlier the debugger was working fine in that. A Debug>>Go was able to load and connect debugger.

Parents
  • Hi.

    I have been able to provoke behavior similar to what you are seeing using the cloud_client sample. I have not yet been able to recreate your workaround (simply opening another socket does not work), but I will keep working on it tomorrow. I have captured a modem trace and forwarded it to our R&D team for deeper analysis. However, I would still like a modem trace from you to confirm that we are seeing the same problem.

    I'll keep you updated when I know more.

    Best regards,

    Didrik

Reply
  • Hi.

    I have been able to provoke behavior similar to what you are seeing using the cloud_client sample. I have not yet been able to recreate your workaround (simply opening another socket does not work), but I will keep working on it tomorrow. I have captured a modem trace and forwarded it to our R&D team for deeper analysis. However, I would still like a modem trace from you to confirm that we are seeing the same problem.

    I'll keep you updated when I know more.

    Best regards,

    Didrik

Children
No Data
Related