Hi folks,
Im trying to run the heart rate collector from a Visual Studio application and I have some communication issues with the connectivity device. I use a nRF52 Dongle running the firmware downloaded by the nRF Connect BLE app (4.1.1, sd api 3, from what I can see in the log printouts from nRF Connect). I run on a Macbook in Parallels (a VM), but nRF Connect works as expected, so I guess my application should work as well.
pc-ble-driver is installed using vcpkt, and should be the same version:
nrf-ble-driver:x86-windows 4.1.1-2 BLE driver is a library for Bluetooth Low Energy...
The only modifications I´ve made to the heart rate collector example is changing the include statements (to point out header files in sd_api_v3), adding defines NRF_SD_BLE_API=3 and _CRT_SECURE_NO_WARNINGS and enabling debug printouts.
These are the debug printouts:
Serial port used: COM15 Baud rate used: 1000000 Info: Successfully opened COM15. Baud rate: 1000000. Flow control: none. Parity: none. Log: State change: STATE_START -> STATE_RESET Log: 1 -> [N/A] type: RESERVED_5 reliable: no seq#:0 ack#:0 payload_length:0 data_integrity:0 err_code:0x0 Status: 6, message: Target Reset performed Log: 1/ 0 <- [01 7e ] type: LINK_CONTROL_PACKET reliable: no seq#:0 ack#:0 payload_length:2 data_integrity:0 err_code:0x0 [SYNC] Log: State change: STATE_RESET -> STATE_UNINITIALIZED Log: 2 -> [01 7e ] type: LINK_CONTROL_PACKET reliable: no seq#:0 ack#:0 payload_length:2 data_integrity:0 err_code:0x0 [SYNC] Log: 2/ 0 <- [02 7d ] type: LINK_CONTROL_PACKET reliable: no seq#:0 ack#:0 payload_length:2 data_integrity:0 err_code:0x0 [SYNC_RESP] Log: State change: STATE_UNINITIALIZED -> STATE_INITIALIZED Log: 3 -> [03 fc 11 ] type: LINK_CONTROL_PACKET reliable: no seq#:0 ack#:0 payload_length:3 data_integrity:0 err_code:0x0 [CONFIG [ sliding-window-size:1 out-of-frame:0 data-integrity-check-type:1 version-number:0 ]] Log: 3/ 0 <- [01 7e ] type: LINK_CONTROL_PACKET reliable: no seq#:0 ack#:0 payload_length:2 data_integrity:0 err_code:0x0 [SYNC] Log: 4 -> [02 7d ] type: LINK_CONTROL_PACKET reliable: no seq#:0 ack#:0 payload_length:2 data_integrity:0 err_code:0x0 [SYNC_RESP] Log: 5 -> [03 fc 11 ] type: LINK_CONTROL_PACKET reliable: no seq#:0 ack#:0 payload_length:3 data_integrity:0 err_code:0x0 [CONFIG [ sliding-window-size:1 out-of-frame:0 data-integrity-check-type:1 version-number:0 ]] Log: 4/ 0 <- [03 fc 11 ] type: LINK_CONTROL_PACKET reliable: no seq#:0 ack#:0 payload_length:3 data_integrity:0 err_code:0x0 [CONFIG [ sliding-window-size:1 out-of-frame:0 data-integrity-check-type:1 version-number:0 ]] Log: 6 -> [04 7b 11 ] type: LINK_CONTROL_PACKET reliable: no seq#:0 ack#:0 payload_length:3 data_integrity:0 err_code:0x0 [CONFIG_RESP [ sliding-window-size:1 out-of-frame:0 data-integrity-check-type:1 version-number:0 ]] Log: 7 -> [03 fc 11 ] type: LINK_CONTROL_PACKET reliable: no seq#:0 ack#:0 payload_length:3 data_integrity:0 err_code:0x0 [CONFIG [ sliding-window-size:1 out-of-frame:0 data-integrity-check-type:1 version-number:0 ]] Log: 5/ 0 <- [04 7b 11 ] type: LINK_CONTROL_PACKET reliable: no seq#:0 ack#:0 payload_length:3 data_integrity:0 err_code:0x0 [CONFIG_RESP [ sliding-window-size:1 out-of-frame:0 data-integrity-check-type:1 version-number:0 ]] Log: State change: STATE_INITIALIZED -> STATE_ACTIVE Status: 7, message: Connection active Log: 8 -> [00 60 01 00 00 00 01 01 01 00 17 00 00 00 ] type: VENDOR_SPECIFIC reliable:yes seq#:0 ack#:0 payload_length:e data_integrity:1 header_checksum:52 err_code:0x0 Log: 6/ 0 <- [N/A] type: ACK reliable: no seq#:0 ack#:1 payload_length:0 data_integrity:0 err_code:0x0 Log: serial port read on port COM15 aborted. Warning: Failed to receive response for command Status: 4, message: Error sending packet to target. Code: 0x8016 Failed to enable BLE stack. Error code: 32771
What I´ve come up with so far (and where I got stuck on my real application as well) is that the device never responds tosd_ble_enable. This because the asio serialport reports that the operation was aborted. Perhaps my dongle resets for some reason? Any thoughts?
// Henrik