Tizen Native API
Functions | Typedefs
Bluetooth GATT
Bluetooth

Functions

int bt_gatt_foreach_primary_services (const char *remote_address, bt_gatt_primary_service_cb callback, void *user_data)
 Gets the primary services of GATT(Generic Attribute Profile).
int bt_gatt_discover_characteristics (bt_gatt_attribute_h service, bt_gatt_characteristics_discovered_cb callback, void *user_data)
 Discovers the characteristics in service, asynchronously.
int bt_gatt_get_service_uuid (bt_gatt_attribute_h service, char **uuid)
 Gets the UUID of service.
int bt_gatt_foreach_included_services (bt_gatt_attribute_h service, bt_gatt_included_service_cb callback, void *user_data)
 Gets the included services in service.
int bt_gatt_set_characteristic_changed_cb (bt_gatt_characteristic_changed_cb callback, void *user_data)
 Registers a callback function that will be invoked when a characteristic value is changed.
int bt_gatt_unset_characteristic_changed_cb (void)
 Unregisters a callback function that will be invoked when a characteristic is changed.
int bt_gatt_watch_characteristic_changes (bt_gatt_attribute_h service)
 Watches all the characteristic value changes of the service.
int bt_gatt_unwatch_characteristic_changes (bt_gatt_attribute_h service)
 Remove watching of all the characteristic value changes of the service.
int bt_gatt_get_characteristic_declaration (bt_gatt_attribute_h characteristic, char **uuid, unsigned char **value, int *value_length)
 Gets the characteristic declaration.
int bt_gatt_set_characteristic_value (bt_gatt_attribute_h characteristic, const unsigned char *value, int value_length)
 Sets the value of characteristic.
int bt_gatt_set_characteristic_value_request (bt_gatt_attribute_h characteristic, const unsigned char *value, int value_length, bt_gatt_characteristic_write_cb callback)
 Sets the value of characteristic request.
int bt_gatt_clone_attribute_handle (bt_gatt_attribute_h *clone, bt_gatt_attribute_h origin)
 Clones the attribute handle.
int bt_gatt_destroy_attribute_handle (bt_gatt_attribute_h handle)
 Destroys the attribute handle.
int bt_gatt_read_characteristic_value (bt_gatt_attribute_h char_handle, bt_gatt_characteristic_read_cb callback)
 Reads the value of characteristic from remote device.
int bt_gatt_discover_characteristic_descriptor (bt_gatt_attribute_h characteristic_handle, bt_gatt_characteristic_descriptor_discovered_cb callback, void *user_data)
 Discovers the characteristic descriptors of a characteristic within its definition, asynchronously.
int bt_gatt_connect (const char *address, bool auto_connect)
 Connect to a specific LE based service on a remote bluetooth dievice address, asynchronously.
int bt_gatt_disconnect (const char *address)
 Disconnect to LE connection with the given remote Bluetooth dievice address, asynchronously.
int bt_gatt_set_connection_state_changed_cb (bt_gatt_connection_state_changed_cb callback, void *user_data)
 Registers a callback function that will be invoked when the connection state is changed.
int bt_gatt_unset_connection_state_changed_cb (void)
 Unregisters a callback function that will be invoked when the connection state is changed.

Typedefs

typedef void * bt_gatt_attribute_h
 The attribute handle of GATT(Generic Attribute Profile)
typedef bool(* bt_gatt_primary_service_cb )(bt_gatt_attribute_h service, void *user_data)
 Called when you get the primary services repeatedly.
typedef bool(* bt_gatt_characteristics_discovered_cb )(int result, int index, int total, bt_gatt_attribute_h characteristic, void *user_data)
 Called after the characteristics are discovered by bt_gatt_discover_characteristics().
typedef bool(* bt_gatt_included_service_cb )(bt_gatt_attribute_h service, void *user_data)
 Called when you get the included services repeatedly.
typedef void(* bt_gatt_characteristic_changed_cb )(bt_gatt_attribute_h characteristic, unsigned char *value, int value_length, void *user_data)
 Called when a characteristic in service is changed.
typedef void(* bt_gatt_characteristic_write_cb )(void *user_data)
 Called when a characteristic value is written.
typedef void(* bt_gatt_characteristic_read_cb )(unsigned char *value, int value_length, void *user_data)
 Called when a characteristic value is read.
typedef void(* bt_gatt_characteristic_descriptor_discovered_cb )(int result, unsigned char characteristic_format, int total, bt_gatt_attribute_h characteristic_descriptor, void *user_data)
 Called after the characteristics descriptors are discovered by bt_gatt_discover_characteristic_descriptor().
typedef void(* bt_gatt_connection_state_changed_cb )(int result, bool connected, const char *remote_address, void *user_data)
 Called when the connection state is changed.

Bluetooth GATT(Generic Attribute Profile) API provides functions for discovering, reading and modifying attributes.

Required Header

#include <bluetooth.h>

Overview

Two roles are defined for devices that implement GATT. The Server is the device that accepts incoming commands and requests from the client and sends responses, indications and notifications to a client. The Client is the device that initiates commands and requests towards the server and can receive responses, indications and notifications sent by the server. This API supports the Client role in GATT.

Related Features

This API is related with the following features:

It is recommended to design feature related codes in your application for reliability.

You can check if a device supports the related features for this API by using System Information, thereby controlling the procedure of your application.

To ensure your application is only running on the device with specific features, please define the features in your manifest file using the manifest editor in the SDK.

More details on featuring your application can be found from Feature Element.


Typedef Documentation

typedef void* bt_gatt_attribute_h

The attribute handle of GATT(Generic Attribute Profile)

Since :
2.3
typedef void(* bt_gatt_characteristic_changed_cb)(bt_gatt_attribute_h characteristic, unsigned char *value, int value_length, void *user_data)

Called when a characteristic in service is changed.

Since :
2.3
Parameters:
[in]characteristicThe attribute handle of characteristic
[in]valueThe value of characteristic (byte array)
[in]value_lengthThe length of value
[in]user_dataThe user data passed from the callback registration function
See also:
bt_gatt_set_characteristic_changed_cb()
bt_gatt_unset_characteristic_changed_cb()
typedef void(* bt_gatt_characteristic_descriptor_discovered_cb)(int result, unsigned char characteristic_format, int total, bt_gatt_attribute_h characteristic_descriptor, void *user_data)

Called after the characteristics descriptors are discovered by bt_gatt_discover_characteristic_descriptor().

Since :
2.3
Parameters:
[in]resultThe result of discovering
[in]characteristic_formatThe format of the information data. characteristic_format = 0x01 indicates UUIDs are 16-bits characteristic_format = 0x02 indicates UUIDs are 128-bits
[in]totalThe total number of elements in characteristic_descriptor
[in]characteristicdescriptor The attribute handle and the UUID of characteristic descriptor
[in]user_dataThe user data passed from the request function
See also:
bt_gatt_discover_characteristic_descriptor()
typedef void(* bt_gatt_characteristic_read_cb)(unsigned char *value, int value_length, void *user_data)

Called when a characteristic value is read.

Since :
2.3
Parameters:
[in]valueThe value of characteristic (byte array)
[in]value_lengthThe length of value
[in]user_dataThe user data passed from the foreach function
See also:
bt_gatt_read_characteristic_value()
typedef void(* bt_gatt_characteristic_write_cb)(void *user_data)

Called when a characteristic value is written.

Since :
2.3
See also:
bt_gatt_set_characteristic_value()
typedef bool(* bt_gatt_characteristics_discovered_cb)(int result, int index, int total, bt_gatt_attribute_h characteristic, void *user_data)

Called after the characteristics are discovered by bt_gatt_discover_characteristics().

Since :
2.3
Remarks:
If bt_gatt_discover_characteristics() failed, then this callback function is called only once with 0 totla and NULL characteristic_handle.
Parameters:
[in]resultThe result of discovering
[in]indexThe index of characteristics in a service, starts from 0
[in]totalThe total number of characteristics in a service
[in]characteristicThe attribute handle of characteristic
[in]user_dataThe user data passed from the request function
Returns:
true to continue with the next iteration of the loop,
false to break out of the loop.
Precondition:
bt_gatt_discover_characteristics() will invoke this callback.
See also:
bt_gatt_discover_characteristics()
typedef void(* bt_gatt_connection_state_changed_cb)(int result, bool connected, const char *remote_address, void *user_data)

Called when the connection state is changed.

Since :
2.3

This callback is called when the connection state is changed. When you called bt_gatt_connect() or bt_gatt_disconnect(), this callback is also called with error result even though these functions fail.

Parameters:
[in]resultThe result of changing the connection state.
[in]connectedThe state to be changed, true means connected state, Otherwise, false.
[in]remote_addressThe remote_address
[in]user_dataThe user data passed from the callback registration function.
See also:
bt_gatt_connect()
bt_gatt_disconnect()
bt_gatt_set_connection_state_changed_cb()
bt_gatt_unset_connection_state_changed_cb()
typedef bool(* bt_gatt_included_service_cb)(bt_gatt_attribute_h service, void *user_data)

Called when you get the included services repeatedly.

Since :
2.3
Parameters:
[in]serviceThe attribute handle of service
[in]user_dataThe user data passed from the foreach function
Returns:
true to continue with the next iteration of the loop,
false to break out of the loop.
Precondition:
bt_gatt_foreach_included_services() will invoke this function.
See also:
bt_gatt_foreach_included_services()
typedef bool(* bt_gatt_primary_service_cb)(bt_gatt_attribute_h service, void *user_data)

Called when you get the primary services repeatedly.

Since :
2.3
Parameters:
[in]serviceThe attribute handle of service
[in]user_dataThe user data passed from the foreach function
Returns:
true to continue with the next iteration of the loop,
false to break out of the loop.
Precondition:
bt_gatt_foreach_primary_services() will invoke this function.
See also:
bt_gatt_foreach_primary_services()

Function Documentation

Clones the attribute handle.

Since :
2.3
Remarks:
clone must be released with bt_gatt_destroy_attribute_handle().
Parameters:
[out]cloneThe cloned attribute handle
[in]originThe origin attribute handle
Returns:
0 on success, otherwise negative error value.
Return values:
BT_ERROR_NONESuccessful
BT_ERROR_INVALID_PARAMETERInvalid parameter
BT_ERROR_OUT_OF_MEMORYOut of memory
BT_ERROR_NOT_SUPPORTEDNot supported
See also:
bt_gatt_destroy_attribute_handle()
int bt_gatt_connect ( const char *  address,
bool  auto_connect 
)

Connect to a specific LE based service on a remote bluetooth dievice address, asynchronously.

Since :
2.3
Privilege Level:
public
Privilege:
http://tizen.org/privilege/bluetooth
Remarks:
A connection can be disconnected by bt_gatt_disconnect().
Parameters:
[in]addressThe address of the remote Bluetooth device.
[in]auto_connectThe flag of the auto connection.
Returns:
0 on success, otherwise a negative error value.
Return values:
BT_ERROR_NONESuccessful
BT_ERROR_NOT_INITIALIZEDNot initialized
BT_ERROR_NOT_ENABLEDNot enabled
BT_ERROR_INVALID_PARAMETERInvalid paramater
BT_ERROR_OPERATION_FAILEDOperation failed
BT_ERROR_PERMISSION_DENIEDPermission denied
BT_ERROR_NOT_SUPPORTEDNot supported
Precondition:
The Bluetooth service must be initialized with bt_initialize().
The remote device must support le connection.
Postcondition:
This function invokes bt_gatt_connection_state_changed_cb().
See also:
bt_initialize()
bt_gatt_disconnect()
bt_gatt_set_connection_state_changed_cb()
bt_gatt_unset_connection_state_changed_cb()
bt_gatt_connection_state_changed_cb()

Destroys the attribute handle.

Since :
2.3
Parameters:
[in]handleThe attribute handle
Returns:
0 on success, otherwise negative error value.
Return values:
BT_ERROR_NONESuccessful
BT_ERROR_INVALID_PARAMETERInvalid parameter
BT_ERROR_NOT_SUPPORTEDNot supported
See also:
bt_gatt_clone_attribute_handle()
int bt_gatt_disconnect ( const char *  address)

Disconnect to LE connection with the given remote Bluetooth dievice address, asynchronously.

Since :
2.3
Privilege Level:
public
Privilege:
http://tizen.org/privilege/bluetooth
Parameters:
[in]addressThe address of the remote Bluetooth device
Returns:
0 on success, otherwise a negative error value.
Return values:
BT_ERROR_NONESuccessful
BT_ERROR_NOT_INITIALIZEDNot initialized
BT_ERROR_NOT_ENABLEDNot enabled
BT_ERROR_INVALID_PARAMETERInvalid paramater
BT_ERROR_OPERATION_FAILEDOperation failed
BT_ERROR_PERMISSION_DENIEDPermission denied
BT_ERROR_NOT_SUPPORTEDNot supported
Precondition:
The connection must be established.
Postcondition:
This function invokes bt_gatt_connection_state_changed_cb().
See also:
bt_initialize()
bt_gatt_connect()
bt_gatt_set_connection_state_changed_cb()
bt_gatt_unset_connection_state_changed_cb()
bt_gatt_connection_state_changed_cb()

Discovers the characteristic descriptors of a characteristic within its definition, asynchronously.

Since :
2.3
Privilege Level:
public
Privilege:
http://tizen.org/privilege/bluetooth
Parameters:
[in]characteristic_handleThe attribute handle of characteristic
[in]callbackThe result callback
[in]user_dataThe user data to be passed to the callback function
Returns:
0 on success, otherwise a negative error value.
Return values:
BT_ERROR_NONESuccessful
BT_ERROR_NOT_INITIALIZEDNot initialized
BT_ERROR_INVALID_PARAMETERInvalid parameter
BT_ERROR_OPERATION_FAILEDOperation failed
BT_ERROR_PERMISSION_DENIEDPermission denied
BT_ERROR_NOT_SUPPORTEDNot supported
Precondition:
The state of local Bluetooth must be BT_ADAPTER_ENABLED.
Postcondition:
callback will be called.
See also:
bt_gatt_characteristic_descriptor_discovered_cb()

Discovers the characteristics in service, asynchronously.

Since :
2.3
Privilege Level:
public
Privilege:
http://tizen.org/privilege/bluetooth
Parameters:
[in]serviceThe attribute handle of service
[in]callbackThe result callback
[in]user_dataThe user data to be passed to the callback function
Returns:
0 on success, otherwise a negative error value.
Return values:
BT_ERROR_NONESuccessful
BT_ERROR_NOT_INITIALIZEDNot initialized
BT_ERROR_INVALID_PARAMETERInvalid parameter
BT_ERROR_OPERATION_FAILEDOperation failed
BT_ERROR_PERMISSION_DENIEDPermission denied
BT_ERROR_NOT_SUPPORTEDNot supported
Precondition:
The state of local Bluetooth must be BT_ADAPTER_ENABLED.
Postcondition:
callback will be called.
See also:
bt_gatt_characteristics_discovered_cb()
int bt_gatt_foreach_included_services ( bt_gatt_attribute_h  service,
bt_gatt_included_service_cb  callback,
void *  user_data 
)

Gets the included services in service.

Since :
2.3
Privilege Level:
public
Privilege:
http://tizen.org/privilege/bluetooth
Parameters:
[in]serviceThe attribute handle of service
[in]callbackThe callback function to invoke
[in]user_dataThe user data to be passed to the callback function
Returns:
0 on success, otherwise a negative error value.
Return values:
BT_ERROR_NONESuccessful
BT_ERROR_INVALID_PARAMETERInvalid parameter
BT_ERROR_NOT_INITIALIZEDNot initialized
BT_ERROR_NOT_ENABLEDNot enabled
BT_ERROR_OPERATION_FAILEDOperation failed
BT_ERROR_PERMISSION_DENIEDPermission denied
BT_ERROR_NOT_SUPPORTEDNot supported
Precondition:
The state of local Bluetooth must be BT_ADAPTER_ENABLED.
Postcondition:
callback will be called if there are included services.
See also:
bt_gatt_included_service_cb()
int bt_gatt_foreach_primary_services ( const char *  remote_address,
bt_gatt_primary_service_cb  callback,
void *  user_data 
)

Gets the primary services of GATT(Generic Attribute Profile).

Since :
2.3
Privilege Level:
public
Privilege:
http://tizen.org/privilege/bluetooth
Parameters:
[in]remote_addressThe address of the remote device
[in]callbackThe callback function to invoke
[in]user_dataThe user data to be passed to the callback function
Returns:
0 on success, otherwise a negative error value.
Return values:
BT_ERROR_NONESuccessful
BT_ERROR_INVALID_PARAMETERInvalid parameter
BT_ERROR_NOT_INITIALIZEDNot initialized
BT_ERROR_NOT_ENABLEDNot enabled
BT_ERROR_OPERATION_FAILEDOperation failed
BT_ERROR_PERMISSION_DENIEDPermission denied
BT_ERROR_NOT_SUPPORTEDNot supported
Precondition:
The state of local Bluetooth must be BT_ADAPTER_ENABLED.
Postcondition:
callback will be called if there are primary services.
See also:
bt_gatt_primary_service_cb()
int bt_gatt_get_characteristic_declaration ( bt_gatt_attribute_h  characteristic,
char **  uuid,
unsigned char **  value,
int *  value_length 
)

Gets the characteristic declaration.

Since :
2.3
Privilege Level:
public
Privilege:
http://tizen.org/privilege/bluetooth
Remarks:
uuid and value must be released with free() by you.
Parameters:
[in]characteristicThe attribute handle of characteristic
[out]uuidThe UUID of service
[out]valueThe value of characteristic (byte array)
[out]value_lengthThe length of value
Returns:
0 on success, otherwise a negative error value.
Return values:
BT_ERROR_NONESuccessful
BT_ERROR_NOT_INITIALIZEDNot initialized
BT_ERROR_INVALID_PARAMETERInvalid parameter
BT_ERROR_OPERATION_FAILEDOperation failed
BT_ERROR_OUT_OF_MEMORYOut of memory
BT_ERROR_PERMISSION_DENIEDPermission denied
BT_ERROR_NOT_SUPPORTEDNot supported
Precondition:
The state of local Bluetooth must be BT_ADAPTER_ENABLED.
See also:
bt_gatt_set_characteristic_value()
int bt_gatt_get_service_uuid ( bt_gatt_attribute_h  service,
char **  uuid 
)

Gets the UUID of service.

Since :
2.3
Privilege Level:
public
Privilege:
http://tizen.org/privilege/bluetooth
Remarks:
uuid must be released with free() by you.
Parameters:
[in]serviceThe attribute handle of service
[out]uuidThe UUID of service
Returns:
0 on success, otherwise a negative error value.
Return values:
BT_ERROR_NONESuccessful
BT_ERROR_NOT_INITIALIZEDNot initialized
BT_ERROR_INVALID_PARAMETERInvalid parameter
BT_ERROR_OPERATION_FAILEDOperation failed
BT_ERROR_OUT_OF_MEMORYOut of memory
BT_ERROR_PERMISSION_DENIEDPermission denied
BT_ERROR_NOT_SUPPORTEDNot supported
Precondition:
The state of local Bluetooth must be BT_ADAPTER_ENABLED.

Reads the value of characteristic from remote device.

Since :
2.3
Privilege Level:
public
Privilege:
http://tizen.org/privilege/bluetooth
Parameters:
[in]char_handleThe attribute handle of characteristic
[in]callbackThe result callback
Returns:
0 on success, otherwise a negative error value.
Return values:
BT_ERROR_NONESuccessful
BT_ERROR_NOT_INITIALIZEDNot initialized
BT_ERROR_INVALID_PARAMETERInvalid parameter
BT_ERROR_OPERATION_FAILEDOperation failed
BT_ERROR_PERMISSION_DENIEDPermission denied
BT_ERROR_NOT_SUPPORTEDNot supported
Precondition:
The state of local Bluetooth must be BT_ADAPTER_ENABLED.
See also:
bt_gatt_get_characteristic_declaration()

Registers a callback function that will be invoked when a characteristic value is changed.

Since :
2.3
Parameters:
[in]callbackThe callback function to register
[in]user_dataThe user data to be passed to the callback function
Returns:
0 on success, otherwise a negative error value.
Return values:
BT_ERROR_NONESuccessful
BT_ERROR_NOT_INITIALIZEDNot initialized
BT_ERROR_INVALID_PARAMETERInvalid parameter
BT_ERROR_NOT_SUPPORTEDNot supported
Precondition:
The Bluetooth service must be initialized with bt_initialize().
See also:
bt_gatt_unset_characteristic_changed_cb()
int bt_gatt_set_characteristic_value ( bt_gatt_attribute_h  characteristic,
const unsigned char *  value,
int  value_length 
)

Sets the value of characteristic.

Since :
2.3
Privilege Level:
public
Privilege:
http://tizen.org/privilege/bluetooth
Parameters:
[in]characteristicThe attribute handle of characteristic
[in]valueThe value of characteristic (byte array)
[in]value_lengthThe length of value
Returns:
0 on success, otherwise a negative error value.
Return values:
BT_ERROR_NONESuccessful
BT_ERROR_NOT_INITIALIZEDNot initialized
BT_ERROR_INVALID_PARAMETERInvalid parameter
BT_ERROR_OPERATION_FAILEDOperation failed
BT_ERROR_PERMISSION_DENIEDPermission denied
BT_ERROR_NOT_SUPPORTEDNot supported
Precondition:
The state of local Bluetooth must be BT_ADAPTER_ENABLED.
See also:
bt_gatt_get_characteristic_declaration()
int bt_gatt_set_characteristic_value_request ( bt_gatt_attribute_h  characteristic,
const unsigned char *  value,
int  value_length,
bt_gatt_characteristic_write_cb  callback 
)

Sets the value of characteristic request.

Since :
2.3
Privilege Level:
public
Privilege:
http://tizen.org/privilege/bluetooth
Parameters:
[in]characteristicThe attribute handle of characteristic
[in]valueThe value of characteristic (byte array)
[in]value_lengthThe length of value
[in]callbackThe result callback
Returns:
0 on success, otherwise a negative error value.
Return values:
BT_ERROR_NONESuccessful
BT_ERROR_NOT_INITIALIZEDNot initialized
BT_ERROR_INVALID_PARAMETERInvalid parameter
BT_ERROR_OPERATION_FAILEDOperation failed
BT_ERROR_PERMISSION_DENIEDPermission denied
BT_ERROR_NOT_SUPPORTEDNot supported
Precondition:
The state of local Bluetooth must be BT_ADAPTER_ENABLED.
See also:
bt_gatt_get_characteristic_declaration()

Registers a callback function that will be invoked when the connection state is changed.

Since :
2.3
Parameters:
[in]callbackThe callback function to register.
[in]user_dataThe user data to be passed to the callback function.
Return values:
BT_ERROR_NONESuccessful
BT_ERROR_NOT_INITIALIZEDNot initialized
BT_ERROR_INVALID_PARAMETERInvalid paramater
BT_ERROR_NOT_SUPPORTEDNot supported
See also:
bt_gatt_connect()
bt_gatt_disconnect()
bt_gatt_unset_connection_state_changed_cb()

Unregisters a callback function that will be invoked when a characteristic is changed.

Since :
2.3
Returns:
0 on success, otherwise a negative error value.
Return values:
BT_ERROR_NONESuccessful
BT_ERROR_NOT_INITIALIZEDNot initialized
BT_ERROR_NOT_SUPPORTEDNot supported
Precondition:
The Bluetooth service must be initialized with bt_initialize().
See also:
bt_gatt_set_characteristic_changed_cb()

Unregisters a callback function that will be invoked when the connection state is changed.

Since :
2.3
Return values:
BT_ERROR_NONESuccessful
BT_ERROR_NOT_INITIALIZEDNot initialized
BT_ERROR_NOT_SUPPORTEDNot supported
See also:
bt_gatt_connect()
bt_gatt_disconnect()
bt_gatt_connection_state_changed_cb()

Remove watching of all the characteristic value changes of the service.

Since :
2.3
Privilege Level:
public
Privilege:
http://tizen.org/privilege/bluetooth
Parameters:
[in]serviceThe attribute handle of service
Returns:
0 on success, otherwise a negative error value.
Return values:
BT_ERROR_NONESuccessful
BT_ERROR_NOT_INITIALIZEDNot initialized
BT_ERROR_INVALID_PARAMETERInvalid parameter
BT_ERROR_PERMISSION_DENIEDPermission denied
BT_ERROR_NOT_SUPPORTEDNot supported
Precondition:
The Bluetooth service must be initialized with bt_initialize().
See also:
bt_gatt_set_characteristic_changed_cb()

Watches all the characteristic value changes of the service.

Since :
2.3
Privilege Level:
public
Privilege:
http://tizen.org/privilege/bluetooth
Parameters:
[in]serviceThe attribute handle of service
Returns:
0 on success, otherwise a negative error value.
Return values:
BT_ERROR_NONESuccessful
BT_ERROR_NOT_INITIALIZEDNot initialized
BT_ERROR_INVALID_PARAMETERInvalid parameter
BT_ERROR_PERMISSION_DENIEDPermission denied
BT_ERROR_NOT_SUPPORTEDNot supported
Precondition:
The Bluetooth service must be initialized with bt_initialize().
See also:
bt_gatt_unset_characteristic_changed_cb()

Except as noted, this content - excluding the Code Examples - is licensed under Creative Commons Attribution 3.0 and all of the Code Examples contained herein are licensed under BSD-3-Clause.
For details, see the Content License