#define HEART_RATE_CONTROL_POINT_UUID "2a39"
#define DEVICE_INFORMATION_UUID "180a"
-#define HEART_RATE_CHARAC_CFG_UUID "2902"
+#define HEART_RATE_CHARAC_CFG_UUID "2902"
#define DEVICE_INFO_CHARAC_MANUFACTURER_NAME_STRING "2A29"
#define TODO 0
-//Connected Collector List
-typedef struct {
- char *remote_address;
- bool isconnected;
-} bt_hrp_collector_notify_info_s;
-
//Server Info Local Structure
typedef struct bt_hrp_server_info_s {
//fill with Setter API's
bt_gatt_h hrs_descriptor; // hrs cccd
bt_gatt_h bsl_characteristic; // body sensor location
bt_advertiser_h advertiser;
- bt_hrp_sensor_advertising_state_changed_cb adv_app_cb; //application callback for updating state changes
- bt_gatt_server_characteristic_notification_state_changed_cb notif_app_cb; //application callback for updating notification
bt_body_sensor_location_e body_sensor_location; //body sensor location
- GSList *hrs_collector_connected_list; //connected collector list , to be updated when read or write cccd request comes from client
} bt_hrp_server_info_s;
static guint adv_timer_id;
"foot",
};
-
GSList *hrp_collector_list;
static bt_adapter_le_scan_result_cb scan_cb; //le scan application callback
static bt_hrp_collector_s *_bt_hrp_collector_find(const char *remote_address);
adv_state == BT_ADAPTER_LE_ADVERTISING_STARTED ?
"started" : "stopped", adv_state);
- if (hrp_server_info_s.adv_app_cb && adv_state == BT_ADAPTER_LE_ADVERTISING_STOPPED)
- hrp_server_info_s.adv_app_cb(result, adv_state, user_data);
}
static gboolean __hrp_timeout(gpointer user_data)
BT_INFO("[HR]server %s", (char *)server);
BT_INFO("[HR]gatt_handle %s", (char *)gatt_handle);
- if (hrp_server_info_s.notif_app_cb)
- hrp_server_info_s.notif_app_cb(notify, server, gatt_handle, user_data);
-
}
static void __bt_hrp_fast_interval_adv_state_changed_cb(int result,
return;
}
}
- /*todo : Send Start and stop enums*/
- if (hrp_server_info_s.adv_app_cb)
- hrp_server_info_s.adv_app_cb(result, adv_state, user_data);
}
return error_code;
}
-static int __bt_hrp_sensor_create_service(void)
+static int _bt_hrp_sensor_create_service(void)
{
int error_code = BT_ERROR_NOT_INITIALIZED;
return error_code;
}
-static void _bt_hrp_sensor_client_info_free(gpointer object)
-{
- bt_hrp_collector_notify_info_s *client_s = (bt_hrp_collector_notify_info_s *)object;
- g_free(client_s->remote_address);
- client_s->isconnected = false;
-}
-
static void _bt_hrp_sensor_initilize(void)
{
hrp_server_info_s.hrp_sensor = NULL;
hrp_server_info_s.dis_characteristic = NULL;
hrp_server_info_s.hrs_descriptor = NULL;
hrp_server_info_s.advertiser = NULL;
- hrp_server_info_s.adv_app_cb = NULL;
- hrp_server_info_s.hrs_collector_connected_list = NULL;
hrp_server_info_s.is_in_contact = true;
if (hrp_server_info_s.is_hr_value_init == false)
BT_INFO("[HR] bt_hrp_le_connection_state_changed_cb Result : %d", result);
BT_INFO("[HR]IsConnected : %d", connected);
BT_INFO("[HR]Remote Address : %s", remote_address);
- bool isappend = true;
/*If Sensor */
if (hrp_server_info_s.hrp_sensor != NULL) {
BT_INFO("[HR] bt_hrp_le_connection_state_changed_cb Sensor!!");
-
- GSList *iter = hrp_server_info_s.hrs_collector_connected_list;
-
- for (; iter; iter = g_slist_next(iter)) {
- if ((iter) && (iter->data != NULL) &&
- (((bt_hrp_collector_notify_info_s *)iter->data)->remote_address != NULL)) {
- if (!g_ascii_strcasecmp(((bt_hrp_collector_notify_info_s *)iter->data)->remote_address,
- remote_address)) {
- ((bt_hrp_collector_notify_info_s *)iter->data)->isconnected = connected;
- isappend = false;
- break;
- }
- }
- }
-
- if (isappend) {
- bt_hrp_collector_notify_info_s *client_s = g_malloc(sizeof(bt_hrp_collector_notify_info_s));
- client_s->isconnected = connected;
- client_s->remote_address = g_strdup(remote_address);
- hrp_server_info_s.hrs_collector_connected_list =
- g_slist_append(hrp_server_info_s.hrs_collector_connected_list, (gpointer)client_s);
- }
-
} else {
/*If Collector*/
bt_hrp_collector_s *collector_s = _bt_hrp_collector_find(remote_address);
}
-/*Application Interfaces*/
+static int _bt_hrp_sensor_update_heartrate_value(int heartrate)
+{
+ BT_CHECK_HRS_SUPPORT();
+ BT_CHECK_INIT_STATUS();
+
+ int error_code = BT_ERROR_NOT_INITIALIZED;
+
+ if (NULL == hrp_server_info_s.hrp_sensor) {
+ BT_ERR("[HR Sensor START] Call Create First !!\n");
+ return error_code;
+ }
+
+ error_code = bt_gatt_set_int_value(hrp_server_info_s.hrs_characteristic,
+ BT_DATA_TYPE_UINT16, heartrate, 1);
+ if (error_code != BT_ERROR_NONE) {
+ BT_ERR("[HR]bt_gatt_set_int_value failed with [0x%04x]", error_code);
+ return error_code;
+ }
+
+ error_code = bt_gatt_server_notify_characteristic_changed_value(hrp_server_info_s.hrs_characteristic,
+ __bt_hrp_notification_send_cb, NULL, NULL);
+ if (error_code != BT_ERROR_NONE) {
+ BT_ERR("bt_gatt_server_notify_characteristic_changed_value : %s\n", _bt_convert_error_to_string(error_code));
+ return error_code;
+ }
+
+ return error_code;
+
+}
+
+static int _bt_hrp_sensor_start(void)
+{
+ int error_code = BT_ERROR_NOT_INITIALIZED;
+
+ BT_CHECK_HRS_SUPPORT();
+ BT_CHECK_INIT_STATUS();
+
+ if (NULL == hrp_server_info_s.hrp_sensor) {
+ BT_ERR("[HR Sensor START] Call Create First !!\n");
+ return error_code;
+ }
+
+ BT_INFO("[HR] START GATT SERVER \n");
+ error_code = bt_gatt_server_start();
+ if (error_code != BT_ERROR_NONE) {
+ BT_ERR("[HR]bt_gatt_server_start : %s \n", _bt_convert_error_to_string(error_code));
+ return error_code;
+ }
+
+ if (hrp_server_info_s.advertiser == NULL) {
+
+ error_code = bt_adapter_le_create_advertiser(&hrp_server_info_s.advertiser);
+ if (error_code != BT_ERROR_NONE) {
+ BT_ERR("[HR Sensor START] bt_adapter_le_create_advertiser : %s \n", _bt_convert_error_to_string(error_code));
+ return error_code;
+ }
+ } else {
+ error_code = bt_adapter_le_clear_advertising_data(hrp_server_info_s.advertiser,
+ BT_ADAPTER_LE_PACKET_ADVERTISING);
+ if (error_code != BT_ERROR_NONE) {
+ BT_ERR("[HR Sensor START] clear advertising data [0x%04x]", error_code);
+ return error_code;
+ }
+ error_code = bt_adapter_le_clear_advertising_data(hrp_server_info_s.advertiser,
+ BT_ADAPTER_LE_PACKET_SCAN_RESPONSE);
+ if (error_code != BT_ERROR_NONE) {
+ BT_ERR("[HR Sensor START] clear scan response data [0x%04x]", error_code);
+ return error_code;
+ }
+ }
+
+ error_code = bt_adapter_le_add_advertising_service_solicitation_uuid(hrp_server_info_s.advertiser,
+ BT_ADAPTER_LE_PACKET_ADVERTISING, HEART_RATE_UUID);
+ if (error_code != BT_ERROR_NONE) {
+ BT_ERR("[HR Sensor START] add service_solicitation_uuid [0x%04x]", error_code);
+ return error_code;
+ }
+
+ error_code = bt_adapter_le_set_advertising_device_name(hrp_server_info_s.advertiser,
+ BT_ADAPTER_LE_PACKET_ADVERTISING, true);
+
+ if (error_code != BT_ERROR_NONE)
+ BT_ERR("[HR Sensor START] set device name [0x%04x]", error_code);
+
+
+ /*interval = 150*/
+ error_code = bt_adapter_le_set_advertising_mode(hrp_server_info_s.advertiser, BT_ADAPTER_LE_ADVERTISING_MODE_LOW_LATENCY);
+ if (error_code != BT_ERROR_NONE) {
+ BT_ERR("[HR Sensor START] add scan response data [0x%04x]", error_code);
+ return error_code;
+ }
+
+ error_code = bt_adapter_le_set_advertising_device_name(hrp_server_info_s.advertiser,
+ BT_ADAPTER_LE_PACKET_SCAN_RESPONSE, true);
+
+ if (error_code != BT_ERROR_NONE)
+ BT_ERR("[HR Sensor START] set device name [0x%04x]", error_code);
+
+ error_code = bt_adapter_le_start_advertising_new(hrp_server_info_s.advertiser,
+ __bt_hrp_fast_interval_adv_state_changed_cb, NULL);
+ if (error_code != BT_ERROR_NONE) {
+ BT_ERR("[HR Sensor START] failed with [0x%04x]", error_code);
+ return error_code;
+ }
+
+ BT_INFO("[HR Sensor START] bt_hrp_sensor_start exit\n");
+ return error_code;
+
+}
+
+static int _bt_hrp_sensor_stop(void)
+{
+ BT_CHECK_HRS_SUPPORT();
+ BT_CHECK_INIT_STATUS();
+
+ int error_code = BT_ERROR_NOT_INITIALIZED;
+
+ error_code = bt_adapter_le_stop_advertising(hrp_server_info_s.advertiser);
+ if (error_code != BT_ERROR_NONE) {
+ BT_ERR("[HR]bt_hrp_sensor_stop failed with [0x%04x]", error_code);
+ return error_code;
+ }
+
+ return error_code;
+
+}
+
+/*Application Interfaces*/
int bt_hrp_sensor_set_heartrate_value(int heartrate)
{
BT_CHECK_HRS_SUPPORT();
hrp_server_info_s.hr_value = heartrate;
hrp_server_info_s.is_hr_value_init = true;
+ if (_bt_hrp_sensor_update_heartrate_value(heartrate) != BT_ERROR_NONE)
+ BT_ERR("[HR] bt_hrp_sensor_set_heartrate_value Did not Notify !!");
+
return BT_ERROR_NONE;
}
return BT_ERROR_NONE;
}
-int bt_hrp_sensor_set_sensor_notification_state_change_cb(
- bt_gatt_server_characteristic_notification_state_changed_cb callback, void *user_data)
-{
- BT_CHECK_HRS_SUPPORT();
- BT_CHECK_INIT_STATUS();
- BT_CHECK_INPUT_PARAMETER(callback);
-
- hrp_server_info_s.notif_app_cb = callback;
-
- return BT_ERROR_NONE;
-}
-
int bt_hrp_sensor_create(void)
{
int error_code = BT_ERROR_NONE;
return error_code;
}
- error_code = __bt_hrp_sensor_create_service();
+ error_code = _bt_hrp_sensor_create_service();
if (error_code != BT_ERROR_NONE) {
- BT_ERR("[HRP- Sensor Create] __bt_hrp_sensor_create_service : %s \n", _bt_convert_error_to_string(error_code));
- return error_code;
- }
- return error_code;
-}
-
-int bt_hrp_sensor_start(bt_hrp_sensor_advertising_state_changed_cb cb)
-{
- int error_code = BT_ERROR_NOT_INITIALIZED;
-
- BT_CHECK_HRS_SUPPORT();
- BT_CHECK_INIT_STATUS();
- BT_CHECK_INPUT_PARAMETER(cb);
-
- if (NULL == hrp_server_info_s.hrp_sensor) {
- BT_ERR("[HR Sensor START] Call Create First !!\n");
+ BT_ERR("[HRP- Sensor Create] _bt_hrp_sensor_create_service : %s \n", _bt_convert_error_to_string(error_code));
return error_code;
}
- BT_INFO("[HR] START GATT SERVER \n");
- error_code = bt_gatt_server_start();
+ error_code = _bt_hrp_sensor_start();
if (error_code != BT_ERROR_NONE) {
- BT_ERR("[HR]bt_gatt_server_start : %s \n", _bt_convert_error_to_string(error_code));
- return error_code;
- }
-
- if (hrp_server_info_s.advertiser == NULL) {
-
- error_code = bt_adapter_le_create_advertiser(&hrp_server_info_s.advertiser);
- if (error_code != BT_ERROR_NONE) {
- BT_ERR("[HR Sensor START] bt_adapter_le_create_advertiser : %s \n", _bt_convert_error_to_string(error_code));
- return error_code;
- }
- } else {
-
- error_code = bt_adapter_le_clear_advertising_data(hrp_server_info_s.advertiser,
- BT_ADAPTER_LE_PACKET_ADVERTISING);
- if (error_code != BT_ERROR_NONE) {
- BT_ERR("[HR Sensor START] clear advertising data [0x%04x]", error_code);
- return error_code;
- }
- error_code = bt_adapter_le_clear_advertising_data(hrp_server_info_s.advertiser,
- BT_ADAPTER_LE_PACKET_SCAN_RESPONSE);
- if (error_code != BT_ERROR_NONE) {
- BT_ERR("[HR Sensor START] clear scan response data [0x%04x]", error_code);
- return error_code;
- }
- }
-
- error_code = bt_adapter_le_add_advertising_service_solicitation_uuid(hrp_server_info_s.advertiser,
- BT_ADAPTER_LE_PACKET_ADVERTISING, HEART_RATE_UUID);
- if (error_code != BT_ERROR_NONE) {
- BT_ERR("[HR Sensor START] add service_solicitation_uuid [0x%04x]", error_code);
- return error_code;
- }
-
- error_code = bt_adapter_le_set_advertising_device_name(hrp_server_info_s.advertiser,
- BT_ADAPTER_LE_PACKET_ADVERTISING, true);
-
- if (error_code != BT_ERROR_NONE)
- BT_ERR("[HR Sensor START] set device name [0x%04x]", error_code);
-
-
- /*interval = 150*/
- error_code = bt_adapter_le_set_advertising_mode(hrp_server_info_s.advertiser, BT_ADAPTER_LE_ADVERTISING_MODE_LOW_LATENCY);
- if (error_code != BT_ERROR_NONE) {
- BT_ERR("[HR Sensor START] add scan response data [0x%04x]", error_code);
- return error_code;
- }
-
- hrp_server_info_s.adv_app_cb = cb;
-
- error_code = bt_adapter_le_set_advertising_device_name(hrp_server_info_s.advertiser,
- BT_ADAPTER_LE_PACKET_SCAN_RESPONSE, true);
-
- if (error_code != BT_ERROR_NONE)
- BT_ERR("[HR Sensor START] set device name [0x%04x]", error_code);
-
- error_code = bt_adapter_le_start_advertising_new(hrp_server_info_s.advertiser,
- __bt_hrp_fast_interval_adv_state_changed_cb, NULL);
- if (error_code != BT_ERROR_NONE) {
- BT_ERR("[HR Sensor START] failed with [0x%04x]", error_code);
- return error_code;
- }
-
- BT_INFO("[HR Sensor START] bt_hrp_sensor_start exit\n");
- return error_code;
-
-}
-
-int bt_hrp_sensor_stop(void)
-{
- BT_CHECK_HRS_SUPPORT();
- BT_CHECK_INIT_STATUS();
-
- int error_code = BT_ERROR_NOT_INITIALIZED;
-
- error_code = bt_adapter_le_stop_advertising(hrp_server_info_s.advertiser);
- if (error_code != BT_ERROR_NONE) {
- BT_ERR("[HR]bt_hrp_sensor_stop failed with [0x%04x]", error_code);
+ BT_ERR("[HRP- Sensor Create] _bt_hrp_sensor_start : %s \n", _bt_convert_error_to_string(error_code));
return error_code;
}
return error_code;
-
-}
-
-int bt_hrp_sensor_update_heartrate_value(int heartrate)
-{
- BT_CHECK_HRS_SUPPORT();
- BT_CHECK_INIT_STATUS();
-
- int error_code = BT_ERROR_NOT_INITIALIZED;
-
- if (NULL == hrp_server_info_s.hrp_sensor) {
- BT_ERR("[HR Sensor START] Call Create First !!\n");
- return error_code;
- }
-
- error_code = bt_gatt_set_int_value(hrp_server_info_s.hrs_characteristic,
- BT_DATA_TYPE_UINT16, heartrate, 1);
- if (error_code != BT_ERROR_NONE) {
- BT_ERR("[HR]bt_gatt_set_int_value failed with [0x%04x]", error_code);
- return error_code;
- }
-
- error_code = bt_gatt_server_notify_characteristic_changed_value(hrp_server_info_s.hrs_characteristic,
- __bt_hrp_notification_send_cb, NULL, NULL);
- if (error_code != BT_ERROR_NONE) {
- BT_ERR("bt_gatt_server_notify_characteristic_changed_value : %s\n", _bt_convert_error_to_string(error_code));
- return error_code;
- }
-
- return error_code;
-
}
int bt_hrp_sensor_destroy(void)
if (hrp_server_info_s.hrp_sensor == NULL)
return BT_ERROR_NOT_INITIALIZED;
+ error_code = _bt_hrp_sensor_stop();
+ if (error_code != BT_ERROR_NONE) {
+ BT_ERR("[HR]bt_hrp_sensor_stop failed with [0x%04x]", error_code);
+ return error_code;
+ }
+
bt_gatt_destroy(hrp_server_info_s.hrs_descriptor);
bt_gatt_destroy(hrp_server_info_s.hrs_characteristic);
bt_gatt_destroy(hrp_server_info_s.dis_characteristic);
bt_gatt_destroy(hrp_server_info_s.dis_service);
bt_gatt_destroy(hrp_server_info_s.hrp_service);
- BT_INFO("[HR]bt_gatt_server_destroy Advertiser Destroy\n");
-
error_code = bt_adapter_le_destroy_advertiser(hrp_server_info_s.advertiser);
if (error_code != BT_ERROR_NONE) {
- BT_ERR("[HR]bt_hrp_sensor_stop failed with [0x%04x]", error_code);
+ BT_ERR("[HR]bt_adapter_le_destroy_advertiser failed with [0x%04x]", error_code);
return error_code;
}
- BT_INFO("[HR]bt_gatt_server_destroy Server Destroy\n");
-
error_code = bt_gatt_server_destroy(hrp_server_info_s.hrp_sensor);
if (error_code != BT_ERROR_NONE) {
BT_ERR("[HR]bt_gatt_server_destroy failed with [0x%04x]", error_code);
hrp_server_info_s.hrp_sensor = NULL;
- BT_INFO("[HR]bt_gatt_server_destroy Server Deinit\n");
-
error_code = bt_gatt_server_deinitialize();
if (error_code != BT_ERROR_NONE) {
- BT_ERR("[HR]bt_gatt_server_destroy failed with [0x%04x]", error_code);
+ BT_ERR("[HR]bt_gatt_server_deinitialize failed with [0x%04x]", error_code);
return error_code;
}
if (hrp_server_info_s.manufname)
g_free(hrp_server_info_s.manufname);
- hrp_server_info_s.adv_app_cb = NULL;
- hrp_server_info_s.notif_app_cb = NULL;
hrp_server_info_s.body_sensor_location = BT_BSL_NOTSUPPORTED;
- g_slist_free_full(hrp_server_info_s.hrs_collector_connected_list, _bt_hrp_sensor_client_info_free);
-
- hrp_server_info_s.hrs_collector_connected_list = NULL;
-
BT_INFO("[HR]bt_gatt_server_destroy Exit\n");
-
-
return error_code;
-
}
/*======================================================================================================
return BT_ERROR_NONE;
}
-int bt_hrp_collector_start_scan(bt_adapter_le_scan_result_cb cb)
+int bt_hrp_collector_start_scan(bt_hrp_collector_scan_result_cb cb)
{
bt_scan_filter_h scan_filter = NULL;
/* HR Sensor functions */
{"BACK"
, BT_UNIT_TEST_FUNCTION_BACK},
- {"[sensor]Set HeartRate Value"
- , BT_UNIT_TEST_FUNCTION_HR_SENSOR_SET_HR_VALUE},
{"[sensor]Set Location Value"
, BT_UNIT_TEST_FUNCTION_HR_SENSOR_SET_LOC_VALUE},
{"[sensor]Set Contact Value"
{"[sensor]Set Device Name"
, BT_UNIT_TEST_FUNCTION_HR_SENSOR_SET_DEVICE_NAME},
{"[sensor]Set Notification Callback"
- , BT_UNIT_TEST_FUNCTION_HR_SENSOR_SET_NOTIF_CB},
- {"[sensor]Set Read Callback"
, BT_UNIT_TEST_FUNCTION_HR_SENSOR_SET_READ_CB},
{"[sensor]Set Send Notification Callback"
, BT_UNIT_TEST_FUNCTION_HR_SENSOR_SET_SEND_NOTIF_CB},
{"HR Sensor Create Instance"
, BT_UNIT_TEST_FUNCTION_HR_SENSOR_CREATE},
- {"HR Sensor Start Advertising"
- , BT_UNIT_TEST_FUNCTION_HR_SENSOR_START},
- {"HR Sensor Stop Advertising"
- , BT_UNIT_TEST_FUNCTION_HR_SENSOR_STOP},
- {"HR Sensor SET Notify"
- , BT_UNIT_TEST_FUNCTION_HR_SENSOR_SET_NOTIFY},
{"HR Sensor Notify"
, BT_UNIT_TEST_FUNCTION_HR_SENSOR_NOTIFY},
{"HR Sensor Destroy"
BT_ERR("Object[%llu] delete failed!", obj_id);
}
-static void __bt_adapter_hrp_sensor_adv_state_cb(int result,
- bt_hrp_sensor_advertising_state_e adv_state, void *user_data)
-{
- TC_PRT("[HR]Result : %d", result);
- TC_PRT("[HR]Advertiser : %p", advertiser);
- TC_PRT("[HR]Advertising %s [%d]",
- adv_state == BT_HRP_SENSOR_ADVERTISING_STARTED ?
- "started" : "stopped", adv_state);
-}
-
void __bt_gatt_client_read_request_completed_cb(int result,
bt_gatt_h request_handle, void *user_data)
{
}
case BT_UNIT_TEST_TABLE_HRP_SENSOR: {
switch (test_id) {
- case BT_UNIT_TEST_FUNCTION_HR_SENSOR_SET_HR_VALUE: {
- TC_PRT("HR SENSOR SET HR VALUE\n");
- int heartrate = 0x38;
- bt_hrp_sensor_set_heartrate_value(heartrate);
- break;
- }
case BT_UNIT_TEST_FUNCTION_HR_SENSOR_SET_LOC_VALUE: {
TC_PRT("HR SENSOR SET LOC VALUE\n");
bt_body_sensor_location_e location = BT_BSL_WRIST;
bt_hrp_sensor_set_device_manufacturer_name(name);
break;
}
- case BT_UNIT_TEST_FUNCTION_HR_SENSOR_SET_NOTIF_CB: {
- TC_PRT("HR SENSOR SET NOTIFICATION CALLBACK\n");
- bt_hrp_sensor_set_sensor_notification_state_change_cb(
- __bt_gatt_server_notification_state_change_cb, NULL);
- break;
- }
case BT_UNIT_TEST_FUNCTION_HR_SENSOR_CREATE: {
TC_PRT("HR SENSOR CREATE\n");
ret = bt_hrp_sensor_create();
TC_PRT("returns %s\n", __bt_get_error_message(ret));
break;
}
- case BT_UNIT_TEST_FUNCTION_HR_SENSOR_START: {
- TC_PRT("HR SENSOR START\n");
- ret = bt_hrp_sensor_start(__bt_adapter_hrp_sensor_adv_state_cb);
- TC_PRT("returns %s\n", __bt_get_error_message(ret));
- break;
- }
- case BT_UNIT_TEST_FUNCTION_HR_SENSOR_STOP: {
- TC_PRT("HR SENSOR STOP\n");
- ret = bt_hrp_sensor_stop();
- TC_PRT("returns %s\n", __bt_get_error_message(ret));
- break;
- }
case BT_UNIT_TEST_FUNCTION_HR_SENSOR_NOTIFY: {
TC_PRT("HR SENSOR UPDATE HR value\n");
- bt_hrp_sensor_update_heartrate_value(60 + (rand()%60));
+ bt_hrp_sensor_set_heartrate_value(60 + (rand()%60));
break;
}
case BT_UNIT_TEST_FUNCTION_HR_SENSOR_DESTORY: {