static const char *remote_addr = "E4:32:CB:41:1F:A6";
static bool le_supported = false;
static bool bt_supported = false;
+static bool gatt_client_supported = false;
+static bool gatt_server_supported = false;
static bool ipsp_supported = false;
le_supported = false;
system_info_get_platform_bool("http://tizen.org/feature/network.bluetooth.le", &le_supported);
+ gatt_client_supported = false;
+ system_info_get_platform_bool("tizen.org/feature/network.bluetooth.le.gatt.client", &gatt_client_supported);
+
+ gatt_server_supported = false;
+ system_info_get_platform_bool("tizen.org/feature/network.bluetooth.le.gatt.server", &gatt_server_supported);
+
ipsp_supported = false;
system_info_get_platform_bool("http://tizen.org/feature/network.bluetooth.le.ipsp", &ipsp_supported);
{
bool auto_connect = FALSE;
- if(le_supported) {
+ if(gatt_client_supported) {
assert_eq(startup_flag, BT_ERROR_NONE);
ret = bt_deinitialize();
assert_eq(ret,BT_ERROR_NONE);
*/
int utc_bluetooth_bt_gatt_disconnect_n(void)
{
- if(le_supported) {
+ if(gatt_client_supported) {
assert_eq(startup_flag, BT_ERROR_NONE);
ret = bt_deinitialize();
assert_eq(ret,BT_ERROR_NONE);
{
bool auto_connect = FALSE;
- if(le_supported) {
+ if(gatt_client_supported) {
assert_eq(startup_flag, BT_ERROR_NONE);
ret = bt_initialize();
assert_eq(ret,BT_ERROR_NONE);
*/
int utc_bluetooth_bt_gatt_disconnect_n1(void)
{
- if(le_supported) {
+ if(gatt_client_supported) {
assert_eq(startup_flag, BT_ERROR_NONE);
ret = bt_initialize();
assert_eq(ret,BT_ERROR_NONE);
*/
int utc_bluetooth_bt_gatt_set_connection_state_changed_cb_n(void)
{
- if(le_supported) {
+ if(gatt_client_supported || gatt_server_supported) {
assert_eq(startup_flag, BT_ERROR_NONE);
ret = bt_deinitialize();
assert_eq(ret,BT_ERROR_NONE);
*/
int utc_bluetooth_bt_gatt_unset_connection_state_changed_cb_n(void)
{
- if(le_supported) {
+ if(gatt_client_supported || gatt_server_supported) {
assert_eq(startup_flag, BT_ERROR_NONE);
ret = bt_deinitialize();
assert_eq(ret,BT_ERROR_NONE);
char *value = NULL;
int len = 0;
- if(le_supported) {
+ if(gatt_client_supported || gatt_server_supported) {
assert_eq(startup_flag, BT_ERROR_NONE);
ret = bt_gatt_get_value(gatt_handle, &value, &len);
char *value = NULL;
int offset = 0;
- if(le_supported) {
+ if(gatt_client_supported || gatt_server_supported) {
assert_eq(startup_flag, BT_ERROR_NONE);
ret = bt_gatt_get_int_value(gatt_handle, BT_DATA_TYPE_SINT16, offset, value);
float *value = NULL;
int offset = 0;
- if(le_supported) {
+ if(gatt_client_supported || gatt_server_supported) {
assert_eq(startup_flag, BT_ERROR_NONE);
ret = bt_gatt_get_float_value(gatt_handle, BT_DATA_TYPE_FLOAT, offset, value);
const char *value = NULL;
int value_length = 0;
- if(le_supported) {
+ if(gatt_client_supported || gatt_server_supported) {
assert_eq(startup_flag, BT_ERROR_NONE);
ret = bt_gatt_set_value(gatt_handle, value, value_length);
const char *value = NULL;
int value_length = 0;
- if(le_supported) {
+ if(gatt_client_supported || gatt_server_supported) {
assert_eq(startup_flag, BT_ERROR_NONE);
ret = bt_gatt_set_int_value(gatt_handle, 0x02, value, value_length);
int exponent = 0;
int offset = 0;
- if(le_supported) {
+ if(gatt_client_supported || gatt_server_supported) {
assert_eq(startup_flag, BT_ERROR_NONE);
ret = bt_gatt_set_float_value(gatt_handle,
bt_gatt_h gatt_handle = NULL;
char *uuid = NULL;
- if(le_supported) {
+ if(gatt_client_supported || gatt_server_supported) {
assert_eq(startup_flag, BT_ERROR_NONE);
ret = bt_gatt_get_uuid(gatt_handle, &uuid);
{
bt_gatt_h gatt_handle = NULL;
- if(le_supported) {
+ if(gatt_client_supported || gatt_server_supported) {
assert_eq(startup_flag, BT_ERROR_NONE);
ret = bt_gatt_get_type(gatt_handle, NULL);
bt_gatt_h gatt_handle = NULL;
bt_gatt_client_h *client = NULL;
- if(le_supported) {
+ if(gatt_client_supported) {
assert_eq(startup_flag, BT_ERROR_NONE);
ret = bt_gatt_service_get_client(gatt_handle, client);
const char *uuid = NULL;
bt_gatt_h *characteristic = NULL;
- if(le_supported) {
+ if(gatt_client_supported || gatt_server_supported) {
assert_eq(startup_flag, BT_ERROR_NONE);
ret = bt_gatt_service_get_characteristic(service, uuid, characteristic);
int test_id = 0;
bt_gatt_h service = NULL;
- if(le_supported) {
+ if(gatt_client_supported || gatt_server_supported) {
assert_eq(startup_flag, BT_ERROR_NONE);
ret = bt_gatt_service_foreach_characteristics(service,
const char *uuid = NULL;
bt_gatt_h *included_service = NULL;
- if(le_supported) {
+ if(gatt_client_supported || gatt_server_supported) {
assert_eq(startup_flag, BT_ERROR_NONE);
ret = bt_gatt_service_get_included_service(service, uuid, included_service);
bt_gatt_h service = NULL;
const char *uuid = NULL;
- if(le_supported) {
+ if(gatt_client_supported || gatt_server_supported) {
assert_eq(startup_flag, BT_ERROR_NONE);
ret = bt_gatt_service_foreach_included_services(service, __bt_gatt_client_foreach_chr_cb, NULL);
bt_gatt_h characteristic = NULL;
bt_gatt_h *service = NULL;
- if(le_supported) {
+ if(gatt_client_supported || gatt_server_supported) {
assert_eq(startup_flag, BT_ERROR_NONE);
ret = bt_gatt_characteristic_get_service(characteristic, service);
bt_gatt_h characteristic = NULL;
int *properties = NULL;
- if(le_supported) {
+ if(gatt_client_supported || gatt_server_supported) {
assert_eq(startup_flag, BT_ERROR_NONE);
ret = bt_gatt_characteristic_get_properties(characteristic, properties);
bt_gatt_h characteristic = NULL;
bt_gatt_write_type_e *write_type = NULL;
- if(le_supported) {
+ if(gatt_client_supported || gatt_server_supported) {
assert_eq(startup_flag, BT_ERROR_NONE);
ret = bt_gatt_characteristic_get_write_type(characteristic, write_type);
bt_gatt_write_type_e write_type = BT_GATT_WRITE_TYPE_WRITE_NO_RESPONSE;
- if(le_supported) {
+ if(gatt_client_supported || gatt_server_supported) {
assert_eq(startup_flag, BT_ERROR_NONE);
ret = bt_gatt_characteristic_set_write_type(characteristic, write_type);
const char *uuid = NULL;
bt_gatt_h *descriptor = NULL;
- if(le_supported) {
+ if(gatt_client_supported || gatt_server_supported) {
assert_eq(startup_flag, BT_ERROR_NONE);
ret = bt_gatt_characteristic_get_descriptor(characteristic, uuid, descriptor);
const char *uuid = NULL;
bt_gatt_h *descriptor = NULL;
- if(le_supported) {
+ if(gatt_client_supported || gatt_server_supported) {
assert_eq(startup_flag, BT_ERROR_NONE);
ret = bt_gatt_characteristic_foreach_descriptors(characteristic,
bt_gatt_h descriptor = NULL;
bt_gatt_h *characteristic = NULL;
- if(le_supported) {
+ if(gatt_client_supported || gatt_server_supported) {
assert_eq(startup_flag, BT_ERROR_NONE);
ret = bt_gatt_descriptor_get_characteristic(descriptor, characteristic);
const char *remote_address = "00:19:0E:01:61:17";
bt_gatt_client_h client = NULL;
- if(le_supported) {
+ if(gatt_client_supported) {
assert_eq(startup_flag, BT_ERROR_NONE);
ret = bt_deinitialize();
assert_eq(ret,BT_ERROR_NONE);
const char *remote_address = "00:19:0E:01:61:17";
bt_gatt_client_h client = NULL;
- if(le_supported) {
+ if(gatt_client_supported) {
assert_eq(startup_flag, BT_ERROR_NONE);
ret = bt_deinitialize();
assert_eq(ret,BT_ERROR_NONE);
bt_gatt_client_h client = NULL;
char *remote_address = "00:19:0E:01:61:17";
- if(le_supported) {
+ if(gatt_client_supported) {
assert_eq(startup_flag, BT_ERROR_NONE);
ret = bt_deinitialize();
assert_eq(ret,BT_ERROR_NONE);
{
bt_gatt_h gatt_handle = NULL;
- if(le_supported) {
+ if(gatt_client_supported) {
assert_eq(startup_flag, BT_ERROR_NONE);
ret = bt_gatt_client_read_value(gatt_handle,
bt_gatt_h client = NULL;
void *user_data = NULL;
- if(le_supported) {
+ if(gatt_client_supported) {
assert_eq(startup_flag, BT_ERROR_NONE);
ret = bt_gatt_client_write_value(client, __bt_gatt_client_request_completed_cb, NULL);
{
bt_gatt_h characteristic = NULL;
- if(le_supported) {
+ if(gatt_client_supported) {
assert_eq(startup_flag, BT_ERROR_NONE);
ret = bt_gatt_client_set_characteristic_value_changed_cb(characteristic,
{
bt_gatt_h characteristic = NULL;
- if(le_supported) {
+ if(gatt_client_supported) {
assert_eq(startup_flag, BT_ERROR_NONE);
ret = bt_gatt_client_unset_characteristic_value_changed_cb(characteristic);
const char *uuid = NULL;
bt_gatt_h *service = NULL;
- if(le_supported) {
+ if(gatt_client_supported) {
assert_eq(startup_flag, BT_ERROR_NONE);
ret = bt_gatt_client_get_service(client, uuid, service);
{
bt_gatt_client_h client = NULL;
- if(le_supported) {
+ if(gatt_client_supported) {
assert_eq(startup_flag, BT_ERROR_NONE);
ret = bt_gatt_client_foreach_services(client, __bt_gatt_foreach_cb, NULL);
*/
int utc_bluetooth_bt_gatt_service_destroy_n(void)
{
- if(le_supported) {
+ if(gatt_client_supported || gatt_server_supported) {
assert_eq(startup_flag, BT_ERROR_NONE);
ret = bt_gatt_service_destroy(NULL);
*/
int utc_bluetooth_bt_gatt_characteristic_destroy_n(void)
{
- if(le_supported) {
+ if(gatt_client_supported || gatt_server_supported) {
assert_eq(startup_flag, BT_ERROR_NONE);
ret = bt_gatt_characteristic_destroy(NULL);
*/
int utc_bluetooth_bt_gatt_descriptor_destroy_n(void)
{
- if(le_supported) {
+ if(gatt_client_supported || gatt_server_supported) {
assert_eq(startup_flag, BT_ERROR_NONE);
ret = bt_gatt_descriptor_destroy(NULL);
*/
int utc_bluetooth_bt_gatt_characteristic_get_permissions_n(void)
{
- if(le_supported) {
+ if(gatt_client_supported || gatt_server_supported) {
assert_eq(startup_flag, BT_ERROR_NONE);
ret = bt_gatt_characteristic_get_permissions(NULL, NULL);
*/
int utc_bluetooth_bt_gatt_descriptor_get_permissions_n(void)
{
- if(le_supported) {
+ if(gatt_client_supported || gatt_server_supported) {
assert_eq(startup_flag, BT_ERROR_NONE);
ret = bt_gatt_descriptor_get_permissions(NULL, NULL);
{
bt_gatt_service_type_e service_type = BT_GATT_SERVICE_TYPE_PRIMARY;
- if(le_supported) {
+ if(gatt_client_supported || gatt_server_supported) {
assert_eq(startup_flag, BT_ERROR_NONE);
ret = bt_gatt_service_create(NULL, service_type, NULL);
*/
int utc_bluetooth_bt_gatt_service_add_characteristic_n(void)
{
- if(le_supported) {
+ if(gatt_server_supported) {
assert_eq(startup_flag, BT_ERROR_NONE);
ret = bt_gatt_service_add_characteristic(NULL, NULL);
*/
int utc_bluetooth_bt_gatt_service_add_included_service_n(void)
{
- if(le_supported) {
+ if(gatt_server_supported) {
assert_eq(startup_flag, BT_ERROR_NONE);
ret = bt_gatt_service_add_included_service(NULL, NULL);
*/
int utc_bluetooth_bt_gatt_service_get_server_n(void)
{
- if(le_supported) {
+ if(gatt_server_supported) {
assert_eq(startup_flag, BT_ERROR_NONE);
ret = bt_gatt_service_get_server(NULL, NULL);
int properties = BT_GATT_PROPERTY_READ | BT_GATT_PROPERTY_NOTIFY;
char char_value[1] = {80};
- if(le_supported) {
+ if(gatt_client_supported || gatt_server_supported) {
assert_eq(startup_flag, BT_ERROR_NONE);
ret = bt_gatt_characteristic_create(NULL, permissions, properties, char_value, sizeof(char_value), NULL);
*/
int utc_bluetooth_bt_gatt_characteristic_add_descriptor_n(void)
{
- if(le_supported) {
+ if(gatt_server_supported) {
assert_eq(startup_flag, BT_ERROR_NONE);
ret = bt_gatt_characteristic_add_descriptor(NULL, NULL);
char desc_value[2] = {0, 0};
int permissions = BT_GATT_PERMISSION_READ | BT_GATT_PERMISSION_WRITE;
- if(le_supported) {
+ if(gatt_client_supported || gatt_server_supported) {
assert_eq(startup_flag, BT_ERROR_NONE);
ret = bt_gatt_descriptor_create(NULL, permissions, desc_value, sizeof(desc_value), NULL);
*/
int utc_bluetooth_bt_gatt_server_initialize_n(void)
{
- if(le_supported) {
+ if(gatt_server_supported) {
assert_eq(startup_flag, BT_ERROR_NONE);
ret = bt_deinitialize();
*/
int utc_bluetooth_bt_gatt_server_deinitialize_n(void)
{
- if(le_supported) {
+ if(gatt_server_supported) {
assert_eq(startup_flag, BT_ERROR_NONE);
ret = bt_deinitialize();
{
bt_gatt_server_h server = NULL;
- if(le_supported) {
+ if(gatt_server_supported) {
assert_eq(startup_flag, BT_ERROR_NONE);
ret = bt_deinitialize();
{
bt_gatt_server_h server = NULL;
- if(le_supported) {
+ if(gatt_server_supported) {
assert_eq(startup_flag, BT_ERROR_NONE);
ret = bt_deinitialize();
{
bt_gatt_h characteristic = NULL;
- if(le_supported) {
+ if(gatt_server_supported) {
assert_eq(startup_flag, BT_ERROR_NONE);
ret = bt_deinitialize();
{
bt_gatt_h characteristic = NULL;
- if(le_supported) {
+ if(gatt_server_supported) {
assert_eq(startup_flag, BT_ERROR_NONE);
ret = bt_deinitialize();
{
bt_gatt_h characteristic = NULL;
- if(le_supported) {
+ if(gatt_server_supported) {
assert_eq(startup_flag, BT_ERROR_NONE);
ret = bt_deinitialize();
*/
int utc_bluetooth_bt_gatt_server_notify_characteristic_changed_value_n(void)
{
- if(le_supported) {
+ if(gatt_server_supported) {
assert_eq(startup_flag, BT_ERROR_NONE);
ret = bt_deinitialize();
*/
int utc_bluetooth_bt_gatt_server_get_service_n(void)
{
- if(le_supported) {
+ if(gatt_server_supported) {
assert_eq(startup_flag, BT_ERROR_NONE);
ret = bt_deinitialize();
*/
int utc_bluetooth_bt_gatt_server_foreach_services_n(void)
{
- if(le_supported) {
+ if(gatt_server_supported) {
assert_eq(startup_flag, BT_ERROR_NONE);
ret = bt_deinitialize();
*/
int utc_bluetooth_bt_gatt_server_register_service_n(void)
{
- if(le_supported) {
+ if(gatt_server_supported) {
assert_eq(startup_flag, BT_ERROR_NONE);
ret = bt_deinitialize();
*/
int utc_bluetooth_bt_gatt_server_unregister_service_n(void)
{
- if(le_supported) {
+ if(gatt_server_supported) {
assert_eq(startup_flag, BT_ERROR_NONE);
ret = bt_deinitialize();
*/
int utc_bluetooth_bt_gatt_server_unregister_all_services_n(void)
{
- if(le_supported) {
+ if(gatt_server_supported) {
assert_eq(startup_flag, BT_ERROR_NONE);
ret = bt_deinitialize();
*/
int utc_bluetooth_bt_gatt_server_start_n(void)
{
- if(le_supported) {
+ if(gatt_server_supported) {
assert_eq(startup_flag, BT_ERROR_NONE);
ret = bt_deinitialize();
*/
int utc_bluetooth_bt_gatt_server_send_response_n(void)
{
- if(le_supported) {
+ if(gatt_server_supported) {
assert_eq(startup_flag, BT_ERROR_NONE);
ret = bt_deinitialize();
*/
int utc_bluetooth_bt_gatt_client_set_service_changed_cb_n(void)
{
- if (le_supported) {
+ if (gatt_client_supported) {
assert_eq(startup_flag, BT_ERROR_NONE);
ret = bt_deinitialize();
*/
int utc_bluetooth_bt_gatt_client_unset_service_changed_cb_n(void)
{
- if (le_supported) {
+ if (gatt_client_supported) {
assert_eq(startup_flag, BT_ERROR_NONE);
ret = bt_gatt_client_unset_service_changed_cb(NULL);
int utc_bluetooth_bt_gatt_client_request_att_mtu_change_n(void)
{
- if (le_supported) {
+ if (gatt_client_supported) {
assert_eq(startup_flag, BT_ERROR_NONE);
ret = bt_gatt_client_request_att_mtu_change(NULL, 0);
int utc_bluetooth_bt_gatt_client_get_att_mtu_n(void)
{
- if (le_supported) {
+ if (gatt_client_supported) {
assert_eq(startup_flag, BT_ERROR_NONE);
ret = bt_gatt_client_get_att_mtu(NULL, NULL);
int utc_bluetooth_bt_gatt_client_set_att_mtu_changed_cb_n(void)
{
- if (le_supported) {
+ if (gatt_client_supported) {
assert_eq(startup_flag, BT_ERROR_NONE);
ret = bt_gatt_client_set_att_mtu_changed_cb(NULL, NULL, NULL);
int utc_bluetooth_bt_gatt_client_unset_att_mtu_changed_cb_n(void)
{
- if (le_supported) {
+ if (gatt_client_supported) {
assert_eq(startup_flag, BT_ERROR_NONE);
ret = bt_gatt_client_unset_att_mtu_changed_cb(NULL);
static int startup_flag = BT_ERROR_NONE;
static int ret = BT_ERROR_NONE;
static bool le_supported = false;
+static bool gatt_client_supported = false;
+static bool gatt_server_supported = false;
static bool bt_supported = false;
static bool ipsp_supported = false;
le_supported = false;
system_info_get_platform_bool("http://tizen.org/feature/network.bluetooth.le", &le_supported);
+ gatt_client_supported = false;
+ system_info_get_platform_bool("tizen.org/feature/network.bluetooth.le.gatt.client", &gatt_client_supported);
+
+ gatt_server_supported = false;
+ system_info_get_platform_bool("tizen.org/feature/network.bluetooth.le.gatt.server", &gatt_server_supported);
+
ipsp_supported = false;
system_info_get_platform_bool("http://tizen.org/feature/network.bluetooth.le.ipsp", &ipsp_supported);
*/
int utc_bluetooth_bt_gatt_set_connection_state_changed_cb_p(void)
{
- if(le_supported) {
+ if(gatt_client_supported || gatt_server_supported) {
assert_eq(startup_flag, BT_ERROR_NONE);
ret = bt_gatt_set_connection_state_changed_cb(gatt_connection_state_changed_cb_p, NULL);
*/
int utc_bluetooth_bt_gatt_unset_connection_state_changed_cb_p(void)
{
- if(le_supported) {
+ if(gatt_client_supported || gatt_server_supported) {
assert_eq(startup_flag, BT_ERROR_NONE);
ret = bt_gatt_unset_connection_state_changed_cb();
char *service_uuid = "180f"; /* Battery Service */
bt_gatt_service_type_e service_type = BT_GATT_SERVICE_TYPE_PRIMARY;
- if (le_supported) {
+ if (gatt_client_supported || gatt_server_supported) {
assert_eq(startup_flag, BT_ERROR_NONE);
ret = bt_gatt_service_create(service_uuid, service_type, &service);
bt_gatt_property_e properties = BT_GATT_PROPERTY_READ | BT_GATT_PROPERTY_NOTIFY;
bt_gatt_permission_e permissions = BT_GATT_PERMISSION_READ;
- if (le_supported) {
+ if (gatt_client_supported || gatt_server_supported) {
assert_eq(startup_flag, BT_ERROR_NONE);
ret = bt_gatt_characteristic_create(char_uuid, permissions, properties, char_value, sizeof(char_value), &characteristic);
assert_eq(ret, BT_ERROR_NONE);
} else {
ret = bt_gatt_characteristic_destroy(characteristic);
- assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+ assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
}
return 0;
char desc_value[2] = {0, 0}; /* Notification & Indication */
bt_gatt_permission_e permissions = BT_GATT_PERMISSION_READ | BT_GATT_PERMISSION_WRITE;
- if (le_supported) {
+ if (gatt_client_supported || gatt_server_supported) {
assert_eq(startup_flag, BT_ERROR_NONE);
ret = bt_gatt_descriptor_create(desc_uuid, permissions, desc_value, sizeof(desc_value), &descriptor);
assert_eq(ret, BT_ERROR_NONE);
} else {
ret = bt_gatt_descriptor_destroy(descriptor);
- assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+ assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
}
return 0;
bt_gatt_property_e properties = BT_GATT_PROPERTY_READ | BT_GATT_PROPERTY_NOTIFY;
bt_gatt_permission_e permissions = BT_GATT_PERMISSION_READ;
- if (le_supported) {
+ if (gatt_client_supported || gatt_server_supported) {
assert_eq(startup_flag, BT_ERROR_NONE);
ret = bt_gatt_characteristic_create(char_uuid, permissions, properties, char_value, sizeof(char_value), &characteristic);
bt_gatt_characteristic_destroy(characteristic);
} else {
ret = bt_gatt_characteristic_get_permissions(characteristic, &permissions);
- assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+ assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
}
return 0;
char desc_value[2] = {0, 0}; /* Notification & Indication */
bt_gatt_permission_e permissions = BT_GATT_PERMISSION_READ | BT_GATT_PERMISSION_WRITE;
- if (le_supported) {
+ if (gatt_client_supported || gatt_server_supported) {
assert_eq(startup_flag, BT_ERROR_NONE);
ret = bt_gatt_descriptor_create(desc_uuid, permissions, desc_value, sizeof(desc_value), &descriptor);
bt_gatt_descriptor_destroy(descriptor);
} else {
ret = bt_gatt_descriptor_get_permissions(descriptor, &permissions);
- assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+ assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
}
return 0;
char *service_uuid = "180f"; /* Battery Service */
bt_gatt_service_type_e service_type = BT_GATT_SERVICE_TYPE_PRIMARY;
- if (le_supported) {
+ if (gatt_client_supported || gatt_server_supported) {
assert_eq(startup_flag, BT_ERROR_NONE);
ret = bt_gatt_service_create(service_uuid, service_type, &service);
bt_gatt_property_e properties = BT_GATT_PROPERTY_READ | BT_GATT_PROPERTY_NOTIFY;
bt_gatt_permission_e permissions = BT_GATT_PERMISSION_READ;
- if (le_supported) {
+ if (gatt_server_supported) {
assert_eq(startup_flag, BT_ERROR_NONE);
ret = bt_gatt_service_create(service_uuid, service_type, &service);
char *included_service_uuid = "180d"; /* Heart Rate Service */
bt_gatt_service_type_e included_service_type = BT_GATT_SERVICE_TYPE_SECONDARY;
- if (le_supported) {
+ if (gatt_server_supported) {
assert_eq(startup_flag, BT_ERROR_NONE);
ret = bt_gatt_service_create(service_uuid, service_type, &service);
char *service_uuid = "180f"; /* Battery Service */
bt_gatt_service_type_e service_type = BT_GATT_SERVICE_TYPE_PRIMARY;
- if (le_supported) {
+ if (gatt_server_supported) {
assert_eq(startup_flag, BT_ERROR_NONE);
ret = bt_gatt_server_initialize();
bt_gatt_property_e properties = BT_GATT_PROPERTY_READ | BT_GATT_PROPERTY_NOTIFY;
bt_gatt_permission_e permissions = BT_GATT_PERMISSION_READ;
- if (le_supported) {
+ if (gatt_client_supported || gatt_server_supported) {
assert_eq(startup_flag, BT_ERROR_NONE);
ret = bt_gatt_characteristic_create(char_uuid, permissions, properties, char_value, sizeof(char_value), &characteristic);
bt_gatt_property_e properties = BT_GATT_PROPERTY_READ | BT_GATT_PROPERTY_NOTIFY;
bt_gatt_permission_e permissions = BT_GATT_PERMISSION_READ;
- if (le_supported) {
+ if (gatt_server_supported) {
assert_eq(startup_flag, BT_ERROR_NONE);
ret = bt_gatt_characteristic_create(char_uuid, permissions, properties, char_value, sizeof(char_value), &characteristic);
char desc_value[2] = {0, 0}; /* Notification & Indication */
bt_gatt_permission_e permissions = BT_GATT_PERMISSION_READ | BT_GATT_PERMISSION_WRITE;
- if (le_supported) {
+ if (gatt_client_supported || gatt_server_supported) {
assert_eq(startup_flag, BT_ERROR_NONE);
ret = bt_gatt_descriptor_create(desc_uuid, permissions, desc_value, sizeof(desc_value), &descriptor);
*/
int utc_bluetooth_bt_gatt_server_initialize_p(void)
{
- if (le_supported) {
+ if (gatt_server_supported) {
assert_eq(startup_flag, BT_ERROR_NONE);
ret = bt_gatt_server_deinitialize();
*/
int utc_bluetooth_bt_gatt_server_deinitialize_p(void)
{
- if (le_supported) {
+ if (gatt_server_supported) {
assert_eq(startup_flag, BT_ERROR_NONE);
ret = bt_gatt_server_deinitialize();
{
bt_gatt_server_h server = NULL;
- if (le_supported) {
+ if (gatt_server_supported) {
assert_eq(startup_flag, BT_ERROR_NONE);
ret = bt_gatt_server_create(&server);
{
bt_gatt_server_h server = NULL;
- if (le_supported) {
+ if (gatt_server_supported) {
assert_eq(startup_flag, BT_ERROR_NONE);
ret = bt_gatt_server_create(&server);
bt_gatt_property_e properties = BT_GATT_PROPERTY_READ | BT_GATT_PROPERTY_NOTIFY;
bt_gatt_permission_e permissions = BT_GATT_PERMISSION_READ;
- if (le_supported) {
+ if (gatt_server_supported) {
assert_eq(startup_flag, BT_ERROR_NONE);
ret = bt_gatt_server_initialize();
bt_gatt_property_e properties = BT_GATT_PROPERTY_READ | BT_GATT_PROPERTY_NOTIFY;
bt_gatt_permission_e permissions = BT_GATT_PERMISSION_READ;
- if (le_supported) {
+ if (gatt_server_supported) {
assert_eq(startup_flag, BT_ERROR_NONE);
ret = bt_gatt_server_initialize();
bt_gatt_property_e properties = BT_GATT_PROPERTY_READ | BT_GATT_PROPERTY_NOTIFY;
bt_gatt_permission_e permissions = BT_GATT_PERMISSION_READ;
- if (le_supported) {
+ if (gatt_server_supported) {
assert_eq(startup_flag, BT_ERROR_NONE);
ret = bt_gatt_server_initialize();
char *service_uuid = "180f"; /* Battery Service */
bt_gatt_service_type_e service_type = BT_GATT_SERVICE_TYPE_PRIMARY;
- if (le_supported) {
+ if (gatt_server_supported) {
assert_eq(startup_flag, BT_ERROR_NONE);
ret = bt_gatt_server_initialize();
char *service_uuid = "180f"; /* Battery Service */
bt_gatt_service_type_e service_type = BT_GATT_SERVICE_TYPE_PRIMARY;
- if (le_supported) {
+ if (gatt_server_supported) {
assert_eq(startup_flag, BT_ERROR_NONE);
ret = bt_gatt_server_initialize();
char *service_uuid = "180f"; /* Battery Service */
bt_gatt_service_type_e service_type = BT_GATT_SERVICE_TYPE_PRIMARY;
- if (le_supported) {
+ if (gatt_server_supported) {
assert_eq(startup_flag, BT_ERROR_NONE);
ret = bt_gatt_server_initialize();
char *service_uuid = "180f"; /* Battery Service */
bt_gatt_service_type_e service_type = BT_GATT_SERVICE_TYPE_PRIMARY;
- if (le_supported) {
+ if (gatt_server_supported) {
assert_eq(startup_flag, BT_ERROR_NONE);
ret = bt_gatt_server_initialize();
char *service_uuid = "180f"; /* Battery Service */
bt_gatt_service_type_e service_type = BT_GATT_SERVICE_TYPE_PRIMARY;
- if (le_supported) {
+ if (gatt_server_supported) {
assert_eq(startup_flag, BT_ERROR_NONE);
ret = bt_gatt_server_initialize();
char *service_uuid = "180f"; /* Battery Service */
bt_gatt_service_type_e service_type = BT_GATT_SERVICE_TYPE_PRIMARY;
- if (le_supported) {
+ if (gatt_server_supported) {
assert_eq(startup_flag, BT_ERROR_NONE);
ret = bt_gatt_server_initialize();
bt_gatt_client_h client = NULL;
static const char *remote_addr = "E4:32:CB:41:1F:A6";
- if (le_supported) {
+ if (gatt_client_supported) {
assert_eq(startup_flag, BT_ERROR_NONE);
ret = bt_gatt_client_create(remote_addr, &client);
bt_gatt_client_h client = NULL;
static const char *remote_addr = "E4:32:CB:41:1F:A6";
- if (le_supported) {
+ if (gatt_client_supported) {
assert_eq(startup_flag, BT_ERROR_NONE);
ret = bt_gatt_client_create(remote_addr, &client);