Microchip® Advanced Software Framework

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Device Configuration APIs

This group includes GAP device configurations APIs.

Functions

at_ble_status_t at_ble_device_name_set (uint8_t *dev_name, uint8_t len)
 Set device name. More...
 
at_ble_status_t at_ble_gap_get_peer_deviceinfo (uint16_t conn_handle, at_ble_gapc_get_info_cmd_t *operation)
 Retrieve information about peer device or about the current active link expected events are AT_BLE_PEER_ATT_INFO_IND AT_BLE_CON_CHANNEL_MAP_IND. More...
 
at_ble_status_t at_ble_init (at_ble_init_config_t *args)
 Initialize bus interface, reset the link layer and the host , Initialize memory required for storing data base related data. More...
 
at_ble_status_t at_ble_set_att_config (at_ble_att_cfg_t *dev_att_cfg)
 Set attribute permissions configuration (Device Appearance permissions, slave preferred connection parameters, Device Name permissions, Service Change feature) More...
 
at_ble_status_t at_ble_set_channel_map (at_ble_channel_map_t *map)
 Set channel map. More...
 
at_ble_status_t at_ble_set_dev_config (at_ble_dev_config_t *config)
 Set device configuration. More...
 
at_ble_status_t at_ble_set_gap_deviceinfo (at_ble_gap_deviceinfo_t *gap_deviceinfo)
 Set GAP attribute data base (Appearance , slave preferred connection parameters , device name write permissions) More...
 
at_ble_status_t at_ble_set_privacy_key (at_ble_gap_irk_t *irk, uint16_t interval)
 Set device Identity Resolving Key. More...
 

at_ble_status_t at_ble_device_name_set ( uint8_t *  dev_name,
uint8_t  len 
)

Set device name.

Parameters
[in]dev_namethe new device name
[in]lenname length
Returns
Upon successful completion the function shall return AT_BLE_SUCCESS, Otherwise the function shall return at_ble_status_t
Parameters
[in]dev_namethe new device name
[in]lenname length
Returns
AT_BLE_SUCCESS Operation completed successfully
AT_BLE_INVALID_PARAM Invalid parameter supplied
AT_BLE_FAILURE Generic error

References AT_BLE_INVALID_PARAM, gapm_set_dev_name_handler(), and NULL.

at_ble_status_t at_ble_gap_get_peer_deviceinfo ( uint16_t  conn_handle,
at_ble_gapc_get_info_cmd_t operation 
)

Retrieve information about peer device or about the current active link expected events are AT_BLE_PEER_ATT_INFO_IND AT_BLE_CON_CHANNEL_MAP_IND.

Parameters
[in]operationrequested operation ,
See Also
at_ble_gapc_get_info_cmd_t
Parameters
[in]conn_handleHandle to the peer device
Returns
Upon successful completion the function shall return AT_BLE_SUCCESS, Otherwise the function shall return at_ble_status_t
at_ble_status_t at_ble_init ( at_ble_init_config_t args)

Initialize bus interface, reset the link layer and the host , Initialize memory required for storing data base related data.

Parameters
[in]argsPointer to specific data depends on API version
Warning
This function must be the first to be called.
Returns
Upon successful completion the function shall return AT_BLE_SUCCESS, Otherwise the function shall return at_ble_status_t
at_ble_status_t at_ble_set_att_config ( at_ble_att_cfg_t dev_att_cfg)

Set attribute permissions configuration (Device Appearance permissions, slave preferred connection parameters, Device Name permissions, Service Change feature)

Parameters
[in]dev_att_cfgpointer to attributes configuration
See Also
at_ble_att_cfg_t
Returns
Upon successful completion the function shall return AT_BLE_SUCCESS, Otherwise the function shall return at_ble_status_t
at_ble_status_t at_ble_set_channel_map ( at_ble_channel_map_t map)

Set channel map.

Parameters
[in]mappointer to mapping values
See Also
at_ble_channel_map_t
Returns
Upon successful completion the function shall return AT_BLE_SUCCESS, Otherwise the function shall return at_ble_status_t
at_ble_status_t at_ble_set_dev_config ( at_ble_dev_config_t config)

Set device configuration.

Parameters
[in]configPointer to configurations data structure
Note
Default values would be applied in case of not assign another configurations values.
See Also
at_ble_dev_config_t
Returns
Upon successful completion the function shall return AT_BLE_SUCCESS, Otherwise the function shall return at_ble_status_t
at_ble_status_t at_ble_set_gap_deviceinfo ( at_ble_gap_deviceinfo_t gap_deviceinfo)

Set GAP attribute data base (Appearance , slave preferred connection parameters , device name write permissions)

Parameters
[in]gap_deviceinfoGAP device information,
See Also
at_ble_gap_deviceinfo_t
Returns
Upon successful completion the function shall return AT_BLE_SUCCESS, Otherwise the function shall return at_ble_status_t

Set GAP attribute data base (Appearance , slave preferred connection parameters , device name write permissions)

Parameters
[in]gap_deviceinfogap device information
Returns
AT_BLE_SUCCESS Operation completed successfully
AT_BLE_INVALID_PARAM Invalid parameter supplied
AT_BLE_FAILURE Generic error

References device_info::appearance, at_ble_gap_deviceinfo_t::appearance, AT_BLE_INVALID_PARAM, AT_BLE_SUCCESS, AT_BLE_WRITE_AUTH, AT_BLE_WRITE_DISABLE, AT_BLE_WRITE_ENABLE, AT_BLE_WRITE_UNAUTH, at_ble_gap_deviceinfo_t::dev_name_perm, device_info::dev_name_write_perm, device, GAPM_WRITE_AUTH, GAPM_WRITE_DISABLE, GAPM_WRITE_ENABLE, GAPM_WRITE_UNAUTH, NULL, device_info::spcp_param, and at_ble_gap_deviceinfo_t::spcp_param.

at_ble_status_t at_ble_set_privacy_key ( at_ble_gap_irk_t irk,
uint16_t  interval 
)

Set device Identity Resolving Key.

Parameters
[in]irkdevice IRK used for resolvable random BD address generation
[in]intervalduration before regenerate device address in 10 ms units
Returns
Upon successful completion the function shall return AT_BLE_SUCCESS, Otherwise the function shall return at_ble_status_t
Parameters
[in]irkdevice IRK used for resolvable random BD address generation
[in]intervalduration before regenerate device address in 10 ms units
Returns
AT_BLE_SUCCESS Operation completed successfully
AT_BLE_FAILURE Generic error

References AT_BLE_INVALID_PARAM, AT_BLE_MAX_KEY_LEN, AT_BLE_SUCCESS, device, device_info::irk, at_ble_gap_irk_t::irk, at_ble_IRK_t::key, NULL, and device_info::renew_dur.