static void bluetooth_le_advertise(void* user_data);
static void _bt_gatt_server_read_value_requested_cb(const char *remote_address, int request_id, bt_gatt_server_h server, bt_gatt_h gatt_handle, int offset, void *user_data);
static void _bt_gatt_server_characteristic_notification_state_changed_cb(bool notify, bt_gatt_server_h server, bt_gatt_h gatt_handle, void *user_data);
-static void _bt_gatt_server_write_value_requested_cb(const char *remote_address, int request_id, bt_gatt_server_h server, bt_gatt_h gatt_handle, int offset, const char *value, int len, void *user_data);
+static void _bt_gatt_server_write_value_requested_cb(const char *remote_address, int request_id, bt_gatt_server_h server, bt_gatt_h gatt_handle, bool response_needed, int offset, const char *value, int len, void *user_data);
static void _bt_adapter_le_advertising_state_changed_cb(int result, bt_advertiser_h advertiser, bt_adapter_le_advertising_state_e adv_state, void *user_data);
static void services_list_show(bluetoothle_view *this);
static void on_hardware_back_button_pressed(void *user_data, Evas_Object *obj, void *event_info);
DBG("_bt_gatt_server_characteristic_notification_state_changed_cb");
}
-static void _bt_gatt_server_write_value_requested_cb(const char *remote_address, int request_id, bt_gatt_server_h server, bt_gatt_h gatt_handle, int offset, const char *value, int len, void *user_data)
+static void _bt_gatt_server_write_value_requested_cb(const char *remote_address, int request_id, bt_gatt_server_h server, bt_gatt_h gatt_handle, bool response_needed, int offset, const char *value, int len, void *user_data)
{
DBG("_bt_gatt_server_write_value_requested_cb");
RETM_IF(NULL == user_data, "data is NULL");
elm_list_item_append(this->bluetoothle_list, str, NULL, NULL, NULL, NULL);
SAFE_DELETE(str);
- bt_gatt_server_send_response(request_id,
- BT_GATT_REQUEST_TYPE_WRITE, offset,
- resp_status, NULL, 0);
+ if (response_needed == true)
+ bt_gatt_server_send_response(request_id,
+ BT_GATT_REQUEST_TYPE_WRITE, offset,
+ resp_status, NULL, 0);
elm_list_go(this->bluetoothle_list);
}