Microchip® Advanced Software Framework

at_ble_api.h File Reference

WINC3400 BLE API for Applications.

Copyright (c) 2017-2021 Microchip Technology Inc. and its subsidiaries.

#include <stdint.h>
#include <stdbool.h>

Data Structures

struct  at_ble_addr_t
 Blue-tooth Low Energy address Type. More...
 
struct  at_ble_char_presentation_t
 Characteristic presentation format. More...
 
struct  at_ble_characteristic_changed_t
 
struct  at_ble_characteristic_found_t
 
struct  at_ble_characteristic_read_response_t
 
struct  at_ble_characteristic_t
 Characteristic structure. More...
 
struct  at_ble_characteristic_write_response_t
 
struct  at_ble_conn_param_update_done_t
 
struct  at_ble_conn_param_update_request_t
 
struct  at_ble_connected_t
 AT_BLE_CONNECTED message format. More...
 
struct  at_ble_connection_params_t
 Connection parameters. More...
 
struct  at_ble_CSRK_t
 Connection Signature Resolution Key. More...
 
struct  at_ble_descriptor_found_t
 
struct  at_ble_disconnected_t
 
struct  at_ble_discovery_complete_t
 
struct  at_ble_encryption_request_t
 
struct  at_ble_encryption_status_changed_t
 
union  at_ble_event_parameter_t
 
struct  at_ble_gap_deviceinfo_t
 
struct  at_ble_gap_irk_t
 Identity Resolving Key. More...
 
struct  at_ble_gap_whitelist_t
 White-list structure. More...
 
struct  at_ble_included_service_found_t
 
struct  at_ble_included_service_t
 Service Definition. More...
 
struct  at_ble_indication_confirmed_t
 
struct  at_ble_indication_received_t
 
struct  at_ble_IRK_t
 
struct  at_ble_l2cap_rx_t
 
struct  at_ble_LTK_t
 Long Term Key. More...
 
struct  at_ble_max_PA_gain_value_t
 
struct  at_ble_notification_received_t
 
struct  at_ble_pair_done_t
 Pairing done message. More...
 
struct  at_ble_pair_features_t
 Pairing Features. More...
 
struct  at_ble_pair_key_request_t
 
struct  at_ble_pair_request_t
 
struct  at_ble_prf_date_time_t
 Time profile information. More...
 
struct  at_ble_prf_server_error_ind_t
 Message structure used to inform APP that an error has occurred in the profile server role task. More...
 
struct  at_ble_primary_service_found_t
 
struct  at_ble_rand_addr_changed_t
 
struct  at_ble_read_authorize_request_t
 
struct  at_ble_resolv_rand_addr_status_t
 
struct  at_ble_rx_power_value_t
 
struct  at_ble_scan_info_t
 
struct  at_ble_scan_report_t
 
struct  at_ble_service_changed_notification_confirmed_t
 
struct  at_ble_signature_info_t
 
struct  at_ble_slave_sec_request_t
 
struct  at_ble_spcp_t
 Slave preferred connection parameters. More...
 
struct  at_ble_tx_power_set_t
 
struct  at_ble_tx_power_value_t
 
struct  at_ble_uuid_t
 UUID type. More...
 
struct  at_ble_write_authorize_request_t
 

Macros

#define AT_BLE_ADDR_LEN   6
 BLE address length. More...
 
#define AT_BLE_ADV_INTERVAL_MAX   0x4000
 Maximum Advertising interval in 625 us units, i.e. More...
 
#define AT_BLE_ADV_INTERVAL_MIN   0x0020
 Minimum Advertising interval in 625 us units, i.e. More...
 
#define AT_BLE_ADV_MAX_SIZE   31
 Maximum size of advertising data in octets. More...
 
#define AT_BLE_ADV_NONCON_INTERVAL_MIN   0x00A0
 Minimum Advertising interval in 625 us units for non connectable mode, i.e. More...
 
#define AT_BLE_GAP_WHITELIST_ADDR_MAX_COUNT   (8)
 Maximum amount of addresses in a white-list. More...
 
#define AT_BLE_GAP_WHITELIST_IRK_MAX_COUNT   (8)
 Maximum amount of IRKs in a white-list. More...
 
#define AT_BLE_MAX_ATT_LEN   512
 ATT Maximum Attribute Length. More...
 
#define AT_BLE_MAX_KEY_LEN   (16)
 BLE security key maximum length. More...
 
#define AT_BLE_PASSKEY_LEN   (6)
 GAP Security Key Length. More...
 
#define AT_BLE_SCAN_INTERVAL_MAX   0x4000
 Maximum scanning interval in 625 us units , i.e. More...
 
#define AT_BLE_SCAN_INTERVAL_MIN   0x0004
 Minimum scanning interval in 625 us units , i.e. More...
 
#define AT_BLE_SCAN_WINDOW_MAX   0x4000
 Maximum scanning window in 625 us units , i.e. More...
 
#define AT_BLE_SCAN_WINDOW_MIN   0x0004
 Minimum scanning window in 625 us units , i.e. More...
 
#define AT_BLE_UUID_128_LEN   (16)
 UUID 128 size in bytes. More...
 
#define AT_BLE_UUID_16_LEN   (2)
 UUID 16 size in bytes. More...
 
#define AT_BLE_UUID_32_LEN   (4)
 UUID 32 size in bytes. More...
 
#define AT_CNX_INTERVAL_MAX   3200
 Maximum Connection interval in 1.250ms units, i.e. More...
 
#define AT_CNX_INTERVAL_MIN   6
 Minimum Connection interval in 1.250ms units, i.e. More...
 
#define AT_CNX_LATENCY_MAX   499
 Maximum Connection latency (number of connection events that may be missed). More...
 
#define AT_CNX_LATENCY_MIN   0
 Minimum Connection latency (number of connection events that may be missed). More...
 
#define AT_CNX_SUP_TO_MAX   3200
 Maximum Supervision timeout in 10ms units, i.e. More...
 
#define AT_CNX_SUP_TO_MIN   10
 Minimum Supervision timeout in 10ms units, i.e. More...
 
#define AT_DEFAULT_MTU   0x0017
 Maximum Transmission Unit. More...
 

Typedefs

typedef uint16_t at_ble_handle_t
 BLE connection handle. More...
 

Enumerations

enum  at_ble_addr_type_t {
  AT_BLE_ADDRESS_PUBLIC,
  AT_BLE_ADDRESS_RANDOM_STATIC,
  AT_BLE_ADDRESS_RANDOM_PRIVATE_RESOLVABLE,
  AT_BLE_ADDRESS_RANDOM_PRIVATE_NON_RESOLVABLE,
  AT_BLE_ADDRESS_INVALID
}
 BLE can accept either public or random addresses. More...
 
enum  at_ble_adv_mode_t {
  AT_BLE_ADV_NON_DISCOVERABLE,
  AT_BLE_ADV_GEN_DISCOVERABLE,
  AT_BLE_ADV_LIM_DISCOVERABLE,
  AT_BLE_ADV_BROADCASTER_MODE
}
 Advertising Mode. More...
 
enum  at_ble_adv_type_t {
  AT_BLE_ADV_TYPE_UNDIRECTED = 0x00,
  AT_BLE_ADV_TYPE_DIRECTED,
  AT_BLE_ADV_TYPE_SCANNABLE_UNDIRECTED,
  AT_BLE_ADV_TYPE_NONCONN_UNDIRECTED,
  AT_BLE_ADV_TYPE_SCAN_RESPONSE
}
 GAP Advertising types. More...
 
enum  at_ble_att_write_perm_t {
  AT_BLE_WRITE_DISABLE,
  AT_BLE_WRITE_ENABLE,
  AT_BLE_WRITE_UNAUTH,
  AT_BLE_WRITE_AUTH
}
 Write access. More...
 
enum  at_ble_attr_permissions_t {
  AT_BLE_ATTR_NO_PERMISSIONS = 0x00,
  AT_BLE_ATTR_READABLE_NO_AUTHN_NO_AUTHR = 0x01,
  AT_BLE_ATTR_READABLE_REQ_AUTHN_NO_AUTHR = 0x02,
  AT_BLE_ATTR_READABLE_NO_AUTHN_REQ_AUTHR = 0x03,
  AT_BLE_ATTR_READABLE_REQ_AUTHN_REQ_AUTHR = 0x04,
  AT_BLE_ATTR_WRITABLE_NO_AUTHN_NO_AUTHR = 0x10,
  AT_BLE_ATTR_WRITABLE_REQ_AUTHN_NO_AUTHR = 0x20,
  AT_BLE_ATTR_WRITABLE_NO_AUTHN_REQ_AUTHR = 0x30,
  AT_BLE_ATTR_WRITABLE_REQ_AUTHN_REQ_AUTHR = 0x40
}
 Attribute Permissions. More...
 
enum  at_ble_auth_levels_t {
  AT_BLE_NO_SEC = 0x00,
  AT_BLE_MODE1_L2_NOAUTH_PAIR_ENC,
  AT_BLE_MODE1_L3_AUTH_PAIR_ENC,
  AT_BLE_MODE2_L1_NOAUTH_DATA_SGN,
  AT_BLE_MODE2_L2_AUTH_DATA_SGN,
  AT_BLE_MODE1_L2_AUTH_PAIR_ENC
}
 Security authentication level. More...
 
enum  at_ble_auth_t {
  AT_BLE_AUTH_NO_MITM_NO_BOND,
  AT_BLE_AUTH_NO_MITM_BOND = 0x01,
  AT_BLE_AUTH_MITM_NO_BOND = 0x04,
  AT_BLE_AUTH_MITM_BOND = 0x05
}
 Authorization Types. More...
 
enum  at_ble_author_t {
  GAP_AUTHZ_NOT_SET = 0x00,
  GAP_AUTHZ_ACCEPT = 0x01,
  GAP_AUTHZ_REJECT = 0x02
}
 Authorization setting. More...
 
enum  at_ble_char_pres_format_t {
  AT_BLE_PRES_FORMAT_BOOLEAN = 0X01,
  AT_BLE_PRES_FORMAT_2BIT = 0X02,
  AT_BLE_PRES_FORMAT_NIBBLE = 0X03,
  AT_BLE_PRES_FORMAT_UINT8 = 0X04,
  AT_BLE_PRES_FORMAT_UINT12 = 0X05,
  AT_BLE_PRES_FORMAT_UINT16 = 0X06,
  AT_BLE_PRES_FORMAT_UINT24 = 0X07,
  AT_BLE_PRES_FORMAT_UINT32 = 0X08,
  AT_BLE_PRES_FORMAT_UINT48 = 0X09,
  AT_BLE_PRES_FORMAT_UINT64 = 0X0A,
  AT_BLE_PRES_FORMAT_UINT128 = 0X0B,
  AT_BLE_PRES_FORMAT_SINT8 = 0X0C,
  AT_BLE_PRES_FORMAT_SINT12 = 0X0D,
  AT_BLE_PRES_FORMAT_SINT16 = 0X0E,
  AT_BLE_PRES_FORMAT_SINT24 = 0X0F,
  AT_BLE_PRES_FORMAT_SINT32 = 0X10,
  AT_BLE_PRES_FORMAT_SINT48 = 0X11,
  AT_BLE_PRES_FORMAT_SINT64 = 0X12,
  AT_BLE_PRES_FORMAT_SINT128 = 0X13,
  AT_BLE_PRES_FORMAT_FLOAT32 = 0X14,
  AT_BLE_PRES_FORMAT_FLOAT64 = 0X15,
  AT_BLE_PRES_FORMAT_SFLOAT = 0X16,
  AT_BLE_PRES_FORMAT_FLOAT = 0X17,
  AT_BLE_PRES_FORMAT_DUINT16 = 0X18,
  AT_BLE_PRES_FORMAT_UTF8S = 0X19,
  AT_BLE_PRES_FORMAT_UTF16S = 0X1A,
  AT_BLE_PRES_FORMAT_STRUCT = 0X1B
}
 Presentation Formats. More...
 
enum  at_ble_char_properties_t {
  AT_BLE_CHAR_BROADCST = (1 << 0),
  AT_BLE_CHAR_READ = (1 << 1),
  AT_BLE_CHAR_WRITE_WITHOUT_RESPONSE = (1 << 2),
  AT_BLE_CHAR_WRITE = (1 << 3),
  AT_BLE_CHAR_NOTIFY = (1 << 4),
  AT_BLE_CHAR_INDICATE = (1 << 5),
  AT_BLE_CHAR_SIGNED_WRITE = (1 << 6),
  AT_BLE_CHAR_RELIABLE_WRITE = (1 << 7),
  AT_BLE_CHAR_WRITEABLE_AUX = (1 << 8)
}
 Characteristic properties (Each enum value is a single bit; multiple properties can be indicated simultaneously.) More...
 
enum  at_ble_disconnect_reason_t {
  AT_BLE_TERMINATED_BY_USER,
  AT_BLE_UNACCEPTABLE_INTERVAL
}
 Disconnection reasons. More...
 
enum  at_ble_events_t {
  AT_BLE_UNDEFINED_EVENT,
  AT_BLE_SCAN_INFO,
  AT_BLE_SCAN_REPORT,
  AT_BLE_RAND_ADDR_CHANGED,
  AT_BLE_CONNECTED,
  AT_BLE_DISCONNECTED,
  AT_BLE_CONN_PARAM_UPDATE_DONE,
  AT_BLE_CONN_PARAM_UPDATE_REQUEST,
  AT_BLE_RX_POWER_VALUE,
  AT_BLE_PAIR_DONE,
  AT_BLE_PAIR_REQUEST,
  AT_BLE_SLAVE_SEC_REQUEST,
  AT_BLE_PAIR_KEY_REQUEST,
  AT_BLE_ENCRYPTION_REQUEST,
  AT_BLE_ENCRYPTION_STATUS_CHANGED,
  AT_BLE_RESOLV_RAND_ADDR_STATUS,
  AT_BLE_PRIMARY_SERVICE_FOUND,
  AT_BLE_INCLUDED_SERVICE_FOUND,
  AT_BLE_CHARACTERISTIC_FOUND,
  AT_BLE_DESCRIPTOR_FOUND,
  AT_BLE_DISCOVERY_COMPLETE,
  AT_BLE_CHARACTERISTIC_READ_RESPONSE,
  AT_BLE_CHARACTERISTIC_READ_MULTIBLE_RESPONSE,
  AT_BLE_CHARACTERISTIC_WRITE_RESPONSE,
  AT_BLE_NOTIFICATION_RECEIVED,
  AT_BLE_INDICATION_RECEIVED,
  AT_BLE_INDICATION_CONFIRMED,
  AT_BLE_CHARACTERISTIC_CHANGED,
  AT_BLE_SERVICE_CHANGED_NOTIFICATION_CONFIRMED,
  AT_BLE_WRITE_AUTHORIZE_REQUEST,
  AT_BLE_READ_AUTHORIZE_REQUEST,
  AT_BLE_L2CAP_RX,
  AT_BLE_WIFIPROV_SCAN_MODE_CHANGE_IND = AT_BLE_L2CAP_RX+7,
  AT_BLE_WIFIPROV_COMPLETE_IND,
  AT_BLE_CUSTOM_EVENT,
  AT_BLE_TX_POWER_VALUE,
  AT_BLE_TX_POWER_SET,
  AT_BLE_MAX_PA_GAIN_VALUE,
  AT_BLE_MTU_CHANGED_CMD_COMPLETE,
  AT_BLE_CHARACTERISTIC_WRITE_CMD_CMP,
  AT_BLE_NOTIFICATION_CONFIRMED
}
 Events delivered from BLE stack to the application layer. More...
 
enum  at_ble_filter_type_t {
  AT_BLE_ADV_FP_ANY,
  AT_BLE_ADV_FP_FILTER_SCANREQ,
  AT_BLE_ADV_FP_FILTER_CONNREQ,
  AT_BLE_ADV_FP_FILTER_BOTH
}
 Advertising Filter Policy. More...
 
enum  at_ble_gap_role {
  AT_BLE_GAP_NO_ROLE = 0x00,
  AT_BLE_GAP_OBSERVER_SCA = 0x01,
  AT_BLE_GAP_BROADCASTER_ADV = 0x02,
  AT_BLE_GAP_CENTRAL_MST = (0x04 | AT_BLE_GAP_OBSERVER_SCA),
  AT_BLE_GAP_PERIPHERAL_SLV = (0x08 | AT_BLE_GAP_BROADCASTER_ADV)
}
 GAP Role. More...
 
enum  at_ble_gattc_discovery_complete_status_t {
  AT_BLE_DISCOVERY_SUCCESS =0x00,
  AT_BLE_DISCOVERY_FAILURE
}
 Discovery status. More...
 
enum  at_ble_iocab_t {
  AT_BLE_IO_CAP_DISPLAY_ONLY,
  AT_BLE_IO_CAP_DISPLAY_YES_NO,
  AT_BLE_IO_CAP_KB_ONLY,
  AT_BLE_IO_CAP_NO_INPUT_NO_OUTPUT,
  AT_BLE_IO_CAP_KB_DISPLAY
}
 IO capabilities of a device. More...
 
enum  at_ble_key_dis_t {
  AT_BLE_KEY_DIST_NONE = 0x00,
  AT_BLE_KEY_DIST_ENC = (1 << 0),
  AT_BLE_KEY_DIST_ID = (1 << 1),
  AT_BLE_KEY_DIST_SIGN = (1 << 2),
  AT_BLE_KEY_DIS_ALL
}
 Security keys distribution list. More...
 
enum  at_ble_pair_key_type_t {
  AT_BLE_PAIR_PASSKEY,
  AT_BLE_PAIR_OOB
}
 Pairing Key Types. More...
 
enum  at_ble_parameters_t {
  AT_BLE_GAP_GEN_DISC_ADV_MIN =0,
  AT_BLE_GAP_LIM_ADV_TIMEOUT,
  AT_BLE_GAP_GEN_DISC_SCAN,
  AT_BLE_GAP_LIM_DISC_SCAN,
  AT_BLE_GAP_CONN_EST_ADV_TIMEOUT,
  AT_BLE_GAP_CONN_PARAM_TIMEOUT,
  AT_BLE_GAP_LIM_DISC_ADV_INT_MIN,
  AT_BLE_GAP_LIM_DISC_ADV_INT_MAX,
  AT_BLE_GAP_GEN_DISC_ADV_INT_MIN,
  AT_BLE_GAP_GEN_DISC_ADV_INT_MAX,
  AT_BLE_GAP_CONN_ADV_INT_MIN,
  AT_BLE_GAP_CONN_ADV_INT_MAX,
  AT_BLE_GAP_CONN_SCAN_INT,
  AT_BLE_GAP_CONN_SCAN_WIND,
  AT_BLE_GAP_CONN_HIGH_SCAN_INT,
  AT_BLE_GAP_CONN_HIGH_SCAN_WIND,
  AT_BLE_GAP_GEN_DISC_SCAN_INT,
  AT_BLE_GAP_GEN_DISC_SCAN_WIND,
  AT_BLE_GAP_LIM_DISC_SCAN_INT,
  AT_BLE_GAP_LIM_DISC_SCAN_WIND,
  AT_BLE_GAP_CONN_EST_ADV,
  AT_BLE_GAP_CONN_EST_INT_MIN,
  AT_BLE_GAP_CONN_EST_INT_MAX,
  AT_BLE_GAP_CONN_EST_SCAN_INT,
  AT_BLE_GAP_CONN_EST_SCAN_WIND,
  AT_BLE_GAP_CONN_EST_SUPERV_TIMEOUT,
  AT_BLE_GAP_CONN_EST_LATENCY,
  AT_BLE_GAP_CONN_EST_MIN_CE_LEN,
  AT_BLE_GAP_CONN_EST_MAX_CE_LEN,
  AT_BLE_GAP_PRIVATE_ADDR_INT,
  AT_BLE_GAP_CONN_PAUSE_CENTRAL,
  AT_BLE_GAP_CONN_PAUSE_PERIPHERAL
}
 Enumeration for GAP Parameters. More...
 
enum  at_ble_passkey_type_t {
  AT_BLE_PAIR_PASSKEY_ENTRY,
  AT_BLE_PAIR_PASSKEY_DISPLAY
}
 Passkey Types. More...
 
enum  at_ble_prf_con_type_t {
  PRF_CON_DISCOVERY = 0x00,
  PRF_CON_NORMAL = 0x01
}
 Connection type. More...
 
enum  at_ble_scan_mode_t {
  AT_BLE_SCAN_GEN_DISCOVERY,
  AT_BLE_SCAN_LIM_DISCOVERY,
  AT_BLE_SCAN_OBSERVER_MODE
}
 Scan modes used at at_ble_scan_start. More...
 
enum  at_ble_scan_type_t {
  AT_BLE_SCAN_PASSIVE,
  AT_BLE_SCAN_ACTIVE
}
 Scan types used at at_ble_scan_start. More...
 
enum  at_ble_status_t {
  AT_BLE_SUCCESS =0,
  AT_BLE_FAILURE,
  AT_BLE_INVALID_PARAM,
  AT_BLE_PRIVACY_CFG_PB,
  AT_BLE_COMMAND_DISALLOWED,
  AT_BLE_INVALID_STATE,
  AT_BLE_INVALID_HANDLE,
  AT_BLE_INSUFF_RESOURCE,
  AT_BLE_INVALID_ATTRIBUTE_VAL_LEN,
  AT_BLE_TIMEOUT,
  AT_BLE_FW_INCOMPAT
}
 Enumeration for BLE Status. More...
 
enum  at_ble_uuid_type_t {
  AT_BLE_UUID_16,
  AT_BLE_UUID_32,
  AT_BLE_UUID_128,
  AT_BLE_UUID_INVALID
}
 UUID Type. More...
 

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...
 
at_ble_status_t at_ble_characteristic_discover_all (at_ble_handle_t conn_handle, at_ble_handle_t start_handle, at_ble_handle_t end_handle)
 Discover all Characteristics declared in a connected device. More...
 
at_ble_status_t at_ble_characteristic_discover_by_uuid (at_ble_handle_t conn_handle, at_ble_handle_t start_handle, at_ble_handle_t end_handle, at_ble_uuid_t *uuid)
 Discover all Characteristics of a given UUID declared in a connected device. More...
 
at_ble_status_t at_ble_characteristic_read (at_ble_handle_t conn_handle, at_ble_handle_t char_handle, uint16_t offset, uint16_t length)
 Read a characteristic given its handle. More...
 
at_ble_status_t at_ble_characteristic_read_by_uuid (at_ble_handle_t conn_handle, at_ble_handle_t start_handle, at_ble_handle_t end_handle, at_ble_uuid_t *uuid)
 Read a characteristic given its UUID. More...
 
at_ble_status_t at_ble_characteristic_read_multible (at_ble_handle_t conn_handle, at_ble_handle_t *char_handle_list, uint16_t *char_val_length, uint8_t char_handle_count)
 Read a list of characteristics given their handles. More...
 
at_ble_status_t at_ble_characteristic_reliable_write_cancel (at_ble_handle_t conn_handle)
 Cancels a pending prepared write operation. More...
 
at_ble_status_t at_ble_characteristic_reliable_write_execute (at_ble_handle_t conn_handle)
 Executes a pending prepared write operation. More...
 
at_ble_status_t at_ble_characteristic_reliable_write_prepare (at_ble_handle_t conn_handle, at_ble_handle_t char_handle, uint16_t offset, uint16_t length, uint8_t *data)
 Add a new prepared write request. More...
 
at_ble_status_t at_ble_characteristic_value_get (at_ble_handle_t handle, uint8_t *value, uint16_t *actual_read_len)
 Reads a characteristic value. More...
 
at_ble_status_t at_ble_characteristic_value_set (at_ble_handle_t handle, uint8_t *value, uint16_t len)
 Sets a characteristic value. More...
 
at_ble_status_t at_ble_characteristic_write (at_ble_handle_t conn_handle, at_ble_handle_t char_handle, uint16_t offset, uint16_t length, uint8_t *data, bool signed_write, bool with_response)
 Write a characteristic. 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_descriptor_discover_all (at_ble_handle_t conn_handle, at_ble_handle_t start_handle, at_ble_handle_t end_handle)
 Discover all Descriptors declared in a connected device. 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_exchange_mtu (at_ble_handle_t conn_handle)
 This message is used by the application to initiate the MTU exchange. 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_included_service_discover_all (at_ble_handle_t conn_handle, at_ble_handle_t start_handle, at_ble_handle_t end_handle)
 Discover all included services declared in a connected device. More...
 
at_ble_status_t at_ble_indication_send (at_ble_handle_t conn_handle, at_ble_handle_t attr_handle)
 Sends an Indication. More...
 
at_ble_status_t at_ble_init (void *args)
 Reset the link layer and the host. More...
 
at_ble_status_t at_ble_l2cap_cid_register (at_ble_handle_t conn_handle, uint16_t cid)
 Registers a custom CID to received data from, when the L2CAP received data on the registered CID an AT_BLE_L2CAP_RX event will be reported. More...
 
at_ble_status_t at_ble_l2cap_cid_unregister (at_ble_handle_t conn_handle, uint16_t cid)
 Unregister a previously registered custom CID. More...
 
at_ble_status_t at_ble_l2cap_tx (at_ble_handle_t conn_handle, uint16_t cid, uint8_t *data, uint16_t len)
 Sends a custom L2CAP message using the given CID. 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_notification_send (at_ble_handle_t conn_handle, at_ble_handle_t attr_handle)
 Sends a Notification. 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_primary_service_define (at_ble_uuid_t *uuid, at_ble_handle_t *service_handle, at_ble_included_service_t *included_service_list, uint16_t included_service_count, at_ble_characteristic_t *characteristic_list, uint16_t characteristic_count)
 Defines a new Primary service along with its included services and characteristics. More...
 
at_ble_status_t at_ble_primary_service_discover_all (at_ble_handle_t conn_handle, at_ble_handle_t start_handle, at_ble_handle_t end_handle)
 Discover all Primary services declared in a connected device. More...
 
at_ble_status_t at_ble_primary_service_discover_by_uuid (at_ble_handle_t conn_handle, at_ble_handle_t start_handle, at_ble_handle_t end_handle, at_ble_uuid_t *uuid)
 Discover all Primary services of a given UUID declared in a connected device. 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...
 
at_ble_status_t at_ble_read_authorize_reply (at_ble_handle_t conn_handle, at_ble_handle_t attr_handle, bool grant_authorization, bool update_value, uint8_t *value, uint16_t offset, uint16_t len)
 Replies to a read authorization request requested by by AT_BLE_READ_AUTHORIZE_REQUEST event. 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_secondary_service_define (at_ble_uuid_t *uuid, at_ble_handle_t *service_handle, at_ble_included_service_t *included_service_list, uint16_t included_service_count, at_ble_characteristic_t *characteristic_list, uint16_t characteristic_count)
 Defines a new Secondary service along with its included services and characteristics. 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_service_changed_notification_send (at_ble_handle_t conn_handle, at_ble_handle_t start_handle, at_ble_handle_t end_handle)
 Sends a Service changed Notification. 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_write_authorize_reply (at_ble_handle_t conn_handle, at_ble_handle_t attr_handle, bool grant_authorization)
 Replies to a write authorization request requested by by AT_BLE_WRITE_AUTHORIZE_REQUEST event. More...