Tizen Native API  6.0
Bluetooth LE Adapter

Bluetooth LE API provides functions for managing bonds with other devices for LE and searching for supported LE services.

Required Header

#include <bluetooth.h>

Overview

Bluetooth stack architecture has been changed. Thus, GATT APIs defined in Tizen 2.3 are deprecated and new GATT client APIs are defined.

Related Features

This API is related with the following features:

  • http://tizen.org/feature/network.bluetooth
  • http://tizen.org/feature/network.bluetooth.le

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.

Functions

int bt_adapter_le_is_discovering (bool *is_discovering)
 Checks for the LE device discovery is in progress or not.
int bt_adapter_le_start_scan (bt_adapter_le_scan_result_cb cb, void *user_data)
 Starts the LE scan to find LE advertisement.
int bt_adapter_le_stop_scan (void)
 Stops the LE scan.
int bt_adapter_le_get_scan_result_service_uuids (const bt_adapter_le_device_scan_result_info_s *info, bt_adapter_le_packet_type_e pkt_type, char ***uuids, int *count)
 Gets the service UUID list from the scan result information.
int bt_adapter_le_get_scan_result_device_name (const bt_adapter_le_device_scan_result_info_s *info, bt_adapter_le_packet_type_e pkt_type, char **name)
 Gets the device name from the scan result information.
int bt_adapter_le_get_scan_result_tx_power_level (const bt_adapter_le_device_scan_result_info_s *info, bt_adapter_le_packet_type_e pkt_type, int *power_level)
 Gets the transmission power level from the scan result information.
int bt_adapter_le_get_scan_result_service_solicitation_uuids (const bt_adapter_le_device_scan_result_info_s *info, bt_adapter_le_packet_type_e pkt_type, char ***uuids, int *count)
 Gets the service solicitation UUID list from the scan result information.
int bt_adapter_le_get_scan_result_service_data_list (const bt_adapter_le_device_scan_result_info_s *info, bt_adapter_le_packet_type_e pkt_type, bt_adapter_le_service_data_s **data_list, int *count)
 Gets the service data list from the scan result information.
int bt_adapter_le_free_service_data_list (bt_adapter_le_service_data_s *data_list, int count)
 Frees service data list.
int bt_adapter_le_get_scan_result_appearance (const bt_adapter_le_device_scan_result_info_s *info, bt_adapter_le_packet_type_e pkt_type, int *appearance)
 Gets the appearance from the scan result information.
int bt_adapter_le_get_scan_result_manufacturer_data (const bt_adapter_le_device_scan_result_info_s *info, bt_adapter_le_packet_type_e pkt_type, int *manufacturer_id, char **manufacturer_data, int *manufacturer_data_len)
 Gets the manufacturer data from the scan result information.
int bt_adapter_le_get_scan_result_ibeacon_report (const bt_adapter_le_device_scan_result_info_s *info, bt_adapter_le_packet_type_e pkt_type, bt_adapter_le_ibeacon_scan_result_info_s **ibeacon_info)
 Gets iBeacon format's data from the scan result information.
int bt_adapter_le_free_ibeacon_report (bt_adapter_le_ibeacon_scan_result_info_s *ibeacon_info)
 Frees iBeacon information.
int bt_adapter_le_create_advertiser (bt_advertiser_h *advertiser)
 Creates advertiser to advertise device's existence or respond to LE scanning request.
int bt_adapter_le_destroy_advertiser (bt_advertiser_h advertiser)
 Destroys advertiser.
int bt_adapter_le_add_advertising_service_uuid (bt_advertiser_h advertiser, bt_adapter_le_packet_type_e pkt_type, const char *uuid)
 Adds a service UUID to advertise or scan response data. The maximum advertised or responded data size is 31 bytes including data type and system wide data.
int bt_adapter_le_add_advertising_service_solicitation_uuid (bt_advertiser_h advertiser, bt_adapter_le_packet_type_e pkt_type, const char *uuid)
 Adds a service solicitation UUID to advertise or scan response data. The maximum advertised or responded data size is 31 bytes including data type and system wide data.
int bt_adapter_le_add_advertising_service_data (bt_advertiser_h advertiser, bt_adapter_le_packet_type_e pkt_type, const char *uuid, const char *service_data, int service_data_len)
 Adds service data to advertise or scan response data. The maximum advertised or responded data size is 31 bytes including data type and system wide data.
int bt_adapter_le_set_advertising_appearance (bt_advertiser_h advertiser, bt_adapter_le_packet_type_e pkt_type, int appearance)
 Sets the external appearance of this device to advertise or scan response data. Please refer to the adopted Bluetooth specification for the the appearance.
int bt_adapter_le_add_advertising_manufacturer_data (bt_advertiser_h advertiser, bt_adapter_le_packet_type_e pkt_type, int manufacturer_id, const char *manufacturer_data, int manufacturer_data_len)
 Adds manufacturer specific data to advertise or scan response data. Please refer to the Bluetooth Assigned Numbers provided by the Bluetooth SIG for a list of existing company identifiers. The maximum advertised or responded data size is 31 bytes including data type and system wide data.
int bt_adapter_le_set_advertising_device_name (bt_advertiser_h advertiser, bt_adapter_le_packet_type_e pkt_type, bool include_name)
 Sets whether the device name should be included in advertise or scan response data. The maximum advertised or responded data size is 31 bytes including data type and system wide data.
int bt_adapter_le_set_advertising_tx_power_level (bt_advertiser_h advertiser, bt_adapter_le_packet_type_e pkt_type, bool include_tx_power)
 Sets whether the transmission power level should be included in advertise or scan response data. The maximum advertised or responded data size is 31 bytes including data type and system wide data.
int bt_adapter_le_clear_advertising_data (bt_advertiser_h advertiser, bt_adapter_le_packet_type_e pkt_type)
 Clears all data to be advertised or responded to scan request from LE scanning device.
int bt_adapter_le_stop_advertising (bt_advertiser_h advertiser)
 Stops the advertising.
int bt_adapter_le_start_advertising_new (bt_advertiser_h advertiser, bt_adapter_le_advertising_state_changed_cb cb, void *user_data)
 Starts advertising with passed advertiser and advertising parameters.
int bt_adapter_le_set_advertising_mode (bt_advertiser_h advertiser, bt_adapter_le_advertising_mode_e mode)
 Sets advertising mode to control the advertising power and latency.
int bt_adapter_le_set_advertising_connectable (bt_advertiser_h advertiser, bool connectable)
 Sets whether the advertising type should be connectable or non-connectable.
int bt_adapter_le_set_scan_mode (bt_adapter_le_scan_mode_e scan_mode)
 Sets Bluetooth LE scan mode.
int bt_adapter_le_scan_filter_create (bt_scan_filter_h *scan_filter)
 Creates a scan filter to find only LE advertisements which match specific requirements.
int bt_adapter_le_scan_filter_destroy (bt_scan_filter_h scan_filter)
 Destroys a scan filter.
int bt_adapter_le_scan_filter_set_device_address (bt_scan_filter_h scan_filter, const char *address)
 Sets the device address for the advertisements filter.
int bt_adapter_le_scan_filter_set_device_name (bt_scan_filter_h scan_filter, const char *name)
 Sets the device name for the advertisements filter.
int bt_adapter_le_scan_filter_set_service_uuid (bt_scan_filter_h scan_filter, const char *uuid)
 Sets the service UUID for the advertisements filter.
int bt_adapter_le_scan_filter_set_service_uuid_with_mask (bt_scan_filter_h scan_filter, const char *uuid, const char *mask)
 Sets the service UUID and the mask for the advertisements filter, to use for filtering by partial data.
int bt_adapter_le_scan_filter_set_service_solicitation_uuid (bt_scan_filter_h scan_filter, const char *uuid)
 Sets the service solicitation UUID for the advertisements filter.
int bt_adapter_le_scan_filter_set_service_solicitation_uuid_with_mask (bt_scan_filter_h scan_filter, const char *uuid, const char *mask)
 Sets the service solicitation UUID and the mask for the advertisements filter, to use for filtering by partial data.
int bt_adapter_le_scan_filter_set_service_data (bt_scan_filter_h scan_filter, const char *uuid, const char *data, unsigned int data_len)
 Sets the service data for the advertisements filter.
int bt_adapter_le_scan_filter_set_service_data_with_mask (bt_scan_filter_h scan_filter, const char *uuid, const char *data, unsigned int data_len, const char *mask, unsigned int mask_len)
 Sets the service data and the mask for the advertisements filter, to use for filtering by partial data.
int bt_adapter_le_scan_filter_set_manufacturer_data (bt_scan_filter_h scan_filter, int manufacturer_id, const char *data, unsigned int data_len)
 Sets the manufacturer data for the advertisements filter.
int bt_adapter_le_scan_filter_set_manufacturer_data_with_mask (bt_scan_filter_h scan_filter, int manufacturer_id, const char *data, unsigned int data_len, const char *mask, unsigned int mask_len)
 Sets the manufacturer data and the mask for the advertisements filter, to use for filtering by partial data.
int bt_adapter_le_scan_filter_set_type (bt_scan_filter_h scan_filter, bt_adapter_le_scan_filter_type_e mode)
 Sets the scan filter type for the advertisements filter.
int bt_adapter_le_scan_filter_register (bt_scan_filter_h scan_filter)
 Registers a scan filter to use for scanning.
int bt_adapter_le_scan_filter_unregister (bt_scan_filter_h scan_filter)
 Unregisters all registered scan filters.
int bt_adapter_le_scan_filter_unregister_all (void)
 Unregisters all registered scan filters.

Typedefs

typedef void * bt_advertiser_h
 The handle to control Bluetooth LE advertising.
typedef void(* bt_adapter_le_scan_result_cb )(int result, bt_adapter_le_device_scan_result_info_s *info, void *user_data)
 Called when the LE advertisement has been found.
typedef 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)
 Called when the state of advertiser changes.
typedef void * bt_scan_filter_h
 The handle of a Bluetooth LE scan filter.

Typedef Documentation

typedef 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)

Called when the state of advertiser changes.

Since :
2.3.1
Parameters:
[out]resultThe result of the requested state change of advertiser
[out]advertiserThe handle of the state changed advertiser
[out]adv_stateThe advertiser state to be changed
[out]user_dataThe user data passed from the start function
See also:
bt_adapter_le_start_advertising_new()
bt_adapter_le_stop_advertising()
typedef void(* bt_adapter_le_scan_result_cb)(int result, bt_adapter_le_device_scan_result_info_s *info, void *user_data)

Called when the LE advertisement has been found.

Since :
2.3.1
Parameters:
[in]resultThe result of the LE scan
[in]infoThe information of the found LE advertisement.
[in]user_dataThe user data passed from the start function
See also:
bt_adapter_le_start_scan()
typedef void* bt_advertiser_h

The handle to control Bluetooth LE advertising.

Since :
2.3.1
typedef void* bt_scan_filter_h

The handle of a Bluetooth LE scan filter.

Since :
4.0

Enumeration Type Documentation

Enumerations of the Bluetooth advertising filter policy.

Since :
2.3.1
Enumerator:
BT_ADAPTER_LE_ADVERTISING_FILTER_DEFAULT 

White list is not in use

BT_ADAPTER_LE_ADVERTISING_FILTER_ALLOW_SCAN_WL 

Allow the scan request that in the White list

BT_ADAPTER_LE_ADVERTISING_FILTER_ALLOW_CONN_WL 

Allow the connection request that in the White list

BT_ADAPTER_LE_ADVERTISING_FILTER_ALLOW_SCAN_CONN_WL 

Allow the scan and connection request that in the White list

Enumerations of the Bluetooth advertising mode.

Since :
2.3.1
Enumerator:
BT_ADAPTER_LE_ADVERTISING_MODE_BALANCED 

Balanced advertising mode

BT_ADAPTER_LE_ADVERTISING_MODE_LOW_LATENCY 

Low latency advertising mode

BT_ADAPTER_LE_ADVERTISING_MODE_LOW_ENERGY 

Low energy advertising mode

Enumerations of the Bluetooth advertising state.

Since :
2.3.1
Enumerator:
BT_ADAPTER_LE_ADVERTISING_STOPPED 

Bluetooth advertising is stopped

BT_ADAPTER_LE_ADVERTISING_STARTED 

Bluetooth advertising is started

Enumerations of the Bluetooth LE packet type.

Since :
2.3.1
Enumerator:
BT_ADAPTER_LE_PACKET_ADVERTISING 

Advertising packet

BT_ADAPTER_LE_PACKET_SCAN_RESPONSE 

Scan response packet

Enumeration for the scan filter type.

Since :
4.0
See also:
bt_adapter_le_scan_filter_set_type()
Enumerator:
BT_ADAPTER_LE_SCAN_FILTER_TYPE_IBEACON 

iBeacon filter type

BT_ADAPTER_LE_SCAN_FILTER_TYPE_PROXIMITY_UUID 

Proximity UUID filter type

Enumerations of the Bluetooth le scan mode.

Since :
3.0
Enumerator:
BT_ADAPTER_LE_SCAN_MODE_BALANCED 

Balanced mode of power consumption and connection latency

BT_ADAPTER_LE_SCAN_MODE_LOW_LATENCY 

Low connection latency but high power consumption

BT_ADAPTER_LE_SCAN_MODE_LOW_ENERGY 

Low power consumption but high connection latency


Function Documentation

int bt_adapter_le_add_advertising_manufacturer_data ( bt_advertiser_h  advertiser,
bt_adapter_le_packet_type_e  pkt_type,
int  manufacturer_id,
const char *  manufacturer_data,
int  manufacturer_data_len 
)

Adds manufacturer specific data to advertise or scan response data. Please refer to the Bluetooth Assigned Numbers provided by the Bluetooth SIG for a list of existing company identifiers. The maximum advertised or responded data size is 31 bytes including data type and system wide data.

Since :
2.3.1
Parameters:
[in]advertiserThe handle of advertiser
[in]pkt_typeThe packet type
[in]manufacturer_idManufacturer identifier
[in]manufacturer_dataThe manufacturer specific data
[in]manufacturer_data_lenThe data length of manufacturer data
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_QUOTA_EXCEEDEDQuota exceeded
BT_ERROR_OPERATION_FAILEDOperation failed
BT_ERROR_NOT_SUPPORTEDNot supported
Precondition:
The Bluetooth service must be initialized with bt_initialize().
See also:
bt_adapter_le_clear_advertising_data()
int bt_adapter_le_add_advertising_service_data ( bt_advertiser_h  advertiser,
bt_adapter_le_packet_type_e  pkt_type,
const char *  uuid,
const char *  service_data,
int  service_data_len 
)

Adds service data to advertise or scan response data. The maximum advertised or responded data size is 31 bytes including data type and system wide data.

Since :
2.3.1
Remarks:
16-bit UUID is supported. (e.g. 180F).
Parameters:
[in]advertiserThe handle of advertiser
[in]pkt_typeThe packet type
[in]uuid16-bit UUID of the service
[in]service_dataThe service data
[in]service_data_lenThe data length of service data
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_QUOTA_EXCEEDEDQuota exceeded
BT_ERROR_OPERATION_FAILEDOperation failed
BT_ERROR_NOT_SUPPORTEDNot supported
Precondition:
The Bluetooth service must be initialized with bt_initialize().
See also:
bt_adapter_le_clear_advertising_data()

Adds a service solicitation UUID to advertise or scan response data. The maximum advertised or responded data size is 31 bytes including data type and system wide data.

Since :
2.3.1
Remarks:
16-bit service solicitation UUID or 128-bit service solicitation UUID is supported. (e.g. 180F, 0000180F-0000-1000-8000-00805F9B34FB). 16-bit UUID is advertised as 16-bit UUID. 128-bit UUID made from base UUID(00000000-0000-1000-8000-00805F9B34FB) is converted to the 16-bit equivalent form and advertised as such. (e.g. 0000180F-0000-1000-8000-00805F9B34FB is converted to 180F 16-bit form). Any other 128-bit UUID is advertised as 128-bit UUID.
Parameters:
[in]advertiserThe handle of advertiser
[in]pkt_typeThe packet type
[in]uuidThe string of the service solicitation UUID.
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_QUOTA_EXCEEDEDQuota exceeded
BT_ERROR_OPERATION_FAILEDOperation failed
BT_ERROR_NOT_SUPPORTEDNot supported
Precondition:
The Bluetooth service must be initialized with bt_initialize().
See also:
bt_adapter_le_clear_advertising_data()
int bt_adapter_le_add_advertising_service_uuid ( bt_advertiser_h  advertiser,
bt_adapter_le_packet_type_e  pkt_type,
const char *  uuid 
)

Adds a service UUID to advertise or scan response data. The maximum advertised or responded data size is 31 bytes including data type and system wide data.

Since :
2.3.1
Remarks:
16-bit UUID or 128-bit UUID is supported. (e.g. 180F, 0000180F-0000-1000-8000-00805F9B34FB). 16-bit UUID is advertised as 16-bit UUID. 128-bit UUID made from base UUID(00000000-0000-1000-8000-00805F9B34FB) is converted to the 16-bit equivalent form and advertised as such. (e.g. 0000180F-0000-1000-8000-00805F9B34FB is converted to 180F 16-bit form). Any other 128-bit UUID is advertised as 128-bit UUID.
Parameters:
[in]advertiserThe handle of advertiser
[in]pkt_typeThe packet type
[in]uuidThe string of the service UUID.
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_QUOTA_EXCEEDEDQuota exceeded
BT_ERROR_OPERATION_FAILEDOperation failed
BT_ERROR_NOT_SUPPORTEDNot supported
Precondition:
The Bluetooth service must be initialized with bt_initialize().
See also:
bt_adapter_le_clear_advertising_data()

Clears all data to be advertised or responded to scan request from LE scanning device.

Since :
2.3.1
Parameters:
[in]advertiserThe handle of advertiser
[in]pkt_typeThe packet type to be cleared
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().

Creates advertiser to advertise device's existence or respond to LE scanning request.

Since :
2.3.1
Parameters:
[out]advertiserThe handle of advertiser
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_OUT_OF_MEMORYOut of memory
BT_ERROR_NOT_SUPPORTEDNot supported
Precondition:
The Bluetooth service must be initialized with bt_initialize().
See also:
bt_adapter_le_destroy_advertiser()

Destroys advertiser.

Since :
2.3.1
Parameters:
[out]advertiserThe handle of advertiser
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_adapter_le_create_advertiser()

Frees iBeacon information.

Since :
4.0
Parameters:
[in]ibeacon_infoThe iBeacon format's scan result data
Returns:
0 on success, otherwise a negative error value.
Return values:
BT_ERROR_NONESuccessful
BT_ERROR_INVALID_PARAMETERInvalid parameter
BT_ERROR_NOT_SUPPORTEDNot supported
See also:
bt_adapter_le_get_scan_result_service_data_list()

Frees service data list.

Since :
2.3.1
Parameters:
[in]data_listThe list of the service data
[in]countThe count of the service data list
Returns:
0 on success, otherwise a negative error value.
Return values:
BT_ERROR_NONESuccessful
BT_ERROR_INVALID_PARAMETERInvalid parameter
BT_ERROR_NOT_SUPPORTEDNot supported
See also:
bt_adapter_le_get_scan_result_service_data_list()

Gets the appearance from the scan result information.

Since :
2.3.1
Parameters:
[in]infoThe scan result information
[in]pkt_typeThe packet type
[out]appearanceThe appearance
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_NO_DATANo data available
BT_ERROR_NOT_SUPPORTEDNot supported
Precondition:
The Bluetooth service must be initialized with bt_initialize().
See also:
bt_adapter_le_scan_result_cb()

Gets the device name from the scan result information.

Since :
2.3.1
Remarks:
The name must be released with free() by you.
Parameters:
[in]infoThe scan result information
[in]pkt_typeThe packet type
[out]nameThe device name
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_NO_DATANo data available
BT_ERROR_NOT_SUPPORTEDNot supported
Precondition:
The Bluetooth service must be initialized with bt_initialize().
See also:
bt_adapter_le_scan_result_cb()

Gets iBeacon format's data from the scan result information.

Since :
4.0
Remarks:
The ibeacon_info must be released with bt_adapter_le_free_ibeacon_report().
Parameters:
[in]infoThe scan result information
[in]pkt_typeThe packet type
[out]ibeacon_infoThe iBeacon format's scan result data
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_NO_DATANo data available
BT_ERROR_NOT_SUPPORTEDNot supported
Precondition:
The Bluetooth service must be initialized with bt_initialize().
See also:
bt_adapter_le_scan_result_cb()
int bt_adapter_le_get_scan_result_manufacturer_data ( const bt_adapter_le_device_scan_result_info_s info,
bt_adapter_le_packet_type_e  pkt_type,
int *  manufacturer_id,
char **  manufacturer_data,
int *  manufacturer_data_len 
)

Gets the manufacturer data from the scan result information.

Since :
2.3.1
Remarks:
The manufacturer_data must be released with free() by you.
Parameters:
[in]infoThe scan result information
[in]pkt_typeThe packet type
[out]manufacturer_idThe manufacturer ID
[out]manufacturer_dataThe manufacturer data (byte array)
[out]manufacturer_data_lenThe length of manufacturer data
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_NO_DATANo data available
BT_ERROR_NOT_SUPPORTEDNot supported
Precondition:
The Bluetooth service must be initialized with bt_initialize().
See also:
bt_adapter_le_scan_result_cb()

Gets the service data list from the scan result information.

Since :
2.3.1
Remarks:
The data_list must be released with bt_adapter_le_free_service_data_list() by you .
Parameters:
[in]infoThe scan result information
[in]pkt_typeThe packet type
[out]data_listThe list of the service data
[out]countThe count of the service data list
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_NO_DATANo data available
BT_ERROR_NOT_SUPPORTEDNot supported
Precondition:
The Bluetooth service must be initialized with bt_initialize().
See also:
bt_adapter_le_scan_result_cb()

Gets the service solicitation UUID list from the scan result information.

Since :
2.3.1
Remarks:
The uuids must be iterated as count and each pointed data must be released with free(). Then uuids must be released with free().
16-bit service solicitation UUID or 128-bit service solicitation UUID is supported. (e.g. 180F, 0000180F-0000-1000-8000-00805F9B34FB)
Parameters:
[in]infoThe scan result information
[in]pkt_typeThe packet type
[out]uuidsThe list of string of the service solicitation UUID
[out]countThe count of the service UUIDs
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_NO_DATANo data available
BT_ERROR_NOT_SUPPORTEDNot supported
Precondition:
The Bluetooth service must be initialized with bt_initialize().
See also:
bt_adapter_le_scan_result_cb()
int bt_adapter_le_get_scan_result_service_uuids ( const bt_adapter_le_device_scan_result_info_s info,
bt_adapter_le_packet_type_e  pkt_type,
char ***  uuids,
int *  count 
)

Gets the service UUID list from the scan result information.

Since :
2.3.1
Remarks:
The uuids must be iterated as count and each pointed data must be released with free(). Then uuids must be released with free().
16-bit service UUID or 128-bit service UUID is supported. (e.g. 180F, 0000180F-0000-1000-8000-00805F9B34FB)
Parameters:
[in]infoThe scan result information
[in]pkt_typeThe packet type
[out]uuidsThe list of string of the service UUID
[out]countThe count of the service UUIDs
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_NO_DATANo data available
BT_ERROR_NOT_SUPPORTEDNot supported
Precondition:
The Bluetooth service must be initialized with bt_initialize().
See also:
bt_adapter_le_scan_result_cb()

Gets the transmission power level from the scan result information.

Since :
2.3.1
Parameters:
[in]infoThe scan result information
[in]pkt_typeThe packet type
[out]power_levelThe transmission power level in dBm
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_NO_DATANo data available
BT_ERROR_NOT_SUPPORTEDNot supported
Precondition:
The Bluetooth service must be initialized with bt_initialize().
See also:
bt_adapter_le_scan_result_cb()
int bt_adapter_le_is_discovering ( bool *  is_discovering)

Checks for the LE device discovery is in progress or not.

Since :
6.0
Remarks:
If Bluetooth LE scan is in progress, other operations are not allowed and
you have to either stop the LE scan operation, or wait for it to be finished,
before performing other operations.
Parameters:
[out]is_discoveringThe discovering status: (true = in progress , false = not in progress )
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_ENABLEDNot enabled
BT_ERROR_OPERATION_FAILEDOperation failed
BT_ERROR_NOT_SUPPORTEDNot supported
Precondition:
The state of local Bluetooth must be BT_ADAPTER_ENABLED.

Creates a scan filter to find only LE advertisements which match specific requirements.

If the filter's attribute is not set, then the filter will accept all values of that attribute. If an attribute is set, the filter will accept only advertisements which match the set attribute.

For example, if device name is set with bt_adapter_le_scan_filter_set_device_name(), the filter will accept only advertisements from devices with the given name. If device name is not set, advertisements will be filtered without regard to device names.

Since :
4.0
Remarks:
The scan_filter should be destroyed with bt_adapter_le_scan_filter_destroy().
Parameters:
[out]scan_filterThe scan filter handle
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_OUT_OF_MEMORYOut of memory
BT_ERROR_NOT_SUPPORTEDNot supported
Precondition:
The Bluetooth service must be initialized with bt_initialize().
See also:
bt_adapter_le_scan_filter_destroy()

Destroys a scan filter.

Since :
4.0
Parameters:
[in]scan_filterThe scan filter handle
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_adapter_le_scan_filter_create()

Registers a scan filter to use for scanning.

If the filter is registered, it cannot be changed.

Since :
4.0
Privilege Level:
public
Privilege:
http://tizen.org/privilege/bluetooth
Remarks:
Several scan filters can be registered. If an advertisement passes
any of the registered scan filters, it will be included in the results.
Parameters:
[in]scan_filterThe scan filter handle
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_NOW_IN_PROGRESSScan is in progress
BT_ERROR_NOT_SUPPORTEDNot supported
BT_ERROR_PERMISSION_DENIEDPermission denied
Precondition:
The Bluetooth service must be initialized with bt_initialize().
int bt_adapter_le_scan_filter_set_device_address ( bt_scan_filter_h  scan_filter,
const char *  address 
)

Sets the device address for the advertisements filter.

Since :
4.0
Parameters:
[in]scan_filterThe scan filter handle
[in]addressThe device address by which advertisements will be filtered
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().
int bt_adapter_le_scan_filter_set_device_name ( bt_scan_filter_h  scan_filter,
const char *  name 
)

Sets the device name for the advertisements filter.

Any previously set value will be overwritten.

Since :
4.0
Parameters:
[in]scan_filterThe scan filter handle
[in]nameThe device name by which advertisements will be filtered
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().
int bt_adapter_le_scan_filter_set_manufacturer_data ( bt_scan_filter_h  scan_filter,
int  manufacturer_id,
const char *  data,
unsigned int  data_len 
)

Sets the manufacturer data for the advertisements filter.

Any previously set value will be overwritten.

Since :
4.0
Parameters:
[in]scan_filterThe scan filter handle
[in]manufacturer_idThe manufacturer ID (0x0000 ~ 0xFFFF)
[in]dataThe manufacturer data (byte array)
[in]data_lenThe length of the manufacturer data
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().
int bt_adapter_le_scan_filter_set_manufacturer_data_with_mask ( bt_scan_filter_h  scan_filter,
int  manufacturer_id,
const char *  data,
unsigned int  data_len,
const char *  mask,
unsigned int  mask_len 
)

Sets the manufacturer data and the mask for the advertisements filter, to use for filtering by partial data.

Any previously set value will be overwritten. The mask works as follows: For each bit set to 1 in the mask, the corresponding bits in data and in the filtered data will have to be equal. If the mask bit is set to 0, the corresponding bits will be ignored.

Since :
4.0
Remarks:
The mask and the manufacturer data must have equal lengths.
Parameters:
[in]scan_filterThe scan filter handle
[in]manufacturer_idThe manufacturer ID (0x0000 ~ 0xFFFF)
[in]dataThe manufacturer data (byte array)
[in]data_lenThe length of the manufacturer data
[in]maskThe mask by which advertisements will be filtered
[in]mask_lenThe length of the mask
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().
int bt_adapter_le_scan_filter_set_service_data ( bt_scan_filter_h  scan_filter,
const char *  uuid,
const char *  data,
unsigned int  data_len 
)

Sets the service data for the advertisements filter.

Any previously set value will be overwritten.

Since :
4.0
Parameters:
[in]scan_filterThe scan filter handle
[in]uuidThe service UUID by which advertisements will be filtered
[in]dataThe service data by which advertisements will be filtered
[in]data_lenThe length of the service data
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().
int bt_adapter_le_scan_filter_set_service_data_with_mask ( bt_scan_filter_h  scan_filter,
const char *  uuid,
const char *  data,
unsigned int  data_len,
const char *  mask,
unsigned int  mask_len 
)

Sets the service data and the mask for the advertisements filter, to use for filtering by partial data.

Any previously set value will be overwritten. The mask works as follows: For each bit set to 1 in the mask, the corresponding bits in data and in the filtered data will have to be equal. If the mask bit is set to 0, the corresponding bits will be ignored.

Since :
4.0
Remarks:
The mask and the service data must have equal lengths.
Parameters:
[in]scan_filterThe scan filter handle
[in]uuidThe service UUID by which advertisements will be filtered
[in]dataThe service data by which advertisements will be filtered
[in]data_lenThe length of the service data
[in]maskThe mask by which advertisements will be filtered
[in]mask_lenThe length of the mask
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().
int bt_adapter_le_scan_filter_set_service_solicitation_uuid ( bt_scan_filter_h  scan_filter,
const char *  uuid 
)

Sets the service solicitation UUID for the advertisements filter.

Any previously set value will be overwritten.

Since :
4.0
Parameters:
[in]scan_filterThe scan filter handle
[in]uuidThe service solicitation UUID by which advertisements will be filtered
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().
int bt_adapter_le_scan_filter_set_service_solicitation_uuid_with_mask ( bt_scan_filter_h  scan_filter,
const char *  uuid,
const char *  mask 
)

Sets the service solicitation UUID and the mask for the advertisements filter, to use for filtering by partial data.

Any previously set value will be overwritten. The mask works as follows: For each bit set to 1 in the mask, the corresponding bits in uuid and in the filtered data will have to be equal. If the mask bit is set to 0, the corresponding bits will be ignored.

Since :
4.0
Remarks:
The mask and the service solicitation uuid must have equal lengths.
Parameters:
[in]scan_filterThe scan filter handle
[in]uuidThe service solicitation UUID by which advertisements will be filtered
[in]maskThe mask by which advertisements will be filtered
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().
int bt_adapter_le_scan_filter_set_service_uuid ( bt_scan_filter_h  scan_filter,
const char *  uuid 
)

Sets the service UUID for the advertisements filter.

Any previously set value will be overwritten.

Since :
4.0
Parameters:
[in]scan_filterThe scan filter handle
[in]uuidThe service UUID by which advertisements will be filtered
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().
int bt_adapter_le_scan_filter_set_service_uuid_with_mask ( bt_scan_filter_h  scan_filter,
const char *  uuid,
const char *  mask 
)

Sets the service UUID and the mask for the advertisements filter, to use for filtering by partial data.

Any previously set value will be overwritten. The mask works as follows: For each bit set to 1 in the mask, the corresponding bits in uuid and in the filtered data will have to be equal. If the mask bit is set to 0, the corresponding bits will be ignored.

Since :
4.0
Remarks:
The mask and the service uuid must have equal lengths.
Parameters:
[in]scan_filterThe scan filter handle
[in]uuidThe service UUID by which advertisements will be filtered
[in]maskThe mask to filter advertisements
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().

Sets the scan filter type for the advertisements filter.

The filter type is used when searching only for iBeacon or proximity type's advertising data. If the type is not set, LE scanner will search devices as with regard to other filtered attributes. If the type is set, all other attributes set for the filter are ignored.

Since :
4.0
Parameters:
[in]scan_filterThe scan filter handle
[in]modeThe scan filter type
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().

Unregisters all registered scan filters.

Since :
4.0
Privilege Level:
public
Privilege:
http://tizen.org/privilege/bluetooth
Parameters:
[in]scan_filterThe scan filter handle
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_NOW_IN_PROGRESSScan is in progress
BT_ERROR_NOT_SUPPORTEDNot supported
BT_ERROR_PERMISSION_DENIEDPermission denied
Precondition:
The Bluetooth service must be initialized with bt_initialize().

Unregisters all registered scan filters.

Since :
4.0
Privilege Level:
public
Privilege:
http://tizen.org/privilege/bluetooth
Returns:
0 on success, otherwise a negative error value.
Return values:
BT_ERROR_NONESuccessful
BT_ERROR_NOT_INITIALIZEDNot initialized
BT_ERROR_NOW_IN_PROGRESSScan is in progress
BT_ERROR_NOT_SUPPORTEDNot supported
BT_ERROR_PERMISSION_DENIEDPermission denied
Precondition:
The Bluetooth service must be initialized with bt_initialize().
int bt_adapter_le_set_advertising_appearance ( bt_advertiser_h  advertiser,
bt_adapter_le_packet_type_e  pkt_type,
int  appearance 
)

Sets the external appearance of this device to advertise or scan response data. Please refer to the adopted Bluetooth specification for the the appearance.

Since :
2.3.1
Parameters:
[in]advertiserThe handle of advertiser
[in]pkt_typeThe packet type
[in]appearanceThe external appearance of device
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_QUOTA_EXCEEDEDQuota exceeded
BT_ERROR_OPERATION_FAILEDOperation failed
BT_ERROR_NOT_SUPPORTEDNot supported
Precondition:
The Bluetooth service must be initialized with bt_initialize().
See also:
bt_adapter_le_clear_advertising_data()
int bt_adapter_le_set_advertising_connectable ( bt_advertiser_h  advertiser,
bool  connectable 
)

Sets whether the advertising type should be connectable or non-connectable.

Since :
2.3.1
Privilege Level:
public
Privilege:
http://tizen.org/privilege/bluetooth
Parameters:
[in]advertiserThe handle of advertiser
[in]connectableThe type of advertising
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_ENABLEDNot enabled
BT_ERROR_NOW_IN_PROGRESSOperation is now in progress
BT_ERROR_PERMISSION_DENIEDPermission denied
BT_ERROR_NOT_SUPPORTEDNot supported
Precondition:
The Bluetooth service must be initialized with bt_initialize().
See also:
bt_adapter_le_start_advertising_new()
int bt_adapter_le_set_advertising_device_name ( bt_advertiser_h  advertiser,
bt_adapter_le_packet_type_e  pkt_type,
bool  include_name 
)

Sets whether the device name should be included in advertise or scan response data. The maximum advertised or responded data size is 31 bytes including data type and system wide data.

Since :
2.3.1
Parameters:
[in]advertiserThe handle of advertiser
[in]pkt_typeThe packet type
[in]include_nameWhether the device name should be included
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_QUOTA_EXCEEDEDQuota exceeded
BT_ERROR_OPERATION_FAILEDOperation failed
BT_ERROR_NOT_SUPPORTEDNot supported
Precondition:
The Bluetooth service must be initialized with bt_initialize().
See also:
bt_adapter_le_clear_advertising_data()

Sets advertising mode to control the advertising power and latency.

Since :
2.3.1
Privilege Level:
public
Privilege:
http://tizen.org/privilege/bluetooth
Parameters:
[in]advertiserThe handle of advertiser
[in]modeThe mode of advertising
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_ENABLEDNot enabled
BT_ERROR_NOW_IN_PROGRESSOperation is now in progress
BT_ERROR_PERMISSION_DENIEDPermission denied
BT_ERROR_NOT_SUPPORTEDNot supported
Precondition:
The Bluetooth service must be initialized with bt_initialize().
See also:
bt_adapter_le_start_advertising_new()
int bt_adapter_le_set_advertising_tx_power_level ( bt_advertiser_h  advertiser,
bt_adapter_le_packet_type_e  pkt_type,
bool  include_tx_power 
)

Sets whether the transmission power level should be included in advertise or scan response data. The maximum advertised or responded data size is 31 bytes including data type and system wide data.

Since :
2.3.1
Parameters:
[in]advertiserThe handle of advertiser
[in]pkt_typeThe packet type
[in]include_tx_powerWhether the transmission power level should be included
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_QUOTA_EXCEEDEDQuota exceeded
BT_ERROR_OPERATION_FAILEDOperation failed
BT_ERROR_NOT_SUPPORTEDNot supported
Precondition:
The Bluetooth service must be initialized with bt_initialize().
See also:
bt_adapter_le_clear_advertising_data()

Sets Bluetooth LE scan mode.

Since :
3.0
Privilege Level:
public
Privilege:
http://tizen.org/privilege/bluetooth
Parameters:
[in]scan_modeThe scan mode
Returns:
0 on success, otherwise a negative error value.
Return values:
BT_ERROR_NONESuccessful
BT_ERROR_NOT_ENABLEDAdapter is not enabled
BT_ERROR_INVALID_PARAMETERParameter is invalid
BT_ERROR_PERMISSION_DENIEDPermission denied
BT_ERROR_NOT_SUPPORTEDNot supported
Precondition:
The state of local bluetooth must be BT_ADAPTER_ENABLED.
The bluetooth service must be initialized with bt_initialize().
See also:
bt_initialize()

Starts advertising with passed advertiser and advertising parameters.

Once Bluetooth advertising is started, nearby Bluetooth LE (Low Energy) supported
devices can know this device's existence. And one of them can make a connection request,
if it is allowed.

Since :
2.3.1
Privilege Level:
public
Privilege:
http://tizen.org/privilege/bluetooth
Parameters:
[in]advertiserThe handle of advertiser
[in]cbThe callback to report the result of this function
[in]user_dataThe user data to be passed when callback is called
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_ENABLEDNot enabled
BT_ERROR_NOW_IN_PROGRESSOperation is now in progress
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().
Postcondition:
This function invokes bt_adapter_le_advertising_state_changed_cb().
See also:
bt_adapter_le_stop_advertising()
bt_adapter_le_advertising_state_changed_cb()
int bt_adapter_le_start_scan ( bt_adapter_le_scan_result_cb  cb,
void *  user_data 
)

Starts the LE scan to find LE advertisement.

If a LE advertisement is found, bt_adapter_le_scan_result_cb() will be invoked.

Since :
2.3.1
Privilege Level:
public
Privilege:
http://tizen.org/privilege/bluetooth
Parameters:
[in]cbThe callback to report the result of this function
[in]user_dataThe user data to be passed when callback is called
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_NOW_IN_PROGRESSOperation is now in progress
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:
This function invokes bt_adapter_le_scan_result_cb().
See also:
bt_adapter_le_scan_result_cb()

Stops the advertising.

Since :
2.3.1
Privilege Level:
public
Privilege:
http://tizen.org/privilege/bluetooth
Parameters:
[in]advertiserThe handle of advertiser
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_ENABLEDNot enabled
BT_ERROR_NOT_IN_PROGRESSOperation is not in progress
BT_ERROR_OPERATION_FAILEDOperation failed
BT_ERROR_PERMISSION_DENIEDPermission denied
BT_ERROR_NOT_SUPPORTEDNot supported
Precondition:
The advertising must be going on with bt_adapter_le_start_advertising_new().
Postcondition:
This function invokes bt_adapter_le_advertising_state_changed_cb().
See also:
bt_adapter_le_start_advertising_new()
bt_adapter_le_advertising_state_changed_cb()
int bt_adapter_le_stop_scan ( void  )

Stops the LE scan.

Since :
2.3.1
Privilege Level:
public
Privilege:
http://tizen.org/privilege/bluetooth
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_NOT_IN_PROGRESSOperation is not in progress
BT_ERROR_OPERATION_FAILEDOperation failed
BT_ERROR_PERMISSION_DENIEDPermission denied
BT_ERROR_NOT_SUPPORTEDNot supported
Precondition:
The LE scan must be in progress with bt_adapter_le_start_scan().
See also:
bt_adapter_le_start_scan()