Microchip® Advanced Software Framework

ble_sdk/ble_services/ble_mgr/ble_manager.h File Reference

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
 

Enumerations

enum  ble_device_ll_state {
  BLE_DEVICE_IDLE_STATE,
  PERIPHERAL_ADVERTISING_STATE,
  CENTRAL_SCANNING_STATE,
  PERIPHERAL_CONNECTED_STATE,
  PERIPHERAL_PAIRED_STATE,
  PERIPHERAL_ENCRYPTION_STATE,
  PERIPHERAL_DISCONNECTED_STATE
}
 
enum  ble_device_state {
  BLE_DEVICE_DEFAULT_IDLE,
  BLE_DEVICE_DISCONNECTED,
  BLE_DEVICE_CONNECTED,
  BLE_DEVICE_PAIRING,
  BLE_DEVICE_PAIRING_FAILED,
  BLE_DEVICE_PAIRED,
  BLE_DEVICE_ENCRYPTION_STATE,
  BLE_DEVICE_ENCRYPTION_FAILED,
  BLE_DEVICE_ENCRYPTION_COMPLETED
}
 
enum  ble_gatt_cccd_status {
  CCCD_NOTIFICATION_INDICATION_DISABLED = 0x00,
  CCCD_NOTIFICATION_ENABLED_INDICATION_DISABLED = 0x01,
  CCCD_NOTIFICATION_DISABLED_INDICATION_ENABLED = 0x02,
  CCCD_INIDCATION_NOTIFICATION_ENABLED = 0x03
}
 
enum  ble_mgr_event_cb_t {
  REGISTER_CALL_BACK,
  UNREGISTER_CALL_BACK
}
 Subscribe the events or Un-subscribe the events. More...
 
enum  ble_mgr_event_t {
  BLE_GAP_EVENT_TYPE,
  BLE_GATT_SERVER_EVENT_TYPE,
  BLE_GATT_CLIENT_EVENT_TYPE,
  BLE_COMMON_EVENT_TYPE,
  BLE_PAIRING_EVENT_TYPE,
  BLE_GATT_TP_EVENT_TYPE,
  BLE_GAP_EVENT_TYPE,
  BLE_GATT_CLIENT_EVENT_TYPE,
  BLE_GATT_SERVER_EVENT_TYPE,
  BLE_L2CAP_EVENT_TYPE,
  BLE_GATT_HTPT_EVENT_TYPE,
  BLE_DTM_EVENT_TYPE,
  BLE_CUSTOM_EVENT_TYPE
}
 
enum  gap_ad_type {
  FLAGS = 0x01,
  INCOMPLETE_LIST_16BIT_SERV_UUIDS,
  COMPLETE_LIST_16BIT_SERV_UUIDS,
  INCOMPLETE_LIST_32BIT_SERV_UUIDS,
  COMPLETE_LIST_32BIT_SERV_UUIDS,
  INCOMPLETE_LIST_128BIT_SERV_UUIDS,
  COMPLETE_LIST_128BIT_SERV_UUIDS,
  SHORTENED_LOCAL_NAME,
  COMPLETE_LOCAL_NAME,
  TX_POWER_LEVEL,
  CLASS_OF_DEVICE = 0x0D,
  SIMPLE_PAIRING_HASHING,
  SIMPLE_PAIRING_RANDOMIZER,
  DEVICE_ID,
  SECURITY_MANAGER_OOB_FLAGS,
  SLAVE_CONNECTION_INTERVAL_RANGE,
  LIST_16BIT_SERV_SOLICITATION_UUIDS = 0x14,
  LIST_128BIT_SERV_SOLICITATION_UUIDS,
  SERVICE_DATA,
  PUBLIC_TARGET_ADDRESS,
  RANDOM_TARGET_ADDRESS,
  APPEARANCE,
  ADVERTISING_INTERVAL,
  LE_BLUETOOTH_DEVICE_ADDRESS,
  LE_ROLE,
  SIMPLE_PAIRING_HASHING_C256,
  SIMPLE_PAIRING_RANDOMIZER_R256,
  LIST_32BIT_SERV_SOLICITATION_UUIDS,
  SERVICE_DATA_32BIT = 0x20,
  SERVICE_DATA_128BIT,
  LE_SECURE_CONNECTIONS_CONFIRMATION_VALUE,
  LE_SECURE_CONNECTIONS_RANDOM_VALUE,
  THREED_INFORMATION_DATA = 0x3D,
  MANUFACTURER_SPECIFIC_DATA = 0xFF
}
 enum gap_ad_type brief Gap Advertisement Types More...
 

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 
)
Value:
{ \
if (BLE_GAP_ADV_DATA_PUBLIC_TARGET_ADDR##n##_ENABLE) \
{\
adv_ptr = (adv_element_container_t *)uuid_ptr;\
{ \
DBG_LOG("Adv Data too big");\
while(1);\
} \
memcpy(&adv_ptr->adv_ptr[adv_ptr->len], BLE_GAP_ADV_DATA_PUBLIC_TARGET_ADDR##n##_VAL, BLE_GAP_ADV_PUBLIC_TARGET_ADDR_LENGTH);\
}\
}
struct adv_element_container adv_element_container_t
if((SERIAL_RX_BUF_SIZE_HOST-1)==serial_rx_buf_tail)
Definition: sio2host.c:258
#define AT_BLE_ADV_MAX_SIZE
Maximum size of advertising data in octets.
Definition: at_ble_api.h:71
Definition: ble_sdk/ble_services/ble_mgr/ble_manager.h:1562
#define ADV_TYPE_FLAG_SIZE
Definition: ble_sdk/ble_services/ble_mgr/ble_manager.h:1036
#define BLE_GAP_ADV_PUBLIC_TARGET_ADDR_LENGTH
Definition: ble_sdk/ble_services/ble_mgr/ble_manager.h:1456
#define DBG_LOG
Definition: ble_host_sdk/utils/ble_utils.h:101

Referenced by ble_advertisement_data_set().

#define _CONF_PUBLIC_TARGET_ADDR_SCAN_RSP (   n,
  uuid_ptr 
)
Value:
{ \
if (BLE_GAP_ADV_DATA_PUBLIC_TARGET_ADDR##n##_ENABLE) \
{\
adv_ptr = (adv_element_container_t *)uuid_ptr;\
{ \
DBG_LOG("Adv Data too big");\
while(1);\
} \
memcpy(&adv_ptr->adv_ptr[adv_ptr->len], BLE_GAP_ADV_DATA_PUBLIC_TARGET_ADDR##n##_VAL, BLE_GAP_ADV_PUBLIC_TARGET_ADDR_LENGTH);\
}\
}
struct adv_element_container adv_element_container_t
if((SERIAL_RX_BUF_SIZE_HOST-1)==serial_rx_buf_tail)
Definition: sio2host.c:258
#define AT_BLE_ADV_MAX_SIZE
Maximum size of advertising data in octets.
Definition: at_ble_api.h:71
Definition: ble_sdk/ble_services/ble_mgr/ble_manager.h:1562
#define BLE_GAP_ADV_PUBLIC_TARGET_ADDR_LENGTH
Definition: ble_sdk/ble_services/ble_mgr/ble_manager.h:1456
#define DBG_LOG
Definition: ble_host_sdk/utils/ble_utils.h:101

Referenced by ble_advertisement_data_set().

#define _CONF_RANDOM_TARGET_ADDR (   n,
  uuid_ptr 
)
Value:
{ \
if (BLE_GAP_ADV_DATA_RANDOM_TARGET_ADDR##n##_ENABLE) \
{\
adv_ptr = (adv_element_container_t *)uuid_ptr;\
{ \
DBG_LOG("Adv Data too big");\
while(1);\
} \
memcpy(&adv_ptr->adv_ptr[adv_ptr->len], BLE_GAP_ADV_DATA_RANDOM_TARGET_ADDR##n##_VAL, BLE_GAP_ADV_RANDOM_TARGET_ADDR_LENGTH);\
}\
}
struct adv_element_container adv_element_container_t
if((SERIAL_RX_BUF_SIZE_HOST-1)==serial_rx_buf_tail)
Definition: sio2host.c:258
#define BLE_GAP_ADV_RANDOM_TARGET_ADDR_LENGTH
Definition: ble_sdk/ble_services/ble_mgr/ble_manager.h:1478
#define AT_BLE_ADV_MAX_SIZE
Maximum size of advertising data in octets.
Definition: at_ble_api.h:71
Definition: ble_sdk/ble_services/ble_mgr/ble_manager.h:1562
#define ADV_TYPE_FLAG_SIZE
Definition: ble_sdk/ble_services/ble_mgr/ble_manager.h:1036
#define DBG_LOG
Definition: ble_host_sdk/utils/ble_utils.h:101

Referenced by ble_advertisement_data_set().

#define _CONF_RANDOM_TARGET_ADDR_SCAN_RSP (   n,
  uuid_ptr 
)
Value:
{ \
if (BLE_GAP_ADV_DATA_RANDOM_TARGET_ADDR##n##_ENABLE) \
{\
adv_ptr = (adv_element_container_t *)uuid_ptr;\
{ \
DBG_LOG("Adv Data too big");\
while(1);\
} \
memcpy(&adv_ptr->adv_ptr[adv_ptr->len], BLE_GAP_ADV_DATA_RANDOM_TARGET_ADDR##n##_VAL, BLE_GAP_ADV_RANDOM_TARGET_ADDR_LENGTH);\
}\
}
struct adv_element_container adv_element_container_t
if((SERIAL_RX_BUF_SIZE_HOST-1)==serial_rx_buf_tail)
Definition: sio2host.c:258
#define BLE_GAP_ADV_RANDOM_TARGET_ADDR_LENGTH
Definition: ble_sdk/ble_services/ble_mgr/ble_manager.h:1478
#define AT_BLE_ADV_MAX_SIZE
Maximum size of advertising data in octets.
Definition: at_ble_api.h:71
Definition: ble_sdk/ble_services/ble_mgr/ble_manager.h:1562
#define DBG_LOG
Definition: ble_host_sdk/utils/ble_utils.h:101

Referenced by ble_advertisement_data_set().

#define _CONF_SERVICE_128BIT_UUID (   n,
  uuid_ptr 
)
Value:
{ \
if (BLE_GAP_ADV_SERVICE_128BIT_UUID##n##_ENABLE) \
{\
adv_ptr = (adv_element_container_t *)uuid_ptr;\
{ \
DBG_LOG("Adv Data too big");\
while(1);\
} \
memcpy(&adv_ptr->adv_ptr[adv_ptr->len], BLE_GAP_ADV_DATA_SERVICE_128BIT_UUID##n##_VAL , BLE_GAP_ADV_SERVICE_128BIT_UUID_LENGTH);\
}\
}
struct adv_element_container adv_element_container_t
if((SERIAL_RX_BUF_SIZE_HOST-1)==serial_rx_buf_tail)
Definition: sio2host.c:258
#define AT_BLE_ADV_MAX_SIZE
Maximum size of advertising data in octets.
Definition: at_ble_api.h:71
Definition: ble_sdk/ble_services/ble_mgr/ble_manager.h:1562
#define ADV_TYPE_FLAG_SIZE
Definition: ble_sdk/ble_services/ble_mgr/ble_manager.h:1036
#define BLE_GAP_ADV_SERVICE_128BIT_UUID_LENGTH
Definition: ble_sdk/ble_services/ble_mgr/ble_manager.h:1215
#define DBG_LOG
Definition: ble_host_sdk/utils/ble_utils.h:101

Referenced by ble_advertisement_data_set().

#define _CONF_SERVICE_128BIT_UUID_SCAN_RSP (   n,
  uuid_ptr 
)
Value:
{ \
if (BLE_GAP_ADV_SERVICE_128BIT_UUID##n##_ENABLE) \
{\
adv_ptr = (adv_element_container_t *)uuid_ptr;\
{ \
DBG_LOG("Adv Data too big");\
while(1);\
} \
memcpy(&adv_ptr->adv_ptr[adv_ptr->len], BLE_GAP_ADV_DATA_SERVICE_128BIT_UUID##n##_VAL , BLE_GAP_ADV_SERVICE_128BIT_UUID_LENGTH);\
}\
}
struct adv_element_container adv_element_container_t
if((SERIAL_RX_BUF_SIZE_HOST-1)==serial_rx_buf_tail)
Definition: sio2host.c:258
#define AT_BLE_ADV_MAX_SIZE
Maximum size of advertising data in octets.
Definition: at_ble_api.h:71
Definition: ble_sdk/ble_services/ble_mgr/ble_manager.h:1562
#define BLE_GAP_ADV_SERVICE_128BIT_UUID_LENGTH
Definition: ble_sdk/ble_services/ble_mgr/ble_manager.h:1215
#define DBG_LOG
Definition: ble_host_sdk/utils/ble_utils.h:101

Referenced by ble_advertisement_data_set().

#define _CONF_SERVICE_16BIT_UUID (   n,
  uuid_ptr 
)
Value:
{ \
if (BLE_GAP_ADV_SERVICE_16BIT_UUID##n##_ENABLE) \
{\
adv_ptr = (adv_element_container_t *)uuid_ptr;\
{ \
DBG_LOG("Adv Data too big");\
while(1);\
} \
adv_ptr->adv_ptr[adv_ptr->len++] = (uint8_t) BLE_GAP_ADV_DATA_SERVICE_16BIT_UUID##n##_VAL; \
adv_ptr->adv_ptr[adv_ptr->len++] = (uint8_t) ((BLE_GAP_ADV_DATA_SERVICE_16BIT_UUID##n##_VAL) >> 8); \
}\
}
struct adv_element_container adv_element_container_t
if((SERIAL_RX_BUF_SIZE_HOST-1)==serial_rx_buf_tail)
Definition: sio2host.c:258
#define AT_BLE_ADV_MAX_SIZE
Maximum size of advertising data in octets.
Definition: at_ble_api.h:71
Definition: ble_sdk/ble_services/ble_mgr/ble_manager.h:1562
#define ADV_TYPE_FLAG_SIZE
Definition: ble_sdk/ble_services/ble_mgr/ble_manager.h:1036
#define BLE_GAP_ADV_SERVICE_16BIT_UUID_LENGTH
UUID Type&#39;s and configuration&#39;s.
Definition: ble_sdk/ble_services/ble_mgr/ble_manager.h:1075
#define DBG_LOG
Definition: ble_host_sdk/utils/ble_utils.h:101

Referenced by ble_advertisement_data_set().

#define _CONF_SERVICE_16BIT_UUID_SCAN_RSP (   n,
  uuid_ptr 
)
Value:
{ \
if (BLE_GAP_ADV_SERVICE_16BIT_UUID##n##_ENABLE) \
{\
adv_ptr = (adv_element_container_t *)uuid_ptr;\
{ \
DBG_LOG("Adv Data too big");\
while(1);\
} \
adv_ptr->adv_ptr[adv_ptr->len++] = (uint8_t) BLE_GAP_ADV_DATA_SERVICE_16BIT_UUID##n##_VAL; \
adv_ptr->adv_ptr[adv_ptr->len++] = (uint8_t) ((BLE_GAP_ADV_DATA_SERVICE_16BIT_UUID##n##_VAL) >> 8); \
}\
}
struct adv_element_container adv_element_container_t
if((SERIAL_RX_BUF_SIZE_HOST-1)==serial_rx_buf_tail)
Definition: sio2host.c:258
#define AT_BLE_ADV_MAX_SIZE
Maximum size of advertising data in octets.
Definition: at_ble_api.h:71
Definition: ble_sdk/ble_services/ble_mgr/ble_manager.h:1562
#define BLE_GAP_ADV_SERVICE_16BIT_UUID_LENGTH
UUID Type&#39;s and configuration&#39;s.
Definition: ble_sdk/ble_services/ble_mgr/ble_manager.h:1075
#define DBG_LOG
Definition: ble_host_sdk/utils/ble_utils.h:101

Referenced by ble_advertisement_data_set().

#define _CONF_SERVICE_32BIT_UUID (   n,
  uuid_ptr 
)
Value:
{ \
if (BLE_GAP_ADV_SERVICE_32BIT_UUID##n##_ENABLE) \
{\
adv_ptr = (adv_element_container_t *)uuid_ptr;\
{ \
DBG_LOG("Adv Data too big");\
while(1);\
} \
memcpy(&adv_ptr->adv_ptr[adv_ptr->len], BLE_GAP_ADV_DATA_SERVICE_32BIT_UUID##n##_VAL, BLE_GAP_ADV_SERVICE_32BIT_UUID_LENGTH);\
}\
}
struct adv_element_container adv_element_container_t
if((SERIAL_RX_BUF_SIZE_HOST-1)==serial_rx_buf_tail)
Definition: sio2host.c:258
#define AT_BLE_ADV_MAX_SIZE
Maximum size of advertising data in octets.
Definition: at_ble_api.h:71
Definition: ble_sdk/ble_services/ble_mgr/ble_manager.h:1562
#define ADV_TYPE_FLAG_SIZE
Definition: ble_sdk/ble_services/ble_mgr/ble_manager.h:1036
#define BLE_GAP_ADV_SERVICE_32BIT_UUID_LENGTH
Definition: ble_sdk/ble_services/ble_mgr/ble_manager.h:1188
#define DBG_LOG
Definition: ble_host_sdk/utils/ble_utils.h:101

Referenced by ble_advertisement_data_set().

#define _CONF_SERVICE_32BIT_UUID_SCAN_RSP (   n,
  uuid_ptr 
)
Value:
{ \
if (BLE_GAP_ADV_SERVICE_32BIT_UUID##n##_ENABLE) \
{\
adv_ptr = (adv_element_container_t *)uuid_ptr;\
{ \
DBG_LOG("Adv Data too big");\
while(1);\
} \
memcpy(&adv_ptr->adv_ptr[adv_ptr->len], BLE_GAP_ADV_DATA_SERVICE_32BIT_UUID##n##_VAL, BLE_GAP_ADV_SERVICE_32BIT_UUID_LENGTH);\
}\
}
struct adv_element_container adv_element_container_t
if((SERIAL_RX_BUF_SIZE_HOST-1)==serial_rx_buf_tail)
Definition: sio2host.c:258
#define AT_BLE_ADV_MAX_SIZE
Maximum size of advertising data in octets.
Definition: at_ble_api.h:71
Definition: ble_sdk/ble_services/ble_mgr/ble_manager.h:1562
#define BLE_GAP_ADV_SERVICE_32BIT_UUID_LENGTH
Definition: ble_sdk/ble_services/ble_mgr/ble_manager.h:1188
#define DBG_LOG
Definition: ble_host_sdk/utils/ble_utils.h:101

Referenced by ble_advertisement_data_set().

#define _CONF_SERVICE_SOLTN_128BIT_UUID (   n,
  uuid_ptr 
)
Value:
{ \
if (BLE_GAP_ADV_SERVICE_SOLTN_128BIT_UUID##n##_ENABLE) \
{\
adv_ptr = (adv_element_container_t *)uuid_ptr;\
{ \
DBG_LOG("Adv Data too big");\
while(1);\
} \
memcpy(&adv_ptr->adv_ptr[adv_ptr->len], BLE_GAP_ADV_DATA_SERVICE_SOLTN_128BIT_UUID##n##_VAL , BLE_GAP_ADV_SERVICE_128BIT_UUID_LENGTH);\
}\
}
struct adv_element_container adv_element_container_t
if((SERIAL_RX_BUF_SIZE_HOST-1)==serial_rx_buf_tail)
Definition: sio2host.c:258
#define AT_BLE_ADV_MAX_SIZE
Maximum size of advertising data in octets.
Definition: at_ble_api.h:71
Definition: ble_sdk/ble_services/ble_mgr/ble_manager.h:1562
#define ADV_TYPE_FLAG_SIZE
Definition: ble_sdk/ble_services/ble_mgr/ble_manager.h:1036
#define BLE_GAP_ADV_SERVICE_128BIT_UUID_LENGTH
Definition: ble_sdk/ble_services/ble_mgr/ble_manager.h:1215
#define DBG_LOG
Definition: ble_host_sdk/utils/ble_utils.h:101

Referenced by ble_advertisement_data_set().

#define _CONF_SERVICE_SOLTN_128BIT_UUID_SCAN_RSP (   n,
  uuid_ptr 
)
Value:
{ \
if (BLE_GAP_ADV_SERVICE_SOLTN_128BIT_UUID##n##_ENABLE) \
{\
adv_ptr = (adv_element_container_t *)uuid_ptr;\
{ \
DBG_LOG("Adv Data too big");\
while(1);\
} \
memcpy(&adv_ptr->adv_ptr[adv_ptr->len], BLE_GAP_ADV_DATA_SERVICE_SOLTN_128BIT_UUID##n##_VAL , BLE_GAP_ADV_SERVICE_128BIT_UUID_LENGTH);\
}\
}
struct adv_element_container adv_element_container_t
if((SERIAL_RX_BUF_SIZE_HOST-1)==serial_rx_buf_tail)
Definition: sio2host.c:258
#define AT_BLE_ADV_MAX_SIZE
Maximum size of advertising data in octets.
Definition: at_ble_api.h:71
Definition: ble_sdk/ble_services/ble_mgr/ble_manager.h:1562
#define BLE_GAP_ADV_SERVICE_128BIT_UUID_LENGTH
Definition: ble_sdk/ble_services/ble_mgr/ble_manager.h:1215
#define DBG_LOG
Definition: ble_host_sdk/utils/ble_utils.h:101

Referenced by ble_advertisement_data_set().

#define _CONF_SERVICE_SOLTN_16BIT_UUID (   n,
  uuid_ptr 
)
Value:
{ \
if (BLE_GAP_ADV_SERVICE_SOLTN_16BIT_UUID##n##_ENABLE) \
{\
adv_ptr = (adv_element_container_t *)uuid_ptr;\
{ \
DBG_LOG("Adv Data too big");\
while(1);\
} \
adv_ptr->adv_ptr[adv_ptr->len++] = (uint8_t) BLE_GAP_ADV_DATA_SERVICE_SOLTN_16BIT_UUID##n##_VAL; \
adv_ptr->adv_ptr[adv_ptr->len++] = (uint8_t) ((BLE_GAP_ADV_DATA_SERVICE_SOLTN_16BIT_UUID##n##_VAL) >> 8); \
}\
}
struct adv_element_container adv_element_container_t
if((SERIAL_RX_BUF_SIZE_HOST-1)==serial_rx_buf_tail)
Definition: sio2host.c:258
#define AT_BLE_ADV_MAX_SIZE
Maximum size of advertising data in octets.
Definition: at_ble_api.h:71
Definition: ble_sdk/ble_services/ble_mgr/ble_manager.h:1562
#define ADV_TYPE_FLAG_SIZE
Definition: ble_sdk/ble_services/ble_mgr/ble_manager.h:1036
#define BLE_GAP_ADV_SERVICE_16BIT_UUID_LENGTH
UUID Type&#39;s and configuration&#39;s.
Definition: ble_sdk/ble_services/ble_mgr/ble_manager.h:1075
#define DBG_LOG
Definition: ble_host_sdk/utils/ble_utils.h:101

Referenced by ble_advertisement_data_set().

#define _CONF_SERVICE_SOLTN_16BIT_UUID_SCAN_RSP (   n,
  uuid_ptr 
)
Value:
{ \
if (BLE_GAP_ADV_SERVICE_SOLTN_16BIT_UUID##n##_ENABLE) \
{\
adv_ptr = (adv_element_container_t *)uuid_ptr;\
{ \
DBG_LOG("Adv Data too big");\
while(1);\
} \
adv_ptr->adv_ptr[adv_ptr->len++] = (uint8_t) BLE_GAP_ADV_DATA_SERVICE_SOLTN_16BIT_UUID##n##_VAL; \
adv_ptr->adv_ptr[adv_ptr->len++] = (uint8_t) ((BLE_GAP_ADV_DATA_SERVICE_SOLTN_16BIT_UUID##n##_VAL) >> 8); \
}\
}
struct adv_element_container adv_element_container_t
if((SERIAL_RX_BUF_SIZE_HOST-1)==serial_rx_buf_tail)
Definition: sio2host.c:258
#define AT_BLE_ADV_MAX_SIZE
Maximum size of advertising data in octets.
Definition: at_ble_api.h:71
Definition: ble_sdk/ble_services/ble_mgr/ble_manager.h:1562
#define BLE_GAP_ADV_SERVICE_16BIT_UUID_LENGTH
UUID Type&#39;s and configuration&#39;s.
Definition: ble_sdk/ble_services/ble_mgr/ble_manager.h:1075
#define DBG_LOG
Definition: ble_host_sdk/utils/ble_utils.h:101

Referenced by ble_advertisement_data_set().

#define _CONF_SERVICE_SOLTN_32BIT_UUID (   n,
  uuid_ptr 
)
Value:
{ \
if (BLE_GAP_ADV_SERVICE_SOLTN_32BIT_UUID##n##_ENABLE) \
{\
adv_ptr = (adv_element_container_t *)uuid_ptr;\
{ \
DBG_LOG("Adv Data too big");\
while(1);\
} \
memcpy(&adv_ptr->adv_ptr[adv_ptr->len], BLE_GAP_ADV_DATA_SERVICE_SOLTN_32BIT_UUID##n##_VAL, BLE_GAP_ADV_SERVICE_32BIT_UUID_LENGTH);\
}\
}
struct adv_element_container adv_element_container_t
if((SERIAL_RX_BUF_SIZE_HOST-1)==serial_rx_buf_tail)
Definition: sio2host.c:258
#define AT_BLE_ADV_MAX_SIZE
Maximum size of advertising data in octets.
Definition: at_ble_api.h:71
Definition: ble_sdk/ble_services/ble_mgr/ble_manager.h:1562
#define ADV_TYPE_FLAG_SIZE
Definition: ble_sdk/ble_services/ble_mgr/ble_manager.h:1036
#define BLE_GAP_ADV_SERVICE_32BIT_UUID_LENGTH
Definition: ble_sdk/ble_services/ble_mgr/ble_manager.h:1188
#define DBG_LOG
Definition: ble_host_sdk/utils/ble_utils.h:101

Referenced by ble_advertisement_data_set().

#define _CONF_SERVICE_SOLTN_32BIT_UUID_SCAN_RSP (   n,
  uuid_ptr 
)
Value:
{ \
if (BLE_GAP_ADV_SERVICE_SOLTN_32BIT_UUID##n##_ENABLE) \
{\
adv_ptr = (adv_element_container_t *)uuid_ptr;\
{ \
DBG_LOG("Adv Data too big");\
while(1);\
} \
memcpy(&adv_ptr->adv_ptr[adv_ptr->len], BLE_GAP_ADV_DATA_SERVICE_SOLTN_32BIT_UUID##n##_VAL, BLE_GAP_ADV_SERVICE_32BIT_UUID_LENGTH);\
}\
}
struct adv_element_container adv_element_container_t
if((SERIAL_RX_BUF_SIZE_HOST-1)==serial_rx_buf_tail)
Definition: sio2host.c:258
#define AT_BLE_ADV_MAX_SIZE
Maximum size of advertising data in octets.
Definition: at_ble_api.h:71
Definition: ble_sdk/ble_services/ble_mgr/ble_manager.h:1562
#define BLE_GAP_ADV_SERVICE_32BIT_UUID_LENGTH
Definition: ble_sdk/ble_services/ble_mgr/ble_manager.h:1188
#define DBG_LOG
Definition: ble_host_sdk/utils/ble_utils.h:101

Referenced by ble_advertisement_data_set().

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

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

Referenced by ble_advertisement_data_set().

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

#define BLE_GAP_ADV_SLAVE_CONN_INTERVAL_RANGE_ENABLE   false
#define BLE_GAP_ADV_TX_POWER_ENABLE   false
#define BLE_IO_CAPABALITIES   (AT_BLE_IO_CAP_NO_INPUT_NO_OUTPUT)
#define BLE_MITM_REQ   (false)
#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)
#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)
#define CURRENT_TIME_SERVICE_UUID   (0x1805)
#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)
#define GATT_DISCOVERY_STARTING_HANDLE   (0x0001)
#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 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)
#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.

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)
#define NEXT_DST_SERVICE_UUID   (0x1807)
#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
#define PUBLIC_TARGET_ADDR_MAX_NUM   5
#define REF_TIME_CHAR_UUID   (0x2A14)
#define REFERENCE_TIME_SERVICE_UUID   (0x1806)
#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
#define SERVICE_UUID16_MAX_NUM   15
#define SERVICE_UUID32_MAX_NUM   5
#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)
#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)

typedef struct adv_element adv_element_t
typedef at_ble_status_t(* ble_event_callback_t)(void *params)

Enumerator
BLE_DEVICE_IDLE_STATE 

Device is in idle state.

PERIPHERAL_ADVERTISING_STATE 

Peripheral state in advertisement.

CENTRAL_SCANNING_STATE 

Central in scanning state.

PERIPHERAL_CONNECTED_STATE 

Device stopped advertisement/scanning and Connection established.

PERIPHERAL_PAIRED_STATE 

Device paired with peer device.

PERIPHERAL_ENCRYPTION_STATE 

Device GAP state in Encryption state.

PERIPHERAL_DISCONNECTED_STATE 

Device disconnected from peer device.

Enumerator
BLE_DEVICE_DEFAULT_IDLE 

Device is not connected and device information table contains invalid information.

BLE_DEVICE_DISCONNECTED 

Device is in disconnected from the peer device.

BLE_DEVICE_CONNECTED 

Device connected to peer device.

BLE_DEVICE_PAIRING 

Device is in pairing state.

BLE_DEVICE_PAIRING_FAILED 

Device pairing is not success with peer device.

BLE_DEVICE_PAIRED 

Device successfully paired with peer device.

BLE_DEVICE_ENCRYPTION_STATE 

Device is in pairing state.

BLE_DEVICE_ENCRYPTION_FAILED 

Device encryption is not success with peer device.

BLE_DEVICE_ENCRYPTION_COMPLETED 

Device successfully started the encryption with peer device.

Enumerator
CCCD_NOTIFICATION_INDICATION_DISABLED 

GATT Server characteristics Notification and Indications are disabled.

CCCD_NOTIFICATION_ENABLED_INDICATION_DISABLED 

GATT Server characteristics Notification enabled and Indications are disabled.

CCCD_NOTIFICATION_DISABLED_INDICATION_ENABLED 

GATT Server characteristics Notification disabled and Indications enabled.

CCCD_INIDCATION_NOTIFICATION_ENABLED 

GATT Server characteristics Notification and Indications are enabled.

Subscribe the events or Un-subscribe the events.

Enumerator
REGISTER_CALL_BACK 

Subscribe for the BLE events.

UNREGISTER_CALL_BACK 

Un Subscribe for the BLE events.

Enumerator
BLE_GAP_EVENT_TYPE 
BLE_GATT_SERVER_EVENT_TYPE 
BLE_GATT_CLIENT_EVENT_TYPE 
BLE_COMMON_EVENT_TYPE 
BLE_PAIRING_EVENT_TYPE 
BLE_GATT_TP_EVENT_TYPE 
BLE_GAP_EVENT_TYPE 

BLE GAP Events types.

BLE_GATT_CLIENT_EVENT_TYPE 

BLE GATT Client Event types.

BLE_GATT_SERVER_EVENT_TYPE 

BLE GATT Server Event types.

BLE_L2CAP_EVENT_TYPE 

BLE L2CAP Event types.

BLE_GATT_HTPT_EVENT_TYPE 

BLE HTPT Profile Event types.

BLE_DTM_EVENT_TYPE 

BLE DTM Event types.

BLE_CUSTOM_EVENT_TYPE 

Custom Event types (Application, ISR etc.,)

enum gap_ad_type brief Gap Advertisement Types

Enumerator
FLAGS 

flags

INCOMPLETE_LIST_16BIT_SERV_UUIDS 

incomplete list of 16bits service uuids

COMPLETE_LIST_16BIT_SERV_UUIDS 

complete list of 16bits service uuids

INCOMPLETE_LIST_32BIT_SERV_UUIDS 

incomplete list of 32bits service uuids

COMPLETE_LIST_32BIT_SERV_UUIDS 

complete list of 32bits service uuids

INCOMPLETE_LIST_128BIT_SERV_UUIDS 

incomplete list of 128bits service uuids

COMPLETE_LIST_128BIT_SERV_UUIDS 

complete list of 128bits of service uuids

SHORTENED_LOCAL_NAME 

shortened local name of the device

COMPLETE_LOCAL_NAME 

complete local name of the device

TX_POWER_LEVEL 

TX power level.

CLASS_OF_DEVICE 

class of the device

SIMPLE_PAIRING_HASHING 

simple pairing hashing

SIMPLE_PAIRING_RANDOMIZER 

simple pairing randomizer

DEVICE_ID 

device id

SECURITY_MANAGER_OOB_FLAGS 

security manager out of band flags

SLAVE_CONNECTION_INTERVAL_RANGE 

slave connection interval range

LIST_16BIT_SERV_SOLICITATION_UUIDS 

list of 16bits service solicitation uuid

LIST_128BIT_SERV_SOLICITATION_UUIDS 

list of 128bits service solicitation uuids

SERVICE_DATA 

service data

PUBLIC_TARGET_ADDRESS 

public target address

RANDOM_TARGET_ADDRESS 

random target address

APPEARANCE 

appearance

ADVERTISING_INTERVAL 

advertising interval

LE_BLUETOOTH_DEVICE_ADDRESS 

le bluetooth device address

LE_ROLE 

le role

SIMPLE_PAIRING_HASHING_C256 

simple pairing hashing c256

SIMPLE_PAIRING_RANDOMIZER_R256 

simple pairing randomizer r256

LIST_32BIT_SERV_SOLICITATION_UUIDS 

list of 16bits service solicitation uuid

SERVICE_DATA_32BIT 

service data 32bits

SERVICE_DATA_128BIT 

service data 128bits

LE_SECURE_CONNECTIONS_CONFIRMATION_VALUE 

le secure connection confirmation value

LE_SECURE_CONNECTIONS_RANDOM_VALUE 

le secure connection random value

THREED_INFORMATION_DATA 

threed information data

MANUFACTURER_SPECIFIC_DATA 

manufacturer specific data

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.

Parameters
[in]None
Returns
AT_BLE_SUCCESS BLE advertisement data set successfully
AT_BLE_FAILURE Failed to set the advertisement data

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.

Parameters
[in]characteristic_foundat_ble_characteristic_found_t information related to the characteristic found.
Returns
none.
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

Parameters
[in]paramsof at_ble_cmd_complete_event_t type, Refer to at_ble_cmd_complete_event_t
Returns
AT_BLE_SUCCESS event handled successfully
AT_BLE_FAILURE event with error status

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.

Parameters
[in]conn_handleat_ble_handle_t Device connection handle
[in]stateble_device_state_t device state
Returns
AT_BLE_SUCCESS if the passed handle of device states are matches
AT_BLE_FAILURE if the passed handle of device states are doesn't matches

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.

Parameters
[in]handleat_ble_handle_t Device connection handle
Returns
true if the passed handle of the device is disconnected and central
false if the passed handle of the device is not central or not disconnected.

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.

Parameters
[in]handleat_ble_handle_t Device connection handle
Returns
true if the passed handle of the device is disconnected and peripheral
false if the passed handle of the device is not peripheral or not disconnected.

References AT_BLE_ROLE_PERIPHERAL, AT_BLE_SUCCESS, and ble_disconnected_device_role().

bool ble_check_ispheripheral ( at_ble_handle_t  handle)

Check the passed connection handle of the device is peripheral or central device.

Parameters
[in]handleat_ble_handle_t Device connection handle
Returns
true if the passed handle of the device is peripheral
false if the passed handle of the device is not peripheral.

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.

Parameters
[in]conn_param_updateat_ble_conn_param_update_done_t parameters to be updated.
Returns
AT_BLE_SUCCESS operation completed successfully.
AT_BLE_FAILURE Generic error.

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.

Parameters
[in]conn_param_reqat_ble_conn_param_update_request_t parameters received.
Returns
AT_BLE_SUCCESS operation completed successfully.
AT_BLE_FAILURE Generic error.

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.

Parameters
[in]conn_handleat_ble_handle_t Device connection handle
[in]dev_roleat_ble_dev_role_t device role Central or Peripheral
Returns
AT_BLE_SUCCESS if the passed handle of the device gets the device role
AT_BLE_FAILURE if the passed handle doesn't match and failure of getting device role

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_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

Parameters
[in]paramsof void * type
Returns
AT_BLE_SUCCESS event handled successfully
AT_BLE_FAILURE event with error status

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.

Parameters
[in]addraddress to be set as a device address.
[in]argsconfiguration required for initialization.
Returns
none.

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

Parameters
[in]paramsof void * type
Returns
AT_BLE_SUCCESS event handled successfully
AT_BLE_FAILURE event with error status

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.

Parameters
[in]conn_handleat_ble_handle_t Device connection handle
[in]dev_roleat_ble_dev_role_t device role Central or Peripheral
Returns
AT_BLE_SUCCESS if the passed handle of the device gets the device role
AT_BLE_FAILURE if the passed handle doesn't match and failure of getting device role

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

Parameters
[in]discover_statusstatus of the discovery.
Returns
none.
at_ble_status_t ble_encryption_request_handler ( void *  params)

function called when the AT_BLE_ENCRYPTION_REQUEST event is received from stack.

Parameters
[in]encry_reqencryption request from the peer device.
Returns
AT_BLE_SUCCESS operation completed successfully.
AT_BLE_FAILURE Generic error.

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.

Parameters
[in]encry_statuschanged encryption status.
Returns
AT_BLE_SUCCESS operation completed successfully.
AT_BLE_FAILURE Generic error.

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.

Parameters
[in]eventsevents received from the stack at_ble_events_t.
[in]event_paramsdata received from stack for the respective event received.
Returns
none.

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.

Parameters
[in]none.
Returns
AT_BLE_SUCCESS operation completed successfully
AT_BLE_FAILURE Generic error.

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

Parameters
[in]paramof ble_mgr_event_cb_t type, Refer to ble_mgr_event_cb_t
[in]paramof ble_mgr_event_t type, Refer to ble_mgr_event_t
[in]ble_event_handlerof ble_mgr_event_t type, Refer to ble_mgr_event_t
Returns
true callback registered or un-register from the event handlers
false failed to register or un-register the events from the event handlers

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

Parameters
[in]event_cb_typeRegister/Unregister the callback functions
[in]event_typetype of BLE event
[in]ble_event_handlerstructure of function pointers for the event
Returns
Upon successful completion the function shall return true, Otherwise the function shall return false

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

Parameters
[in]paramsof at_ble_mtu_changed_ind_t type, Refer to at_ble_mtu_changed_ind_t
Returns
AT_BLE_SUCCESS event handled successfully
AT_BLE_FAILURE event with error status

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

Parameters
[in]paramsof at_ble_mtu_changed_ind_t type, Refer to at_ble_mtu_changed_ind_t
Returns
AT_BLE_SUCCESS event handled successfully
AT_BLE_FAILURE event with error status

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

Parameters
[in]pair_keyat_ble_pair_key_request_t key details for the pairing request.
Returns
AT_BLE_SUCCESS operation completed successfully.
AT_BLE_FAILURE Generic error.

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_remove_bonding_info ( void  )

Remove all bonding information from PDS.

Remove all the valid bonding informations from PDS

Parameters
[in]None
Returns
Status of the Remove bonding information procedure
Return values
AT_BLE_SUCCESSbonding information removed successfully from the PDS
AT_BLE_FAILUREFailed 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_restore_bonding_info ( void  )

Restore the bonding information from PDS.

Restore all the valid bonding information from PDS to device info table

Parameters
[in]None
Returns
Status of the Restore bonding information
Return values
AT_BLE_SUCCESSPDS Restore bonding information is completed.
AT_BLE_FAILURERestore 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.

Parameters
[in]scan_paramscanned data.
Returns
AT_BLE_SUCCESS operation completed successfully.
AT_BLE_FAILURE Generic error.

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.

Parameters
[in]scan_reportstatus of the scan.
Returns
AT_BLE_SUCCESS operation completed successfully.
AT_BLE_FAILURE Generic error.

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

Parameters
[in]None
Returns
BluSDK version

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.

Parameters
[in]conn_handleat_ble_handle_t connection handle.
Returns
AT_BLE_SUCCESS operation completed successfully
AT_BLE_FAILURE Generic error.

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.

Parameters
[in]namename of the device.
[in]name_lenlength of the device name.
Returns
AT_BLE_SUCCESS operation completed successfully.
AT_BLE_FAILURE Generic error.

function to set the device name.

References at_ble_device_name_set(), AT_BLE_INVALID_PARAM, and NULL.

at_ble_status_t ble_store_bonding_info ( void *  params)

Store the bonding information.

Parameters
[in]None
Returns
Status of the PDS bonding information store procedure
Return values
AT_BLE_SUCCESSStored the bonding information in PDS
AT_BLE_FAILUREFailed 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

Parameters
[in]paramsof void * type
Returns
AT_BLE_SUCCESS event handled successfully
AT_BLE_FAILURE event with error status

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

Parameters
[in]pds_instanceInitialized PDS environment structure
Returns
Status of the PDS Initialize procedure
Return values
PDS_SUCCESSPDS Initialize procedure is completed
PDS_INIT_ERRORPDS initialization failed, due to inactive sector or NVM Init failures
forother 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.

Parameters
[in]dev_addraddress of the the peer device.
Returns
AT_BLE_SUCCESS operation completed successfully.
AT_BLE_FAILURE Generic error.
at_ble_status_t pds_module_init ( void  )

Initialize the PDS Module.

IInitialize the PDS & NVM Memory

Parameters
[in]None
Returns
Status of the PDS Module Initialize procedure
Return values
AT_BLE_SUCCESSPDS Module Initialize is completed
AT_BLE_FAILUREPDS 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.

Parameters
[in]scan_info_datathe received data.
[in]ble_service_uuiduuid to be searched in the received data.
[in]adv_typeadvertisement type
Returns
AT_BLE_SUCCESS operation completed successfully.
AT_BLE_FAILURE Generic error.

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