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

pc-ble-driver communication issue

Hello,

I am trying to establish communication between Win 10 PC and nRF52 Dev Kit using pc-ble-driver. I followed the instructions in:

https://github.com/NordicSemiconductor/pc-ble-driver/blob/master/Installation.md

I successfully programmed the IC using the following commands:

$ nrfjprog -f NRF5<x> -e
$ nrfjprog -f NRF5<x> --program hex/sd_api_v<x>/connectivity_<ver>_<baudrate>_with_s13<v>_<a>.<b>.<c>.hex

Then I am not sure how to make the hear_rate_monitor run on the IC from Windows 10. Instruction is not clear. I flashed ble_app_hrs_pca10040_s132.hex from 14.2 SDK using nrfgo Studio and connected the device on Win 10.

Then I ran the node ../examples/heart_rate_monitor.js and got the follow error:

*******************************************Command Line Output Begins **************************************************

c:\Users\Magnima\Documents>node C:\Users\Magnima\node_modules\pc-ble-driver-js\examples\heart_rate_monitor.js
Searching for connected adapters...
onAdded: Adapter added: 682805666.
Found the following adapters:
682805666
Connected to adapter: 682805666.
Opening adapter with ID: 682805666 and baud rate: 115200...
#BLE_PERIPHERAL: logMessage: Successfully opened COM4. Baud rate: 115200. Flow control: none. Parity: none.
.
#BLE_PERIPHERAL: status: {
"id": 6,
"name": "RESET_PERFORMED",
"message": "Target Reset performed",
"time": "2018-04-06T04:43:20.474Z"
}.

Failed to open the nRF5 BLE driver.
#BLE_PERIPHERAL: logMessage: UART port COM4 closed..
#BLE_PERIPHERAL: error: {
"message": "Error occurred opening serial port.",
"description": {
"errno": 13,
"errcode": "NRF_ERROR_TIMEOUT",
"erroperation": "opening port",
"errmsg": "Error occured when opening port. Errorcode: NRF_ERROR_TIMEOUT (0xd)\n"
}
}.
Error: Error opening adapter: Error: Error occured when opening port. Errorcode: NRF_ERROR_TIMEOUT (0xd)
.
at adapter.open.err (C:\Users\Magnima\node_modules\pc-ble-driver-js\examples\heart_rate_monitor.js:153:31)
at Adapter._checkAndPropagateError (C:\Users\Magnima\node_modules\pc-ble-driver-js\api\adapter.js:273:27)
at _adapter.open.err (C:\Users\Magnima\node_modules\pc-ble-driver-js\api\adapter.js:410:22)

C:\Users\Magnima\Documents>

*******************************************Command Line Output Ends **************************************************

Please advice how to get beyond this error.
  • Hi,

    You are not supposed to flash the heart rate application from the SDK. The connectivity firmware will act as a serialized controller for the softdevice. The heart rate application is implemented in the hear_rate_monitor.js script. Flash the connectivity firmware, run the script, and connect to the device with the HRM app in nRF Toolbox on your phone to check that it is working.

    Best regards,
    Jørgen

Related