Microchip® Advanced Software Framework

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
GAP API

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.

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

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.

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

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.

Note
  • To clear the advertisement data and set it to a 0-length packet, simply provide a valid pointer (pAdvData/pSrData) with its corresponding length (dlen/srdlen) set to 0.
  • The call will fail if pAdvData and pSrData are both NULL since this would have no effect.
Parameters
[in]adv_dataRaw data to be placed in advertisement packet. If NULL, no changes are made to the current advertisement packet data.
[in]adv_data_lenData length for adv_data.
[in]scan_resp_dataRaw 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_lenData length for scan_resp_data
Returns
AT_BLE_SUCCESS Advertisement data successfully updated or cleared.
AT_BLE_INVALID_PARAM One of the length parameters is invalid.
AT_BLE_FAILURE Both pointer parameters are invalid.

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.

Parameters
[in]powerNew TX power in dB (attenuation 0..18 db in 3dB steps)
Returns
AT_BLE_SUCCESS TX value changed successfully
AT_BLE_INVALID_PARAM TX value is out of range
AT_BLE_FAILURE Other error
Warning
This function is NOT IMPLEMENTED and returns AT_BLE_FAILURE.

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).

Parameters
[in]typeAdvertising type, see at_ble_adv_type_t for more info
[in]modeeither non-discoverable,General, Limited or Broadcaster , at_ble_adv_mode_t for more details
[in]peer_addrFor AT_BLE_ADV_TYPE_DIRECTED mode only, known peer address
[in]filteredpolicy at_ble_filter_type_t for more details
[in]intervalAdvertising 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]timeoutAdvertising 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_randomnessif True the device will advertise at the exact interval without adding the random 10msec
Precondition
If it is required to change BD address, at_ble_addr_set should be used otherwise default address will be used
Warning
Advertising time-out "timeout" and randomness "disable_randomness" features are not supported.
Returns
AT_BLE_SUCCESS The BLE stack has started advertising
AT_BLE_PRIVACY_CFG_PB Advertising type conflicts with local device address type
AT_BLE_INVALID_PARAM Invalid parameter supplied
AT_BLE_FAILURE Generic error

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).

Returns
AT_BLE_SUCCESS The BLE stack has stopped advertising
AT_BLE_FAILURE Error to stop advertising (most probably not in advertising state)

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.

Note
  • Bonding information(information exchanged during pairing)such as key , authentication level should be stored by application in order to be reused during another connection
  • According to IO capabilities or Out Of Band (OOB), if it is possible to perform a pairing using PIN code or OOB data then AT_BLE_PAIR_KEY_REQUEST event will be received by application.
Parameters
[in]conn_handleHandle of the ongoing connection
[in]featuresLocal device requirements and IO capabilities
[in]ltkLocal device Long Term Key, null if not available
[in]csrkLocal device Connection Signature Resolution Key , null if not available
Returns
AT_BLE_SUCCESS Operation programmed successfully
AT_BLE_FAILURE Generic error

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.

Parameters
[in]conn_handleHandle of the connection to be updated
[in]connection_paramsNew parameters to be used
Returns
AT_BLE_SUCCESS Operation programmed successfully
AT_BLE_INVALID_PARAM Invalid parameter supplied
AT_BLE_FAILURE Generic error

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

Parameters
[in]peersa list of peers that the device will connect to one of them
[in]peer_countnumber of elements in peers, 0 to connect to any peer device
[in]scan_intervalscan interval in 625us units
[in]scan_windowscan window in 625us units
[in]connection_paramsparameters of the established connection
Returns
AT_BLE_SUCCESS Operation programmed successfully
AT_BLE_INVALID_PARAM Invalid parameter supplied
AT_BLE_FAILURE Generic error

Referenced by ble_scan_info(), and gap_dev_connect().

at_ble_status_t at_ble_connect_cancel ( void  )

Cancels an ongoing connection attempt.

Returns
AT_BLE_SUCCESS Operation canceled successfully
AT_BLE_FAILURE Generic error
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

Parameters
[in]handleHandle of the connection to be updated
[in]connection_paramsNew parameters to be used
Returns
AT_BLE_SUCCESS Operation programmed successfully
AT_BLE_INVALID_PARAM Invalid parameter supplied
AT_BLE_FAILURE Generic error
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
AT_BLE_SUCCESS Operation completed successfully
AT_BLE_INVALID_PARAM Invalid parameter supplied
AT_BLE_FAILURE Generic error

Referenced by at_ble_init(), ble_device_config(), and ble_set_device_name().

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.

Parameters
[in]conn_handleHandle of the connection to be updated
[in]key_foundIf true then a valid key is found in device database and will be used
[in]authAuthentication level
[in]keyLTK key used for encryption
Returns
AT_BLE_SUCCESS Operation completed successfully
AT_BLE_FAILURE Generic error

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.

Parameters
[in]conn_handleHandle of the connection to be updated
[in]keyLTK key used for encryption
[in]authAuthentication level , this information must be stored in device database after each pairing process at_ble_pair_done_t
Returns
AT_BLE_SUCCESS Operation completed successfully
AT_BLE_FAILURE Generic error

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

Parameters
[out]eventThe received event
[out]paramsReceived event data
[in]timeoutTime 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
Returns
AT_BLE_SUCCESS Operation completed successfully
AT_BLE_FAILURE Generic error

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

Parameters
[in]paramsParameters sent to the custom event
Returns
AT_BLE_SUCCESS Operation completed successfully
AT_BLE_FAILURE Generic error

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.

Parameters
[in]paramParameter to get
[out]value_buffBuffer to store the value in
[out]value_lenValue length
Warning
Not Supported
Returns
AT_BLE_SUCCESS Operation completed successfully
AT_BLE_FAILURE Generic error
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.

Parameters
[in]paramParameter to set
[in]value_buffBuffer where value is stored
[in]value_lenValue length
Warning
Not Supported
Returns
AT_BLE_SUCCESS Operation completed successfully
AT_BLE_FAILURE Generic error
int8_t at_ble_max_PA_gain_get ( at_ble_handle_t  conn_handle)

Gets maximum allowed TX gain of a given connection.

Parameters
[in]conn_handleHandle of the connection
Returns
Maximum PA gain in dB

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

Parameters
[in]conn_handleHandle of the ongoing connection
[in]typeType of requested key, must match the one asked for in AT_BLE_PAIR_KEY_REQUEST
[in]keyThe key requested
Returns
AT_BLE_SUCCESS Operation programmed successfully
AT_BLE_FAILURE Generic error

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.

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

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.

Parameters
[in]conn_handleHandle of the connection
Returns
RX power (RSSI) in dBm 0 or -1: Failed to get RX power

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.

Parameters
[in]conn_handleHandle of the connection
[in]range_maxNotifications will be received if RX power falls under this value but over range_min
[in]range_minNotifications will be received if RX power falls over this value but under range_max
Warning
Not Supported
Returns
AT_BLE_SUCCESS Operation completed successfully
AT_BLE_FAILURE Generic error
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

Parameters
[in]conn_handleHandle of the connection
Warning
Not Supported
Returns
AT_BLE_SUCCESS Operation completed successfully
AT_BLE_FAILURE Generic error
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.

Parameters
[in]intervalScan interval in 625us units
[in]windowScan window in 625us units
[in]timeoutScan time-out, 0x0000 disables time-out.
[in]typeControls the type of scan to perform either Passive or Active at_ble_scan_type_t for more details.
[in]modeEither General, Limited or Observer only, at_ble_scan_mode_t for more details
[in]filter_whitelistIf 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_duplicatesIf 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.
Warning
Scan time-out feature is not supported.
Returns
AT_BLE_SUCCESS Scan operation started successfully
AT_BLE_INVALID_PARAM Invalid parameter supplied
AT_BLE_FAILURE Generic error

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.

Returns
AT_BLE_SUCCESS Scan operation stopped successfully
AT_BLE_FAILURE Generic error

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.

Parameters
[in]handleHandle of the connection to be terminated
[in]signature_infoSignature_info, more info at at_ble_signature_info_t
[in]authenAuthentication value, one of at_ble_auth_t
[in]authorAuthorization value, one of at_ble_author_t
Returns
AT_BLE_SUCCESS Operation completed successfully
AT_BLE_FAILURE Generic error

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.

Parameters
[in]conn_handleHandle of the ongoing connection
[in]mitm_protectionBoolean value for Man-In-The-Middle protection 0 -> Disable, 1 -> Enable
[in]bondBoolean value for bonding 0 -> Disable, 1 -> Enable
Returns
AT_BLE_SUCCESS Operation programmed successfully
AT_BLE_FAILURE Generic error

Referenced by ble_send_slave_sec_request().

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)

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
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
AT_BLE_SUCCESS Operation completed successfully
AT_BLE_FAILURE Generic error
int8_t at_ble_tx_power_get ( at_ble_handle_t  conn_handle)

Gets TX power of a given connection.

Parameters
[in]conn_handlehandle of the connection
Returns
PA gain in dB

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.

Parameters
[in]conn_handleHandle of the connection
[in]powerdBmReduction of TX gain in dB (attenuation 0..18 dB in 3dB steps). Valid inputs are 0,3,6,...,18.
Returns
AT_BLE_SUCCESS Operation completed successfully
AT_BLE_INVALID_PARAM Invalid parameter supplied
1: Operation completed. In this case, the gain reduction requested is greater than the maximum gain for some channels; for those channels, the gain has been reduced to 0.

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.

Parameters
[in]addressPeer device address
Note
To get scan results from only peers added to white list, make sure that "filter_whitelist" argument of at_ble_scan_start is true.
Returns
AT_BLE_SUCCESS Operation completed successfully
AT_BLE_FAILURE Generic error

Referenced by app_init().

at_ble_status_t at_ble_whitelist_clear ( void  )

Clear the white-list.

Returns
AT_BLE_SUCCESS Operation completed successfully
AT_BLE_FAILURE Generic error
at_ble_status_t at_ble_whitelist_remove ( at_ble_addr_t address)

Removes a peer device address from the white-list.

Parameters
[in]addressPeer device address
Returns
AT_BLE_SUCCESS Operation completed successfully
AT_BLE_FAILURE Generic error