Functions | |
at_ble_status_t | at_ble_addr_get (at_ble_addr_t *address) |
Get device public BT Address. More... | |
at_ble_status_t | at_ble_addr_set (at_ble_addr_t *address) |
Set the local device BT Address. More... | |
at_ble_status_t | at_ble_adv_data_set (uint8_t const *const adv_data, uint8_t adv_data_len, uint8_t const *const scan_resp_data, uint8_t scan_response_data_len) |
Set, clear or update advertisement and scan response data. More... | |
at_ble_status_t | at_ble_adv_set_tx_power (int8_t power) |
Set the Advertising transmission power. More... | |
at_ble_status_t | at_ble_adv_start (at_ble_adv_type_t type, at_ble_adv_mode_t mode, at_ble_addr_t *peer_addr, at_ble_filter_type_t filtered, uint16_t interval, uint16_t timeout, bool disable_randomness) |
Start advertising (GAP Discoverable, Connectable modes, Broadcast Procedure). More... | |
at_ble_status_t | at_ble_adv_stop (void) |
Stop advertising (GAP Discoverable, Connectable modes, Broadcast Procedure). More... | |
at_ble_status_t | at_ble_authenticate (at_ble_handle_t conn_handle, at_ble_pair_features_t *features, at_ble_LTK_t *ltk, at_ble_CSRK_t *csrk) |
Starts Pairing procedure for a given connection. More... | |
void | at_ble_conn_update_reply (at_ble_handle_t conn_handle, at_ble_connection_params_t *connection_params) |
Reply to connection parameters update request AT_BLE_CONN_PARAM_UPDATE_REQUEST. More... | |
at_ble_status_t | at_ble_connect (at_ble_addr_t peers[], uint8_t peer_count, uint16_t scan_interval, uint16_t scan_window, at_ble_connection_params_t *connection_params) |
Connect to a peer device. More... | |
at_ble_status_t | at_ble_connect_cancel (void) |
Cancels an ongoing connection attempt. More... | |
at_ble_status_t | at_ble_connection_param_update (at_ble_handle_t handle, at_ble_connection_params_t *connection_params) |
Update the connection parameters of an ongoing connection. More... | |
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_disconnect (at_ble_handle_t handle, at_ble_disconnect_reason_t reason) |
Disconnect a connected peer device. More... | |
at_ble_status_t | at_ble_encryption_request_reply (at_ble_handle_t conn_handle, at_ble_auth_t auth, bool key_found, at_ble_LTK_t *key) |
Responds to encryption start request from master device AT_BLE_ENCRYPTION_REQUEST , once encryption starts AT_BLE_ENCRYPTION_STATUS_CHANGED event is delivered. More... | |
at_ble_status_t | at_ble_encryption_start (at_ble_handle_t conn_handle, at_ble_LTK_t *key, at_ble_auth_t auth) |
Starts encryption, once encryption starts AT_BLE_ENCRYPTION_STATUS_CHANGED event is delivered. More... | |
at_ble_status_t | at_ble_event_get (at_ble_events_t *event, void *params, uint32_t timeout) |
extracts the next event form the event queue More... | |
at_ble_status_t | at_ble_event_user_defined_post (void *params) |
Posts a user defined custom event into the event queue, allowing the user code to process other events in the same event handling loop. More... | |
at_ble_status_t | at_ble_gap_get_param (at_ble_parameters_t param, uint8_t *value_buff, uint16_t value_len) |
Fetch a GAP Parameter value. More... | |
at_ble_status_t | at_ble_gap_set_param (at_ble_parameters_t param, uint8_t *value_buff, uint16_t value_len) |
Change the GAP related parameters. More... | |
at_ble_status_t | at_ble_init (void *args) |
Reset the link layer and the host. More... | |
int8_t | at_ble_max_PA_gain_get (at_ble_handle_t conn_handle) |
Gets maximum allowed TX gain of a given connection. More... | |
at_ble_status_t | at_ble_pair_key_reply (at_ble_handle_t conn_handle, at_ble_pair_key_type_t type, uint8_t *key) |
Provides a passkey or OOB data that was requested via AT_BLE_PAIR_KEY_REQUEST event, If key type is AT_BLE_PAIR_PASSKEY, then a 6-byte ASCII string (digit 0..9 only). 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. More... | |
int8_t | at_ble_rx_power_get (at_ble_handle_t conn_handle) |
Gets RX power of a given connection. More... | |
at_ble_status_t | at_ble_rx_power_subscribe (at_ble_handle_t conn_handle, uint16_t range_max, uint16_t range_min) |
Subscribes for RX power level notifications. More... | |
at_ble_status_t | at_ble_rx_power_unsubscribe (at_ble_handle_t conn_handle) |
Unsubscribe form RX power level notifications. More... | |
at_ble_status_t | at_ble_scan_start (uint16_t interval, uint16_t window, uint16_t timeout, at_ble_scan_type_t type, at_ble_scan_mode_t mode, bool filter_whitelist, bool filter_duplicates) |
Start scan operation. More... | |
at_ble_status_t | at_ble_scan_stop (void) |
Stops an ongoing scan operation. More... | |
at_ble_status_t | at_ble_sec_info_set (at_ble_handle_t handle, at_ble_signature_info_t signature_info, at_ble_auth_t authen, at_ble_author_t author) |
Set specific link security configuration and bonding data. More... | |
at_ble_status_t | at_ble_send_slave_sec_request (at_ble_handle_t conn_handle, bool mitm_protection, bool bond) |
Send slave security request to master. More... | |
at_ble_status_t | at_ble_set_dev_config (at_ble_gap_role role) |
Set GAP attribute data base into BLE chip. More... | |
at_ble_status_t | at_ble_set_gap_deviceinfo (at_ble_gap_deviceinfo_t *gap_deviceinfo) |
Set GAP attribute data base in BLE API (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... | |
int8_t | at_ble_tx_power_get (at_ble_handle_t conn_handle) |
Gets TX power of a given connection. More... | |
at_ble_status_t | at_ble_tx_power_set (at_ble_handle_t conn_handle, int8_t powerdBm) |
Sets TX gain, relative to maximum gain, for a given connection. More... | |
at_ble_status_t | at_ble_whitelist_add (at_ble_addr_t *address) |
Adds a peer device address to the white-list. More... | |
at_ble_status_t | at_ble_whitelist_clear (void) |
Clear the white-list. More... | |
at_ble_status_t | at_ble_whitelist_remove (at_ble_addr_t *address) |
Removes a peer device address from the white-list. More... | |
at_ble_status_t at_ble_addr_get | ( | at_ble_addr_t * | address | ) |
Get device public BT Address.
[out] | address | The current BT address |
Referenced by app_init(), at_ble_adv_start(), at_ble_connect(), at_ble_scan_start(), ble_device_config(), ble_set_address(), and ble_set_dev_config().
at_ble_status_t at_ble_addr_set | ( | at_ble_addr_t * | address | ) |
Set the local device BT Address.
[in] | address | The new BT address |
Referenced by app_init(), ble_device_config(), ble_set_address(), and ble_set_dev_config().
at_ble_status_t at_ble_adv_data_set | ( | uint8_t const *const | adv_data, |
uint8_t | adv_data_len, | ||
uint8_t const *const | scan_resp_data, | ||
uint8_t | scan_response_data_len | ||
) |
Set, clear or update advertisement and scan response data.
[in] | adv_data | Raw data to be placed in advertisement packet. If NULL, no changes are made to the current advertisement packet data. |
[in] | adv_data_len | Data length for adv_data. |
[in] | scan_resp_data | Raw data to be placed in scan response packet. If NULL, no changes are made to the current scan response packet data. |
[in] | scan_response_data_len | Data length for scan_resp_data |
Referenced by altbeacon_init(), app_init(), beacon_init(), ble_advertisement_data_set(), ble_bat_start_advertise(), ble_heart_rate_start_advertise(), ble_trans_service_advertise(), brd_start_broadcast(), csc_prf_dev_adv(), eddystone_adv_start(), esurl_conf_adv_start(), prepare_advertisement(), and pxp_reporter_adv().
at_ble_status_t at_ble_adv_set_tx_power | ( | int8_t | power | ) |
Set the Advertising transmission power.
[in] | power | New TX power in dB (attenuation 0..18 db in 3dB steps) |
References AT_BLE_FAILURE.
at_ble_status_t at_ble_adv_start | ( | at_ble_adv_type_t | type, |
at_ble_adv_mode_t | mode, | ||
at_ble_addr_t * | peer_addr, | ||
at_ble_filter_type_t | filtered, | ||
uint16_t | interval, | ||
uint16_t | timeout, | ||
bool | disable_randomness | ||
) |
Start advertising (GAP Discoverable, Connectable modes, Broadcast Procedure).
[in] | type | Advertising type, see at_ble_adv_type_t for more info |
[in] | mode | either non-discoverable,General, Limited or Broadcaster , at_ble_adv_mode_t for more details |
[in] | peer_addr | For AT_BLE_ADV_TYPE_DIRECTED mode only, known peer address |
[in] | filtered | policy at_ble_filter_type_t for more details |
[in] | interval | Advertising interval between 0x0020 and 0x4000 in 0.625 ms units (20ms to 10.24s). This parameter must be set to 0 if type equals AT_BLE_ADV_TYPE_DIRECTED |
[in] | timeout | Advertising time-out between 0x0001 and 0x3FFF in seconds, 0x0000 disables time-out. This parameter must be set to 0 if type equals AT_BLE_ADV_TYPE_DIRECTED |
[in] | disable_randomness | if True the device will advertise at the exact interval without adding the random 10msec |
Referenced by altbeacon_init(), anp_client_adv(), app_disconnected_event_handler(), app_init(), battery_service_advertise(), battery_start_advertisement(), beacon_init(), ble_bat_start_advertise(), ble_heart_rate_start_advertise(), ble_trans_service_advertise(), blp_sensor_adv(), brd_start_broadcast(), csc_prf_dev_adv(), csc_prf_disconnect_event_handler(), device_information_advertise(), eddystone_adv_start(), esurl_conf_adv_start(), fmp_target_adv(), fmp_target_disconnect_event_handler(), hid_prf_dev_adv(), hid_prf_disconnect_event_handler(), hr_sensor_adv(), htpt_set_advertisement_data(), pas_client_adv(), pxp_disconnect_event_handler(), pxp_reporter_adv(), pxp_reporter_disconnect_event_handler(), sps_service_advertise(), start_advertise(), time_info_adv(), and time_info_disconnected_event_handler().
at_ble_status_t at_ble_adv_stop | ( | void | ) |
Stop advertising (GAP Discoverable, Connectable modes, Broadcast Procedure).
Referenced by disconnect_ble(), and eddystone_adv_stop().
at_ble_status_t at_ble_authenticate | ( | at_ble_handle_t | conn_handle, |
at_ble_pair_features_t * | features, | ||
at_ble_LTK_t * | ltk, | ||
at_ble_CSRK_t * | csrk | ||
) |
Starts Pairing procedure for a given connection.
This API will initiate the authentication procedure, given local device requirements and IO capabilities the authentication will proceed in a number of ways, progress is monitored and controlled via the events : AT_BLE_PAIR_KEY_REQUEST ,AT_BLE_PAIR_DONE
In the central role, this function will send an SMP Pairing Request, otherwise in the peripheral role, this function will reply to AT_BLE_PAIR_REQUEST.
[in] | conn_handle | Handle of the ongoing connection |
[in] | features | Local device requirements and IO capabilities |
[in] | ltk | Local device Long Term Key, null if not available |
[in] | csrk | Local device Connection Signature Resolution Key , null if not available |
Referenced by ble_pair_request_handler(), ble_slave_security_handler(), and ble_slave_security_request_handler().
void at_ble_conn_update_reply | ( | at_ble_handle_t | conn_handle, |
at_ble_connection_params_t * | connection_params | ||
) |
Reply to connection parameters update request AT_BLE_CONN_PARAM_UPDATE_REQUEST.
[in] | conn_handle | Handle of the connection to be updated |
[in] | connection_params | New parameters to be used |
References at_ble_connection_params_t::ce_len_max, at_ble_connection_params_t::ce_len_min, and gapc_param_update_cfm_handler().
Referenced by ble_conn_param_update_req().
at_ble_status_t at_ble_connect | ( | at_ble_addr_t | peers[], |
uint8_t | peer_count, | ||
uint16_t | scan_interval, | ||
uint16_t | scan_window, | ||
at_ble_connection_params_t * | connection_params | ||
) |
Connect to a peer device.
Connecting to a peer device, implicitly starting the necessary scan operation then connecting if a device in the peers list is found. This API returns immediately after the operation is programmed, actual connection establishment or failure is marked with AT_BLE_CONNECTED event
[in] | peers | a list of peers that the device will connect to one of them |
[in] | peer_count | number of elements in peers, 0 to connect to any peer device |
[in] | scan_interval | scan interval in 625us units |
[in] | scan_window | scan window in 625us units |
[in] | connection_params | parameters of the established connection |
Referenced by ble_scan_info(), and gap_dev_connect().
at_ble_status_t at_ble_connect_cancel | ( | void | ) |
Cancels an ongoing connection attempt.
at_ble_status_t at_ble_connection_param_update | ( | at_ble_handle_t | handle, |
at_ble_connection_params_t * | connection_params | ||
) |
Update the connection parameters of an ongoing connection.
This API returns after programming the new values but before they take effect; the actual effect of the parameters is marked by the event AT_BLE_CONN_PARAM_UPDATE_DONE
[in] | handle | Handle of the connection to be updated |
[in] | connection_params | New parameters to be used |
at_ble_status_t at_ble_device_name_set | ( | uint8_t * | dev_name, |
uint8_t | len | ||
) |
Set device name.
[in] | dev_name | the new device name |
[in] | len | name length |
Referenced by at_ble_init(), ble_device_config(), and ble_set_device_name().
at_ble_status_t at_ble_disconnect | ( | at_ble_handle_t | handle, |
at_ble_disconnect_reason_t | reason | ||
) |
Disconnect a connected peer device.
[in] | handle | Handle of the connection to be terminated |
[in] | reason | Disconnection reason, more info at at_ble_disconnect_reason_t |
Referenced by anp_client_discovery_complete_handler(), app_pair_done_event_handler(), ble_connected_state_handler(), ble_encryption_request_handler(), ble_pair_done_handler(), ble_pair_key_request_handler(), ble_resolv_rand_addr_handler(), blp_disconnection(), disconnect_ble(), eddystone_url_frame_send(), fmp_locator_discovery_complete_handler(), hr_sensor_disconnect(), multirole_app_custom_event(), pas_client_discovery_complete_handler(), pxp_monitor_app_button_event(), pxp_monitor_discovery_complete_handler(), time_info_characteristic_read_response(), and time_info_discovery_complete_handler().
at_ble_status_t at_ble_encryption_request_reply | ( | at_ble_handle_t | conn_handle, |
at_ble_auth_t | auth, | ||
bool | key_found, | ||
at_ble_LTK_t * | key | ||
) |
Responds to encryption start request from master device AT_BLE_ENCRYPTION_REQUEST , once encryption starts AT_BLE_ENCRYPTION_STATUS_CHANGED event is delivered.
[in] | conn_handle | Handle of the connection to be updated |
[in] | key_found | If true then a valid key is found in device database and will be used |
[in] | auth | Authentication level |
[in] | key | LTK key used for encryption |
Referenced by ble_encryption_request_handler().
at_ble_status_t at_ble_encryption_start | ( | at_ble_handle_t | conn_handle, |
at_ble_LTK_t * | key, | ||
at_ble_auth_t | auth | ||
) |
Starts encryption, once encryption starts AT_BLE_ENCRYPTION_STATUS_CHANGED event is delivered.
[in] | conn_handle | Handle of the connection to be updated |
[in] | key | LTK key used for encryption |
[in] | auth | Authentication level , this information must be stored in device database after each pairing process at_ble_pair_done_t |
Referenced by ble_slave_security_request_handler(), and pxp_monitor_app_button_event().
at_ble_status_t at_ble_event_get | ( | at_ble_events_t * | event, |
void * | params, | ||
uint32_t | timeout | ||
) |
extracts the next event form the event queue
[out] | event | The received event |
[out] | params | Received event data |
[in] | timeout | Time in millisecond this function will block waiting of an event (0xFFFFFFFF to block indefinitely) in this case, if the user wishes to unblock the function at_ble_event_user_defined_post can be used |
Referenced by at_ble_max_PA_gain_get(), at_ble_rx_power_get(), at_ble_tx_power_get(), at_ble_tx_power_set(), ble_event_task(), and m2m_ble_event_get().
at_ble_status_t at_ble_event_user_defined_post | ( | void * | params | ) |
Posts a user defined custom event into the event queue, allowing the user code to process other events in the same event handling loop.
Events will be received with the as AT_BLE_CUSTOM_EVENT
[in] | params | Parameters sent to the custom event |
Referenced by button_cb(), and timer_callback_handler().
at_ble_status_t at_ble_gap_get_param | ( | at_ble_parameters_t | param, |
uint8_t * | value_buff, | ||
uint16_t | value_len | ||
) |
Fetch a GAP Parameter value.
[in] | param | Parameter to get |
[out] | value_buff | Buffer to store the value in |
[out] | value_len | Value length |
at_ble_status_t at_ble_gap_set_param | ( | at_ble_parameters_t | param, |
uint8_t * | value_buff, | ||
uint16_t | value_len | ||
) |
Change the GAP related parameters.
[in] | param | Parameter to set |
[in] | value_buff | Buffer where value is stored |
[in] | value_len | Value length |
at_ble_status_t at_ble_init | ( | void * | args | ) |
Reset the link layer and the host.
[in] | args | Pointer passed to platform_init() and interpreted by the platform. |
References device_info::addr_auto_gen, device_info::advLen, APP_CON_INTV_MAX, APP_CON_INTV_MIN, APP_CON_LATENCY, APP_SUPERV_TO, device_info::appearance, device_info::at_addr_set, at_ble_device_name_set(), AT_BLE_MAX_KEY_LEN, AT_BLE_SUCCESS, at_ble_spcp_t::con_intv_max, at_ble_spcp_t::con_intv_min, at_ble_spcp_t::con_latency, device_info::conn_handle, device_info::dev_name_write_perm, device, event_init(), GAP_device_name, GAP_TMR_PRIV_ADDR_INT, gapm_reset_req_handler(), GAPM_WRITE_DISABLE, i, device_info::irk, at_ble_IRK_t::key, platform_init(), device_info::privacy_flags, device_info::renew_dur, device_info::role, ROLE_SLAVE, device_info::spcp_param, device_info::srLen, status, and at_ble_spcp_t::superv_to.
Referenced by ble_init(), and m2m_ble_init().
int8_t at_ble_max_PA_gain_get | ( | at_ble_handle_t | conn_handle | ) |
Gets maximum allowed TX gain of a given connection.
[in] | conn_handle | Handle of the connection |
References at_ble_event_get(), AT_BLE_MAX_PA_GAIN_VALUE, AT_BLE_SUCCESS, event, gapc_get_tx_pwr_req_handler(), gapc_con_max_PA_gain_get_ind::max_PA_gain, and params.
at_ble_status_t at_ble_pair_key_reply | ( | at_ble_handle_t | conn_handle, |
at_ble_pair_key_type_t | type, | ||
uint8_t * | key | ||
) |
Provides a passkey or OOB data that was requested via AT_BLE_PAIR_KEY_REQUEST event, If key type is AT_BLE_PAIR_PASSKEY, then a 6-byte ASCII string (digit 0..9 only).
If key type is AT_BLE_PAIR_OOB , then a 16-byte OOB key value in Little Endian format
[in] | conn_handle | Handle of the ongoing connection |
[in] | type | Type of requested key, must match the one asked for in AT_BLE_PAIR_KEY_REQUEST |
[in] | key | The key requested |
Referenced by ble_pair_key_request_handler().
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.
[in] | nb_key | Number of provided IRK |
[in] | rand_addr | Pointer to the random address |
[in] | irk_key | Array of IRK used for address resolution |
Referenced by ble_connected_state_handler().
int8_t at_ble_rx_power_get | ( | at_ble_handle_t | conn_handle | ) |
Gets RX power of a given connection.
[in] | conn_handle | Handle of the connection |
References at_ble_event_get(), AT_BLE_RX_POWER_VALUE, AT_BLE_SUCCESS, event, GAPC_GET_CON_RSSI, gapc_get_info_cmd_handler(), params, and gapc_con_rssi_ind::rssi.
Referenced by rssi_update().
at_ble_status_t at_ble_rx_power_subscribe | ( | at_ble_handle_t | conn_handle, |
uint16_t | range_max, | ||
uint16_t | range_min | ||
) |
Subscribes for RX power level notifications.
If RX power falls between range_min and range_max the event AT_BLE_RX_POWER_VALUE will be received.
[in] | conn_handle | Handle of the connection |
[in] | range_max | Notifications will be received if RX power falls under this value but over range_min |
[in] | range_min | Notifications will be received if RX power falls over this value but under range_max |
at_ble_status_t at_ble_rx_power_unsubscribe | ( | at_ble_handle_t | conn_handle | ) |
Unsubscribe form RX power level notifications.
no more AT_BLE_RX_POWER_VALUE events will be received
[in] | conn_handle | Handle of the connection |
at_ble_status_t at_ble_scan_start | ( | uint16_t | interval, |
uint16_t | window, | ||
uint16_t | timeout, | ||
at_ble_scan_type_t | type, | ||
at_ble_scan_mode_t | mode, | ||
bool | filter_whitelist, | ||
bool | filter_duplicates | ||
) |
Start scan operation.
While the scan operation is ongoing, the application will always receive AT_BLE_SCAN_INFO event per found device.
In case of using AT_BLE_SCAN_GEN_DISCOVERY or AT_BLE_SCAN_LIM_DISCOVERY, also AT_BLE_SCAN_REPORT event will be received at the end of scan process.
[in] | interval | Scan interval in 625us units |
[in] | window | Scan window in 625us units |
[in] | timeout | Scan time-out, 0x0000 disables time-out. |
[in] | type | Controls the type of scan to perform either Passive or Active at_ble_scan_type_t for more details. |
[in] | mode | Either General, Limited or Observer only, at_ble_scan_mode_t for more details |
[in] | filter_whitelist | If true, get scan results only from white-listed devices added by at_ble_whitelist_add otherwise scan results will be got from any advertising device. |
[in] | filter_duplicates | If true, scan event will be generated only once per device. If false, multiple events per device may be generated. Note that if more than 10 devices are found, filtering only applies to the first 10 found; multiple scan events may be generated for 11th and subsequent devices. |
Referenced by app_init(), ble_l2cap_disconnected(), and gap_dev_scan().
at_ble_status_t at_ble_scan_stop | ( | void | ) |
Stops an ongoing scan operation.
Referenced by ble_observer_custom_event(), ble_scan_info(), ble_scan_info_handler(), ble_scan_report_app_event(), pxp_monitor_scan_data_handler(), and pxp_monitor_start_scan().
at_ble_status_t at_ble_sec_info_set | ( | at_ble_handle_t | handle, |
at_ble_signature_info_t | signature_info, | ||
at_ble_auth_t | authen, | ||
at_ble_author_t | author | ||
) |
Set specific link security configuration and bonding data.
[in] | handle | Handle of the connection to be terminated |
[in] | signature_info | Signature_info, more info at at_ble_signature_info_t |
[in] | authen | Authentication value, one of at_ble_auth_t |
[in] | author | Authorization value, one of at_ble_author_t |
References gapc_connection_cfm_handler(), at_ble_CSRK_t::key, at_ble_signature_info_t::local_csrk, at_ble_signature_info_t::lsign_counter, at_ble_signature_info_t::peer_csrk, and at_ble_signature_info_t::peer_sign_counter.
at_ble_status_t at_ble_send_slave_sec_request | ( | at_ble_handle_t | conn_handle, |
bool | mitm_protection, | ||
bool | bond | ||
) |
Send slave security request to master.
[in] | conn_handle | Handle of the ongoing connection |
[in] | mitm_protection | Boolean value for Man-In-The-Middle protection 0 -> Disable, 1 -> Enable |
[in] | bond | Boolean value for bonding 0 -> Disable, 1 -> Enable |
Referenced by ble_send_slave_sec_request().
at_ble_status_t at_ble_set_dev_config | ( | at_ble_gap_role | role | ) |
Set GAP attribute data base into BLE chip.
[in] | role | BLE role to set |
References APP_MAX_MTU, device_info::appearance, at_ble_spcp_t::con_intv_max, at_ble_spcp_t::con_intv_min, at_ble_spcp_t::con_latency, device_info::dev_name_write_perm, device, gapm_set_dev_config_cmd_handler(), GAPM_WRITE_DISABLE, device_info::irk, at_ble_IRK_t::key, device_info::privacy_flags, device_info::spcp_param, and at_ble_spcp_t::superv_to.
Referenced by ble_bat_start_advertise(), ble_device_config(), ble_heart_rate_start_advertise(), ble_set_dev_config(), ble_trans_service_advertise(), csc_prf_dev_adv(), csc_prf_disconnect_event_handler(), pxp_disconnect_event_handler(), pxp_reporter_adv(), and start_advertise().
at_ble_status_t at_ble_set_gap_deviceinfo | ( | at_ble_gap_deviceinfo_t * | gap_deviceinfo | ) |
Set GAP attribute data base in BLE API (Appearance , slave preferred connection parameters , device name write permissions)
[in] | gap_deviceinfo | gap device information |
at_ble_status_t at_ble_set_privacy_key | ( | at_ble_gap_irk_t * | irk, |
uint16_t | interval | ||
) |
Set device Identity Resolving Key.
[in] | irk | device IRK used for resolvable random BD address generation |
[in] | interval | duration before regenerate device address in 10 ms units |
int8_t at_ble_tx_power_get | ( | at_ble_handle_t | conn_handle | ) |
Gets TX power of a given connection.
[in] | conn_handle | handle of the connection |
References at_ble_event_get(), AT_BLE_SUCCESS, AT_BLE_TX_POWER_VALUE, event, gapc_get_tx_pwr_req_handler(), params, and gapc_con_tx_pow_get_ind::tx_pow_lvl.
at_ble_status_t at_ble_tx_power_set | ( | at_ble_handle_t | conn_handle, |
int8_t | powerdBm | ||
) |
Sets TX gain, relative to maximum gain, for a given connection.
[in] | conn_handle | Handle of the connection |
[in] | powerdBm | Reduction of TX gain in dB (attenuation 0..18 dB in 3dB steps). Valid inputs are 0,3,6,...,18. |
References at_ble_event_get(), AT_BLE_SUCCESS, AT_BLE_TX_POWER_SET, event, gapc_set_tx_pwr_req_handler(), params, and gapc_con_tx_pow_set_ind::status.
Referenced by eddystone_create_uid_frame(), eddystone_create_url_frame(), and esurl_conf_adv_start().
at_ble_status_t at_ble_whitelist_add | ( | at_ble_addr_t * | address | ) |
Adds a peer device address to the white-list.
[in] | address | Peer device address |
Referenced by app_init().
at_ble_status_t at_ble_whitelist_clear | ( | void | ) |
Clear the white-list.
at_ble_status_t at_ble_whitelist_remove | ( | at_ble_addr_t * | address | ) |
Removes a peer device address from the white-list.
[in] | address | Peer device address |