Microchip® Advanced Software Framework

gapc_task.h File Reference
#include "cmn_defs.h"

Data Structures

struct  gapc_con_max_PA_gain_get_ind
 
struct  gapc_con_rssi_ind
 
struct  gapc_con_tx_pow_get_ind
 
struct  gapc_con_tx_pow_set_ind
 

Enumerations

enum  gap_auth {
  GAP_AUTH_REQ_NO_MITM_NO_BOND = (GAP_AUTH_NONE),
  GAP_AUTH_REQ_NO_MITM_BOND = (GAP_AUTH_BOND),
  GAP_AUTH_REQ_MITM_NO_BOND = (GAP_AUTH_MITM),
  GAP_AUTH_REQ_MITM_BOND = (GAP_AUTH_MITM | GAP_AUTH_BOND),
  GAP_AUTH_REQ_LAST
}
 Authentication Requirements. More...
 
enum  gap_auth_mask {
  GAP_AUTH_NONE = 0,
  GAP_AUTH_BOND = (1 << 0),
  GAP_AUTH_MITM = (1 << 2)
}
 Authentication mask. More...
 
enum  gap_io_cap {
  GAP_IO_CAP_DISPLAY_ONLY = 0x00,
  GAP_IO_CAP_DISPLAY_YES_NO,
  GAP_IO_CAP_KB_ONLY,
  GAP_IO_CAP_NO_INPUT_NO_OUTPUT,
  GAP_IO_CAP_KB_DISPLAY,
  GAP_IO_CAP_LAST
}
 IO Capability Values. More...
 
enum  gap_kdist {
  GAP_KDIST_NONE = 0x00,
  GAP_KDIST_ENCKEY = (1 << 0),
  GAP_KDIST_IDKEY = (1 << 1),
  GAP_KDIST_SIGNKEY = (1 << 2),
  GAP_KDIST_LAST = (1 << 3)
}
 Key Distribution Flags. More...
 
enum  gap_oob {
  GAP_OOB_AUTH_DATA_NOT_PRESENT = 0x00,
  GAP_OOB_AUTH_DATA_PRESENT,
  GAP_OOB_AUTH_DATA_LAST
}
 OOB Data Present Flag Values. More...
 
enum  gap_sec_req {
  GAP_NO_SEC = 0x00,
  GAP_SEC1_NOAUTH_PAIR_ENC,
  GAP_SEC1_AUTH_PAIR_ENC,
  GAP_SEC2_NOAUTH_DATA_SGN,
  GAP_SEC2_AUTH_DATA_SGN,
  GAP_SEC_UNDEFINED
}
 Security Defines. More...
 
enum  gap_tk_type {
  GAP_TK_OOB = 0x00,
  GAP_TK_DISPLAY,
  GAP_TK_KEY_ENTRY
}
 TK Type. More...
 
enum  gapc_bond {
  GAPC_PAIRING_REQ,
  GAPC_PAIRING_RSP,
  GAPC_PAIRING_SUCCEED,
  GAPC_PAIRING_FAILED,
  GAPC_TK_EXCH,
  GAPC_IRK_EXCH,
  GAPC_CSRK_EXCH,
  GAPC_LTK_EXCH,
  GAPC_REPEATED_ATTEMPT
}
 Bond event type. More...
 
enum  gapc_msg_id {
  GAPC_CMP_EVT = 0x3800,
  GAPC_CONNECTION_REQ_IND,
  GAPC_CONNECTION_CFM,
  GAPC_DISCONNECT_IND,
  GAPC_DISCONNECT_CMD,
  GAPC_GET_INFO_CMD,
  GAPC_PEER_NAME_IND,
  GAPC_PEER_VERSION_IND,
  GAPC_PEER_FEATURES_IND,
  GAPC_CON_RSSI_IND,
  GAPC_PRIVACY_IND,
  GAPC_RECON_ADDR_IND,
  GAPC_SET_PRIVACY_CMD,
  GAPC_SET_RECON_ADDR_CMD,
  GAPC_PARAM_UPDATE_CMD,
  GAPC_PARAM_UPDATE_REQ_IND,
  GAPC_PARAM_UPDATE_CFM,
  GAPC_PARAM_UPDATED_IND,
  GAPC_BOND_CMD,
  GAPC_BOND_REQ_IND,
  GAPC_BOND_CFM,
  GAPC_BOND_IND,
  GAPC_ENCRYPT_CMD,
  GAPC_ENCRYPT_REQ_IND,
  GAPC_ENCRYPT_CFM,
  GAPC_ENCRYPT_IND,
  GAPC_SECURITY_CMD,
  GAPC_SECURITY_IND,
  GAPC_SIGN_COUNTER_IND,
  GAPC_CON_CHANNEL_MAP_IND,
  GAPC_PARAM_UPDATE_TO_IND,
  GAPC_GET_TX_PWR_REQ,
  GAPC_GET_TX_PWR_REQ_CMP_EVT,
  GAPC_SET_TX_PWR_REQ,
  GAPC_SET_TX_PWR_REQ_CMP_EVT,
  GAPC_CON_TX_POW_GET_IND,
  GAPC_CON_TX_POW_SET_IND,
  GAPC_CON_MAX_PA_GAIN_GET_IND
}
 
enum  gapc_operation {
  GAPC_NO_OP = 0x00,
  GAPC_DISCONNECT,
  GAPC_GET_PEER_NAME,
  GAPC_GET_PEER_VERSION,
  GAPC_GET_PEER_FEATURES,
  GAPC_GET_CON_RSSI,
  GAPC_GET_PRIVACY,
  GAPC_GET_RECON_ADDR,
  GAPC_SET_PRIVACY,
  GAPC_SET_RECON_ADDR,
  GAPC_UPDATE_PARAMS,
  GAPC_BOND,
  GAPC_ENCRYPT,
  GAPC_SECURITY_REQ,
  GAPC_GET_CON_CHANNEL_MAP,
  GAPC_LAST
}
 request operation type - application interface More...
 

Functions

at_ble_status_t gapc_bond_cfm_handler_key_exch (uint8_t u8Req, uint8_t u8Accept, uint8_t *key, uint16_t u16ConHdl)
 
at_ble_status_t gapc_bond_cfm_handler_pair_resp (uint8_t u8Accept, uint8_t u8IoCap, uint8_t u8OOB, uint8_t u8Auth, uint8_t u8KeySize, uint8_t u8IkeyDist, uint8_t u8RkeyDist, uint8_t u8SecReq, uint16_t u16ConHdl)
 
at_ble_status_t gapc_bond_cmd_handler (uint16_t conn_handle, uint8_t io_capabilities, uint8_t oob_available, uint8_t auth_req, uint8_t max_key_size, uint8_t initiator_keys, uint8_t responder_keys, uint8_t desired_auth)
 
at_ble_events_t gapc_bond_ind (uint16_t src, uint8_t *data, at_ble_pair_done_t *param)
 
void gapc_bond_req (uint16_t src, at_ble_pair_request_t *param)
 
at_ble_events_t gapc_bond_req_ind (uint16_t src, uint8_t *data, void *param)
 
at_ble_events_t gapc_cmp_evt (uint16_t src, uint8_t *data, at_ble_encryption_status_changed_t *params)
 
at_ble_status_t gapc_con_max_PA_gain_get_ind_parser (uint16_t src, uint8_t *data, gapc_con_max_PA_gain_get_ind *params)
 
at_ble_status_t gapc_con_req_ind (uint8_t *data)
 
at_ble_status_t gapc_con_rssi_ind_parser (uint16_t src, uint8_t *data, gapc_con_rssi_ind *params)
 
at_ble_status_t gapc_con_tx_pow_get_ind_parser (uint16_t src, uint8_t *data, gapc_con_tx_pow_get_ind *params)
 
at_ble_status_t gapc_con_tx_pow_set_ind_parser (uint16_t src, uint8_t *data, gapc_con_tx_pow_set_ind *params)
 
at_ble_status_t gapc_connection_cfm_handler (uint8_t *pu8LocalKey, uint32_t u32LocalSignCntr, uint8_t *pu8RemoteKey, uint32_t u32RemoteSignCntr, uint8_t u8Auth, uint8_t u8Authorize, uint16_t u16ConHdl)
 
at_ble_status_t gapc_disconnect_cmd_handler (uint8_t reason, uint16_t handle)
 
at_ble_status_t gapc_disconnect_ind (uint8_t *data, at_ble_disconnected_t *param)
 
at_ble_status_t gapc_encrypt_cfm_handler (uint16_t conn_handle, uint8_t auth, uint8_t key_found, uint8_t *key, uint8_t key_size)
 
at_ble_status_t gapc_encrypt_cmd_handler (uint16_t conn_handle, uint8_t *key, uint16_t ediv, uint8_t *rand, uint8_t key_size, uint8_t auth)
 
at_ble_status_t gapc_encrypt_ind (uint16_t src, uint8_t *data, at_ble_encryption_status_changed_t *params)
 
at_ble_status_t gapc_encrypt_req_ind (uint16_t src, uint8_t *data, at_ble_encryption_request_t *params)
 
at_ble_status_t gapc_get_info_cmd_handler (uint16_t conn_handle, uint8_t operation)
 
at_ble_status_t gapc_get_tx_pwr_req_handler (uint16_t u16ConHdl, uint8_t get_type)
 
void gapc_key_exch (uint8_t u8Req, uint16_t ConHdl)
 
at_ble_status_t gapc_param_update_cfm_handler (uint16_t conn_handle, uint16_t ce_len_min, uint16_t ce_len_max)
 
at_ble_status_t gapc_param_update_cmd_handler (uint16_t handle, uint16_t con_intv_min, uint16_t con_intv_max, uint16_t con_latency, uint16_t superv_to, uint16_t ce_len_min, uint16_t ce_len_max)
 
at_ble_status_t gapc_param_update_req_ind (uint16_t src, uint8_t *data, at_ble_conn_param_update_request_t *param)
 
at_ble_status_t gapc_param_updated_ind (uint16_t src, uint8_t *data, at_ble_conn_param_update_done_t *param)
 
at_ble_status_t gapc_sec_req_ind (uint16_t src, uint8_t *data, at_ble_slave_sec_request_t *params)
 
at_ble_status_t gapc_security_cmd_handler (uint16_t conn_handle, uint8_t auth_req)
 
at_ble_status_t gapc_set_tx_pwr_req_handler (uint16_t u16ConHdl, uint8_t u8txpow)
 

enum gap_auth

Authentication Requirements.

Enumerator
GAP_AUTH_REQ_NO_MITM_NO_BOND 

No MITM No Bonding.

GAP_AUTH_REQ_NO_MITM_BOND 

No MITM Bonding.

GAP_AUTH_REQ_MITM_NO_BOND 

MITM No Bonding.

GAP_AUTH_REQ_MITM_BOND 

MITM and Bonding.

GAP_AUTH_REQ_LAST 

Authentication mask.

Enumerator
GAP_AUTH_NONE 

No Flag set.

GAP_AUTH_BOND 

Bond authentication.

GAP_AUTH_MITM 

Man In the middle protection.

enum gap_io_cap

IO Capability Values.

Enumerator
GAP_IO_CAP_DISPLAY_ONLY 

Display Only.

GAP_IO_CAP_DISPLAY_YES_NO 

Display Yes No.

GAP_IO_CAP_KB_ONLY 

Keyboard Only.

GAP_IO_CAP_NO_INPUT_NO_OUTPUT 

No Input No Output.

GAP_IO_CAP_KB_DISPLAY 

Keyboard Display.

GAP_IO_CAP_LAST 
enum gap_kdist

Key Distribution Flags.

Enumerator
GAP_KDIST_NONE 

No Keys to distribute.

GAP_KDIST_ENCKEY 

Encryption key in distribution.

GAP_KDIST_IDKEY 

IRK (ID key)in distribution.

GAP_KDIST_SIGNKEY 

CSRK(Signature key) in distribution.

GAP_KDIST_LAST 
enum gap_oob

OOB Data Present Flag Values.

Enumerator
GAP_OOB_AUTH_DATA_NOT_PRESENT 

OOB Data not present.

GAP_OOB_AUTH_DATA_PRESENT 

OOB data present.

GAP_OOB_AUTH_DATA_LAST 

Security Defines.

Enumerator
GAP_NO_SEC 

No security (no authentication and encryption)

GAP_SEC1_NOAUTH_PAIR_ENC 

Unauthenticated pairing with encryption.

GAP_SEC1_AUTH_PAIR_ENC 

Authenticated pairing with encryption.

GAP_SEC2_NOAUTH_DATA_SGN 

Unauthenticated pairing with data signing.

GAP_SEC2_AUTH_DATA_SGN 

Authentication pairing with data signing.

GAP_SEC_UNDEFINED 

Unrecognized security.

TK Type.

Enumerator
GAP_TK_OOB 

TK get from out of band method.

GAP_TK_DISPLAY 

TK generated and shall be displayed by local device.

GAP_TK_KEY_ENTRY 

TK shall be entered by user using device keyboard.

enum gapc_bond

Bond event type.

Enumerator
GAPC_PAIRING_REQ 

Bond Pairing request.

GAPC_PAIRING_RSP 

Respond to Pairing request.

GAPC_PAIRING_SUCCEED 

Pairing Finished information.

GAPC_PAIRING_FAILED 

Pairing Failed information.

GAPC_TK_EXCH 

Used to retrieve pairing Temporary Key.

GAPC_IRK_EXCH 

Used for Identity Resolving Key exchange.

GAPC_CSRK_EXCH 

Used for Connection Signature Resolving Key exchange.

GAPC_LTK_EXCH 

Used for Long Term Key exchange.

GAPC_REPEATED_ATTEMPT 

Bond Pairing request issue, Repeated attempt.

Enumerator
GAPC_CMP_EVT 

Command Complete event.

GAPC_CONNECTION_REQ_IND 

Indicate that a connection has been established.

GAPC_CONNECTION_CFM 

Set specific link data configuration.

GAPC_DISCONNECT_IND 

Indicate that a link has been disconnected.

GAPC_DISCONNECT_CMD 

Request disconnection of current link command.

GAPC_GET_INFO_CMD 

Retrieve information command.

GAPC_PEER_NAME_IND 

Name of peer device indication.

GAPC_PEER_VERSION_IND 

Indication of peer version info.

GAPC_PEER_FEATURES_IND 

Indication of peer features info.

GAPC_CON_RSSI_IND 

Indication of ongoing connection RSSI.

GAPC_PRIVACY_IND 

Indication of peer privacy info.

GAPC_RECON_ADDR_IND 

Indication of peer reconnection address info.

GAPC_SET_PRIVACY_CMD 

Set Privacy flag command.

GAPC_SET_RECON_ADDR_CMD 

Set Reconnection Address Value command.

GAPC_PARAM_UPDATE_CMD 

Perform update of connection parameters command.

GAPC_PARAM_UPDATE_REQ_IND 

Request of updating connection parameters indication.

GAPC_PARAM_UPDATE_CFM 

Master confirm or not that parameters proposed by slave are accepted or not.

GAPC_PARAM_UPDATED_IND 

Connection parameters updated indication.

GAPC_BOND_CMD 

Start Bonding command procedure.

GAPC_BOND_REQ_IND 

Bonding requested by peer device indication message.

GAPC_BOND_CFM 

Confirm requested bond information.

GAPC_BOND_IND 

Bonding information indication message.

GAPC_ENCRYPT_CMD 

Start Encryption command procedure.

GAPC_ENCRYPT_REQ_IND 

Encryption requested by peer device indication message.

GAPC_ENCRYPT_CFM 

Confirm requested Encryption information.

GAPC_ENCRYPT_IND 

Encryption information indication message.

GAPC_SECURITY_CMD 

Start Security Request command procedure.

GAPC_SECURITY_IND 

Security requested by peer device indication message.

GAPC_SIGN_COUNTER_IND 

Indicate the current sign counters to the application.

GAPC_CON_CHANNEL_MAP_IND 

Indication of ongoing connection Channel Map.

GAPC_PARAM_UPDATE_TO_IND 

Parameter update procedure timeout indication.

GAPC_GET_TX_PWR_REQ 

Get Tx Power value.

GAPC_GET_TX_PWR_REQ_CMP_EVT 

Get Tx Power value complete event.

GAPC_SET_TX_PWR_REQ 

SET Tx Power value.

GAPC_SET_TX_PWR_REQ_CMP_EVT 

Set Tx Power value complete event.

GAPC_CON_TX_POW_GET_IND 

Indication of tx power get.

GAPC_CON_TX_POW_SET_IND 

Indication of tx power set.

GAPC_CON_MAX_PA_GAIN_GET_IND 

Indication of max PA gain get.

request operation type - application interface

Enumerator
GAPC_NO_OP 

No operation.

GAPC_DISCONNECT 

Disconnect link.

GAPC_GET_PEER_NAME 

Retrieve name of peer device.

GAPC_GET_PEER_VERSION 

Retrieve peer device version info.

GAPC_GET_PEER_FEATURES 

Retrieve peer device features.

GAPC_GET_CON_RSSI 

Retrieve connection RSSI.

GAPC_GET_PRIVACY 

Retrieve Privacy Info.

GAPC_GET_RECON_ADDR 

Retrieve Reconnection Address Value.

GAPC_SET_PRIVACY 

Set Privacy flag.

GAPC_SET_RECON_ADDR 

Set Reconnection Address Value.

GAPC_UPDATE_PARAMS 

Perform update of connection parameters.

GAPC_BOND 

Start bonding procedure.

GAPC_ENCRYPT 

Start encryption procedure.

GAPC_SECURITY_REQ 

Start security request procedure.

GAPC_GET_CON_CHANNEL_MAP 

Retrieve Connection Channel MAP.

GAPC_LAST 

Last GAPC operation flag.

at_ble_status_t gapc_bond_cfm_handler_key_exch ( uint8_t  u8Req,
uint8_t  u8Accept,
uint8_t *  key,
uint16_t  u16ConHdl 
)
at_ble_status_t gapc_bond_cfm_handler_pair_resp ( uint8_t  u8Accept,
uint8_t  u8IoCap,
uint8_t  u8OOB,
uint8_t  u8Auth,
uint8_t  u8KeySize,
uint8_t  u8IkeyDist,
uint8_t  u8RkeyDist,
uint8_t  u8SecReq,
uint16_t  u16ConHdl 
)
at_ble_status_t gapc_bond_cmd_handler ( uint16_t  conn_handle,
uint8_t  io_capabilities,
uint8_t  oob_available,
uint8_t  auth_req,
uint8_t  max_key_size,
uint8_t  initiator_keys,
uint8_t  responder_keys,
uint8_t  desired_auth 
)
void gapc_bond_req ( uint16_t  src,
at_ble_pair_request_t param 
)
at_ble_status_t gapc_con_max_PA_gain_get_ind_parser ( uint16_t  src,
uint8_t *  data,
gapc_con_max_PA_gain_get_ind params 
)
at_ble_status_t gapc_con_rssi_ind_parser ( uint16_t  src,
uint8_t *  data,
gapc_con_rssi_ind params 
)
at_ble_status_t gapc_con_tx_pow_get_ind_parser ( uint16_t  src,
uint8_t *  data,
gapc_con_tx_pow_get_ind params 
)
at_ble_status_t gapc_con_tx_pow_set_ind_parser ( uint16_t  src,
uint8_t *  data,
gapc_con_tx_pow_set_ind params 
)
at_ble_status_t gapc_connection_cfm_handler ( uint8_t *  pu8LocalKey,
uint32_t  u32LocalSignCntr,
uint8_t *  pu8RemoteKey,
uint32_t  u32RemoteSignCntr,
uint8_t  u8Auth,
uint8_t  u8Authorize,
uint16_t  u16ConHdl 
)
at_ble_status_t gapc_disconnect_cmd_handler ( uint8_t  reason,
uint16_t  handle 
)
at_ble_status_t gapc_encrypt_cfm_handler ( uint16_t  conn_handle,
uint8_t  auth,
uint8_t  key_found,
uint8_t *  key,
uint8_t  key_size 
)
at_ble_status_t gapc_encrypt_cmd_handler ( uint16_t  conn_handle,
uint8_t *  key,
uint16_t  ediv,
uint8_t *  rand,
uint8_t  key_size,
uint8_t  auth 
)
at_ble_status_t gapc_get_info_cmd_handler ( uint16_t  conn_handle,
uint8_t  operation 
)
at_ble_status_t gapc_param_update_cfm_handler ( uint16_t  conn_handle,
uint16_t  ce_len_min,
uint16_t  ce_len_max 
)
at_ble_status_t gapc_param_update_cmd_handler ( uint16_t  handle,
uint16_t  con_intv_min,
uint16_t  con_intv_max,
uint16_t  con_latency,
uint16_t  superv_to,
uint16_t  ce_len_min,
uint16_t  ce_len_max 
)
at_ble_status_t gapc_security_cmd_handler ( uint16_t  conn_handle,
uint8_t  auth_req 
)
at_ble_status_t gapc_set_tx_pwr_req_handler ( uint16_t  u16ConHdl,
uint8_t  u8txpow 
)