Microchip® Advanced Software Framework

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Address Management APIs

This group includes GAP address APIs.

Functions

at_ble_status_t at_ble_addr_get (at_ble_addr_t *address)
 Get device BT Address. More...
 
at_ble_status_t at_ble_addr_set (at_ble_addr_t *address)
 Set device BT Address. More...
 
at_ble_status_t at_ble_random_address_resolve (uint8_t nb_key, at_ble_addr_t *rand_addr, uint8_t *irk_key)
 Handles request of resolving a resolvable random address ,AT_BLE_RESOLV_RAND_ADDR_STATUS event is used to inform which key has been used to perform resolution for the returned address. More...
 

at_ble_status_t at_ble_addr_get ( at_ble_addr_t address)

Get device BT Address.

Parameters
[out]addresspointer to save returned BT Address
Returns
Upon successful completion the function shall return AT_BLE_SUCCESS, Otherwise the function shall return at_ble_status_t

Get device BT Address.

Parameters
[out]addressThe current BT address
Returns
AT_BLE_SUCCESS Operation completed successfully
AT_BLE_INVALID_PARAM Invalid parameter supplied
AT_BLE_FAILURE Generic error

References at_ble_addr_t::addr, AT_BLE_ADDRESS_PUBLIC, AT_BLE_INVALID_PARAM, dbg_le_get_bd_addr_req_handler(), NULL, and at_ble_addr_t::type.

at_ble_status_t at_ble_addr_set ( at_ble_addr_t address)

Set device BT Address.

Parameters
[in]addressthe new BT address
Precondition
In case of using resolvable random address, at_ble_set_dev_config is used to set device IRK key otherwise default randomness IRK key values will be used.
Note
Returns
Upon successful completion the function shall return AT_BLE_SUCCESS, Otherwise the function shall return at_ble_status_t

Set device BT Address.

Parameters
[in]addressThe new BT address
Precondition
In case of using resolvable random address, at_ble_set_privacy_key is used to set device IRK key otherwise default randomness IRK key values will be used.
Note
Returns
AT_BLE_SUCCESS Operation completed successfully
AT_BLE_INVALID_PARAM Invalid parameter supplied
AT_BLE_FAILURE Generic error

References at_ble_addr_t::addr, device_info::addr_auto_gen, device_info::at_addr_set, AT_BLE_ADDR_LEN, AT_BLE_ADDRESS_PUBLIC, AT_BLE_ADDRESS_RANDOM_PRIVATE_NON_RESOLVABLE, AT_BLE_ADDRESS_RANDOM_PRIVATE_RESOLVABLE, AT_BLE_ADDRESS_RANDOM_STATIC, AT_BLE_INVALID_PARAM, AT_BLE_SUCCESS, device_info::at_dev_addr, dbg_le_set_bd_addr_req_handler(), device, NULL, device_info::privacy_flags, status, and at_ble_addr_t::type.

at_ble_status_t at_ble_random_address_resolve ( uint8_t  nb_key,
at_ble_addr_t rand_addr,
uint8_t *  irk_key 
)

Handles request of resolving a resolvable random address ,AT_BLE_RESOLV_RAND_ADDR_STATUS event is used to inform which key has been used to perform resolution for the returned address.

Parameters
[in]nb_keynumber of provided IRK
[in]rand_addrpointer to the random address
[in]irk_keyarray of IRK used for address resolution
Note
  • irk_key argument, should be known after exchanging keys at security level (bonding).
Returns
Upon successful completion the function shall return AT_BLE_SUCCESS, Otherwise the function shall return at_ble_status_t

Handles request of resolving a resolvable random address ,AT_BLE_RESOLV_RAND_ADDR_STATUS event is used to inform which key has been used to perform resolution for the returned address.

Parameters
[in]nb_keyNumber of provided IRK
[in]rand_addrPointer to the random address
[in]irk_keyArray of IRK used for address resolution
Returns
AT_BLE_SUCCESS Operation completed successfully
AT_BLE_INVALID_PARAM Invalid parameter supplied
AT_BLE_FAILURE Generic error

References at_ble_addr_t::addr, AT_BLE_ADDRESS_RANDOM_PRIVATE_RESOLVABLE, AT_BLE_INVALID_PARAM, gapm_resolv_addr_cmd_handler(), NULL, and at_ble_addr_t::type.