Bluetooth OOB (Out of Band) API provides functions for exchanging some information used in the pairing process.
Required Header
#include <bluetooth.h>
Overview
This set of functions is used for exchanging the hash key and randomizer. This API uses an external means of communication, such as near-field communication (NFC) to exchange some information used in the pairing process.
Related Features
This API is related with the following features:
It is recommended to use features in your application for reliability.
You can check if a device supports the related features for this API by using System Information, and control your application's actions accordingly.
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_get_local_oob_data (unsigned char **hash, unsigned char **randomizer, int *hash_len, int *randomizer_len) |
| Gets the Hash and Randomizer value, synchronously.
|
int | bt_adapter_set_remote_oob_data (const char *remote_address, unsigned char *hash, unsigned char *randomizer, int hash_len, int randomizer_len) |
| Sets the Hash and Randomizer value, synchronously.
|
int | bt_adapter_get_local_oob_ext_data (unsigned char **hash192, unsigned char **randomizer192, int *hash192_len, int *randomizer192_len, unsigned char **hash256, unsigned char **randomizer256, int *hash256_len, int *randomizer256_len) |
| Gets the Hash and Randomizer value, synchronously.
|
int | bt_adapter_set_remote_oob_ext_data (const char *remote_address, const unsigned char *hash192, const unsigned char *randomizer192, int hash192_len, int randomizer192_len, const unsigned char *hash256, const unsigned char *randomizer256, int hash256_len, int randomizer256_len) |
| Sets the Hash and Randomizer value, synchronously.
|
int | bt_adapter_remove_remote_oob_data (const char *remote_address) |
| Deletes the Hash and Randomizer value, synchronously.
|
Function Documentation
Gets the Hash and Randomizer value, synchronously.
- Since :
- 2.3
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/bluetooth
- Parameters:
-
[out] | hash | The hash value received from the controller |
[out] | randomizer | The hash value received from the controller |
[out] | hash_len | The length of the hash value |
[out] | randomizer_len | The length of the randomizer value |
- Returns:
- 0 on success, otherwise a negative error value.
- Return values:
-
- Precondition:
- The state of local Bluetooth must be BT_ADAPTER_ENABLED.
-
The Bluetooth service must be initialized with bt_initialize().
- See also:
- bt_initialize()
int bt_adapter_get_local_oob_ext_data |
( |
unsigned char ** |
hash192, |
|
|
unsigned char ** |
randomizer192, |
|
|
int * |
hash192_len, |
|
|
int * |
randomizer192_len, |
|
|
unsigned char ** |
hash256, |
|
|
unsigned char ** |
randomizer256, |
|
|
int * |
hash256_len, |
|
|
int * |
randomizer256_len |
|
) |
| |
Gets the Hash and Randomizer value, synchronously.
- Since :
- 3.0
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/bluetooth
- Parameters:
-
[out] | hash192 | The hash value derived from the P-192 public key |
[out] | randomizer192 | The randomizer value associated with the P-192 public key |
[out] | hash192_len | The length of hash192 |
[out] | randomizer192_len | The length of randomizer192 |
[out] | hash256 | The hash value derived from the P-256 public key |
[out] | randomizer256 | The randomizer value associated with the P-256 public key |
[out] | hash256_len | The length of hash256 |
[out] | randomizer256_len | The length of randomizer256 |
- Returns:
- 0 on success, otherwise a negative error value.
- Return values:
-
- Precondition:
- The state of local Bluetooth must be BT_ADAPTER_ENABLED.
-
The Bluetooth service must be initialized with bt_initialize().
- See also:
- bt_initialize()
Deletes the Hash and Randomizer value, synchronously.
- Since :
- 2.3
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/bluetooth
- Parameters:
-
[in] | remote_address | Remote device address |
- Returns:
- 0 on success, otherwise a negative error value.
- Return values:
-
- Precondition:
- The state of local Bluetooth must be BT_ADAPTER_ENABLED.
-
The Bluetooth service must be initialized with bt_initialize().
- See also:
- bt_initialize()
int bt_adapter_set_remote_oob_data |
( |
const char * |
remote_address, |
|
|
unsigned char * |
hash, |
|
|
unsigned char * |
randomizer, |
|
|
int |
hash_len, |
|
|
int |
randomizer_len |
|
) |
| |
Sets the Hash and Randomizer value, synchronously.
- Since :
- 2.3
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/bluetooth
- Parameters:
-
[in] | remote_address | Remote device address |
[in] | hash | The hash value received from the controller |
[in] | randomizer | The hash value received from the controller |
[in] | hash_len | The length of the hash value. Allowed value is 16 |
[in] | randomizer_len | The length of the randomizer value. Allowed value is 16 |
- Returns:
- 0 on success, otherwise a negative error value.
- Return values:
-
- Precondition:
- The state of local Bluetooth must be BT_ADAPTER_ENABLED.
-
The Bluetooth service must be initialized with bt_initialize().
- See also:
- bt_initialize()
int bt_adapter_set_remote_oob_ext_data |
( |
const char * |
remote_address, |
|
|
const unsigned char * |
hash192, |
|
|
const unsigned char * |
randomizer192, |
|
|
int |
hash192_len, |
|
|
int |
randomizer192_len, |
|
|
const unsigned char * |
hash256, |
|
|
const unsigned char * |
randomizer256, |
|
|
int |
hash256_len, |
|
|
int |
randomizer256_len |
|
) |
| |
Sets the Hash and Randomizer value, synchronously.
- Since :
- 3.0
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/bluetooth
- Parameters:
-
[in] | remote_address | Remote device address |
[in] | hash192 | The P-192 hash value received via OOB from remote device |
[in] | randomizer192 | The P-192 randomizer value received via OOB from remote device |
[in] | hash192_len | The length of hash192 |
[in] | randomizer192_len | The length of randomizer192 |
[in] | hash256 | The P-256 hash value received via OOB from remote device |
[in] | randomizer256 | The P-256 randomizer value received via OOB from remote device |
[in] | hash256_len | The length of hash256 |
[in] | randomizer256_len | The length of randomizer256 |
- Returns:
- 0 on success, otherwise a negative error value.
- Return values:
-
- Precondition:
- The state of local Bluetooth must be BT_ADAPTER_ENABLED.
-
The Bluetooth service must be initialized with bt_initialize().
- See also:
- bt_initialize()