TI BLE5-Stack API Documentation  2.01.03.00
gap.h
Go to the documentation of this file.
1 /******************************************************************************
2 
3  Group: WCS, BTS
4  $Target Device: DEVICES $
5 
6  ******************************************************************************
7  $License: TISD 2009 $
8  ******************************************************************************
9  $Release Name: PACKAGE NAME $
10  $Release Date: PACKAGE RELEASE DATE $
11  *****************************************************************************/
12 
21 #ifndef GAP_H
22 #define GAP_H
23 
24 #ifdef __cplusplus
25 extern "C"
26 {
27 #endif
28 
29 /*-------------------------------------------------------------------
30  * INCLUDES
31  */
32 #include <stdbool.h>
33 #include "bcomdef.h"
34 #include "osal.h"
35 #include "sm.h"
36 #include "ll_ae.h"
37 
38 /*-------------------------------------------------------------------
39  * MACROS
40  */
42 #ifndef status_t
43  #define status_t bStatus_t
44 #endif
45 
55 #define GAP_IS_ADDR_RPR(pAddr) ((pAddr[B_ADDR_LEN-1] & RANDOM_ADDR_HDR_MASK) \
56  == PRIVATE_RESOLVE_ADDR_HDR)
57 
66 #define GAP_IS_ADDR_RPN(pAddr) ((pAddr[B_ADDR_LEN-1] & RANDOM_ADDR_HDR_MASK) \
67  == PRIVATE_NON_RESOLVE_ADDR_HDR)
68 
77 #define GAP_IS_ADDR_RS(pAddr) ((pAddr[B_ADDR_LEN-1] & RANDOM_ADDR_HDR_MASK) \
78  == STATIC_ADDR_HDR)
79 
83 #define GAP_IS_ADDR_RAND(pAddr) (GAP_IS_ADDR_RPR(pAddr) | \
84  GAP_IS_ADDR_RPN(pAddr) | \
85  GAP_IS_ADDR_RS(pAddr))
86 
87 /*-------------------------------------------------------------------
88  * CONSTANTS
89  */
90 
107 #define GAP_DEVICE_INIT_DONE_EVENT 0x00
108 
111 #define GAP_LINK_ESTABLISHED_EVENT 0x05
112 
115 #define GAP_LINK_TERMINATED_EVENT 0x06
116 
121 #define GAP_LINK_PARAM_UPDATE_EVENT 0x07
122 
128 #define GAP_SIGNATURE_UPDATED_EVENT 0x09
129 
134 #define GAP_AUTHENTICATION_COMPLETE_EVENT 0x0A
135 
140 #define GAP_PASSKEY_NEEDED_EVENT 0x0B
141 
147 #define GAP_SLAVE_REQUESTED_SECURITY_EVENT 0x0C
148 
153 #define GAP_BOND_COMPLETE_EVENT 0x0E
154 
160 #define GAP_PAIRING_REQ_EVENT 0x0F
161 
167 #define GAP_AUTHENTICATION_FAILURE_EVT 0x10
168 
174 #define GAP_UPDATE_LINK_PARAM_REQ_EVENT 0x11
175 #define GAP_SCAN_SESSION_END_EVENT 0x12
177 #define GAP_ADV_REMOVE_SET_EVENT 0x13
179 
182 #define GAP_CONNECTING_CANCELLED_EVENT 0x15
183 
187 #define GAP_BOND_LOST_EVENT 0x17
188 
193 #define GAP_LINK_PARAM_UPDATE_REJECT_EVENT 0x18
194 
211 #define GAP_EVT_ADV_START_AFTER_ENABLE (uint32_t)BV(0)
212 
217 #define GAP_EVT_ADV_END_AFTER_DISABLE (uint32_t)BV(1)
218 
224 #define GAP_EVT_ADV_START (uint32_t)BV(2)
225 
231 #define GAP_EVT_ADV_END (uint32_t)BV(3)
232 
238 #define GAP_EVT_ADV_SET_TERMINATED (uint32_t)BV(4)
239 
244 #define GAP_EVT_SCAN_REQ_RECEIVED (uint32_t)BV(5)
245 
251 #define GAP_EVT_ADV_DATA_TRUNCATED (uint32_t)BV(6)
252 #define GAP_EVT_SCAN_ENABLED (uint32_t)BV(16)
254 
260 #define GAP_EVT_SCAN_DISABLED (uint32_t)BV(17)
261 
266 #define GAP_EVT_SCAN_PRD_ENDED (uint32_t)BV(18)
267 #define GAP_EVT_SCAN_DUR_ENDED (uint32_t)BV(19)
269 
274 #define GAP_EVT_SCAN_INT_ENDED (uint32_t)BV(20)
275 #define GAP_EVT_SCAN_WND_ENDED (uint32_t)BV(21)
277 
283 #define GAP_EVT_ADV_REPORT (uint32_t)BV(22)
284 
289 #define GAP_EVT_ADV_REPORT_FULL (uint32_t)BV(23)
290 
297 #define GAP_EVT_PRD_ADV_SYNC_ESTABLISHED (uint32_t)BV(24)
298 
304 #define GAP_EVT_PRD_ADV_REPORT (uint32_t)BV(25)
305 
311 #define GAP_EVT_PRD_ADV_SYNC_LOST (uint32_t)BV(26)
312 #define GAP_EVT_INSUFFICIENT_MEMORY (uint32_t)BV(31)
315 
317 #define GAP_EVT_ADV_EVT_MASK (GAP_EVT_ADV_START_AFTER_ENABLE | \
318  GAP_EVT_ADV_END_AFTER_DISABLE | \
319  GAP_EVT_ADV_START | \
320  GAP_EVT_ADV_END | \
321  GAP_EVT_ADV_SET_TERMINATED | \
322  GAP_EVT_SCAN_REQ_RECEIVED | \
323  GAP_EVT_ADV_DATA_TRUNCATED | \
324  GAP_EVT_INSUFFICIENT_MEMORY)
325 
327 #define GAP_EVT_SCAN_EVT_MASK (GAP_EVT_SCAN_ENABLED | \
328  GAP_EVT_SCAN_DISABLED | \
329  GAP_EVT_SCAN_PRD_ENDED | \
330  GAP_EVT_SCAN_DUR_ENDED | \
331  GAP_EVT_SCAN_INT_ENDED | \
332  GAP_EVT_SCAN_WND_ENDED | \
333  GAP_EVT_ADV_REPORT | \
334  GAP_EVT_ADV_REPORT_FULL | \
335  GAP_EVT_PRD_ADV_SYNC_ESTABLISHED | \
336  GAP_EVT_PRD_ADV_REPORT | \
337  GAP_EVT_PRD_ADV_SYNC_LOST | \
338  GAP_EVT_INSUFFICIENT_MEMORY)
339 
356 typedef enum
357 {
376 
395 
397  GAP_CONFIG_PARAM_COUNT
400 
407 {
416 
430 
442 
452 
461 
470 
472 
476  GAP_PARAM_AUTH_TASK_ID,
477 
482  GAP_PARAM_DEPRECATED,
483 
491  GAP_PARAM_GGS_PARAMS,
492 
493 #if defined ( TESTMODES )
494 
497  GAP_PARAM_GAP_TESTCODE,
498 
502  GAP_PARAM_SM_TESTCODE,
503 
507  GAP_PARAM_GATT_TESTCODE,
508 
512  GAP_PARAM_ATT_TESTCODE,
513 
518  GAP_PARAM_L2CAP_TESTCODE,
519 
529  GAP_PARAM_SET_SCAN_CHAN_TESTCODE,
530 
531 #endif // TESTMODES
532 
539  GAP_STUB1_NOT_TESTCODE,
540 
547  GAP_STUB2_NOT_TESTCODE,
548 
555  GAP_STUB3_NOT_TESTCODE,
556 
563  GAP_STUB4_NOT_TESTCODE,
564 
571  GAP_STUB5_NOT_TESTCODE,
572 
582  GAP_PARAM_SET_SCAN_CHAN,
583 
587  GAP_PARAMID_MAX
589 };
590 
604 #define GAP_PROFILE_BROADCASTER 0x01
606 #define GAP_PROFILE_OBSERVER 0x02
608 
612 #define GAP_PROFILE_PERIPHERAL 0x04
613 
617 #define GAP_PROFILE_CENTRAL 0x08
618 
625 typedef enum
626 {
629 
635 
637 typedef enum
638 {
646 
648 typedef enum
649 {
652  ADDRTYPE_PUBLIC_ID = 0x02,
660 
662 typedef enum
663 {
667 
672 #define SET_ADDRTYPE_ID 0x02
674 #define MASK_ADDRTYPE_ID 0x01
676 
682 #define RANDOM_ADDR_HDR_MASK 0xC0
684 #define STATIC_ADDR_HDR 0xC0
686 #define PRIVATE_NON_RESOLVE_ADDR_HDR 0x80
688 #define PRIVATE_RESOLVE_ADDR_HDR 0x40
690 
698 #define GAP_ADTYPE_FLAGS 0x01
700 #define GAP_ADTYPE_16BIT_MORE 0x02
702 #define GAP_ADTYPE_16BIT_COMPLETE 0x03
704 #define GAP_ADTYPE_32BIT_MORE 0x04
706 #define GAP_ADTYPE_32BIT_COMPLETE 0x05
708 #define GAP_ADTYPE_128BIT_MORE 0x06
710 #define GAP_ADTYPE_128BIT_COMPLETE 0x07
712 #define GAP_ADTYPE_LOCAL_NAME_SHORT 0x08
714 #define GAP_ADTYPE_LOCAL_NAME_COMPLETE 0x09
716 #define GAP_ADTYPE_POWER_LEVEL 0x0A
718 #define GAP_ADTYPE_OOB_CLASS_OF_DEVICE 0x0D
720 #define GAP_ADTYPE_OOB_SIMPLE_PAIRING_HASHC 0x0E
722 #define GAP_ADTYPE_OOB_SIMPLE_PAIRING_RANDR 0x0F
724 #define GAP_ADTYPE_SM_TK 0x10
726 #define GAP_ADTYPE_SM_OOB_FLAG 0x11
728 
732 #define GAP_ADTYPE_SLAVE_CONN_INTERVAL_RANGE 0x12
733 #define GAP_ADTYPE_SIGNED_DATA 0x13
735 #define GAP_ADTYPE_SERVICES_LIST_16BIT 0x14
737 #define GAP_ADTYPE_SERVICES_LIST_128BIT 0x15
739 #define GAP_ADTYPE_SERVICE_DATA 0x16
741 #define GAP_ADTYPE_PUBLIC_TARGET_ADDR 0x17
743 #define GAP_ADTYPE_RANDOM_TARGET_ADDR 0x18
745 #define GAP_ADTYPE_APPEARANCE 0x19
747 #define GAP_ADTYPE_ADV_INTERVAL 0x1A
749 #define GAP_ADTYPE_LE_BD_ADDR 0x1B
751 #define GAP_ADTYPE_LE_ROLE 0x1C
753 #define GAP_ADTYPE_SIMPLE_PAIRING_HASHC_256 0x1D
755 #define GAP_ADTYPE_SIMPLE_PAIRING_RANDR_256 0x1E
757 #define GAP_ADTYPE_SERVICE_DATA_32BIT 0x20
759 #define GAP_ADTYPE_SERVICE_DATA_128BIT 0x21
761 #define GAP_ADTYPE_3D_INFO_DATA 0x3D
763 
767 #define GAP_ADTYPE_MANUFACTURER_SPECIFIC 0xFF
768 #define GAP_ADTYPE_FLAGS_LIMITED 0x01
770 #define GAP_ADTYPE_FLAGS_GENERAL 0x02
772 #define GAP_ADTYPE_FLAGS_BREDR_NOT_SUPPORTED 0x04
774 
780 #define GAP_STATE_IDLE 0x00
781 #define GAP_STATE_ADV 0x01
782 #define GAP_STATE_SCAN 0x02
783 #define GAP_STATE_INIT 0x04
784 
790 #define GAP_APPEARE_UNKNOWN 0x0000
791 #define GAP_APPEARE_GENERIC_PHONE 0x0040
792 #define GAP_APPEARE_GENERIC_COMPUTER 0x0080
793 #define GAP_APPEARE_GENERIC_WATCH 0x00C0
794 #define GAP_APPEARE_WATCH_SPORTS 0x00C1
795 #define GAP_APPEARE_GENERIC_CLOCK 0x0100
796 #define GAP_APPEARE_GENERIC_DISPLAY 0x0140
797 #define GAP_APPEARE_GENERIC_RC 0x0180
798 #define GAP_APPEARE_GENERIC_EYE_GALSSES 0x01C0
799 #define GAP_APPEARE_GENERIC_TAG 0x0200
800 #define GAP_APPEARE_GENERIC_KEYRING 0x0240
801 #define GAP_APPEARE_GENERIC_MEDIA_PLAYER 0x0280
802 #define GAP_APPEARE_GENERIC_BARCODE_SCANNER 0x02C0
803 #define GAP_APPEARE_GENERIC_THERMOMETER 0x0300
804 #define GAP_APPEARE_GENERIC_THERMO_EAR 0x0301
805 #define GAP_APPEARE_GENERIC_HR_SENSOR 0x0340
806 #define GAP_APPEARE_GENERIC_HRS_BELT 0x0341
807 #define GAP_APPEARE_GENERIC_BLOOD_PRESSURE 0x0380
808 #define GAP_APPEARE_GENERIC_BP_ARM 0x0381
809 #define GAP_APPEARE_GENERIC_BP_WRIST 0x0382
810 #define GAP_APPEARE_GENERIC_HID 0x03C0
811 #define GAP_APPEARE_HID_KEYBOARD 0x03C1
812 #define GAP_APPEARE_HID_MOUSE 0x03C2
813 #define GAP_APPEARE_HID_JOYSTIC 0x03C3
814 #define GAP_APPEARE_HID_GAMEPAD 0x03C4
815 #define GAP_APPEARE_HID_DIGITIZER_TYABLET 0x03C5
816 #define GAP_APPEARE_HID_DIGITAL_CARDREADER 0x03C6
817 #define GAP_APPEARE_HID_DIGITAL_PEN 0x03C7
818 #define GAP_APPEARE_HID_BARCODE_SCANNER 0x03C8
819 
825 #define GAP_PRIVACY_MODE_NETWORK 0
826 #define GAP_PRIVACY_MODE_DEVICE 1
827 
832 typedef enum
833 {
838 
842 typedef enum
843 {
845  GAP_CONN_EVT_STAT_SUCCESS = LL_CONN_EVT_STAT_SUCCESS,
847  GAP_CONN_EVT_STAT_CRC_ERROR = LL_CONN_EVT_STAT_CRC_ERROR,
849  GAP_CONN_EVT_STAT_MISSED = LL_CONN_EVT_STAT_MISSED
851 
855 typedef enum
856 {
858  GAP_CONN_EVT_TASK_TYPE_ADV = LL_TASK_ID_ADVERTISER,
860  GAP_CONN_EVT_TASK_TYPE_INIT = LL_TASK_ID_INITIATOR,
862  GAP_CONN_EVT_TASK_TYPE_SLAVE = LL_TASK_ID_SLAVE,
864  GAP_CONN_EVT_TASK_TYPE_SCAN = LL_TASK_ID_SCANNER,
866  GAP_CONN_EVT_TASK_TYPE_MASTER = LL_TASK_ID_MASTER,
867  // No task
868  GAP_CONN_EVT_TASK_TYPE_NONE = LL_TASK_ID_NONE
870 
874 typedef enum
875 {
879 
882 /*-------------------------------------------------------------------
883  * TYPEDEFS
884  */
885 
891 typedef struct
893 {
895  uint8_t opcode;
896 } gapEventHdr_t;
897 
904 typedef struct
905 {
907  uint16_t intervalMin;
909  uint16_t intervalMax;
911  uint16_t latency;
913  uint16_t timeout;
915 
923 typedef struct
924 {
926  uint8_t opcode;
927  uint8_t numDataPkts;
928  uint16_t dataPktLen;
929  uint8_t devAddr[B_ADDR_LEN];
931 
944 typedef struct
945 {
947  uint8_t opcode;
948  uint8_t addrType;
949  uint8_t devAddr[B_ADDR_LEN];
950  uint32_t signCounter;
952 
958 typedef struct
959 {
960  uint16_t connectionHandle;
961  uint16_t intervalMin;
962  uint16_t intervalMax;
963  uint16_t connLatency;
964  uint16_t connTimeout;
967 
973 typedef struct
974 {
975  uint16_t connectionHandle;
976  uint16_t intervalMin;
977  uint16_t intervalMax;
978  uint16_t connLatency;
979  uint16_t connTimeout;
981  uint8_t accepted;
983 
990 typedef struct
991 {
993  uint8_t opcode;
996 
1013 typedef struct
1014 {
1016  uint8_t opcode;
1017  uint8_t devAddrType;
1018  uint8_t devAddr[B_ADDR_LEN];
1019  uint16_t connectionHandle;
1020  uint8_t connRole;
1021  uint16_t connInterval;
1022  uint16_t connLatency;
1023  uint16_t connTimeout;
1024  uint8_t clockAccuracy;
1026 
1033 typedef struct
1034 {
1036  uint8_t opcode;
1037  uint8_t status;
1038  uint16_t connectionHandle;
1039  uint16_t connInterval;
1040  uint16_t connLatency;
1041  uint16_t connTimeout;
1043 
1049 typedef struct
1050 {
1052  uint8_t opcode;
1053  uint16_t connectionHandle;
1054  uint8_t reason;
1056 
1065 typedef struct
1066 {
1068  uint8_t opcode;
1069  uint8_t deviceAddr[B_ADDR_LEN];
1070  uint16_t connectionHandle;
1071  uint8_t uiInputs;
1072  uint8_t uiOutputs;
1073  uint32_t numComparison;
1075 
1083 typedef struct
1084 {
1086  uint8_t opcode;
1087  uint16_t connectionHandle;
1088  uint8_t authState;
1094 
1099 typedef struct
1100 {
1101  uint16_t connectionHandle;
1103 } gapAuthParams_t;
1104 
1112 typedef struct
1113 {
1115  uint8_t opcode;
1116  uint16_t connectionHandle;
1117  uint8_t deviceAddr[B_ADDR_LEN];
1118 
1123  uint8_t authReq;
1125 
1134 typedef struct
1135 {
1137  uint8_t opcode;
1138  uint16_t connectionHandle;
1140 
1145 typedef struct
1146 {
1147  uint8_t ioCap;
1148  uint8_t oobDataFlag;
1149  uint8_t authReq;
1150  uint8_t maxEncKeySize;
1152 } gapPairingReq_t;
1153 
1165 typedef struct
1166 {
1168  uint8_t opcode;
1169  uint16_t connectionHandle;
1172 
1176 typedef struct
1177 {
1178  GAP_ConnEvtStat_t status;
1179  uint16_t handle;
1180  uint8_t channel;
1182  int8_t lastRssi;
1183  uint16_t packets;
1186  uint16_t errors;
1188  GAP_ConnEvtTaskType_t nextTaskType;
1190  uint32_t nextTaskTime;
1192 
1200 typedef struct
1201 {
1203  uint8_t opcode;
1204  uint16_t connectionHandle;
1205  uint8_t deviceAddr[B_ADDR_LEN];
1207 
1210 /*-------------------------------------------------------------------
1211  * CALLBACKS
1212  */
1213 
1219 typedef uint8_t(*pfnSuppCentAddrRes_t)
1222  uint8_t *deviceAddr,
1223  GAP_Peer_Addr_Types_t addrType
1224 );
1225 
1226 //TODO try to move these to gap_internal.h
1227 
1229 typedef void (*pfnGapIdleCB_t)();
1230 
1232 typedef uint8_t(*pfnGapDevPrivModeCB_t)
1234  GAP_Peer_Addr_Types_t addrType,
1235  uint8_t *pAddr
1236 );
1237 
1239 typedef struct
1240 {
1244 } gapBondMgrCBs_t;
1245 
1258 typedef void (*pfnGapCB_t)
1260  uint32_t event,
1261  void *pBuf,
1262  uintptr_t arg
1263 );
1264 
1279 typedef void (*pfnGapConnEvtCB_t)
1282  Gap_ConnEventRpt_t *pReport
1283 );
1284 
1287 /*-------------------------------------------------------------------
1288  * FUNCTIONS - Initialization and Configuration
1289  */
1290 
1321 extern bStatus_t GAP_DeviceInit(uint8_t profileRole, uint8_t taskID,
1322  GAP_Addr_Modes_t addrMode,
1323  uint8_t* pRandomAddr);
1324 
1355 extern bStatus_t GAP_DeviceInit_noGAPBondMgr(uint8_t profileRole, uint8_t taskID,
1356  GAP_Addr_Modes_t addrMode,
1357  uint8_t* pRandomAddr);
1358 
1370 extern bStatus_t GAP_SetParamValue(uint16_t paramID, uint16_t paramValue);
1371 
1380 extern uint16_t GAP_GetParamValue(uint16_t paramID);
1381 
1390 extern void GAP_RegisterForMsgs(uint8_t taskID);
1391 
1397 extern void GAP_RegisterBondMgrCBs(gapBondMgrCBs_t *pCBs);
1398 
1416  uint8_t *pAddr, uint8_t mode);
1417 
1418 /*-------------------------------------------------------------------
1419  * FUNCTIONS - Link Establishment
1420  */
1421 
1436 extern bStatus_t GAP_TerminateLinkReq(uint16_t connectionHandle, uint8_t reason);
1437 
1460 
1485  *pParams);
1486 
1492 extern uint8_t GAP_NumActiveConnections(void);
1493 
1520  GAP_CB_Action_t action,
1521  uint16_t connHandle);
1522 
1523 /*-------------------------------------------------------------------
1524  * FUNCTIONS - GAP Configuration
1525  */
1526 
1542 extern bStatus_t GapConfig_SetParameter(Gap_configParamIds_t param,
1543  void *pValue);
1544 
1554 extern uint8_t *GAP_GetDevAddress(uint8 wantIA);
1555 
1565 extern uint8_t *GAP_GetIRK(void);
1566 
1576 extern uint8_t *GAP_GetSRK(void);
1577 
1578 /*-------------------------------------------------------------------
1579  * FUNCTIONS - Pairing
1580  */
1581 
1613  gapPairingReq_t *pPairReq);
1614 
1624 extern uint8_t GAP_isPairing(void);
1625 
1643 extern bStatus_t GAP_TerminateAuth(uint16_t connectionHandle, uint8_t reason);
1644 
1666 extern bStatus_t GAP_PasskeyUpdate(uint8_t *pPasskey, uint16_t connectionHandle);
1667 
1685 extern bStatus_t GAP_PasscodeUpdate(uint32_t passcode, uint16_t connectionHandle);
1686 
1703 extern bStatus_t GAP_SendSlaveSecurityRequest(uint16_t connectionHandle,
1704  uint8_t authReq);
1705 
1723 extern bStatus_t GAP_Signable(uint16_t connectionHandle, uint8_t authenticated,
1724  smSigningInfo_t *pParams);
1725 
1748 extern bStatus_t GAP_Bond(uint16_t connectionHandle, uint8_t authenticated,
1749  uint8_t secureConnections, smSecurityInfo_t *pParams,
1750  uint8_t startEncryption);
1751 
1752 /*-------------------------------------------------------------------
1753  * TASK FUNCTIONS - To only be used in osal_icall_ble.c
1754  */
1755 
1763 extern void GAP_Init(uint8_t task_id);
1764 
1775 extern uint16_t GAP_ProcessEvent(uint8_t task_id, uint16_t events);
1776 
1777 /*-------------------------------------------------------------------
1778 -------------------------------------------------------------------*/
1779 
1780 #ifdef __cplusplus
1781 }
1782 #endif
1783 
1784 #endif /* GAP_H */
1785 
uint8_t(* pfnSuppCentAddrRes_t)(uint8_t *deviceAddr, GAP_Peer_Addr_Types_t addrType)
Central Address Resolution (CAR) Support Callback Function.
Definition: gap.h:1221
Definition: gap.h:429
bStatus_t Gap_RegisterConnEventCb(pfnGapConnEvtCB_t cb, GAP_CB_Action_t action, uint16_t connHandle)
GAP_Addr_Types_t
Address types used for identifying peer address type.
Definition: gap.h:648
osal_event_hdr_t hdr
GAP_MSG_EVENT and status
Definition: gap.h:946
uint8_t * GAP_GetDevAddress(uint8 wantIA)
This API allows the software components in the Z-Stack to be written independently of the specifics o...
GAP_Peer_Addr_Types_t
Address types used for specifying peer address type.
Definition: gap.h:662
uint8_t addrType
Device&#39;s address type for devAddr.
Definition: gap.h:948
void(* pfnGapConnEvtCB_t)(Gap_ConnEventRpt_t *pReport)
Definition: gap.h:1280
This file contains the interface to the SM.
No address provided.
Definition: gap.h:658
2 MBPS
Definition: gap.h:835
Definition: sm.h:194
Definition: gap.h:451
uint8_t opcode
GAP_BOND_COMPLETE_EVENT
Definition: gap.h:1137
smSecurityInfo_t * pSecurityInfo
security information from this device
Definition: gap.h:1089
Random (static) Identity Address (corresponds to peer&#39;s RPA)
Definition: gap.h:655
Definition: gap.h:1099
bStatus_t GAP_TerminateAuth(uint16_t connectionHandle, uint8_t reason)
osal_event_hdr_t hdr
GAP_MSG_EVENT and status
Definition: gap.h:1114
Connection event in slave role.
Definition: gap.h:862
smSigningInfo_t * pSigningInfo
Signing information.
Definition: gap.h:1090
uint16_t handle
connection handle
Definition: gap.h:1179
GAP_ConnEvtTaskType_t
Definition: gap.h:855
osal_event_hdr_t hdr
GAP_MSG_EVENT and status
Definition: gap.h:925
Definition: gap.h:651
Definition: gap.h:1200
Deny all parameter update requests.
Definition: gap.h:628
bStatus_t GAP_SetParamValue(uint16_t paramID, uint16_t paramValue)
Definition: gap.h:1065
GAP_CB_Action_t
Definition: gap.h:874
osal_event_hdr_t hdr
GAP_MSG_EVENT and status
Definition: gap.h:894
Gap_configParamIds_t
Definition: gap.h:356
Definition: gap.h:904
Definition: gap.h:923
Definition: gap.h:1176
uint8_t maxEncKeySize
Pairing Request Maximum Encryption Key Size field.
Definition: gap.h:1150
Definition: gap.h:1112
uint8_t opcode
GAP_DEVICE_INIT_DONE_EVENT
Definition: gap.h:926
uint16_t connectionHandle
connection Handle
Definition: gap.h:1169
Register a callback.
Definition: gap.h:876
Connection event occurred successfully.
Definition: gap.h:845
GAP_ConnEvtStat_t status
status of connection event
Definition: gap.h:1178
GAP event header format.
Definition: gap.h:892
Definition: gap.h:1134
uint16_t timeout
Connection Timeout (0x000A - 0x0C80 * 10 ms)
Definition: gap.h:913
GAP_ConnEvtTaskType_t nextTaskType
Type of next BLE task.
Definition: gap.h:1188
Definition: gap.h:633
uint16_t dataPktLen
HC_LE_Data_Packet_Length.
Definition: gap.h:928
Definition: gap.h:640
Definition: gap.h:1165
int8_t lastRssi
Definition: gap.h:1182
uint16_t intervalMin
Minimum value for the connection event (interval. 0x0006 - 0x0C80 * 1.25 ms)
Definition: gap.h:907
1 MBPS
Definition: gap.h:834
uint8_t uiInputs
Pairing User Interface Inputs - Ask user to input passcode.
Definition: gap.h:1071
osal_event_hdr_t hdr
GAP_MSG_EVENT and status
Definition: gap.h:1136
GAP_ConnEvtStat_t
Definition: gap.h:842
bStatus_t GAP_TerminateLinkReq(uint16_t connectionHandle, uint8_t reason)
Random Device Address (controller unable to resolve)
Definition: gap.h:657
osal_event_hdr_t hdr
GAP_MSG_EVENT and status
Definition: gap.h:1067
bStatus_t GAP_UpdateLinkParamReq(gapUpdateLinkParamReq_t *pParams)
void GAP_RegisterForMsgs(uint8_t taskID)
keyDist_t keyDist
Pairing Request Key Distribution field.
Definition: gap.h:1151
uint8_t channel
BLE RF channel index (0-39)
Definition: gap.h:1180
uint8_t ioCap
Pairing Request ioCap field.
Definition: gap.h:1147
uint16_t connectionHandle
connection Handle
Definition: gap.h:1138
GAP_ConnEvtPhy_t
Definition: gap.h:832
Definition: gap.h:944
Definition: sm.h:148
osal_event_hdr_t hdr
GAP_MSG_EVENT and status
Definition: gap.h:1202
Gap_updateDecision_t
Definition: gap.h:625
Public Identity Address (corresponds to peer&#39;s RPA)
Definition: gap.h:653
uint8_t opcode
GAP_SIGNATURE_UPDATED_EVENT
Definition: gap.h:947
void(* pfnGapCB_t)(uint32_t event, void *pBuf, uintptr_t arg)
Definition: gap.h:1259
smIdentityInfo_t * pIdentityInfo
identity information
Definition: gap.h:1092
uint8_t * GAP_GetIRK(void)
Definition: sm.h:205
uint8_t authReq
Definition: gap.h:1123
void GAP_RegisterBondMgrCBs(gapBondMgrCBs_t *pCBs)
bStatus_t GAP_Bond(uint16_t connectionHandle, uint8_t authenticated, uint8_t secureConnections, smSecurityInfo_t *pParams, uint8_t startEncryption)
uint8_t uiOutputs
Pairing User Interface Outputs - Display passcode.
Definition: gap.h:1072
uint16_t connectionHandle
Connection handle.
Definition: gap.h:1070
uint16_t GAP_ProcessEvent(uint8_t task_id, uint16_t events)
Coded-S2 or Coded-S8.
Definition: gap.h:836
smLinkSecurityReq_t secReqs
Pairing Control info.
Definition: gap.h:1102
bStatus_t GAP_SendSlaveSecurityRequest(uint16_t connectionHandle, uint8_t authReq)
uint16_t GAP_GetParamValue(uint16_t paramID)
bStatus_t GAP_PasscodeUpdate(uint32_t passcode, uint16_t connectionHandle)
Always Use Resolvable Private Address with Random Identity Address.
Definition: gap.h:644
pfnSuppCentAddrRes_t suppCentAddrResCB
Supports Central Address Resolution.
Definition: gap.h:1241
Definition: gap.h:469
uint16_t errors
Total number of CRC errors for the entire connection.
Definition: gap.h:1186
osal_event_hdr_t hdr
GAP_MSG_EVENT and status
Definition: gap.h:1085
Type definitions and macros for BLE stack.
uint32_t numComparison
Numeric Comparison value to be displayed.
Definition: gap.h:1073
osal_event_hdr_t hdr
GAP_MSG_EVENT and status
Definition: gap.h:1167
uint16_t latency
Number of LL latency connection events (0x0000 - 0x03e8)
Definition: gap.h:911
uint8_t opcode
GAP_PAIRING_REQ_EVENT
Definition: gap.h:1168
No data was received during connection event.
Definition: gap.h:849
Public Device Address.
Definition: gap.h:650
smSecurityInfo_t * pDevSecInfo
security information from connected device
Definition: gap.h:1091
uint8_t GAP_NumActiveConnections(void)
Initiating a connection.
Definition: gap.h:860
void(* pfnGapIdleCB_t)()
GAP Idle Callback Function.
Definition: gap.h:1229
Definition: sm.h:215
uint8_t opcode
GAP_SLAVE_REQUESTED_SECURITY_EVENT
Definition: gap.h:1115
Definition: gap.h:441
Definition: gap.h:460
Can be used by the application to set the SRK.
Definition: gap.h:394
OSAL Event Header.
Definition: osal.h:92
Connection event failed because all packets had CRC errors.
Definition: gap.h:847
Gap_ParamIDs_t
Definition: gap.h:406
Always Use Public Address.
Definition: gap.h:639
bStatus_t GAP_UpdateLinkParamReqReply(gapUpdateLinkParamReqReply_t *pParams)
Can be used by the application to set the IRK.
Definition: gap.h:375
uint8_t opcode
GAP_PASSKEY_NEEDED_EVENT
Definition: gap.h:1068
Advertiser.
Definition: gap.h:858
bStatus_t GAP_DeviceInit(uint8_t profileRole, uint8_t taskID, GAP_Addr_Modes_t addrMode, uint8_t *pRandomAddr)
Definition: gap.h:415
uint8_t(* pfnGapDevPrivModeCB_t)(GAP_Peer_Addr_Types_t addrType, uint8_t *pAddr)
GAP Device Privacy Mode Callback Function.
Definition: gap.h:1233
uint8_t authState
TRUE if the pairing was authenticated (MITM)
Definition: gap.h:1088
void GAP_Init(uint8_t task_id)
uint8_t opcode
GAP type of command. GAP Event IDs.
Definition: gap.h:895
#define B_ADDR_LEN
Default Public and Random Address Length.
Definition: bcomdef.h:108
uint8_t opcode
GAP_BOND_LOST_EVENT
Definition: gap.h:1203
uint8_t numDataPkts
HC_Total_Num_LE_Data_Packets.
Definition: gap.h:927
Definition: gap.h:1083
Callback Registration Structure.
Definition: gap.h:1239
uint8_t GAP_isPairing(void)
uint8_t authReq
Pairing Request Auth Req field.
Definition: gap.h:1149
uint32_t nextTaskTime
Time to next BLE task (in us). 0xFFFFFFFF if there is no next task.
Definition: gap.h:1190
uint8_t * GAP_GetSRK(void)
uint16_t intervalMax
Maximum value for the connection event (interval. 0x0006 - 0x0C80 * 1.25 ms)
Definition: gap.h:909
pfnGapIdleCB_t gapIdleCB
GAP Idle callback.
Definition: gap.h:1242
uint8_t opcode
GAP_AUTHENTICATION_COMPLETE_EVENT
Definition: gap.h:1086
GAP_ConnEvtPhy_t phy
PHY of connection event.
Definition: gap.h:1181
uint8_t oobDataFlag
Pairing Request OOB Data Flag field.
Definition: gap.h:1148
uint16_t connectionHandle
Connection Handle from controller used to ref the device.
Definition: gap.h:1087
Status_t bStatus_t
BLE Generic Status return.
Definition: bcomdef.h:246
Random or Random ID Address.
Definition: gap.h:665
Accept all parameter update requests.
Definition: gap.h:627
bStatus_t GAP_DeviceInit_noGAPBondMgr(uint8_t profileRole, uint8_t taskID, GAP_Addr_Modes_t addrMode, uint8_t *pRandomAddr)
uint16_t connectionHandle
Connection Handle.
Definition: gap.h:1204
bStatus_t GAP_SetPrivacyMode(GAP_Peer_Addr_Types_t addrType, uint8_t *pAddr, uint8_t mode)
Definition: gap.h:1145
bStatus_t GapConfig_SetParameter(Gap_configParamIds_t param, void *pValue)
bStatus_t GAP_Signable(uint16_t connectionHandle, uint8_t authenticated, smSigningInfo_t *pParams)
Connection event in master role.
Definition: gap.h:866
Always Use Resolvable Private Address with Public Identity Address.
Definition: gap.h:642
bStatus_t GAP_PasskeyUpdate(uint8_t *pPasskey, uint16_t connectionHandle)
gapPairingReq_t pairReq
The Pairing Request fields received.
Definition: gap.h:1170
Scanner.
Definition: gap.h:864
Public or Public ID Address.
Definition: gap.h:664
bStatus_t GAP_Authenticate(gapAuthParams_t *pParams, gapPairingReq_t *pPairReq)
uint32_t signCounter
new Signed Counter
Definition: gap.h:950
uint16_t connectionHandle
Connection Handle.
Definition: gap.h:1116
Unregister a callback
Definition: gap.h:877
GAP_Addr_Modes_t
Address modes to initialize the local device.
Definition: gap.h:637
pfnGapDevPrivModeCB_t gapDevPrivModeCB
GAP Device Privacy Mode callback.
Definition: gap.h:1243
uint16_t connectionHandle
Connection Handle from controller,.
Definition: gap.h:1101
© Copyright 1995-2020, Texas Instruments Incorporated. All rights reserved.
Trademarks | Privacy policy | Terms of use | Terms of sale