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

sd_rpc_open hangs for ever if sd_rpc_close was not called

I'm using Windows driver 0.5.0 with a s130 BLE USB dongle.

If my application calls sd_rpc_open on init and sd_rpc_close before exiting, everything works fine.

Now, if my application crashs, sd_rpc_close is not closed. Then, next session will try to call sd_rpc_open and this will hang forever. Calling sd_rpc_close from the second session before sd_rpc_open does not solve the problem.

The only workaround I found is to unplug and then plug back the dongle.

Could this be fixed in a coming release? Any software workaround?

Parents
  • Hi, the problem is that the transport layer looses sync with the host when not closed beforehand. The development team is aware of this. A workaround is to reset the device before you start your script. You can make a script to do the reset it via the Segger programmer.

    E.g., using nrfjprog:

    nrfjprog --reset
    

    Or Jlink commander:

    >JLinkExe
    
    >device nrf51
    
    >r //reset and halt
    
    >g // "go" start execution
    
    >q // exit Jlink commander
    
Reply
  • Hi, the problem is that the transport layer looses sync with the host when not closed beforehand. The development team is aware of this. A workaround is to reset the device before you start your script. You can make a script to do the reset it via the Segger programmer.

    E.g., using nrfjprog:

    nrfjprog --reset
    

    Or Jlink commander:

    >JLinkExe
    
    >device nrf51
    
    >r //reset and halt
    
    >g // "go" start execution
    
    >q // exit Jlink commander
    
Children
Related