|
hsw-nbt 1.2.0
OPTIGA Authenticate NBT Host Library for C
|
Model interface to create the Bluetooth low energy (BLE) carrier configuration record types and set/get record fields. More...
Go to the source code of this file.
Data Structures | |
| struct | ifx_ble_config_field_t |
| Structure defines the data structure of bluetooth low energy record such as data length and actual config data field. More... | |
| struct | ifx_record_ad_data_t |
| Structure defines advertising and scan response data (AD) format. Each AD structure consists of an AD Length field of 1 octet, an AD Type field and an AD Data field. More... | |
Macros | |
| #define | IFX_RECORD_BLE_GET UINT8_C(0x01) |
| Identifier for model get Bluetooth LE record. | |
| #define | IFX_RECORD_BLE_SET UINT8_C(0x02) |
| Identifier for model set bluetooth LE record ID. | |
| #define | IFX_RECORD_BLE_RELEASE_MEMORY UINT8_C(0x03) |
| Identifier for model bluetooth LE record release memory. | |
| #define | IFX_RECORD_BLE_TYPE "application/vnd.bluetooth.le.oob" |
| Type information for bluetooth record. | |
| #define | IFX_RECORD_TYPE_LEN_BLE_DEV_ADDR UINT8_C(0x1) |
| Length of device address type field. | |
Enumerations | |
| enum | ifx_ble_device_addr_type { IFX_PUBLIC_DEVICE_ADDRESS , IFX_RANDOM_DEVICE_ADDRESS } |
| Enumeration defines the bluetooth low energy device address type. More... | |
Functions | |
| ifx_status_t | ifx_record_ble_new (ifx_record_handle_t *handle) |
| Creates the Bluetooth low energy carrier configuration record and handle of the created record. This handle holds the values of the record needed for encode and decode operations. | |
| ifx_status_t | ifx_record_ble_set_device_addr (ifx_record_handle_t *handle, const uint8_t *device_addr, ifx_ble_device_addr_type device_addr_type) |
| Sets the device address in the Bluetooth low energy (BLE) carrier configuration record for the given record handle. | |
| ifx_status_t | ifx_record_ble_set_role (ifx_record_handle_t *handle, const ifx_ble_config_field_t *role) |
| Sets the low energy (LE) role in the Bluetooth low energy carrier configuration record for the given record handle. | |
| ifx_status_t | ifx_record_ble_set_security_tk_val (ifx_record_handle_t *handle, const ifx_ble_config_field_t *security_manager_tk_val) |
| Sets the security manager temporary key (TK) value in the Bluetooth low energy carrier configuration record for the given record handle. | |
| ifx_status_t | ifx_record_ble_set_secure_conn_confirm (ifx_record_handle_t *handle, const ifx_ble_config_field_t *secure_conn_confirmation_val) |
| Sets the secure connections confirmation value in the Bluetooth low energy carrier configuration record for the given record handle. | |
| ifx_status_t | ifx_record_ble_set_secure_conn_random (ifx_record_handle_t *handle, const ifx_ble_config_field_t *secure_conn_random_val) |
| Sets the secure connections random value in the Bluetooth low energy carrier configuration record for the given record handle. | |
| ifx_status_t | ifx_record_ble_set_appearance (ifx_record_handle_t *handle, const ifx_ble_config_field_t *appearance) |
| Sets an appearance in the Bluetooth low energy carrier configuration record for the given record handle. | |
| ifx_status_t | ifx_record_ble_set_flags (ifx_record_handle_t *handle, const ifx_ble_config_field_t *flags) |
| Sets the flags in the Bluetooth low energy carrier configuration record for the given record handle. | |
| ifx_status_t | ifx_record_ble_set_local_name (ifx_record_handle_t *handle, uint8_t config_type, const ifx_ble_config_field_t *local_name) |
| Sets the local name in the Bluetooth low energy carrier configuration record for the given record handle. | |
| ifx_status_t | ifx_record_ble_set_additional_ad_data (ifx_record_handle_t *handle, const ifx_record_ad_data_t *additional_data, uint32_t count) |
| Sets the array of additional AD data in the Bluetooth low energy carrier configuration record for the given record handle. | |
| ifx_status_t | ifx_record_ble_get_device_addr (const ifx_record_handle_t *handle, uint8_t *device_addr, ifx_ble_device_addr_type *device_addr_type) |
| Gets the device address of the Bluetooth low energy carrier configuration record from the given record handle. | |
| ifx_status_t | ifx_record_ble_get_role (const ifx_record_handle_t *handle, ifx_ble_config_field_t *role) |
| Gets the low energy (LE) role of the Bluetooth low energy carrier configuration record from the given record handle. | |
| ifx_status_t | ifx_record_ble_get_security_tk_val (const ifx_record_handle_t *handle, ifx_ble_config_field_t *security_manager_tk_val) |
| Gets the security manager TK value of the Bluetooth low energy carrier configuration record from the given record handle. | |
| ifx_status_t | ifx_record_ble_get_secure_conn_confirm (const ifx_record_handle_t *handle, ifx_ble_config_field_t *secure_conn_confirmation_val) |
| Gets the secure connections confirmation value of the Bluetooth low energy carrier configuration record from the given record handle. | |
| ifx_status_t | ifx_record_ble_get_secure_conn_random (const ifx_record_handle_t *handle, ifx_ble_config_field_t *secure_conn_random_val) |
| Gets the secure connections random value of the Bluetooth low energy carrier configuration record from the given record handle. | |
| ifx_status_t | ifx_record_ble_get_appearance (const ifx_record_handle_t *handle, ifx_ble_config_field_t *appearance) |
| Gets the appearance of the Bluetooth low energy carrier configuration record from the given record handle. | |
| ifx_status_t | ifx_record_ble_get_flags (const ifx_record_handle_t *handle, ifx_ble_config_field_t *flags) |
| Gets the flags of the Bluetooth low energy carrier configuration record from the given record handle. | |
| ifx_status_t | ifx_record_ble_get_local_name (const ifx_record_handle_t *handle, uint8_t *config_type, ifx_ble_config_field_t *local_name) |
| Gets the local name of the Bluetooth low energy carrier configuration record from the given record handle. | |
| ifx_status_t | ifx_record_ble_get_additional_ad_data (const ifx_record_handle_t *handle, ifx_record_ad_data_t *additional_data, uint32_t *count) |
| Gets the array of additional AD data of the Bluetooth low energy carrier configuration record from the given record handle. | |
Model interface to create the Bluetooth low energy (BLE) carrier configuration record types and set/get record fields.
Definition in file ifx-record-bluetooth-le.h.
| #define IFX_RECORD_BLE_GET UINT8_C(0x01) |
Identifier for model get Bluetooth LE record.
Definition at line 26 of file ifx-record-bluetooth-le.h.
| #define IFX_RECORD_BLE_RELEASE_MEMORY UINT8_C(0x03) |
Identifier for model bluetooth LE record release memory.
Definition at line 36 of file ifx-record-bluetooth-le.h.
| #define IFX_RECORD_BLE_SET UINT8_C(0x02) |
Identifier for model set bluetooth LE record ID.
Definition at line 31 of file ifx-record-bluetooth-le.h.
| #define IFX_RECORD_BLE_TYPE "application/vnd.bluetooth.le.oob" |
Type information for bluetooth record.
Definition at line 41 of file ifx-record-bluetooth-le.h.
| #define IFX_RECORD_TYPE_LEN_BLE_DEV_ADDR UINT8_C(0x1) |
Length of device address type field.
Definition at line 46 of file ifx-record-bluetooth-le.h.
Enumeration defines the bluetooth low energy device address type.
Definition at line 53 of file ifx-record-bluetooth-le.h.
| ifx_status_t ifx_record_ble_get_additional_ad_data | ( | const ifx_record_handle_t * | handle, |
| ifx_record_ad_data_t * | additional_data, | ||
| uint32_t * | count ) |
Gets the array of additional AD data of the Bluetooth low energy carrier configuration record from the given record handle.
| [in] | handle | Pointer to the record handle obtained while creating the record. |
| [out] | additional_data | Pointer to the array of additional AD data. |
| [out] | count | Pointer to the count of additional data. |
| IFX_SUCCESS | If the get operation is successful |
| IFX_ILLEGAL_ARGUMENT | If invalid/NULL parameter is passed to function |
| IFX_RECORD_DATA_FIELD_NA | If the data field is invalid |
| IFX_OUT_OF_MEMORY | If memory allocation fails |
| IFX_RECORD_INVALID | If record type is invalid |
| ifx_status_t ifx_record_ble_get_appearance | ( | const ifx_record_handle_t * | handle, |
| ifx_ble_config_field_t * | appearance ) |
Gets the appearance of the Bluetooth low energy carrier configuration record from the given record handle.
| [in] | handle | Pointer to the record handle obtained while creating the record. |
| [out] | appearance | Pointer to the BLE appearance. |
| IFX_SUCCESS | If the get operation is successful |
| IFX_ILLEGAL_ARGUMENT | If invalid/NULL parameter is passed to function |
| IFX_RECORD_DATA_FIELD_NA | If the data field is invalid |
| IFX_RECORD_INVALID | If record type is invalid |
| IFX_INVALID_STATE | If the object is in an invalid state |
| ifx_status_t ifx_record_ble_get_device_addr | ( | const ifx_record_handle_t * | handle, |
| uint8_t * | device_addr, | ||
| ifx_ble_device_addr_type * | device_addr_type ) |
Gets the device address of the Bluetooth low energy carrier configuration record from the given record handle.
| [in] | handle | Pointer to the record handle obtained while creating the record. |
| [out] | device_addr | 6 octets of the Bluetooth low energy device address are encoded in the Little Endian order. |
| [out] | device_addr_type | Pointer to the type that specifies whether the device address is public(0) or random(1) |
| IFX_SUCCESS | If the get operation is successful |
| IFX_ILLEGAL_ARGUMENT | If invalid/NULL parameter is passed to function |
| IFX_RECORD_DATA_FIELD_NA | If data field is invalid |
| IFX_RECORD_INVALID | If record type is invalid |
| ifx_status_t ifx_record_ble_get_flags | ( | const ifx_record_handle_t * | handle, |
| ifx_ble_config_field_t * | flags ) |
Gets the flags of the Bluetooth low energy carrier configuration record from the given record handle.
| [in] | handle | Pointer to the record handle obtained while creating the record. |
| [out] | flags | Pointer to the LE flags. |
| IFX_SUCCESS | If the get operation is successful |
| IFX_ILLEGAL_ARGUMENT | If invalid/NULL parameter is passed to function |
| IFX_RECORD_DATA_FIELD_NA | If the data field is invalid |
| IFX_RECORD_INVALID | If record type is invalid |
| IFX_INVALID_STATE | If the object is in an invalid state |
| ifx_status_t ifx_record_ble_get_local_name | ( | const ifx_record_handle_t * | handle, |
| uint8_t * | config_type, | ||
| ifx_ble_config_field_t * | local_name ) |
Gets the local name of the Bluetooth low energy carrier configuration record from the given record handle.
| [in] | handle | Pointer to the record handle obtained while creating the record. |
| [out] | config_type | Type of the local name (SHORTENED_LOCAL_NAME or COMPLETE_LOCAL_NAME) |
| [out] | local_name | Pointer to the Bluetooth low energy local name. |
| IFX_SUCCESS | If the get operation is successful |
| IFX_ILLEGAL_ARGUMENT | If invalid/NULL parameter is passed to function |
| IFX_RECORD_DATA_FIELD_NA | If the data field is invalid |
| IFX_RECORD_INVALID | If record type is invalid |
| IFX_INVALID_STATE | If the object is in an invalid state |
| ifx_status_t ifx_record_ble_get_role | ( | const ifx_record_handle_t * | handle, |
| ifx_ble_config_field_t * | role ) |
Gets the low energy (LE) role of the Bluetooth low energy carrier configuration record from the given record handle.
| [in] | handle | Pointer to the record handle obtained while creating the record. |
| [out] | role | Pointer to the low energy role. |
| IFX_SUCCESS | If get operation is successful |
| IFX_ILLEGAL_ARGUMENT | If invalid/NULL parameter is passed to function |
| IFX_RECORD_DATA_FIELD_NA | If the data field is invalid |
| IFX_RECORD_INVALID | If record type is invalid |
| IFX_INVALID_STATE | If the object is in an invalid state |
| ifx_status_t ifx_record_ble_get_secure_conn_confirm | ( | const ifx_record_handle_t * | handle, |
| ifx_ble_config_field_t * | secure_conn_confirmation_val ) |
Gets the secure connections confirmation value of the Bluetooth low energy carrier configuration record from the given record handle.
| [in] | handle | Pointer to the record handle obtained while creating the record. |
| [out] | secure_conn_confirmation_val | Pointer to the BLE secure connections confirmation value. |
| IFX_SUCCESS | If the get operation is successful |
| IFX_ILLEGAL_ARGUMENT | If invalid/NULL parameter is passed to function |
| IFX_RECORD_DATA_FIELD_NA | If the data field is invalid |
| IFX_RECORD_INVALID | If record type is invalid |
| IFX_INVALID_STATE | If the object is in an invalid state |
| ifx_status_t ifx_record_ble_get_secure_conn_random | ( | const ifx_record_handle_t * | handle, |
| ifx_ble_config_field_t * | secure_conn_random_val ) |
Gets the secure connections random value of the Bluetooth low energy carrier configuration record from the given record handle.
| [in] | handle | Pointer to the record handle obtained while creating the record. |
| [out] | secure_conn_random_val | Pointer to the BLE secure connections random value. |
| IFX_SUCCESS | If get operation is successful |
| IFX_ILLEGAL_ARGUMENT | If invalid/NULL parameter is passed to function |
| IFX_RECORD_DATA_FIELD_NA | If the data field is invalid |
| IFX_RECORD_INVALID | If record type is invalid |
| IFX_INVALID_STATE | If the object is in an invalid state |
| ifx_status_t ifx_record_ble_get_security_tk_val | ( | const ifx_record_handle_t * | handle, |
| ifx_ble_config_field_t * | security_manager_tk_val ) |
Gets the security manager TK value of the Bluetooth low energy carrier configuration record from the given record handle.
| [in] | handle | Pointer to the record handle obtained while creating the record. |
| [out] | security_manager_tk_val | Pointer to the BLE security manager TK value. |
| IFX_SUCCESS | If the get operation is successful |
| IFX_ILLEGAL_ARGUMENT | If invalid/NULL parameter is passed to function |
| IFX_RECORD_DATA_FIELD_NA | If the data field is invalid |
| IFX_RECORD_INVALID | If record type is invalid |
| IFX_INVALID_STATE | If the object is in an invalid state |
| ifx_status_t ifx_record_ble_new | ( | ifx_record_handle_t * | handle | ) |
Creates the Bluetooth low energy carrier configuration record and handle of the created record. This handle holds the values of the record needed for encode and decode operations.
| [out] | handle | Handle of the created Bluetooth low energy carrier configuration record. |
| IFX_SUCCESS | If record creation operation is successful |
| IFX_ILLEGAL_ARGUMENT | If invalid/NULL parameter is passed to function |
| IFX_OUT_OF_MEMORY | If memory allocation fails |
| ifx_status_t ifx_record_ble_set_additional_ad_data | ( | ifx_record_handle_t * | handle, |
| const ifx_record_ad_data_t * | additional_data, | ||
| uint32_t | count ) |
Sets the array of additional AD data in the Bluetooth low energy carrier configuration record for the given record handle.
| [out] | handle | Pointer to the record handle obtained while creating the record. |
| [in] | additional_data | Pointer to the array of additional AD data. |
| [in] | count | Count of the additional data. |
| IFX_SUCCESS | If the set operation is successful |
| IFX_ILLEGAL_ARGUMENT | If invalid/NULL parameter is passed to function |
| IFX_OUT_OF_MEMORY | If memory allocation fails |
| IFX_RECORD_INVALID | If record type is invalid |
| ifx_status_t ifx_record_ble_set_appearance | ( | ifx_record_handle_t * | handle, |
| const ifx_ble_config_field_t * | appearance ) |
Sets an appearance in the Bluetooth low energy carrier configuration record for the given record handle.
| [out] | handle | Pointer to the record handle obtained while creating the record. |
| [in] | appearance | Pointer to the BLE appearance. |
| IFX_SUCCESS | If the set operation is successful |
| IFX_ILLEGAL_ARGUMENT | If invalid/NULL parameter is passed to function |
| IFX_RECORD_INVALID | If record type is invalid |
| ifx_status_t ifx_record_ble_set_device_addr | ( | ifx_record_handle_t * | handle, |
| const uint8_t * | device_addr, | ||
| ifx_ble_device_addr_type | device_addr_type ) |
Sets the device address in the Bluetooth low energy (BLE) carrier configuration record for the given record handle.
| [out] | handle | Pointer to the record handle obtained while creating the record. |
| [in] | device_addr | 6 octets of the Bluetooth low energy device address are encoded in the Little Endian order. |
| [in] | device_addr_type | Specifies whether the device address is public(0) or random(1). |
| IFX_SUCCESS | If the set operation is successful |
| IFX_ILLEGAL_ARGUMENT | If invalid/NULL parameter is passed to function |
| IFX_OUT_OF_MEMORY | If memory allocation fails |
| IFX_RECORD_INVALID | If record type is invalid |
| ifx_status_t ifx_record_ble_set_flags | ( | ifx_record_handle_t * | handle, |
| const ifx_ble_config_field_t * | flags ) |
Sets the flags in the Bluetooth low energy carrier configuration record for the given record handle.
| [out] | handle | Pointer to the record handle obtained while creating the record. |
| [in] | flags | Pointer to the LE flags. |
| IFX_SUCCESS | If the set operation is successful |
| IFX_ILLEGAL_ARGUMENT | If invalid/NULL parameter is passed to function |
| IFX_RECORD_INVALID | If record type is invalid |
| ifx_status_t ifx_record_ble_set_local_name | ( | ifx_record_handle_t * | handle, |
| uint8_t | config_type, | ||
| const ifx_ble_config_field_t * | local_name ) |
Sets the local name in the Bluetooth low energy carrier configuration record for the given record handle.
| [out] | handle | Pointer to the record handle obtained while creating the record. |
| [in] | config_type | Type of the local name (SHORTENED_LOCAL_NAME or COMPLETE_LOCAL_NAME) |
| [in] | local_name | Pointer to the Bluetooth low energy local name. |
| IFX_SUCCESS | If the set operation is successful |
| IFX_ILLEGAL_ARGUMENT | If invalid/NULL parameter is passed to function |
| IFX_RECORD_INVALID | If record type is invalid |
| ifx_status_t ifx_record_ble_set_role | ( | ifx_record_handle_t * | handle, |
| const ifx_ble_config_field_t * | role ) |
Sets the low energy (LE) role in the Bluetooth low energy carrier configuration record for the given record handle.
| [out] | handle | Pointer to the record handle obtained while creating the record. |
| [in] | role | Pointer to the low energy role. |
| IFX_SUCCESS | If set operation is successful |
| IFX_ILLEGAL_ARGUMENT | If invalid/NULL parameter is passed to function |
| IFX_RECORD_INVALID | If record type is invalid |
| ifx_status_t ifx_record_ble_set_secure_conn_confirm | ( | ifx_record_handle_t * | handle, |
| const ifx_ble_config_field_t * | secure_conn_confirmation_val ) |
Sets the secure connections confirmation value in the Bluetooth low energy carrier configuration record for the given record handle.
| [out] | handle | Pointer to the record handle obtained while creating the record. |
| [in] | secure_conn_confirmation_val | Pointer to the BLE secure connections confirmation value |
| IFX_SUCCESS | If the set operation is successful |
| IFX_ILLEGAL_ARGUMENT | If invalid/NULL parameter is passed to function |
| IFX_RECORD_INVALID | If record type is invalid |
| ifx_status_t ifx_record_ble_set_secure_conn_random | ( | ifx_record_handle_t * | handle, |
| const ifx_ble_config_field_t * | secure_conn_random_val ) |
Sets the secure connections random value in the Bluetooth low energy carrier configuration record for the given record handle.
| [out] | handle | Pointer to the record handle obtained while creating the record. |
| [in] | secure_conn_random_val | Pointer to the BLE secure connections random value. |
| IFX_SUCCESS | If the set operation is successful |
| IFX_ILLEGAL_ARGUMENT | If invalid/NULL parameter is passed to function |
| IFX_RECORD_INVALID | If record type is invalid |
| ifx_status_t ifx_record_ble_set_security_tk_val | ( | ifx_record_handle_t * | handle, |
| const ifx_ble_config_field_t * | security_manager_tk_val ) |
Sets the security manager temporary key (TK) value in the Bluetooth low energy carrier configuration record for the given record handle.
| [out] | handle | Pointer to the record handle obtained while creating the record. |
| [in] | security_manager_tk_val | Pointer to the low energy (BLE) security manager TK value. |
| IFX_SUCCESS | If the set operation is successful |
| IFX_ILLEGAL_ARGUMENT | If invalid/NULL parameter is passed to function |
| IFX_RECORD_INVALID | If record type is invalid |