This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Access nRF52840 Dongle through pc-ble-driver-py library

Hello,

I've been trying to access the nRF52840 dongle through the pc-ble-driver-py library. However, I can't get the Nordic examples to run. Here's what I did so far:

 

- Install pc-ble-driver-py release 0.16.2 as described here ("installing from pypi"): https://github.com/NordicSemiconductor/pc-ble-driver-py/tree/release/0.16.2#installing-from-pypi

 

- Follow the instructions from the pc-ble-driver release 14.1.4: https://github.com/NordicSemiconductor/pc-ble-driver/tree/release/4.1.4#overview

- Driver installation (Segger J-Link)

- Installing tools (nRF5x Command-Line Tools for Windows and nRF Connect Programmer)

- Programming connectivity HEX files with nrfutil (part of nRF5x Command-Line Tools):  

nrfutil dfu usb-serial -pkg connectivity_x.x.x_usb_with_s<x>_<a>.<b>.<c>_dfu_pkg.zip -p <serial port>

I flashed "connectivity_4.1.4_usb_with_s140_6.1.1_dfu_pkg" which is provided in pc-ble-driver-release-4.1.4\hex\sd_api_v6 

- Then, I try to run one of the examples from pc-ble-driver-py, I get the following output: (form the heart_rate_collector.py example)
 
runfile('C:/Users/s-fre/US_project/pc-ble-driver-py-release-0.16.2/pc_ble_driver_py/examples/heart_rate_collector.py', args='NRF52 COM10', wdir='C:/Users/s-fre/US_project/pc-ble-driver-py-release-0.16.2/pc_ble_driver_py/examples')
Serial port used: COM10
2021-10-28 22:53:58,874 [17532/LogThread] Successfully opened COM10. Baud rate: 1000000. Flow control: none. Parity: none.
2021-10-28 22:53:58,879 [17532/LogThread] evt> severity(20) message(Successfully opened COM10. Baud rate: 1000000. Flow control: none. Parity: none.)
2021-10-28 22:53:58,882 [10420/StatusThread] RpcAppStatus.resetPerformed: Target Reset performed
2021-10-28 22:53:58,883 [10420/StatusThread] evt> status code(RpcAppStatus.resetPerformed) message(Target Reset performed)
2021-10-28 22:54:00,122 [10420/StatusThread] RpcAppStatus.connectionActive: Connection active
2021-10-28 22:54:00,125 [10420/StatusThread] evt> status code(RpcAppStatus.connectionActive) message(Connection active)
2021-10-28 22:54:01,634 [17532/LogThread] Failed to receive response for command
2021-10-28 22:54:01,635 [17532/LogThread] evt> severity(30) message(Failed to receive response for command)
2021-10-28 22:54:01,636 [10420/StatusThread] RpcAppStatus.pktSendError: Error sending packet to target. Code: 0x8016
2021-10-28 22:54:01,637 [10420/StatusThread] evt> status code(RpcAppStatus.pktSendError) message(Error sending packet to target. Code: 0x8016)
Traceback (most recent call last):
  File "C:\Users\s-fre\US_project\pc-ble-driver-py-release-0.16.2\pc_ble_driver_py\examples\heart_rate_collector.py", line 216, in <module>
    main(serial_port)
  File "C:\Users\s-fre\US_project\pc-ble-driver-py-release-0.16.2\pc_ble_driver_py\examples\heart_rate_collector.py", line 175, in main
    conn = collector.connect_and_discover()
  File "C:\Users\s-fre\US_project\pc-ble-driver-py-release-0.16.2\pc_ble_driver_py\examples\heart_rate_collector.py", line 112, in connect_and_discover
    self.adapter.driver.ble_gap_scan_start(scan_params=params)
  File "C:\Users\s-fre\miniconda3\envs\py38\lib\site-packages\pc_ble_driver_py\ble_driver.py", line 106, in wrapper
    raise NordicSemiException(
NordicSemiException: Failed to ble_gap_scan_start. Error code: NRF_ERROR_SD_RPC_SEND
 
Any suggestions what the proplem could be or what I could try to solve it?
Thank you for your help!
Best regards,
Sebastian
Parents Reply Children
Related