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

How to keep HRM device alive (win_0.3.0-alpha API)

Here's my config:

Dongle part :

  • PCA10000
  • Soft device : s120_nrf51822_1.0.1_softdevice.hex
  • Application : nRF51-ble-driver_win_0.3.0-alpha/s120/hex/hexconnectivity_1M.hex

Peripheral part :

  • PCA10028
  • Soft device : s110_nrf51822_7.1.0_softdevice.hex
  • Application : hex file compiled from ble_app_hrs_s110_pca10028.uvprojx

PC: Simply compiled nrf_heart_rate_collector sample program

While executing the nrf_heart_rate_collector program, I received ~150 HRM values and then connection is lost (reason: 0x13, meaning BLE_HCI_REMOTE_USER_TERMINATED_CONNECTION).

Why is the remote device closing the connection? Does the PC need to send a sort of "keep aliv" request? How can we keep HRM being received for ever?

Edit [22/05/2015]: This is apparently a bug either in dongle or PC driver code. See devzone.nordicsemi.com/.../

Parents
  • Hi,
    The reason for the disconnect is likely that the peripheral is sending a connection update request that doesn't get responded to, and the peripheral consequently disconnects. The heart rate collector example in ble driver does not include handling of connection update request events. Try to add handling of BLE_GAP_EVT_CONN_PARAM_UPDATE_REQUEST and see if that helps.

  • Event 0x0012 is BLE_GAP_EVT_CONN_PARAM_UPDATE (from ble_gap.h). This means an update has been done. However since you did not use the parameters requested from the peripheral, the peripheral will request an update again, hence the repeated requests. Use ->params.conn_param_update_request.conn_params as the second parameter instead. See nRF51 SDK ble_app_hrs_c central example for reference.

Reply Children
No Data
Related