BLE Manager declarations.
Copyright (c) 2017-2019 Microchip Technology Inc. and its subsidiaries.
#include <asf.h>
#include <string.h>
#include <stddef.h>
#include "at_ble_api.h"
#include "ble_utils.h"
Data Structures | |
struct | adv_element |
struct | adv_element_container |
struct | ble_connected_dev_info |
struct | ble_custom_event_cb |
struct | ble_dtm_event_cb |
struct | ble_gap_event_cb |
struct | ble_gatt_client_event_cb |
struct | ble_gatt_server_event_cb |
struct | ble_htpt_event_cb |
struct | ble_l2cap_event_cb |
struct | gatt_service_handler |
struct | scan_resp_element |
struct | user_custom_event |
Macros | |
#define | _CONF_PUBLIC_TARGET_ADDR(n, uuid_ptr) |
#define | _CONF_PUBLIC_TARGET_ADDR_SCAN_RSP(n, uuid_ptr) |
#define | _CONF_RANDOM_TARGET_ADDR(n, uuid_ptr) |
#define | _CONF_RANDOM_TARGET_ADDR_SCAN_RSP(n, uuid_ptr) |
#define | _CONF_SERVICE_128BIT_UUID(n, uuid_ptr) |
#define | _CONF_SERVICE_128BIT_UUID_SCAN_RSP(n, uuid_ptr) |
#define | _CONF_SERVICE_16BIT_UUID(n, uuid_ptr) |
#define | _CONF_SERVICE_16BIT_UUID_SCAN_RSP(n, uuid_ptr) |
#define | _CONF_SERVICE_32BIT_UUID(n, uuid_ptr) |
#define | _CONF_SERVICE_32BIT_UUID_SCAN_RSP(n, uuid_ptr) |
#define | _CONF_SERVICE_SOLTN_128BIT_UUID(n, uuid_ptr) |
#define | _CONF_SERVICE_SOLTN_128BIT_UUID_SCAN_RSP(n, uuid_ptr) |
#define | _CONF_SERVICE_SOLTN_16BIT_UUID(n, uuid_ptr) |
#define | _CONF_SERVICE_SOLTN_16BIT_UUID_SCAN_RSP(n, uuid_ptr) |
#define | _CONF_SERVICE_SOLTN_32BIT_UUID(n, uuid_ptr) |
#define | _CONF_SERVICE_SOLTN_32BIT_UUID_SCAN_RSP(n, uuid_ptr) |
#define | ADV_ELEMENT_SIZE 2 |
#define | ADV_INTERVAL_SIZE 2 |
#define | ADV_INTERVAL_SIZE 2 |
#define | ADV_LENGTH_SIZE 1 |
#define | ADV_TYPE_FLAG_SIZE 3 |
#define | ADV_TYPE_SIZE 1 |
#define | ALERT_LEVEL_CHAR_UUID (0x2A06) |
#define | ANP_ANCS_SERVICE_UUID ("\xD0\x00\x2D\x12\x1E\x4B\x0F\xA4\x99\x4E\xCE\xB5\x31\xF4\x05\x79") |
ANCS service UUID. More... | |
#define | ANP_SERVICE_UUID (0x1811) |
Alert notification service uuid. More... | |
#define | APPEARANCE_SIZE 2 |
Length of Adv data types. More... | |
#define | APPEARANCE_SIZE 2 |
Length of Adv data types. More... | |
#define | BAT_CHAR_BAT_LEVEL_UUID (0x2A19) |
battery level characteristic uuid More... | |
#define | BAT_SERVICE_UUID (0x180F) |
battery service uuid More... | |
#define | BLE_ATT_DB_MEMORY_SIZE (2048) |
Maximum Attribute database memory size in Bytes, Default value 2048-Bytes. More... | |
#define | BLE_AUTHENTICATION_LEVEL (AT_BLE_NO_SEC) |
#define | BLE_BOND_REQ (false) |
#define | BLE_DEVICE_NAME "ATMEL-HID" |
#define | BLE_EVENT_PARAM_MAX_SIZE 524 |
Maximum event parameter size that receives in at_ble_event_get. More... | |
#define | BLE_EVENT_TIMEOUT (20) |
event timeout More... | |
#define | BLE_GAP_ADV_ADVERTISING_INTERVAL_ENABLE false |
#define | BLE_GAP_ADV_ADVERTISING_INTERVAL_LENGTH 2 |
#define | BLE_GAP_ADV_APPEARANCE_ENABLE true |
#define | BLE_GAP_ADV_COMPLETE_LOCAL_NAME_ENABLE true |
#define | BLE_GAP_ADV_DATA_SLAVE_CONN_INTERVAL_RANGE_LENGTH 2 |
#define | BLE_GAP_ADV_LE_BT_DEVICE_ADDR_ENABLE false |
#define | BLE_GAP_ADV_LE_ROLE_ENABLE false |
#define | BLE_GAP_ADV_MANUFACTURER_SPECIFIC_DATA_ENABLE true |
#define | BLE_GAP_ADV_PUBLIC_TARGET_ADDR_ENABLE false |
#define | BLE_GAP_ADV_PUBLIC_TARGET_ADDR_LENGTH sizeof(at_ble_addr_t) |
#define | BLE_GAP_ADV_RANDOM_TARGET_ADDR_ENABLE false |
#define | BLE_GAP_ADV_RANDOM_TARGET_ADDR_LENGTH sizeof(at_ble_addr_t) |
#define | BLE_GAP_ADV_SERVICE_128BIT_UUID_ENABLE true |
#define | BLE_GAP_ADV_SERVICE_128BIT_UUID_LENGTH 16 |
#define | BLE_GAP_ADV_SERVICE_16BIT_UUID_ENABLE true |
#define | BLE_GAP_ADV_SERVICE_16BIT_UUID_LENGTH 2 |
UUID Type's and configuration's. More... | |
#define | BLE_GAP_ADV_SERVICE_32BIT_UUID_ENABLE false |
#define | BLE_GAP_ADV_SERVICE_32BIT_UUID_LENGTH 4 |
#define | BLE_GAP_ADV_SERVICE_DATA_128BIT_UUID_ENABLE false |
#define | BLE_GAP_ADV_SERVICE_DATA_16BIT_UUID_ENABLE false |
#define | BLE_GAP_ADV_SERVICE_DATA_32BIT_UUID_ENABLE false |
#define | BLE_GAP_ADV_SERVICE_SOLTN_128BIT_UUID_ENABLE true |
#define | BLE_GAP_ADV_SERVICE_SOLTN_16BIT_UUID_ENABLE false |
#define | BLE_GAP_ADV_SERVICE_SOLTN_32BIT_UUID_ENABLE false |
#define | BLE_GAP_ADV_SHORTENED_LOCAL_NAME_ENABLE false |
Short Local Name configuration. More... | |
#define | BLE_GAP_ADV_SLAVE_CONN_INTERVAL_RANGE_ENABLE false |
#define | BLE_GAP_ADV_TX_POWER_ENABLE false |
#define | BLE_INVALID_CONNECTION_HANDLE (0xFF) |
#define | BLE_IO_CAPABALITIES (AT_BLE_IO_CAP_NO_INPUT_NO_OUTPUT) |
#define | BLE_MAX_DEVICE_CONNECTION (8) |
maximum number of devices connected More... | |
#define | BLE_MITM_REQ (false) |
#define | BLE_OOB_REQ (false) |
Default configuration for Pairing. More... | |
#define | BLE_PAIR_ENABLE (false) |
#define | BLE_PAIR_ENABLE (false) |
#define | BLOOD_PRESSURE_SERVICE_UUID (0x1810) |
Service UUID's. More... | |
#define | BREDR_NOT_SUPPORTED ((uint8_t) 1 << 2) |
Flag to indicate BR/EDR Not supported. More... | |
#define | CSC_ENDPOINT_CHAR_UUID ("\x1b\xc5\xd5\xa5\x02\x00\xa6\x85\xe5\x11\x35\x39\xa1\xbb\x5a\xfd") |
CSC Endpoint Characteristic UUID. More... | |
#define | CSC_SERVICE_UUID ("\x1b\xc5\xd5\xa5\x02\x00\xa6\x85\xe5\x11\x35\x39\xa0\xbb\x5a\xfd") |
CSC Service UUID. More... | |
#define | CURRENT_TIME_CHAR_UUID (0x2A2B) |
#define | CURRENT_TIME_SERVICE_UUID (0x1805) |
#define | DIS_CHAR_FIRMWARE_REIVSION_UUID (0x2A26) |
device information service firmware revision number characteristics UUID More... | |
#define | DIS_CHAR_HARDWARE_REVISION_UUID (0x2A27) |
device information service hardware revision characteristics UUID More... | |
#define | DIS_CHAR_IEEE_REG_CERT_DATA_LIST_UUID (0x2A2A) |
device information service IEEE registration certificate list characteristics UUID More... | |
#define | DIS_CHAR_MANUFACTURER_NAME_UUID (0x2A29) |
device information service manufacturer name characteristics UUID More... | |
#define | DIS_CHAR_MODEL_NUMBER_UUID (0x2A24) |
device information service model number characteristics UUID More... | |
#define | DIS_CHAR_PNP_ID_UUID (0x2A50) |
Product Number ID characteristic uuid. More... | |
#define | DIS_CHAR_SERIAL_NUMBER_UUID (0x2A25) |
device information service serial number characteristics UUID More... | |
#define | DIS_CHAR_SOFTWARE_REVISION_UUID (0x2A28) |
device information service software revision characteristics UUID More... | |
#define | DIS_CHAR_SYSTEM_ID_UUID (0x2A23) |
device information service system characteristics UUID More... | |
#define | DIS_SERVICE_UUID (0x180A) |
#define | GAP_CE_LEN_MAX (0) |
maximum length of local info parameters when using connection establishment proc More... | |
#define | GAP_CE_LEN_MIN (0) |
minimum length of local info parameters when using connection establishment proc More... | |
#define | GAP_CONN_INTERVAL_MAX (40) |
maximum connection interval More... | |
#define | GAP_CONN_INTERVAL_MIN (20) |
minimum connection interval More... | |
#define | GAP_CONN_SLAVE_LATENCY (0) |
connection slave latency More... | |
#define | GAP_CONNECT_PEER_COUNT (1) |
number of connections More... | |
#define | GAP_SUPERVISION_TIMOUT (0x1f4) |
supervision time-out More... | |
#define | GATT_DISCOVERY_ENDING_HANDLE (0xFFFF) |
GATT Database discover default end handle. More... | |
#define | GATT_DISCOVERY_STARTING_HANDLE (0x0001) |
GATT Database discover default start handle. More... | |
#define | HEART_RATE_SERVICE_UUID (0x180D) |
Heart rate service UUID. More... | |
#define | HID_REPORT_REF_DESC (0x2908) |
HID report reference descriptor characteristic uuid. More... | |
#define | HID_SERV_UUID (0x1812) |
HID Service UUID. More... | |
#define | HID_UUID_CHAR_BOOT_KEY_INPUT_REPORT (0x2A22) |
HID Boot Keyboard Input Report UUID. More... | |
#define | HID_UUID_CHAR_BOOT_KEY_OUTPUT_REPORT (0x2A32) |
HID Boot Keyboard Output Report UUID. More... | |
#define | HID_UUID_CHAR_BOOT_MOUSE_INPUT_REPORT (0x2A33) |
HID Boot Mouse Input Report UUID. More... | |
#define | HID_UUID_CHAR_HID_CONTROL_POINT (0x2A4C) |
HID Control Point UUID. More... | |
#define | HID_UUID_CHAR_HID_INFORMATION (0x2A4A) |
HID Information UUID. More... | |
#define | HID_UUID_CHAR_PROTOCOL_MODE (0x2A4E) |
HID Protocol Mode Characteristic UUID. More... | |
#define | HID_UUID_CHAR_REPORT (0x2A4D) |
HID Report Characteristic UUID. More... | |
#define | HID_UUID_CHAR_REPORT_MAP (0x2A4B) |
HID Protocol Mode Characteristic UUID. More... | |
#define | HTPT_SERVICE_UUID (0x1809) |
HTPT SERVICE UUID. More... | |
#define | IMMEDIATE_ALERT_SERVICE_UUID (0x1802) |
#define | LE_BREDR_CAPABLE_CONTROLLER ((uint8_t) 1 << 3) |
Flag to indicate BR/EDR supported controller. More... | |
#define | LE_BREDR_CAPABLE_HOST ((uint8_t) 1 << 4) |
Flag to indicate BR/EDR supported Host. More... | |
#define | LE_GENERAL_DISCOVERABLE_MODE ((uint8_t) 1 << 1) |
LE General discoverable mode. More... | |
#define | LE_LIMITED_DISCOVERABLE_MODE ((uint8_t) 1 << 0) |
Observer related definitions. More... | |
#define | LINK_LOSS_SERVICE_UUID (0x1803) |
#define | LOCAL_TIME_CHAR_UUID (0x2A0F) |
#define | MAX_CUSTOM_EVENT_SUBSCRIBERS 2 |
Maximum Custom event subscribers. Based on No of Custom event handlers this number can be changed. More... | |
#define | MAX_DTM_EVENT_SUBSCRIBERS 5 |
Maximum DTM event subscribers. Based on No of DTM event handlers this number can be changed. More... | |
#define | MAX_GAP_EVENT_SUBSCRIBERS 5 |
Maximum event subscribers for BLE GAP events, Based on number of services/Profiles this number can be changed. More... | |
#define | MAX_GATT_CLIENT_SUBSCRIBERS 5 |
Maximum GATT client event subscribers, Based on number of GATT Client services/Profiles this number can be changed. More... | |
#define | MAX_GATT_SERVER_SUBSCRIBERS 5 |
Maximum GATT Server event subscribers, Based on number of GATT Server services/Profiles this number can be changed. More... | |
#define | MAX_HTPT_EVENT_SUBSCRIBERS 1 |
Maximum HTPT event subscribers. Based on No of HTPT event handlers this number can be changed. More... | |
#define | MAX_L2CAP_EVENT_SUBSCRIBERS 1 |
Maximum L2CAP event subscribers. Based on No of L2CAP event handlers this number can be changed. More... | |
#define | MAX_SCAN_DEVICE (100) |
#define | NEXT_DST_SERVICE_UUID (0x1807) |
#define | PAS_SERVICE_UUID (0x180E) |
#define | PIN_TIMEOUT 30000 |
pin timeout More... | |
#define | PUBLIC_RANDOM_ADDR_MAX_NUM 5 |
#define | PUBLIC_TARGET_ADDR_MAX_NUM 5 |
#define | REF_TIME_CHAR_UUID (0x2A14) |
#define | REFERENCE_TIME_SERVICE_UUID (0x1806) |
#define | SCAN_INTERVAL (96) |
#define | SCAN_RESPONSE_DISABLE 1 |
#define | SCAN_RESPONSE_ENABLE 0 |
#define | SCAN_RESPONSE_ONLY_ENABLE 2 |
#define | SCAN_TIMEOUT (0x0000) |
Timeout Scan time-out, 0x0000 disables time-out. More... | |
#define | SCAN_TYPE (AT_BLE_SCAN_ACTIVE) |
Scan method, Refer to at_ble_scan_type_t. More... | |
#define | SCAN_WINDOW (96) |
#define | SERVICE_UUID128_MAX_NUM 2 |
#define | SERVICE_UUID16_MAX_NUM 15 |
#define | SERVICE_UUID32_MAX_NUM 5 |
#define | SPS_CHAR_SCAN_INT_VALUE_UUID (0x2A4F) |
scan interval characteristic uuid More... | |
#define | SPS_CHAR_SCAN_REFRESH_UUID (0x2A31) |
scan refresh characteristic uuid More... | |
#define | SPS_SERVICE_UUID (0x1813) |
Scan param service uuid. More... | |
#define | TIME_UPDATE_CP_CHAR_UUID (0x2A16) |
#define | TIME_UPDATE_STATE_CHAR_UUID (0x2A17) |
#define | TIME_WITH_DST_CHAR_UUID (0x2A11) |
#define | TX_POWER_LEVEL_CHAR_UUID (0x2A07) |
#define | TX_POWER_LEVEL_SIZE 1 |
#define | TX_POWER_LEVEL_SIZE 1 |
#define | TX_POWER_SERVICE_UUID (0x1804) |
Typedefs | |
typedef struct adv_element_container | adv_element_container_t |
typedef struct adv_element | adv_element_t |
typedef struct ble_connected_dev_info | ble_connected_dev_info_t |
typedef struct ble_custom_event_cb | ble_custom_event_cb_t |
typedef enum ble_device_ll_state | ble_device_ll_state_t |
typedef enum ble_device_state | ble_device_state_t |
typedef struct ble_dtm_event_cb | ble_dtm_event_cb_t |
typedef at_ble_status_t(* | ble_event_callback_t )(void *params) |
typedef struct ble_gap_event_cb | ble_gap_event_cb_t |
typedef enum ble_gatt_cccd_status | ble_gatt_cccd_status_t |
typedef struct ble_gatt_client_event_cb | ble_gatt_client_event_cb_t |
typedef struct ble_gatt_server_event_cb | ble_gatt_server_event_cb_t |
typedef struct ble_htpt_event_cb | ble_htpt_event_cb_t |
typedef struct ble_l2cap_event_cb | ble_l2cap_event_cb_t |
typedef struct gatt_service_handler | gatt_service_handler_t |
typedef struct scan_resp_element | scan_resp_element_t |
typedef struct user_custom_event | user_custom_event_t |
Functions | |
at_ble_status_t | ble_advertisement_data_set (void) |
ble_advertisement_data_set set the BLE advertisement data based on the available available services and profiles which is present in the current application. More... | |
void | ble_characteristic_found_handler (at_ble_characteristic_found_t *characteristic_found) |
function called when the AT_BLE_CHARACTERISTIC_FOUND event is received from stack. More... | |
at_ble_status_t | ble_characteristic_write_cmd_complete_handler (void *params) |
ble_characteristic_write_cmd_complete_handler handler for Char write command complete event More... | |
at_ble_status_t | ble_check_device_state (at_ble_handle_t conn_handle, ble_device_state_t state) |
Check the device state. More... | |
bool | ble_check_disconnected_iscentral (at_ble_handle_t handle) |
Check the passed connection handle of the device is disconnected and central device. More... | |
bool | ble_check_disconnected_isperipheral (at_ble_handle_t handle) |
Check the passed connection handle of the device is disconnected and peripheral device. More... | |
bool | ble_check_iscentral (at_ble_handle_t handle) |
Check the passed connection handle of the device is central device. More... | |
bool | ble_check_ispheripheral (at_ble_handle_t handle) |
Check the passed connection handle of the device is peripheral or central device. More... | |
at_ble_status_t | ble_conn_param_update (void *params) |
function used to update the connection parameter. More... | |
at_ble_status_t | ble_conn_param_update_req (void *params) |
function triggered on receiving a connection parameter update request from the peer. More... | |
at_ble_status_t | ble_connected_device_role (at_ble_handle_t conn_handle, at_ble_dev_role_t *dev_role) |
Get the passed connection handle device role. More... | |
at_ble_status_t | ble_connected_state_handler (void *params) |
ble_connected_state_handler handles the connected event. More... | |
at_ble_status_t | ble_device_dead_handler (void *params) |
ble_device_dead_handler handler for BLE device dead indication handler. More... | |
void | ble_device_init (at_ble_addr_t *addr) |
function sets both device address and device name which are exposed to all other devices. More... | |
at_ble_status_t | ble_device_out_of_sync_handler (void *params) |
ble_device_out_of_sync_handler handler for out of sync indication handler. More... | |
at_ble_status_t | ble_disconnected_device_role (at_ble_handle_t conn_handle, at_ble_dev_role_t *dev_role) |
Get the device role of disconnected device. More... | |
at_ble_status_t | ble_disconnected_state_handler (void *params) |
function called when the AT_BLE_DISCONNECTED event is received from the stack. More... | |
void | ble_discovery_complete_handler (at_ble_discovery_complete_t *discover_status) |
function called when the AT_BLE_DISCOVERY_COMPLETE event is received from the stack. More... | |
at_ble_status_t | ble_encryption_request_handler (void *params) |
function called when the AT_BLE_ENCRYPTION_REQUEST event is received from stack. More... | |
at_ble_status_t | ble_encryption_status_change_handler (void *params) |
function called when the AT_BLE_ENCRYPTION_STATUS_CHANGED event is received from stack. More... | |
void | ble_event_manager (at_ble_events_t events, void *event_params) |
function handling all the events from the stack, responsible for calling the respective functions initialized for the events. More... | |
at_ble_status_t | ble_event_task (void) |
function to handle the BLE event task. More... | |
bool | ble_mgr_events_callback_handler (ble_mgr_event_cb_t event_cb_type, ble_mgr_event_t event_type, const void *ble_event_handler) |
ble_mgr_events_callback_handler handler for Profile/Service/application to register the BLE events callbacks More... | |
at_ble_status_t | ble_mtu_changed_cmd_complete_handler (void *params) |
ble_mtu_changed_indication_handler handler for Peer device MTU size change More... | |
at_ble_status_t | ble_mtu_changed_indication_handler (void *params) |
ble_mtu_changed_indication_handler handler for Peer device MTU size change More... | |
at_ble_status_t | ble_pair_done_handler (void *params) |
function called when the AT_BLE_PAIR_DONE event is received from stack. More... | |
at_ble_status_t | ble_pair_key_request_handler (void *params) |
function called when the AT_BLE_PAIR_KEY_REQUEST event is received from stack. More... | |
at_ble_status_t | ble_pair_request_handler (void *params) |
function called when the AT_BLE_PAIR_REQUEST event is received from stack. More... | |
at_ble_status_t | ble_remove_bonding_info (void) |
Remove all bonding information from PDS. More... | |
at_ble_status_t | ble_resolv_rand_addr_handler (void *params) |
ble_resolv_rand_addr_handler handles the resolved random address event More... | |
at_ble_status_t | ble_restore_bonding_info (void) |
Restore the bonding information from PDS. More... | |
at_ble_status_t | ble_scan_info_handler (void *params) |
function to handle the scan information. More... | |
at_ble_status_t | ble_scan_report_handler (void *params) |
function to handle the scan status. More... | |
uint32_t | ble_sdk_version (void) |
ble_sdk_version gets the version of BluSDK and also checks the SDK and Library version compatibility More... | |
at_ble_status_t | ble_send_slave_sec_request (at_ble_handle_t conn_handle) |
function to send slave security request. More... | |
at_ble_status_t | ble_set_device_name (uint8_t *name, uint8_t name_len) |
function to set the device name. More... | |
at_ble_status_t | ble_slave_security_request_handler (void *params) |
at_ble_status_t | ble_store_bonding_info (void *params) |
Store the bonding information. More... | |
at_ble_status_t | ble_undefined_event_handler (void *params) |
ble_undefined_event_handler handler for undefined events which is not expected in Library More... | |
COMPILER_PACK_RESET () typedef enum | |
Initialize the PDS NVM memory controller. More... | |
at_ble_status_t | gap_dev_connect (at_ble_addr_t dev_addr[]) |
function requesting the device for the connection. More... | |
at_ble_status_t | gap_dev_scan (void) |
function to start scan. More... | |
at_ble_status_t | pds_module_init (void) |
Initialize the PDS Module. More... | |
at_ble_status_t | scan_info_parse (at_ble_scan_info_t *scan_info_data, at_ble_uuid_t *ble_service_uuid, uint8_t adv_type) |
function parses the received advertising data for service and local name. More... | |
Variables | |
le_role_t | |
pds_bond_info_t | |
#define _CONF_PUBLIC_TARGET_ADDR | ( | n, | |
uuid_ptr | |||
) |
Referenced by ble_advertisement_data_set().
#define _CONF_PUBLIC_TARGET_ADDR_SCAN_RSP | ( | n, | |
uuid_ptr | |||
) |
Referenced by ble_advertisement_data_set().
#define _CONF_RANDOM_TARGET_ADDR | ( | n, | |
uuid_ptr | |||
) |
Referenced by ble_advertisement_data_set().
#define _CONF_RANDOM_TARGET_ADDR_SCAN_RSP | ( | n, | |
uuid_ptr | |||
) |
Referenced by ble_advertisement_data_set().
#define _CONF_SERVICE_128BIT_UUID | ( | n, | |
uuid_ptr | |||
) |
Referenced by ble_advertisement_data_set().
#define _CONF_SERVICE_128BIT_UUID_SCAN_RSP | ( | n, | |
uuid_ptr | |||
) |
Referenced by ble_advertisement_data_set().
#define _CONF_SERVICE_16BIT_UUID | ( | n, | |
uuid_ptr | |||
) |
Referenced by ble_advertisement_data_set().
#define _CONF_SERVICE_16BIT_UUID_SCAN_RSP | ( | n, | |
uuid_ptr | |||
) |
Referenced by ble_advertisement_data_set().
#define _CONF_SERVICE_32BIT_UUID | ( | n, | |
uuid_ptr | |||
) |
Referenced by ble_advertisement_data_set().
#define _CONF_SERVICE_32BIT_UUID_SCAN_RSP | ( | n, | |
uuid_ptr | |||
) |
Referenced by ble_advertisement_data_set().
#define _CONF_SERVICE_SOLTN_128BIT_UUID | ( | n, | |
uuid_ptr | |||
) |
Referenced by ble_advertisement_data_set().
#define _CONF_SERVICE_SOLTN_128BIT_UUID_SCAN_RSP | ( | n, | |
uuid_ptr | |||
) |
Referenced by ble_advertisement_data_set().
#define _CONF_SERVICE_SOLTN_16BIT_UUID | ( | n, | |
uuid_ptr | |||
) |
Referenced by ble_advertisement_data_set().
#define _CONF_SERVICE_SOLTN_16BIT_UUID_SCAN_RSP | ( | n, | |
uuid_ptr | |||
) |
Referenced by ble_advertisement_data_set().
#define _CONF_SERVICE_SOLTN_32BIT_UUID | ( | n, | |
uuid_ptr | |||
) |
Referenced by ble_advertisement_data_set().
#define _CONF_SERVICE_SOLTN_32BIT_UUID_SCAN_RSP | ( | n, | |
uuid_ptr | |||
) |
Referenced by ble_advertisement_data_set().
#define ADV_ELEMENT_SIZE 2 |
Referenced by ble_advertisement_data_set().
#define ADV_INTERVAL_SIZE 2 |
Referenced by ble_observer_scan_info_handler().
#define ADV_INTERVAL_SIZE 2 |
#define ADV_LENGTH_SIZE 1 |
#define ADV_TYPE_FLAG_SIZE 3 |
Referenced by ble_advertisement_data_set().
#define ADV_TYPE_SIZE 1 |
Referenced by ble_advertisement_data_set(), and esurl_conf_adv_start().
#define ALERT_LEVEL_CHAR_UUID (0x2A06) |
#define ANP_ANCS_SERVICE_UUID ("\xD0\x00\x2D\x12\x1E\x4B\x0F\xA4\x99\x4E\xCE\xB5\x31\xF4\x05\x79") |
ANCS service UUID.
#define ANP_SERVICE_UUID (0x1811) |
Alert notification service uuid.
Referenced by anp_client_service_found_handler().
#define APPEARANCE_SIZE 2 |
Length of Adv data types.
Referenced by ble_observer_scan_info_handler().
#define APPEARANCE_SIZE 2 |
Length of Adv data types.
#define BAT_CHAR_BAT_LEVEL_UUID (0x2A19) |
battery level characteristic uuid
Referenced by bat_init_service().
#define BAT_SERVICE_UUID (0x180F) |
battery service uuid
Referenced by bat_init_service().
#define BLE_ATT_DB_MEMORY_SIZE (2048) |
Maximum Attribute database memory size in Bytes, Default value 2048-Bytes.
Referenced by ble_device_init().
#define BLE_AUTHENTICATION_LEVEL (AT_BLE_NO_SEC) |
Referenced by ble_pair_request_handler(), and ble_slave_security_request_handler().
#define BLE_BOND_REQ (false) |
Referenced by ble_pair_request_handler(), and ble_send_slave_sec_request().
#define BLE_DEVICE_NAME "ATMEL-HID" |
#define BLE_EVENT_PARAM_MAX_SIZE 524 |
Maximum event parameter size that receives in at_ble_event_get.
#define BLE_EVENT_TIMEOUT (20) |
event timeout
Referenced by ble_event_task().
#define BLE_GAP_ADV_ADVERTISING_INTERVAL_ENABLE false |
#define BLE_GAP_ADV_ADVERTISING_INTERVAL_LENGTH 2 |
Referenced by ble_advertisement_data_set().
#define BLE_GAP_ADV_APPEARANCE_ENABLE true |
#define BLE_GAP_ADV_COMPLETE_LOCAL_NAME_ENABLE true |
#define BLE_GAP_ADV_DATA_SLAVE_CONN_INTERVAL_RANGE_LENGTH 2 |
Referenced by ble_advertisement_data_set().
#define BLE_GAP_ADV_LE_BT_DEVICE_ADDR_ENABLE false |
#define BLE_GAP_ADV_LE_ROLE_ENABLE false |
#define BLE_GAP_ADV_MANUFACTURER_SPECIFIC_DATA_ENABLE true |
#define BLE_GAP_ADV_PUBLIC_TARGET_ADDR_ENABLE false |
#define BLE_GAP_ADV_PUBLIC_TARGET_ADDR_LENGTH sizeof(at_ble_addr_t) |
Referenced by ble_advertisement_data_set().
#define BLE_GAP_ADV_RANDOM_TARGET_ADDR_ENABLE false |
#define BLE_GAP_ADV_RANDOM_TARGET_ADDR_LENGTH sizeof(at_ble_addr_t) |
Referenced by ble_advertisement_data_set().
#define BLE_GAP_ADV_SERVICE_128BIT_UUID_ENABLE true |
#define BLE_GAP_ADV_SERVICE_128BIT_UUID_LENGTH 16 |
Referenced by ble_advertisement_data_set().
#define BLE_GAP_ADV_SERVICE_16BIT_UUID_ENABLE true |
#define BLE_GAP_ADV_SERVICE_16BIT_UUID_LENGTH 2 |
UUID Type's and configuration's.
Referenced by ble_advertisement_data_set().
#define BLE_GAP_ADV_SERVICE_32BIT_UUID_ENABLE false |
#define BLE_GAP_ADV_SERVICE_32BIT_UUID_LENGTH 4 |
Referenced by ble_advertisement_data_set().
#define BLE_GAP_ADV_SERVICE_DATA_128BIT_UUID_ENABLE false |
#define BLE_GAP_ADV_SERVICE_DATA_16BIT_UUID_ENABLE false |
#define BLE_GAP_ADV_SERVICE_DATA_32BIT_UUID_ENABLE false |
#define BLE_GAP_ADV_SERVICE_SOLTN_128BIT_UUID_ENABLE true |
#define BLE_GAP_ADV_SERVICE_SOLTN_16BIT_UUID_ENABLE false |
#define BLE_GAP_ADV_SERVICE_SOLTN_32BIT_UUID_ENABLE false |
#define BLE_GAP_ADV_SHORTENED_LOCAL_NAME_ENABLE false |
Short Local Name configuration.
#define BLE_GAP_ADV_SLAVE_CONN_INTERVAL_RANGE_ENABLE false |
#define BLE_GAP_ADV_TX_POWER_ENABLE false |
#define BLE_INVALID_CONNECTION_HANDLE (0xFF) |
#define BLE_IO_CAPABALITIES (AT_BLE_IO_CAP_NO_INPUT_NO_OUTPUT) |
Referenced by ble_pair_request_handler().
#define BLE_MAX_DEVICE_CONNECTION (8) |
maximum number of devices connected
Referenced by ble_check_device_state(), ble_connected_app_event(), ble_connected_device_role(), ble_connected_state_handler(), ble_device_init(), ble_disconnected_device_role(), ble_disconnected_state_handler(), ble_encryption_request_handler(), ble_encryption_status_change_handler(), ble_pair_done_handler(), ble_pair_request_handler(), ble_remove_bonding_info(), ble_resolv_rand_addr_handler(), ble_restore_bonding_info(), ble_slave_security_request_handler(), and ble_store_bonding_info().
#define BLE_MITM_REQ (false) |
Referenced by ble_pair_request_handler(), and ble_send_slave_sec_request().
#define BLE_OOB_REQ (false) |
Default configuration for Pairing.
bonding bit will be present in the authentication requirement of pairing request message Enable the pairing will initiate slave security request from Peripheral device. Choose BLE security Modes, Refer to at_ble_auth_levels_t Input and Output capabilities of this device, Refer to at_ble_iocab_t Out of Band pairing feature support
Referenced by ble_pair_request_handler().
#define BLE_PAIR_ENABLE (false) |
Referenced by csc_serv_init(), dis_init_service(), esurl_conf_service_init(), and hid_serv_init().
#define BLE_PAIR_ENABLE (false) |
#define BLOOD_PRESSURE_SERVICE_UUID (0x1810) |
Service UUID's.
Referenced by blp_init_service().
#define BREDR_NOT_SUPPORTED ((uint8_t) 1 << 2) |
Flag to indicate BR/EDR Not supported.
Referenced by ble_observer_scan_info_handler().
#define CSC_ENDPOINT_CHAR_UUID ("\x1b\xc5\xd5\xa5\x02\x00\xa6\x85\xe5\x11\x35\x39\xa1\xbb\x5a\xfd") |
CSC Endpoint Characteristic UUID.
Referenced by csc_serv_init().
#define CSC_SERVICE_UUID ("\x1b\xc5\xd5\xa5\x02\x00\xa6\x85\xe5\x11\x35\x39\xa0\xbb\x5a\xfd") |
CSC Service UUID.
Referenced by csc_prf_connected_state_handler(), and csc_serv_init().
#define CURRENT_TIME_CHAR_UUID (0x2A2B) |
Referenced by time_info_characteristic_found_handler().
#define CURRENT_TIME_SERVICE_UUID (0x1805) |
Referenced by time_info_service_found_handler().
#define DIS_CHAR_FIRMWARE_REIVSION_UUID (0x2A26) |
device information service firmware revision number characteristics UUID
Referenced by dis_init_service().
#define DIS_CHAR_HARDWARE_REVISION_UUID (0x2A27) |
device information service hardware revision characteristics UUID
Referenced by dis_init_service().
#define DIS_CHAR_IEEE_REG_CERT_DATA_LIST_UUID (0x2A2A) |
device information service IEEE registration certificate list characteristics UUID
Referenced by dis_init_service().
#define DIS_CHAR_MANUFACTURER_NAME_UUID (0x2A29) |
device information service manufacturer name characteristics UUID
Referenced by dis_init_service().
#define DIS_CHAR_MODEL_NUMBER_UUID (0x2A24) |
device information service model number characteristics UUID
Referenced by dis_init_service().
#define DIS_CHAR_PNP_ID_UUID (0x2A50) |
Product Number ID characteristic uuid.
Referenced by dis_init_service().
#define DIS_CHAR_SERIAL_NUMBER_UUID (0x2A25) |
device information service serial number characteristics UUID
Referenced by dis_init_service().
#define DIS_CHAR_SOFTWARE_REVISION_UUID (0x2A28) |
device information service software revision characteristics UUID
Referenced by dis_init_service().
#define DIS_CHAR_SYSTEM_ID_UUID (0x2A23) |
device information service system characteristics UUID
Referenced by dis_init_service().
#define DIS_SERVICE_UUID (0x180A) |
Referenced by dis_init_service().
#define GAP_CE_LEN_MAX (0) |
maximum length of local info parameters when using connection establishment proc
Referenced by gap_dev_connect().
#define GAP_CE_LEN_MIN (0) |
minimum length of local info parameters when using connection establishment proc
Referenced by gap_dev_connect().
#define GAP_CONN_INTERVAL_MAX (40) |
maximum connection interval
Referenced by gap_dev_connect().
#define GAP_CONN_INTERVAL_MIN (20) |
minimum connection interval
Referenced by gap_dev_connect().
#define GAP_CONN_SLAVE_LATENCY (0) |
connection slave latency
Referenced by gap_dev_connect().
#define GAP_CONNECT_PEER_COUNT (1) |
number of connections
Referenced by gap_dev_connect().
#define GAP_SUPERVISION_TIMOUT (0x1f4) |
supervision time-out
Referenced by gap_dev_connect().
#define GATT_DISCOVERY_ENDING_HANDLE (0xFFFF) |
GATT Database discover default end handle.
Referenced by alert_service_discovery(), fmp_locator_service_discover(), pas_client_start_service_discovery(), pxp_monitor_service_discover(), and time_info_service_discovery().
#define GATT_DISCOVERY_STARTING_HANDLE (0x0001) |
GATT Database discover default start handle.
Referenced by alert_service_discovery(), fmp_locator_service_discover(), pas_client_start_service_discovery(), pxp_monitor_service_discover(), and time_info_service_discovery().
#define HEART_RATE_SERVICE_UUID (0x180D) |
Heart rate service UUID.
#define HID_REPORT_REF_DESC (0x2908) |
HID report reference descriptor characteristic uuid.
Referenced by hid_serv_init().
#define HID_SERV_UUID (0x1812) |
HID Service UUID.
Referenced by hid_serv_init().
#define HID_UUID_CHAR_BOOT_KEY_INPUT_REPORT (0x2A22) |
HID Boot Keyboard Input Report UUID.
Referenced by hid_serv_init().
#define HID_UUID_CHAR_BOOT_KEY_OUTPUT_REPORT (0x2A32) |
HID Boot Keyboard Output Report UUID.
Referenced by hid_serv_init().
#define HID_UUID_CHAR_BOOT_MOUSE_INPUT_REPORT (0x2A33) |
HID Boot Mouse Input Report UUID.
Referenced by hid_serv_init().
#define HID_UUID_CHAR_HID_CONTROL_POINT (0x2A4C) |
HID Control Point UUID.
Referenced by hid_serv_init().
#define HID_UUID_CHAR_HID_INFORMATION (0x2A4A) |
HID Information UUID.
Referenced by hid_serv_init().
#define HID_UUID_CHAR_PROTOCOL_MODE (0x2A4E) |
HID Protocol Mode Characteristic UUID.
Referenced by hid_serv_init().
#define HID_UUID_CHAR_REPORT (0x2A4D) |
HID Report Characteristic UUID.
Referenced by hid_serv_init().
#define HID_UUID_CHAR_REPORT_MAP (0x2A4B) |
HID Protocol Mode Characteristic UUID.
Referenced by hid_serv_init().
#define HTPT_SERVICE_UUID (0x1809) |
HTPT SERVICE UUID.
#define IMMEDIATE_ALERT_SERVICE_UUID (0x1802) |
#define LE_BREDR_CAPABLE_CONTROLLER ((uint8_t) 1 << 3) |
Flag to indicate BR/EDR supported controller.
Referenced by ble_observer_scan_info_handler().
#define LE_BREDR_CAPABLE_HOST ((uint8_t) 1 << 4) |
Flag to indicate BR/EDR supported Host.
Referenced by ble_observer_scan_info_handler().
#define LE_GENERAL_DISCOVERABLE_MODE ((uint8_t) 1 << 1) |
LE General discoverable mode.
The device can discover without any time limit
Referenced by ble_observer_scan_info_handler().
#define LE_LIMITED_DISCOVERABLE_MODE ((uint8_t) 1 << 0) |
Observer related definitions.
LE Limited discoverable mode. The device can discover with time limit of 30seconds
Referenced by ble_observer_scan_info_handler().
#define LINK_LOSS_SERVICE_UUID (0x1803) |
Referenced by init_linkloss_service(), pxp_monitor_scan_data_handler(), and pxp_monitor_service_found_handler().
#define LOCAL_TIME_CHAR_UUID (0x2A0F) |
Referenced by time_info_characteristic_found_handler().
#define MAX_CUSTOM_EVENT_SUBSCRIBERS 2 |
Maximum Custom event subscribers. Based on No of Custom event handlers this number can be changed.
Referenced by ble_event_manager(), and ble_mgr_events_callback_handler().
#define MAX_DTM_EVENT_SUBSCRIBERS 5 |
Maximum DTM event subscribers. Based on No of DTM event handlers this number can be changed.
Referenced by ble_event_manager(), and ble_mgr_events_callback_handler().
#define MAX_GAP_EVENT_SUBSCRIBERS 5 |
Maximum event subscribers for BLE GAP events, Based on number of services/Profiles this number can be changed.
#define MAX_GATT_CLIENT_SUBSCRIBERS 5 |
Maximum GATT client event subscribers, Based on number of GATT Client services/Profiles this number can be changed.
Referenced by ble_event_manager(), and ble_mgr_events_callback_handler().
#define MAX_GATT_SERVER_SUBSCRIBERS 5 |
Maximum GATT Server event subscribers, Based on number of GATT Server services/Profiles this number can be changed.
Referenced by ble_event_manager(), and ble_mgr_events_callback_handler().
#define MAX_HTPT_EVENT_SUBSCRIBERS 1 |
Maximum HTPT event subscribers. Based on No of HTPT event handlers this number can be changed.
Referenced by ble_event_manager(), and ble_mgr_events_callback_handler().
#define MAX_L2CAP_EVENT_SUBSCRIBERS 1 |
Maximum L2CAP event subscribers. Based on No of L2CAP event handlers this number can be changed.
Referenced by ble_event_manager(), and ble_mgr_events_callback_handler().
#define MAX_SCAN_DEVICE (100) |
Referenced by ble_scan_info_handler(), ble_scan_report_app_event(), and pxp_monitor_scan_data_handler().
#define NEXT_DST_SERVICE_UUID (0x1807) |
Referenced by time_info_service_found_handler().
#define PAS_SERVICE_UUID (0x180E) |
#define PIN_TIMEOUT 30000 |
pin timeout
Referenced by ble_pair_key_request_handler().
#define PUBLIC_RANDOM_ADDR_MAX_NUM 5 |
Referenced by ble_advertisement_data_set().
#define PUBLIC_TARGET_ADDR_MAX_NUM 5 |
Referenced by ble_advertisement_data_set().
#define REF_TIME_CHAR_UUID (0x2A14) |
Referenced by time_info_characteristic_found_handler().
#define REFERENCE_TIME_SERVICE_UUID (0x1806) |
Referenced by time_info_service_found_handler().
#define SCAN_INTERVAL (96) |
Referenced by gap_dev_connect(), and gap_dev_scan().
#define SCAN_RESPONSE_DISABLE 1 |
#define SCAN_RESPONSE_ENABLE 0 |
#define SCAN_RESPONSE_ONLY_ENABLE 2 |
#define SCAN_TIMEOUT (0x0000) |
Timeout Scan time-out, 0x0000 disables time-out.
Referenced by gap_dev_scan().
#define SCAN_TYPE (AT_BLE_SCAN_ACTIVE) |
Scan method, Refer to at_ble_scan_type_t.
Referenced by gap_dev_scan().
#define SCAN_WINDOW (96) |
Referenced by gap_dev_connect(), and gap_dev_scan().
#define SERVICE_UUID128_MAX_NUM 2 |
Referenced by ble_advertisement_data_set().
#define SERVICE_UUID16_MAX_NUM 15 |
Referenced by ble_advertisement_data_set().
#define SERVICE_UUID32_MAX_NUM 5 |
Referenced by ble_advertisement_data_set().
#define SPS_CHAR_SCAN_INT_VALUE_UUID (0x2A4F) |
scan interval characteristic uuid
Referenced by sps_init_service().
#define SPS_CHAR_SCAN_REFRESH_UUID (0x2A31) |
scan refresh characteristic uuid
Referenced by sps_init_service().
#define SPS_SERVICE_UUID (0x1813) |
Scan param service uuid.
Referenced by sps_init_service().
#define TIME_UPDATE_CP_CHAR_UUID (0x2A16) |
Referenced by time_info_characteristic_found_handler().
#define TIME_UPDATE_STATE_CHAR_UUID (0x2A17) |
Referenced by time_info_characteristic_found_handler().
#define TIME_WITH_DST_CHAR_UUID (0x2A11) |
Referenced by time_info_characteristic_found_handler().
#define TX_POWER_LEVEL_CHAR_UUID (0x2A07) |
Referenced by init_tx_power_service(), and pxp_monitor_characteristic_found_handler().
#define TX_POWER_LEVEL_SIZE 1 |
Referenced by ble_observer_scan_info_handler(), and esurl_conf_adv_start().
#define TX_POWER_LEVEL_SIZE 1 |
#define TX_POWER_SERVICE_UUID (0x1804) |
Referenced by init_tx_power_service(), and pxp_monitor_service_found_handler().
typedef struct adv_element_container adv_element_container_t |
typedef struct adv_element adv_element_t |
typedef struct ble_connected_dev_info ble_connected_dev_info_t |
typedef struct ble_custom_event_cb ble_custom_event_cb_t |
typedef enum ble_device_ll_state ble_device_ll_state_t |
typedef enum ble_device_state ble_device_state_t |
typedef struct ble_dtm_event_cb ble_dtm_event_cb_t |
typedef at_ble_status_t(* ble_event_callback_t)(void *params) |
typedef struct ble_gap_event_cb ble_gap_event_cb_t |
typedef enum ble_gatt_cccd_status ble_gatt_cccd_status_t |
typedef struct ble_gatt_client_event_cb ble_gatt_client_event_cb_t |
typedef struct ble_gatt_server_event_cb ble_gatt_server_event_cb_t |
typedef struct ble_htpt_event_cb ble_htpt_event_cb_t |
typedef struct ble_l2cap_event_cb ble_l2cap_event_cb_t |
typedef struct gatt_service_handler gatt_service_handler_t |
typedef struct scan_resp_element scan_resp_element_t |
typedef struct user_custom_event user_custom_event_t |
enum ble_device_ll_state |
enum ble_device_state |
enum ble_gatt_cccd_status |
enum ble_mgr_event_cb_t |
enum ble_mgr_event_t |
enum gap_ad_type |
enum gap_ad_type brief Gap Advertisement Types
at_ble_status_t ble_advertisement_data_set | ( | void | ) |
ble_advertisement_data_set set the BLE advertisement data based on the available available services and profiles which is present in the current application.
[in] | None |
References _CONF_PUBLIC_TARGET_ADDR, _CONF_PUBLIC_TARGET_ADDR_SCAN_RSP, _CONF_RANDOM_TARGET_ADDR, _CONF_RANDOM_TARGET_ADDR_SCAN_RSP, _CONF_SERVICE_128BIT_UUID, _CONF_SERVICE_128BIT_UUID_SCAN_RSP, _CONF_SERVICE_16BIT_UUID, _CONF_SERVICE_16BIT_UUID_SCAN_RSP, _CONF_SERVICE_32BIT_UUID, _CONF_SERVICE_32BIT_UUID_SCAN_RSP, _CONF_SERVICE_SOLTN_128BIT_UUID, _CONF_SERVICE_SOLTN_128BIT_UUID_SCAN_RSP, _CONF_SERVICE_SOLTN_16BIT_UUID, _CONF_SERVICE_SOLTN_16BIT_UUID_SCAN_RSP, _CONF_SERVICE_SOLTN_32BIT_UUID, _CONF_SERVICE_SOLTN_32BIT_UUID_SCAN_RSP, ADV_ELEMENT_SIZE, adv_element_container::adv_ptr, ADV_TYPE_FLAG_SIZE, ADV_TYPE_SIZE, ADVERTISING_INTERVAL, APPEARANCE, at_ble_adv_data_set(), AT_BLE_ADV_MAX_SIZE, AT_BLE_GAP_INVALID_PARAM, AT_BLE_SUCCESS, BLE_GAP_ADV_ADVERTISING_INTERVAL_LENGTH, BLE_GAP_ADV_DATA_SLAVE_CONN_INTERVAL_RANGE_LENGTH, BLE_GAP_ADV_PUBLIC_TARGET_ADDR_LENGTH, BLE_GAP_ADV_RANDOM_TARGET_ADDR_LENGTH, BLE_GAP_ADV_SERVICE_128BIT_UUID_LENGTH, BLE_GAP_ADV_SERVICE_16BIT_UUID_LENGTH, BLE_GAP_ADV_SERVICE_32BIT_UUID_LENGTH, COMPLETE_LIST_128BIT_SERV_UUIDS, COMPLETE_LIST_16BIT_SERV_UUIDS, COMPLETE_LIST_32BIT_SERV_UUIDS, COMPLETE_LOCAL_NAME, DBG_LOG, DBG_LOG_ADV, DBG_LOG_DEV, LE_BLUETOOTH_DEVICE_ADDRESS, LE_ROLE, adv_element_container::len, scan_resp_element::len, LIST_128BIT_SERV_SOLICITATION_UUIDS, LIST_16BIT_SERV_SOLICITATION_UUIDS, LIST_32BIT_SERV_SOLICITATION_UUIDS, MANUFACTURER_SPECIFIC_DATA, MREPEAT, NULL, PUBLIC_RANDOM_ADDR_MAX_NUM, PUBLIC_TARGET_ADDR_MAX_NUM, PUBLIC_TARGET_ADDRESS, RANDOM_TARGET_ADDRESS, scan_resp_element::scn_ptr, SERVICE_DATA, SERVICE_DATA_128BIT, SERVICE_DATA_32BIT, SERVICE_UUID128_MAX_NUM, SERVICE_UUID16_MAX_NUM, SERVICE_UUID32_MAX_NUM, SHORTENED_LOCAL_NAME, SLAVE_CONNECTION_INTERVAL_RANGE, and TX_POWER_LEVEL.
Referenced by anp_client_init(), battery_service_advertise(), battery_set_advertisement_data(), blp_sensor_init(), csc_prf_init(), device_information_advertise(), fmp_target_adv(), hid_prf_dev_adv(), hr_sensor_init(), htpt_set_advertisement_data(), pas_client_init(), pxp_reporter_adv(), sps_service_advertise(), and time_info_adv().
void ble_characteristic_found_handler | ( | at_ble_characteristic_found_t * | characteristic_found | ) |
function called when the AT_BLE_CHARACTERISTIC_FOUND event is received from stack.
[in] | characteristic_found | at_ble_characteristic_found_t information related to the characteristic found. |
at_ble_status_t ble_characteristic_write_cmd_complete_handler | ( | void * | params | ) |
ble_characteristic_write_cmd_complete_handler handler for Char write command complete event
[in] | params | of at_ble_cmd_complete_event_t type, Refer to at_ble_cmd_complete_event_t |
References AT_BLE_FAILURE, AT_BLE_SUCCESS, at_ble_cmd_complete_event_t::conn_handle, DBG_LOG_DEV, at_ble_cmd_complete_event_t::operation, and at_ble_cmd_complete_event_t::status.
at_ble_status_t ble_check_device_state | ( | at_ble_handle_t | conn_handle, |
ble_device_state_t | state | ||
) |
Check the device state.
[in] | conn_handle | at_ble_handle_t Device connection handle |
[in] | state | ble_device_state_t device state |
References AT_BLE_FAILURE, AT_BLE_SUCCESS, and BLE_MAX_DEVICE_CONNECTION.
bool ble_check_disconnected_iscentral | ( | at_ble_handle_t | handle | ) |
Check the passed connection handle of the device is disconnected and central device.
[in] | handle | at_ble_handle_t Device connection handle |
References AT_BLE_ROLE_CENTRAL, AT_BLE_SUCCESS, and ble_disconnected_device_role().
Referenced by pxp_disconnect_event_handler().
bool ble_check_disconnected_isperipheral | ( | at_ble_handle_t | handle | ) |
Check the passed connection handle of the device is disconnected and peripheral device.
[in] | handle | at_ble_handle_t Device connection handle |
References AT_BLE_ROLE_PERIPHERAL, AT_BLE_SUCCESS, and ble_disconnected_device_role().
bool ble_check_iscentral | ( | at_ble_handle_t | handle | ) |
Check the passed connection handle of the device is central device.
[in] | handle | at_ble_handle_t Device connection handle |
References AT_BLE_ROLE_CENTRAL, AT_BLE_ROLE_NONE, AT_BLE_SUCCESS, and ble_connected_device_role().
Referenced by bas_encryption_status_changed_app_event(), bas_paired_app_event(), ble_connected_app_event(), fmp_locator_characteristic_found_handler(), fmp_locator_connected_state_handler(), fmp_locator_discovery_complete_handler(), fmp_locator_pair_done_handler(), pxp_monitor_characteristic_found_handler(), pxp_monitor_characteristic_read_response(), pxp_monitor_connected_state_handler(), pxp_monitor_discovery_complete_handler(), pxp_monitor_encryption_change_handler(), pxp_monitor_pair_done_handler(), and pxp_monitor_service_found_handler().
bool ble_check_ispheripheral | ( | at_ble_handle_t | handle | ) |
Check the passed connection handle of the device is peripheral or central device.
[in] | handle | at_ble_handle_t Device connection handle |
References AT_BLE_ROLE_PERIPHERAL, AT_BLE_SUCCESS, and ble_connected_device_role().
Referenced by ble_connected_app_event(), ble_pair_done_handler(), pxp_monitor_encryption_change_handler(), and pxp_monitor_pair_done_handler().
at_ble_status_t ble_conn_param_update | ( | void * | params | ) |
function used to update the connection parameter.
[in] | conn_param_update | at_ble_conn_param_update_done_t parameters to be updated. |
function used to update the connection parameter.
References ALL_UNUSED, AT_BLE_SUCCESS, and DBG_LOG_DEV.
at_ble_status_t ble_conn_param_update_req | ( | void * | params | ) |
function triggered on receiving a connection parameter update request from the peer.
[in] | conn_param_req | at_ble_conn_param_update_request_t parameters received. |
References at_ble_conn_update_reply(), AT_BLE_SUCCESS, and at_ble_conn_param_update_request_t::handle.
at_ble_status_t ble_connected_device_role | ( | at_ble_handle_t | conn_handle, |
at_ble_dev_role_t * | dev_role | ||
) |
Get the passed connection handle device role.
[in] | conn_handle | at_ble_handle_t Device connection handle |
[in] | dev_role | at_ble_dev_role_t device role Central or Peripheral |
References AT_BLE_FAILURE, AT_BLE_SUCCESS, BLE_DEVICE_DEFAULT_IDLE, BLE_DEVICE_DISCONNECTED, and BLE_MAX_DEVICE_CONNECTION.
Referenced by ble_check_iscentral(), and ble_check_ispheripheral().
at_ble_status_t ble_connected_state_handler | ( | void * | params | ) |
ble_connected_state_handler handles the connected event.
stores the peer device information into device info table
[in] | params | of at_ble_connected_t type, Refer to at_ble_connected_t |
ble_connected_state_handler handles the connected event.
References at_ble_addr_t::addr, ALL_UNUSED, AT_BLE_ADDRESS_PUBLIC, AT_BLE_ADDRESS_RANDOM_PRIVATE_RESOLVABLE, at_ble_disconnect(), AT_BLE_FAILURE, AT_BLE_MAX_KEY_LEN, at_ble_random_address_resolve(), AT_BLE_ROLE_CENTRAL, AT_BLE_ROLE_PERIPHERAL, AT_BLE_SUCCESS, AT_BLE_TERMINATED_BY_USER, BLE_DEVICE_CONNECTED, ble_device_count, ble_device_current_state, BLE_DEVICE_DEFAULT_IDLE, BLE_MAX_DEVICE_CONNECTION, ble_send_slave_sec_request(), at_ble_connected_t::conn_status, DBG_LOG, DBG_LOG_DEV, at_ble_connected_t::handle, at_ble_connected_t::peer_addr, PERIPHERAL_CONNECTED_STATE, resolve_addr_flag, and at_ble_addr_t::type.
at_ble_status_t ble_device_dead_handler | ( | void * | params | ) |
ble_device_dead_handler handler for BLE device dead indication handler.
When the application receives this event that means BLE device is not responding. The application may start the BLE device from beginning by calling the at_ble_init, Refer to at_ble_init
[in] | params | of void * type |
References ALL_UNUSED, AT_BLE_SUCCESS, and DBG_LOG.
void ble_device_init | ( | at_ble_addr_t * | addr | ) |
function sets both device address and device name which are exposed to all other devices.
[in] | addr | address to be set as a device address. |
[in] | args | configuration required for initialization. |
function sets both device address and device name which are exposed to all other devices.
Select BTLC1000 GPIO for host wakeup, for Wing board select BTLC1000_EXT_PIN9 only, for SoC use the enum values
UART baudrate value one of at_ble_uart_baudrate_tag values
References AT_BLE_GAP_INVALID_PARAM, platform_api_list_tag::at_ble_reconfigure_usart, AT_BLE_ROLE_NONE, AT_BLE_SUCCESS, AT_BLE_UART, AT_BTLC1000_MR, AT_BTLC1000_ZR, att_db_data, BLE_ATT_DB_MEMORY_SIZE, BLE_CUSTOM_EVENT_TYPE, ble_device_count, BLE_DEVICE_DEFAULT_IDLE, BLE_DEVICE_NAME, BLE_GAP_EVENT_TYPE, BLE_GATT_SERVER_EVENT_TYPE, ble_init(), BLE_INVALID_CONNECTION_HANDLE, BLE_MAX_DEVICE_CONNECTION, ble_mgr_events_callback_handler(), ble_restore_bonding_info(), ble_sdk_version(), ble_set_dev_config(), ble_set_device_name(), BTLC1000_EXT_PIN9, at_ble_init_config_t::btlc1000_module_version, at_ble_bus_info_t::btlc1000_uart_pinout_switch, at_ble_bus_info_t::bus_baudrate, at_ble_init_config_t::bus_info, at_ble_bus_info_t::bus_type, DBG_LOG, at_ble_init_config_t::event_mem_pool, at_ble_init_config_t::event_params_mem_pool, event_params_memory, event_pool_memory, at_ble_bus_info_t::host_external_wakeup_gpio, at_ble_init_config_t::memPool, at_ble_mempool_t::memSize, at_ble_mempool_t::memStartAdd, NULL, at_ble_init_config_t::platform_api_list, platform_configure_hw_fc_uart(), platform_configure_primary_uart(), platform_host_set_sleep(), platform_init(), REGISTER_CALL_BACK, at_ble_init_config_t::rx_fifo_mem_pool, rx_fifo_memory, TRACE_LVL_DISABLE, and trace_set_level().
Referenced by ble_disconnected_app_event(), ble_init(), and main().
at_ble_status_t ble_device_out_of_sync_handler | ( | void * | params | ) |
ble_device_out_of_sync_handler handler for out of sync indication handler.
When device starts missing few events or UART BLE event data
[in] | params | of void * type |
References ALL_UNUSED, AT_BLE_SUCCESS, and DBG_LOG.
at_ble_status_t ble_disconnected_device_role | ( | at_ble_handle_t | conn_handle, |
at_ble_dev_role_t * | dev_role | ||
) |
Get the device role of disconnected device.
[in] | conn_handle | at_ble_handle_t Device connection handle |
[in] | dev_role | at_ble_dev_role_t device role Central or Peripheral |
References AT_BLE_FAILURE, AT_BLE_ROLE_NONE, AT_BLE_SUCCESS, BLE_DEVICE_DEFAULT_IDLE, BLE_DEVICE_DISCONNECTED, and BLE_MAX_DEVICE_CONNECTION.
Referenced by ble_check_disconnected_iscentral(), and ble_check_disconnected_isperipheral().
at_ble_status_t ble_disconnected_state_handler | ( | void * | params | ) |
function called when the AT_BLE_DISCONNECTED event is received from the stack.
[in] | disconnect | at_ble_disconnected_t information about the disconnection. |
function called when the AT_BLE_DISCONNECTED event is received from the stack.
References AT_BLE_ATT_INSUFF_AUTHEN, AT_BLE_AUTH_NO_MITM_NO_BOND, AT_BLE_GAP_INVALID_PARAM, AT_BLE_ROLE_NONE, AT_BLE_SUCCESS, BLE_DEVICE_CONNECTED, ble_device_count, BLE_DEVICE_DEFAULT_IDLE, BLE_DEVICE_DISCONNECTED, BLE_DEVICE_ENCRYPTION_COMPLETED, BLE_DEVICE_ENCRYPTION_FAILED, BLE_DEVICE_ENCRYPTION_STATE, BLE_DEVICE_PAIRED, BLE_DEVICE_PAIRING, BLE_DEVICE_PAIRING_FAILED, BLE_MAX_DEVICE_CONNECTION, DBG_LOG, DBG_LOG_DEV, at_ble_disconnected_t::handle, at_ble_disconnected_t::reason, and send_slave_security_flag.
void ble_discovery_complete_handler | ( | at_ble_discovery_complete_t * | discover_status | ) |
function called when the AT_BLE_DISCOVERY_COMPLETE event is received from the stack.
[in] | discover_status | status of the discovery. |
at_ble_status_t ble_encryption_request_handler | ( | void * | params | ) |
function called when the AT_BLE_ENCRYPTION_REQUEST event is received from stack.
[in] | encry_req | encryption request from the peer device. |
function called when the AT_BLE_ENCRYPTION_REQUEST event is received from stack.
References AT_BLE_AUTH_FAILURE, at_ble_disconnect(), at_ble_encryption_request_reply(), AT_BLE_FAILURE, AT_BLE_SUCCESS, BLE_DEVICE_DEFAULT_IDLE, BLE_DEVICE_DISCONNECTED, BLE_DEVICE_ENCRYPTION_STATE, BLE_MAX_DEVICE_CONNECTION, DBG_LOG, DBG_LOG_DEV, at_ble_encryption_request_t::ediv, at_ble_encryption_request_t::handle, at_ble_encryption_request_t::nb, resolve_addr_flag, and temp_param.
Referenced by ble_resolv_rand_addr_handler().
at_ble_status_t ble_encryption_status_change_handler | ( | void * | params | ) |
function called when the AT_BLE_ENCRYPTION_STATUS_CHANGED event is received from stack.
[in] | encry_status | changed encryption status. |
function called when the AT_BLE_ENCRYPTION_STATUS_CHANGED event is received from stack.
References AT_BLE_FAILURE, AT_BLE_SUCCESS, at_ble_encryption_status_changed_t::authen, BLE_DEVICE_ENCRYPTION_COMPLETED, BLE_DEVICE_ENCRYPTION_FAILED, BLE_DEVICE_ENCRYPTION_STATE, BLE_MAX_DEVICE_CONNECTION, DBG_LOG, at_ble_encryption_status_changed_t::handle, send_slave_security_flag, and at_ble_encryption_status_changed_t::status.
void ble_event_manager | ( | at_ble_events_t | events, |
void * | event_params | ||
) |
function handling all the events from the stack, responsible for calling the respective functions initialized for the events.
[in] | events | events received from the stack at_ble_events_t. |
[in] | event_params | data received from stack for the respective event received. |
References AT_BLE_ADV_REPORT, AT_BLE_CHARACTERISTIC_CHANGED, AT_BLE_CHARACTERISTIC_CONFIGURATION_CHANGED, AT_BLE_CHARACTERISTIC_FOUND, AT_BLE_CHARACTERISTIC_READ_BY_UUID_RESPONSE, AT_BLE_CHARACTERISTIC_READ_MULTIBLE_RESPONSE, AT_BLE_CHARACTERISTIC_WRITE_CMD_CMP, AT_BLE_CHARACTERISTIC_WRITE_RESPONSE, AT_BLE_CON_CHANNEL_MAP_IND, AT_BLE_CONN_PARAM_UPDATE_DONE, AT_BLE_CONN_PARAM_UPDATE_REQUEST, AT_BLE_CONNECTED, AT_BLE_CUSTOM_EVENT, AT_BLE_DESCRIPTOR_FOUND, AT_BLE_DEVICE_READY, AT_BLE_DISCONNECTED, AT_BLE_DISCOVERY_COMPLETE, AT_BLE_ENCRYPTION_REQUEST, AT_BLE_ENCRYPTION_STATUS_CHANGED, AT_BLE_EVENT_MAX, AT_BLE_HTPT_CFG_INDNTF_IND, AT_BLE_HTPT_CREATE_DB_CFM, AT_BLE_HTPT_DISABLE_IND, AT_BLE_HTPT_ENABLE_RSP, AT_BLE_HTPT_ERROR_IND, AT_BLE_HTPT_MEAS_INTV_CHG_IND, AT_BLE_HTPT_MEAS_INTV_CHG_REQ, AT_BLE_HTPT_MEAS_INTV_UPD_RSP, AT_BLE_HTPT_TEMP_SEND_CFM, AT_BLE_INCLUDED_SERVICE_FOUND, AT_BLE_INDICATION_CONFIRMED, AT_BLE_INDICATION_RECIEVED, AT_BLE_LE_PACKET_REPORT, AT_BLE_LE_TEST_STATUS, AT_BLE_LECB_ADD_CREDIT_IND, AT_BLE_LECB_CONN_REQ, AT_BLE_LECB_CONNECTED, AT_BLE_LECB_DATA_RECIEVED, AT_BLE_LECB_DISCONNECTED, AT_BLE_LECB_SEND_RESP, AT_BLE_MTU_CHANGED_CMD_COMPLETE, AT_BLE_MTU_CHANGED_INDICATION, AT_BLE_NOTIFICATION_CONFIRMED, AT_BLE_NOTIFICATION_RECIEVED, AT_BLE_PAIR_DONE, AT_BLE_PAIR_KEY_REQUEST, AT_BLE_PAIR_REQUEST, AT_BLE_PEER_ATT_INFO_IND, AT_BLE_PRIMARY_SERVICE_FOUND, AT_BLE_RAND_ADDR_CHANGED, AT_BLE_READ_AUTHORIZE_REQUEST, AT_BLE_RESOLV_RAND_ADDR_STATUS, AT_BLE_SCAN_INFO, AT_BLE_SCAN_REPORT, AT_BLE_SERVICE_CHANGED_INDICATION_SENT, AT_BLE_SIGN_COUNTERS_IND, AT_BLE_SLAVE_SEC_REQUEST, AT_BLE_UNDEFINED_EVENT, AT_BLE_WRITE_AUTHORIZE_REQUEST, ble_scan_duplication_check(), DBG_LOG, DBG_LOG_DEV, events, MAX_CUSTOM_EVENT_SUBSCRIBERS, MAX_DTM_EVENT_SUBSCRIBERS, MAX_GAP_EVENT_SUBSCRIBERS, MAX_GATT_CLIENT_SUBSCRIBERS, MAX_GATT_SERVER_SUBSCRIBERS, MAX_HTPT_EVENT_SUBSCRIBERS, MAX_L2CAP_EVENT_SUBSCRIBERS, and NULL.
Referenced by ble_event_task().
at_ble_status_t ble_event_task | ( | void | ) |
function to handle the BLE event task.
[in] | none. |
function to handle the BLE event task.
References at_ble_event_get(), AT_BLE_FAILURE, AT_BLE_SUCCESS, ble_event_manager(), ble_event_params, BLE_EVENT_TIMEOUT, and event.
Referenced by main(), and pxp_monitor_start_scan().
bool ble_mgr_events_callback_handler | ( | ble_mgr_event_cb_t | event_cb_type, |
ble_mgr_event_t | event_type, | ||
const void * | ble_event_handler | ||
) |
ble_mgr_events_callback_handler handler for Profile/Service/application to register the BLE events callbacks
[in] | param | of ble_mgr_event_cb_t type, Refer to ble_mgr_event_cb_t |
[in] | param | of ble_mgr_event_t type, Refer to ble_mgr_event_t |
[in] | ble_event_handler | of ble_mgr_event_t type, Refer to ble_mgr_event_t |
ble_mgr_events_callback_handler handler for Profile/Service/application to register the BLE events callbacks
The callback pointers are registered according to the group type of BLE Events request is received AT_BLE_LECB_CONN_REQ
[in] | event_cb_type | Register/Unregister the callback functions |
[in] | event_type | type of BLE event |
[in] | ble_event_handler | structure of function pointers for the event |
References BLE_CUSTOM_EVENT_TYPE, BLE_DTM_EVENT_TYPE, BLE_GAP_EVENT_TYPE, BLE_GATT_CLIENT_EVENT_TYPE, BLE_GATT_HTPT_EVENT_TYPE, BLE_GATT_SERVER_EVENT_TYPE, BLE_L2CAP_EVENT_TYPE, MAX_CUSTOM_EVENT_SUBSCRIBERS, MAX_DTM_EVENT_SUBSCRIBERS, MAX_GAP_EVENT_SUBSCRIBERS, MAX_GATT_CLIENT_SUBSCRIBERS, MAX_GATT_SERVER_SUBSCRIBERS, MAX_HTPT_EVENT_SUBSCRIBERS, MAX_L2CAP_EVENT_SUBSCRIBERS, NULL, REGISTER_CALL_BACK, and UNREGISTER_CALL_BACK.
Referenced by anp_client_init(), ble_device_init(), blp_sensor_init(), csc_prf_init(), eddystone_app_init(), fmp_locator_init(), fmp_target_init(), hid_prf_init(), hr_sensor_init(), main(), pas_client_init(), pxp_monitor_init(), pxp_reporter_init(), sps_init_service(), and time_info_init().
at_ble_status_t ble_mtu_changed_cmd_complete_handler | ( | void * | params | ) |
ble_mtu_changed_indication_handler handler for Peer device MTU size change
[in] | params | of at_ble_mtu_changed_ind_t type, Refer to at_ble_mtu_changed_ind_t |
References AT_BLE_FAILURE, AT_BLE_SUCCESS, at_ble_cmd_complete_event_t::conn_handle, DBG_LOG, DBG_LOG_DEV, at_ble_cmd_complete_event_t::operation, and at_ble_cmd_complete_event_t::status.
at_ble_status_t ble_mtu_changed_indication_handler | ( | void * | params | ) |
ble_mtu_changed_indication_handler handler for Peer device MTU size change
[in] | params | of at_ble_mtu_changed_ind_t type, Refer to at_ble_mtu_changed_ind_t |
References AT_BLE_SUCCESS, at_ble_mtu_changed_ind_t::conhdl, DBG_LOG_DEV, and at_ble_mtu_changed_ind_t::mtu_value.
at_ble_status_t ble_pair_done_handler | ( | void * | params | ) |
function called when the AT_BLE_PAIR_DONE event is received from stack.
[in] | pairing_params | at_ble_pair_done_t pair done information. |
function called when the AT_BLE_PAIR_DONE event is received from stack.
References at_ble_disconnect(), AT_BLE_FAILURE, AT_BLE_SUCCESS, AT_BLE_TERMINATED_BY_USER, at_ble_pair_done_t::auth, ble_check_ispheripheral(), BLE_DEVICE_PAIRED, BLE_DEVICE_PAIRING, BLE_DEVICE_PAIRING_FAILED, BLE_MAX_DEVICE_CONNECTION, ble_store_bonding_info(), DBG_LOG, DBG_LOG_CONT_DEV, DBG_LOG_DEV, at_ble_pair_done_t::handle, at_ble_LTK_t::key, at_ble_CSRK_t::key, at_ble_IRK_t::key, at_ble_pair_done_t::peer_csrk, at_ble_pair_done_t::peer_irk, at_ble_pair_done_t::peer_ltk, and at_ble_pair_done_t::status.
at_ble_status_t ble_pair_key_request_handler | ( | void * | params | ) |
function called when the AT_BLE_PAIR_KEY_REQUEST event is received from stack.
[in] | pair_key | at_ble_pair_key_request_t key details for the pairing request. |
function called when the AT_BLE_PAIR_KEY_REQUEST event is received from stack.
References at_ble_disconnect(), AT_BLE_FAILURE, at_ble_pair_key_reply(), AT_BLE_PAIR_OOB, AT_BLE_PAIR_PASSKEY, AT_BLE_PAIR_PASSKEY_DISPLAY, AT_BLE_PAIR_PASSKEY_ENTRY, AT_BLE_PASSKEY_LEN, AT_BLE_SUCCESS, AT_BLE_TERMINATED_BY_USER, DBG_LOG, DBG_LOG_CONT, getchar_timeout(), at_ble_pair_key_request_t::handle, at_ble_pair_key_request_t::passkey_type, PIN_TIMEOUT, and at_ble_pair_key_request_t::type.
at_ble_status_t ble_pair_request_handler | ( | void * | params | ) |
function called when the AT_BLE_PAIR_REQUEST event is received from stack.
[in] | pair_key | at_ble_pair_request_t details for the pairing request from the peer. |
function called when the AT_BLE_PAIR_REQUEST event is received from stack.
References AT_BLE_ADDRESS_RANDOM_PRIVATE_RESOLVABLE, at_ble_authenticate(), AT_BLE_FAILURE, AT_BLE_GAP_INVALID_PARAM, AT_BLE_KEY_DIST_ENC, AT_BLE_KEY_DIST_ID, AT_BLE_SUCCESS, BLE_AUTHENTICATION_LEVEL, BLE_BOND_REQ, BLE_DEVICE_CONNECTED, BLE_DEVICE_PAIRING, BLE_IO_CAPABALITIES, BLE_MAX_DEVICE_CONNECTION, BLE_MITM_REQ, BLE_OOB_REQ, at_ble_pair_features_t::bond, DBG_LOG, DBG_LOG_CONT_DEV, DBG_LOG_DEV, at_ble_pair_features_t::desired_auth, at_ble_pair_request_t::handle, i, at_ble_pair_features_t::initiator_keys, at_ble_pair_features_t::io_cababilities, at_ble_pair_features_t::max_key_size, at_ble_pair_features_t::min_key_size, at_ble_pair_features_t::mitm_protection, NULL, at_ble_pair_features_t::oob_avaiable, and at_ble_pair_features_t::responder_keys.
at_ble_status_t ble_remove_bonding_info | ( | void | ) |
Remove all bonding information from PDS.
Remove all the valid bonding informations from PDS
[in] | None |
AT_BLE_SUCCESS | bonding information removed successfully from the PDS |
AT_BLE_FAILURE | Failed to remove the bonding information from PDS |
References AT_BLE_FAILURE, AT_BLE_SUCCESS, BLE_BONDING_INFO, BLE_MAX_DEVICE_CONNECTION, count, DBG_LOG, pds_delete(), PDS_ID, pds_list_item(), and PDS_SUCCESS.
Referenced by main().
at_ble_status_t ble_resolv_rand_addr_handler | ( | void * | params | ) |
ble_resolv_rand_addr_handler handles the resolved random address event
[in] | params | of at_ble_resolv_rand_addr_status_t type, Refer to at_ble_resolv_rand_addr_status_t |
References ALL_UNUSED, at_ble_disconnect(), AT_BLE_FAILURE, AT_BLE_MAX_KEY_LEN, AT_BLE_ROLE_PERIPHERAL, AT_BLE_SUCCESS, AT_BLE_TERMINATED_BY_USER, BLE_DEVICE_CONNECTED, ble_device_count, BLE_DEVICE_DEFAULT_IDLE, BLE_DEVICE_DISCONNECTED, ble_encryption_request_handler(), BLE_MAX_DEVICE_CONNECTION, ble_send_slave_sec_request(), DBG_LOG, DBG_LOG_DEV, at_ble_connected_t::handle, at_ble_resolv_rand_addr_status_t::irk, resolve_addr_flag, send_slave_security_flag, at_ble_resolv_rand_addr_status_t::status, and temp_param.
at_ble_status_t ble_restore_bonding_info | ( | void | ) |
Restore the bonding information from PDS.
Restore all the valid bonding information from PDS to device info table
[in] | None |
AT_BLE_SUCCESS | PDS Restore bonding information is completed. |
AT_BLE_FAILURE | Restore bonding information failed |
References AT_BLE_FAILURE, AT_BLE_SUCCESS, BLE_BONDING_INFO, BLE_DEVICE_DISCONNECTED, BLE_MAX_DEVICE_CONNECTION, count, DBG_LOG, PDS_ID, pds_list_item(), pds_read(), and PDS_SUCCESS.
Referenced by ble_device_init().
at_ble_status_t ble_scan_info_handler | ( | void * | params | ) |
function to handle the scan information.
[in] | scan_param | scanned data. |
function to handle the scan information.
References at_ble_addr_t::addr, AT_BLE_FAILURE, at_ble_scan_stop(), AT_BLE_SUCCESS, DBG_LOG, DBG_LOG_DEV, at_ble_scan_info_t::dev_addr, MAX_SCAN_DEVICE, and scan_response_count.
at_ble_status_t ble_scan_report_handler | ( | void * | params | ) |
function to handle the scan status.
[in] | scan_report | status of the scan. |
function to handle the scan status.
References AT_BLE_FAILURE, AT_BLE_SUCCESS, ble_device_current_state, BLE_DEVICE_IDLE_STATE, DBG_LOG, and at_ble_scan_report_t::status.
uint32_t ble_sdk_version | ( | void | ) |
ble_sdk_version gets the version of BluSDK and also checks the SDK and Library version compatibility
[in] | None |
References at_ble_firmware_version_get(), at_ble_rf_version_get(), AT_BLE_SUCCESS, BLE_SDK_BUILD_NO, BLE_SDK_MAJOR_NO, BLE_SDK_MINOR_NO, BLE_SDK_MINOR_NO_INC, BLE_SDK_VERSION, DBG_LOG, and DBG_LOG_DEV.
Referenced by ble_device_init().
at_ble_status_t ble_send_slave_sec_request | ( | at_ble_handle_t | conn_handle | ) |
function to send slave security request.
[in] | conn_handle | at_ble_handle_t connection handle. |
function to send slave security request.
References ALL_UNUSED, AT_BLE_FAILURE, at_ble_send_slave_sec_request(), AT_BLE_SUCCESS, BLE_BOND_REQ, BLE_MITM_REQ, DBG_LOG, and DBG_LOG_DEV.
Referenced by ble_connected_state_handler(), ble_resolv_rand_addr_handler(), and time_info_connected_state_handler().
at_ble_status_t ble_set_device_name | ( | uint8_t * | name, |
uint8_t | name_len | ||
) |
function to set the device name.
[in] | name | name of the device. |
[in] | name_len | length of the device name. |
function to set the device name.
References at_ble_device_name_set(), AT_BLE_INVALID_PARAM, and NULL.
at_ble_status_t ble_slave_security_request_handler | ( | void * | params | ) |
References AT_BLE_ADDRESS_RANDOM_PRIVATE_RESOLVABLE, AT_BLE_AUTH_NO_MITM_BOND, at_ble_authenticate(), at_ble_encryption_start(), AT_BLE_FAILURE, AT_BLE_GAP_INVALID_PARAM, AT_BLE_IO_CAP_KB_DISPLAY, AT_BLE_KEY_DIST_ENC, AT_BLE_KEY_DIST_ID, AT_BLE_SUCCESS, BLE_AUTHENTICATION_LEVEL, BLE_DEVICE_CONNECTED, BLE_DEVICE_ENCRYPTION_STATE, BLE_DEVICE_PAIRING, BLE_MAX_DEVICE_CONNECTION, at_ble_pair_features_t::bond, at_ble_slave_sec_request_t::bond, DBG_LOG, at_ble_pair_features_t::desired_auth, at_ble_slave_sec_request_t::handle, i, at_ble_pair_features_t::initiator_keys, at_ble_pair_features_t::io_cababilities, at_ble_pair_features_t::max_key_size, at_ble_pair_features_t::min_key_size, at_ble_pair_features_t::mitm_protection, NULL, at_ble_pair_features_t::oob_avaiable, and at_ble_pair_features_t::responder_keys.
at_ble_status_t ble_store_bonding_info | ( | void * | params | ) |
Store the bonding information.
[in] | None |
AT_BLE_SUCCESS | Stored the bonding information in PDS |
AT_BLE_FAILURE | Failed to store the bonding information in PDS |
References AT_BLE_FAILURE, AT_BLE_SUCCESS, BLE_BONDING_INFO, BLE_MAX_DEVICE_CONNECTION, count, DBG_LOG, pds_compact_sector(), PDS_ID, pds_list_item(), PDS_NVM_NO_MEMORY, PDS_SECTOR_ITEM_ERROR, PDS_SUCCESS, and pds_write().
Referenced by ble_pair_done_handler().
at_ble_status_t ble_undefined_event_handler | ( | void * | params | ) |
ble_undefined_event_handler handler for undefined events which is not expected in Library
[in] | params | of void * type |
References ALL_UNUSED, AT_BLE_SUCCESS, and DBG_LOG_DEV.
COMPILER_PACK_RESET | ( | ) |
Initialize the PDS NVM memory controller.
Initialize the NVM memory controller, based on the NVM id the respective driver API's must be called, If any errors in the initialization will result in PDS Initialization error
[in] | pds_instance | Initialized PDS environment structure |
PDS_SUCCESS | PDS Initialize procedure is completed |
PDS_INIT_ERROR | PDS initialization failed, due to inactive sector or NVM Init failures |
for | other return values check pds_status_t enum values |
at_ble_status_t gap_dev_connect | ( | at_ble_addr_t | dev_addr[] | ) |
function requesting the device for the connection.
[in] | dev_addr | address of the the peer device. |
at_ble_status_t gap_dev_scan | ( | void | ) |
function to start scan.
[in] | none. |
function to start scan.
References AT_BLE_SCAN_GEN_DISCOVERY, AT_BLE_SCAN_OBSERVER_MODE, at_ble_scan_start(), AT_BLE_SUCCESS, ble_device_current_state, CENTRAL_SCANNING_STATE, DBG_LOG, SCAN_INTERVAL, scan_response_count, SCAN_TIMEOUT, SCAN_TYPE, and SCAN_WINDOW.
Referenced by app_no_device_found_handler(), battery_start_advertisement(), ble_adv_report_app_event(), ble_connected_app_event(), ble_disconnected_app_event(), ble_observer_custom_event(), ble_scan_report_app_event(), pxp_app_init(), pxp_monitor_scan_data_handler(), and pxp_monitor_start_scan().
at_ble_status_t pds_module_init | ( | void | ) |
Initialize the PDS Module.
IInitialize the PDS & NVM Memory
[in] | None |
AT_BLE_SUCCESS | PDS Module Initialize is completed |
AT_BLE_FAILURE | PDS Module Initialization Failure |
References AT_BLE_FAILURE, AT_BLE_SUCCESS, DBG_LOG, pds_init(), and PDS_SUCCESS.
Referenced by main().
at_ble_status_t scan_info_parse | ( | at_ble_scan_info_t * | scan_info_data, |
at_ble_uuid_t * | ble_service_uuid, | ||
uint8_t | adv_type | ||
) |
function parses the received advertising data for service and local name.
[in] | scan_info_data | the received data. |
[in] | ble_service_uuid | uuid to be searched in the received data. |
[in] | adv_type | advertisement type |
References at_ble_scan_info_t::adv_data, at_ble_scan_info_t::adv_data_len, AT_BLE_FAILURE, AT_BLE_SUCCESS, AT_BLE_UUID_128, AT_BLE_UUID_128_LEN, AT_BLE_UUID_16, AT_BLE_UUID_16_LEN, AT_BLE_UUID_32, AT_BLE_UUID_32_LEN, at_ble_uuid_t::type, and at_ble_uuid_t::uuid.
Referenced by ble_scan_report_app_event(), and pxp_monitor_scan_data_handler().
le_role_t |