I must create an application for nrf5 dk with s132 v3.0.0 sd. In this application a device must implement heart rate service client, while continously trasmitting a reference advertising beacon packet. Is it possible ?
I must create an application for nrf5 dk with s132 v3.0.0 sd. In this application a device must implement heart rate service client, while continously trasmitting a reference advertising beacon packet. Is it possible ?
Hi,
The s132 v3.0.0 softdevice support non-connectable advertising (broadcasting) while in a connection. You could easily change the HRS example to continue advetising when a connection is established.
You need to start advertising on the BLE_GAP_EVT_CONNECTED
event in on_ble_evt() handler, with the advertising type BLE_GAP_ADV_TYPE_ADV_NONCONN_IND. Remeber to set the advertising interval to minimum 100 ms.
You should also switch back to connectable advertising when the central disconnects, i.e. on a BLE_GAP_EVT_DISCONNECTED
event.
Best regards,
Jørgen
Hi,
The s132 v3.0.0 softdevice support non-connectable advertising (broadcasting) while in a connection. You could easily change the HRS example to continue advetising when a connection is established.
You need to start advertising on the BLE_GAP_EVT_CONNECTED
event in on_ble_evt() handler, with the advertising type BLE_GAP_ADV_TYPE_ADV_NONCONN_IND. Remeber to set the advertising interval to minimum 100 ms.
You should also switch back to connectable advertising when the central disconnects, i.e. on a BLE_GAP_EVT_DISCONNECTED
event.
Best regards,
Jørgen