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

re-init or resetting nrf52 dongle with pc-ble-driver-py

Hi,

I have a python program using an NRF52 dongle and its working great with the a minor detail that if the program crashes and does not get a chance to close the adapter, then it does not allow you to open it again until the dongle is unplugged and plugged back in.

I've tried opening and closing the device through the library and I've also tried using pyserial to do something similar, but in every case I get either "NordicSemiException: Failed to ble_enable. Error code: 3" or Error Code 13. once the device is power cycled, it works great.

Is there anyway to programmatically ensure that the device is reset when the program loads so that a physical action is not necessary?

Thanks,

Gabe

Related