TI BLE5-Stack API Documentation  1.00.01.04
snp.h
Go to the documentation of this file.
1 /******************************************************************************
2 
3  @file snp.h
4 
5  @brief main header file for the serial network processor
6 
7  Group: WCS, BTS
8  $Target Device: DEVICES $
9 
10  ******************************************************************************
11  $License: BSD3 2015 $
12  ******************************************************************************
13  $Release Name: PACKAGE NAME $
14  $Release Date: PACKAGE RELEASE DATE $
15  *****************************************************************************/
16 
25 #ifndef SNP_H
26 #define SNP_H
27 
28 #ifdef __cplusplus
29 extern "C"
30 {
31 #endif
32 
33 /*********************************************************************
34  * INCLUDES
35  */
36 
37 #include "hal_types.h"
38 
39 /*********************************************************************
40 * EXTERNAL VARIABLES
41 */
42 
48 /*********************************************************************
49  * CONSTANTS
50  */
51 
53 #define SNP_IMAGE_START 0x00000000
54 
56 
59 #define SNP_NPI_ASYNC_CMD_TYPE (RPC_SYS_BLE_SNP+(NPI_MSG_TYPE_ASYNC<<5))
61 #define SNP_NPI_SYNC_REQ_TYPE (RPC_SYS_BLE_SNP+(NPI_MSG_TYPE_SYNCREQ<<5))
63 #define SNP_NPI_SYNC_RSP_TYPE (RPC_SYS_BLE_SNP+(NPI_MSG_TYPE_SYNCRSP<<5))
65 
69 // Fixed size, must not exceed 2 bits!
71 // the upper two bits of NPI frame cmd1 field is reserved for subgroup value.
73  SNP_DEVICE_GRP = 0,
74  SNP_GAP_GRP,
75  SNP_GATT_GRP,
76  SNP_RFU_GRP
77 };
78 
83 #define SNP_MASK_EVT_REQ 0x02
84 #define SNP_GET_REVISION_REQ 0x03
85 #define SNP_HCI_CMD_REQ 0x04
86 #define SNP_GET_STATUS_REQ 0x06
87 #define SNP_GET_RAND_REQ 0x07
88 #define SNP_TEST_REQ 0x10
89 
95 #define SNP_POWER_UP_IND 0x01
96 #define SNP_MASK_EVENT_RSP 0x02
97 #define SNP_GET_REVISION_RSP 0x03
98 #define SNP_HCI_CMD_RSP 0x04
99 #define SNP_EVENT_IND 0x05
100 #define SNP_GET_STATUS_RSP 0x06
101 #define SNP_SYNC_ERROR_CMD_IND 0x07
102 #define SNP_GET_RAND_RSP 0x08
103 #define SNP_TEST_RSP 0x10
104 
110 #define SNP_INIT_DEVICE_REQ 0x41
111 #define SNP_START_ADV_REQ 0x42
112 #define SNP_SET_ADV_DATA_REQ 0x43
113 #define SNP_STOP_ADV_REQ 0x44
114 #define SNP_UPDATE_CONN_PARAM_REQ 0x45
115 #define SNP_TERMINATE_CONN_REQ 0x46
116 #define SNP_SET_GAP_PARAM_REQ 0x48
117 #define SNP_GET_GAP_PARAM_REQ 0x49
118 #define SNP_SET_SECURITY_PARAM_REQ 0x4A
119 #define SNP_SEND_SECURITY_REQUEST_REQ 0x4B
120 #define SNP_SET_AUTHENTICATION_DATA_REQ 0x4C
121 #define SNP_SET_WHITE_LIST_POLICY_REQ 0x4D
122 
128 #define SNP_INIT_DEVICE_CNF 0x41
129 #define SNP_SET_ADV_DATA_CNF 0x43
130 #define SNP_UPDATE_CONN_PARAM_CNF 0x45
131 #define SNP_SET_GAP_PARAM_RSP 0x48
132 #define SNP_GET_GAP_PARAM_RSP 0x49
133 #define SNP_SET_SECURITY_PARAM_RSP 0x4A
134 #define SNP_SEND_AUTHENTICATION_DATA_RSP 0x4C
135 #define SNP_SET_WHITE_LIST_POLICY_RSP 0x4D
136 
142 #define SNP_ADD_SERVICE_REQ 0x81
143 #define SNP_ADD_CHAR_VAL_DECL_REQ 0x82
144 #define SNP_ADD_CHAR_DESC_DECL_REQ 0x83
145 #define SNP_REGISTER_SERVICE_REQ 0x84
146 #define SNP_GET_ATTR_VALUE_REQ 0x85
147 #define SNP_SET_ATTR_VALUE_REQ 0x86
148 #define SNP_CHAR_READ_CNF 0x87
149 #define SNP_CHAR_WRITE_CNF 0x88
150 #define SNP_SEND_NOTIF_IND_REQ 0x89
151 #define SNP_CCCD_UPDATED_CNF 0x8B
152 #define SNP_SET_GATT_PARAM_REQ 0x8C
153 #define SNP_GET_GATT_PARAM_REQ 0x8D
154 #define SNP_REG_PREDEF_SRV_REQ 0x8E
155 
161 #define SNP_ADD_SERVICE_RSP 0x81
162 #define SNP_ADD_CHAR_VAL_DECL_RSP 0x82
163 #define SNP_ADD_CHAR_DESC_DECL_RSP 0x83
164 #define SNP_REGISTER_SERVICE_RSP 0x84
165 #define SNP_GET_ATTR_VALUE_RSP 0x85
166 #define SNP_SET_ATTR_VALUE_RSP 0x86
167 #define SNP_CHAR_READ_IND 0x87
168 #define SNP_CHAR_WRITE_IND 0x88
169 #define SNP_SEND_NOTIF_IND_CNF 0x89
170 #define SNP_CCCD_UPDATED_IND 0x8B
171 #define SNP_SET_GATT_PARAM_RSP 0x8C
172 #define SNP_GET_GATT_PARAM_RSP 0x8D
173 #define SNP_REG_PREDEF_SRV_RSP 0x8E
174 
179 #define SNP_SUCCESS 0x00
180 #define SNP_FAILURE 0x83
181 #define SNP_INVALID_PARAMS 0x84
182 #define SNP_CMD_ALREADY_IN_PROGRESS 0x85
183 #define SNP_CMD_REJECTED 0x86
184 #define SNP_OUT_OF_RESOURCES 0x87
185 #define SNP_UNKNOWN_ATTRIBUTE 0x88
186 #define SNP_UNKNOWN_SERVICE 0x89
187 #define SNP_ALREADY_ADVERTISING 0x8A
188 #define SNP_NOT_ADVERTISING 0x8B
189 #define SNP_HCI_RSP_COLLISION_RSP 0x8C
190 #define SNP_HCI_CMD_UNKNOWN 0x8D
191 #define SNP_GATT_COLLISION 0x8E
192 #define SNP_NOTIF_IND_NOT_ENABLE_BY_CLIENT 0x8F
193 #define SNP_NOTIF_IND_NOT_ALLOWED 0x90
194 #define SNP_NOTIF_IND_NO_CCCD_ATTRIBUTE 0x91
195 #define SNP_NOT_CONNECTED 0x92
196 #define SNP_FAILURE_NO_ATT_RSP 0x93
197 
204 #define SNP_CONN_EST_EVT 0x0001
205 #define SNP_CONN_TERM_EVT 0x0002
206 #define SNP_CONN_PARAM_UPDATED_EVT 0x0004
207 #define SNP_ADV_STARTED_EVT 0x0008
208 #define SNP_ADV_ENDED_EVT 0x0010
209 #define SNP_ATT_MTU_EVT 0x0020
210 #define SNP_SECURITY_EVT 0x0040
211 #define SNP_AUTHENTICATION_EVT 0x0080
212 #define SNP_ERROR_EVT 0x8000
213 
216 #define SNP_DEV_ALL_EVENT_MASK (SNP_CONN_EST_EVT | SNP_CONN_TERM_EVT | \
218 SNP_CONN_PARAM_UPDATED_EVT | SNP_ADV_STARTED_EVT | SNP_ADV_ENDED_EVT | \
219  SNP_ATT_MTU_EVT | SNP_ERROR_EVT)
220 
221 /* HCI Opcodes */
225 #define SNP_HCI_OPCODE_EXT_SET_TX_POWER 0xFC01
226 #define SNP_HCI_OPCODE_EXT_MODEM_TEST_TX 0xFC08
228 #define SNP_HCI_OPCODE_EXT_MODEM_HOP_TEST_TX 0xFC09
229 #define SNP_HCI_OPCODE_EXT_MODEM_TEST_RX 0xFC0A
230 #define SNP_HCI_OPCODE_EXT_END_MODEM_TEST 0xFC0B
231 #define SNP_HCI_OPCODE_EXT_SET_BDADDR 0xFC0C
233 #define SNP_HCI_OPCODE_EXT_SET_SCA 0xFC0D
234 #define SNP_HCI_OPCODE_EXT_ENABLE_PTM 0xFC0E
235 #define SNP_HCI_OPCODE_EXT_SET_MAX_DTM_TX_POWER 0xFC11
236 #define SNP_HCI_OPCODE_EXT_RESET_SYSTEM 0xFC1D
237 #define SNP_HCI_OPCODE_READ_BDADDR 0x1009
238 #define SNP_HCI_OPCODE_READ_RSSI 0x1405
239 #define SNP_HCI_OPCODE_LE_RECEIVER_TEST 0x201D
240 #define SNP_HCI_OPCODE_LE_TRANSMITTER_TEST 0x201E
241 #define SNP_HCI_OPCODE_LE_TEST_END 0x201F
242 #define SNP_HCI_OPCODE_LE_READ_PHY 0x2030
243 #define SNP_HCI_OPCODE_LE_SET_DEFAULT_PHY 0x2031
244 #define SNP_HCI_OPCODE_LE_SET_PHY 0x2032
245 #define SNP_HCI_OPCODE_EXT_PER 0xFC14
246 #define SNP_HCI_OPCODE_EXT_DECRYPT 0xFC05
247 #define SNP_HCI_OPCODE_LE_ENCRYPT 0x2017
248 #define SNP_HCI_OPCODE_EXT_OVERRIDE_SL 0xFC1A
249 #define SNP_HCI_OPCODE_EXT_SET_FAST_TX_RESP_TIME 0xFC07
250 #define SNP_HCI_OPCODE_EXT_ONE_PKT_PER_EVT 0xFC02
251 #define SNP_HCI_OPCODE_EXT_GET_CONNECTION_INFO 0xFC20
252 
256 #define SNP_HCI_OPCODE_SIZE 0x02
258 
259 
260 /* Advertising */
264 #define SNP_ADV_TYPE_CONN 0x00
265 #define SNP_ADV_TYPE_SCANABLE 0x02
266 #define SNP_ADV_TYPE_NONCONN 0x03
267 
274 #define SNP_FILTER_POLICY_ALL 0x00
275 #define SNP_FILTER_POLICY_WHITE 0x03
276 
283 #define SNP_ADV_STOP_ON_CONN 0x00
285 #define SNP_ADV_RESTART_ON_CONN_EST 0x01
288 #define SNP_ADV_RESTART_ON_CONN_TERM 0x02
291 
298 #define SNP_SCANRSP_DATA 0x00 // Scan response data
300 #define SNP_NONCONN_ADV_DATA 0x01 // Non-connectable advertising data.
302 #define SNP_CONN_ADV_DATA 0x02 // Connectable advertising data.
304 
308 #define SNP_MAX_ADVDATA_LENGTH 31
310 
312 
315 #define SNP_CT_SUPERVISOR_TO 0x08
316 #define SNP_CT_PEER_REQ 0x13
317 #define SNP_CT_HOST_REQ 0x16
318 #define SNP_CT_CTRL_PKT_TO 0x22
319 #define SNP_CT_CTRL_PKT_INST_PASS 0x28
320 #define SNP_CT_LSTO_VIOLATION 0x3B
321 #define SNP_CT_MIC_FAILURE 0x3D
322 
326 /* Connection Parameters and Updates */
327 #define SNP_CONN_INT_MIN 0x0006
329 #define SNP_CONN_INT_MAX 0x0C80
330 
331 #define SNP_CONN_SL_MIN 0x0000
333 #define SNP_CONN_SL_MAX 0x01F3
334 
335 #define SNP_CONN_SUPERVISOR_TIMEOUT_MIN 0x000A
337 #define SNP_CONN_SUPERVISOR_TIMEOUT_MAX 0x0C80
338 
339 
342 #define SNP_PRIMARY_SERVICE 1
344 #define SNP_SECONDARY_SERVICE 2
346 
348 #define SNP_CHAR_MANAGED_BY_AP 0x00
349 #define SNP_CHAR_MANAGED_BY_NP 0x01
350 
351 
354 #define SNP_16BIT_UUID_SIZE 2
355 #define SNP_128BIT_UUID_SIZE 16
356 
361 #define SNP_GATT_PERMIT_READ 0x01
364 #define SNP_GATT_PERMIT_WRITE 0x02
366 #define SNP_GATT_PERMIT_AUTHEN_READ 0x04
368 #define SNP_GATT_PERMIT_AUTHEN_WRITE 0x08
370 #define SNP_GATT_PERMIT_ENCRYPT_READ 0x40
372 #define SNP_GATT_PERMIT_ENCRYPT_WRITE 0x80
374 
377 #define SNP_GATT_PERM_RFU_MASK (SNP_GATT_PERMIT_READ | \
379  SNP_GATT_PERMIT_WRITE | \
380  SNP_GATT_PERMIT_AUTHEN_READ | \
381  SNP_GATT_PERMIT_AUTHEN_WRITE | \
382  SNP_GATT_PERMIT_ENCRYPT_READ | \
383  SNP_GATT_PERMIT_ENCRYPT_WRITE)
384 
388 #define SNP_GATT_PROP_READ 0x0002
389 #define SNP_GATT_PROP_WRITE_NORSP 0x0004
390 #define SNP_GATT_PROP_WRITE 0x0008
391 #define SNP_GATT_PROP_NOTIFICATION 0x0010
392 #define SNP_GATT_PROP_INDICATION 0x0020
393 
395 #define SNP_GATT_CHAR_MAX_LENGTH 512
397 
401 #define SNP_SEND_NOTIFICATION 0x01
403 #define SNP_SEND_INDICATION 0x02
405 
411 #define SNP_GGS_SERV_ID 0x01
412 #define SNP_DIS_SERV_ID 0x02
413 
418 #define SNP_DEVINFO_SYSTEM_ID 0
419 #define SNP_DEVINFO_MODEL_NUMBER 1
420 #define SNP_DEVINFO_SERIAL_NUMBER 2
421 #define SNP_DEVINFO_FIRMWARE_REV 3
422 #define SNP_DEVINFO_HARDWARE_REV 4
423 #define SNP_DEVINFO_SOFTWARE_REV 5
424 #define SNP_DEVINFO_MANUFACTURER_NAME 6
425 #define SNP_DEVINFO_11073_CERT_DATA 7
426 #define SNP_DEVINFO_PNP_ID 8
427 
428 #define SNP_DEVINFO_SYSTEM_ID_LEN 8
430 
432 #define SNP_DEVINFO_PNP_ID_LEN 7
433 
435 // this is for information only, do not change it here.
436 #define SNP_DEVINFO_STRING_LEN 21
437 
442 #define SNP_GGS_DEVICE_NAME_ATT 0
443 #define SNP_GGS_APPEARANCE_ATT 1
444 #define SNP_GGS_PERI_PRIVACY_FLAG_ATT 2
445 #define SNP_GGS_RECONNCT_ADDR_ATT 3
446 #define SNP_GGS_PERI_CONN_PARAM_ATT 4
447 #define SNP_GGS_PERI_PRIVACY_FLAG_PROPS 5
448 #define SNP_GGS_W_PERMIT_DEVICE_NAME_ATT 6
449 #define SNP_GGS_W_PERMIT_APPEARANCE_ATT 7
450 #define SNP_GGS_W_PERMIT_PRIVACY_FLAG_ATT 8
451 
452 #define SNP_GAP_DEVICE_NAME_LEN 21
454 
455 // Privacy Flag States
456 #define SNP_GAP_PRIVACY_DISABLED 0x00
457 #define SNP_GAP_PRIVACY_ENABLED 0x01
458 
459 
464 #define SNP_DESC_HEADER_GEN_SHORT_UUID 0x01
465 #define SNP_DESC_HEADER_GEN_LONG_UUID 0x02
466 #define SNP_DESC_HEADER_CCCD 0x04
467 #define SNP_DESC_HEADER_FORMAT 0x08
468 #define SNP_DESC_HEADER_USER_DESC 0x80
469 #define SNP_DESC_HEADER_UNSUPPORTED_MASK 0x70
470 
472 #define SNP_GATT_CLIENT_CFG_NOTIFY 0x0001
473 #define SNP_GATT_CLIENT_CFG_INDICATE 0x0002
474 
475 
478 #define SNP_RESPONSE_NOT_NEEDED 0x00
479 #define SNP_RESPONSE_NEEDED 0x01
480 
482 #define SNP_INVALID_HANDLE 0x0000
483 
484 
488 #define SNP_GAP_TERM_CONN_DEFAULT 0x00
489 #define SNP_GAP_TERM_CONN_IMMEDIATLY 0x01
490 
495 #define SNP_GAPBOND_PAIRING_MODE 0x00
496 #define SNP_GAPBOND_IO_CAPABILITIES 0x01
497 #define SNP_GAPBOND_BONDING_ENABLED 0x02
498 #define SNP_GAPBOND_ERASE_ALLBONDS 0x03
499 #define SNP_GAPBOND_LRU_BOND_REPLACEMENT 0x04
500 
505 #define SNP_GAPBOND_PAIRING_STATE_COMPLETE 0x01
506 #define SNP_GAPBOND_PAIRING_STATE_BONDED 0x02
507 #define SNP_GAPBOND_PAIRING_STATE_BOND_SAVED 0x03
508 
512 /*-------------------------------------------------------------------
513 * TYPEDEFS - Initialization and Configuration
514 */
515 /*** Device Data Types ***/
516 
528 PACKED_TYPEDEF_STRUCT
529 {
530  uint16_t eventMask;
534 
542 PACKED_TYPEDEF_STRUCT
543 {
544  uint16_t maskedEvent;
548 
556 PACKED_TYPEDEF_STRUCT
557 {
558  uint16_t memAlo;
559  uint16_t memMax;
560  uint16_t memSize;
562 
570 PACKED_TYPEDEF_STRUCT
571 {
572  uint16_t opcode;
573  uint8_t *pData;
581 
589 PACKED_TYPEDEF_STRUCT
590 {
591  uint8_t status;
592  uint16_t opcode;
593  uint8_t *pData;
600 
608 PACKED_TYPEDEF_STRUCT
609 {
610  uint8_t status;
611  uint16_t snpVer;
612  uint8_t stackBuildVer[10];
614 
622 PACKED_TYPEDEF_STRUCT
623 {
624  uint32_t rand;
626 
632 PACKED_TYPEDEF_STRUCT
633 {
634  uint8_t gapRoleStatus;
635  uint8_t advStatus;
639  uint8_t ATTstatus;
643  uint8_t ATTmethod;
648 
649 /*** GAP Data Types ***/
650 
658 PACKED_TYPEDEF_STRUCT
659 {
660  uint8_t type;
661  uint16_t timeout;
662  uint16_t interval;
665  uint8_t filterPolicy;
669  uint8_t initiatorAddress[6];
670  uint8_t behavior;
672 
673 
683 PACKED_TYPEDEF_STRUCT
684 {
685  uint8_t type;
686  uint8_t *pData;
688 
698 PACKED_TYPEDEF_STRUCT
699 {
700  uint16_t connHandle;
701  uint8_t option;
703 
711 PACKED_TYPEDEF_STRUCT
712 {
713  uint16_t connHandle;
714  uint16_t intervalMin;
715  uint16_t intervalMax;
721  uint16_t slaveLatency;
727  uint16_t supervisionTimeout;
730 
736 
746 PACKED_TYPEDEF_STRUCT
747 {
748  uint8_t status;
749  uint16_t connHandle;
751 
785 PACKED_TYPEDEF_STRUCT
786 {
787  uint16_t paramId;
788  uint16_t value;
790 
800 PACKED_TYPEDEF_STRUCT
801 {
802  uint8_t status;
803  uint16_t paramId;
804  uint16_t value;
806 
818 PACKED_TYPEDEF_STRUCT
819 {
820  uint32_t authData;
822 
823 /*** GATT Data Types ***/
824 
832 PACKED_TYPEDEF_STRUCT
833 {
834  uint8_t type;
835  uint8_t UUID[16];
841 
862 PACKED_TYPEDEF_STRUCT
863 {
864  uint8_t charValPerms;
865  uint16_t charValProps;
866  uint8_t mgmtOption;
867  uint16_t charValMaxLen;
868  uint8_t UUID[16];
876 
884 PACKED_TYPEDEF_STRUCT
885 {
886  uint8_t status;
887  uint16_t attrHandle;
889 
904 PACKED_TYPEDEF_STRUCT
905 {
906  uint8_t perms;
908 
918 PACKED_TYPEDEF_STRUCT
919 {
920  uint8_t format;
921  uint8_t exponent;
922  uint16_t unit;
923  uint8_t namespace;
924  uint16_t desc;
926 
936 PACKED_TYPEDEF_STRUCT
937 {
938  uint8_t perms;
939  uint16_t maxLen;
940  uint16_t initLen;
941  uint8_t *pDesc;
943 
953 PACKED_TYPEDEF_STRUCT
954 {
955  uint8_t perms;
956  uint16_t maxLen;
957  uint8_t UUID[2];
961 
971 PACKED_TYPEDEF_STRUCT
972 {
973  uint8_t perms;
974  uint16_t maxLen;
975  uint8_t UUID[16];
979 
1000 PACKED_TYPEDEF_STRUCT
1001 {
1002  uint8_t header;
1009 
1020 PACKED_TYPEDEF_STRUCT
1021 {
1022  uint8_t status;
1023  uint8_t header;
1024  uint16_t handles[6];
1029 
1037 PACKED_TYPEDEF_STRUCT
1038 {
1039  uint8_t status;
1040  uint16_t startHandle;
1041  uint16_t endHandle;
1043 
1051 PACKED_TYPEDEF_STRUCT
1052 {
1053  uint16_t connHandle;
1054  uint16_t attrHandle;
1055  uint16_t offset;
1056  uint16_t maxSize;
1058 
1066 PACKED_TYPEDEF_STRUCT
1067 {
1068  uint8_t status;
1069  uint16_t connHandle;
1070  uint16_t attrHandle;
1071  uint16_t offset;
1072  uint8_t *pData;
1075 
1085 PACKED_TYPEDEF_STRUCT
1086 {
1087  uint16_t connHandle;
1088  uint16_t attrHandle;
1089  uint8_t rspNeeded;
1090  uint16_t offset;
1091  uint8_t *pData;
1094 
1114 PACKED_TYPEDEF_STRUCT
1115 {
1116  uint8_t status;
1117  uint16_t connHandle;
1119 
1125 PACKED_TYPEDEF_STRUCT
1126 {
1127  uint16_t connHandle;
1128  uint16_t attrHandle;
1129  uint8_t authenticate;
1130  uint8_t type;
1131  uint8_t *pData;
1133 
1202 PACKED_TYPEDEF_STRUCT
1203 {
1204  uint8_t status;
1208 
1224 PACKED_TYPEDEF_STRUCT
1225 {
1226  uint8_t serviceID;
1227  uint8_t paramID;
1230  uint8_t *pData;
1232 
1240 PACKED_TYPEDEF_STRUCT
1241 {
1242  uint16_t attrHandle;
1243  uint8_t *pData;
1245 
1253 PACKED_TYPEDEF_STRUCT
1254 {
1255  uint8_t status;
1256  uint16_t attrHandle;
1258 
1266 PACKED_TYPEDEF_STRUCT
1267 {
1268  uint16_t attrHandle;
1270 
1278 PACKED_TYPEDEF_STRUCT
1279 {
1280  uint8_t status;
1281  uint16_t attrHandle;
1282  uint8_t *pData;
1284 
1292 PACKED_TYPEDEF_STRUCT
1293 {
1294  uint8_t serviceID;
1295  uint8_t paramID;
1297 
1307 PACKED_TYPEDEF_STRUCT
1308 {
1309  uint16_t connHandle;
1310  uint16_t cccdHandle;
1311  uint8_t rspNeeded;
1312  uint16_t value;
1314 
1322 PACKED_TYPEDEF_STRUCT
1323 {
1324  uint8_t useWhiteList;
1326 
1331 typedef union
1332 {
1333  //Mask events
1336 
1337  //Revision
1339 
1340  //Rand
1342 
1343  //HCI
1346 
1347  //Status
1349 
1350  //Test
1352 
1353  //Advertising
1356  snpSetAdvDataCnf_t setAdvDataCnf;
1357 
1358  //Connection
1362 
1363  //GAP Parameters
1365  snpSetGapParamRsp_t setGapParamRsp;
1366  snpGetGapParamReq_t getGapParamReq;
1368 
1369  //Security
1370  snpSetSecParamReq_t setSecParamReq;
1371  snpSetSecParamRsp_t setSecParamRsp;
1373  snpSetAuthDataRsp_t setAuthDataRsp;
1374 
1375  //White List
1377  snpSetWhiteListRsp_t setWhiteListRsp;
1378 
1379  //Services
1381  snpAddServiceRsp_t addServiceRsp;
1387 
1388  //Incoming GATT Requests
1394  snpNotifIndCnf_t notifIndCnf;
1395 
1396  //NP GATT Parameters of predefined services
1400  snpGetGattParamRsp_t getGattParamRsp;
1401 
1402  //CCCD Updates
1404  snpCharCfgUpdatedRsp_t charcfgUpdatedRsp;
1405 } snp_msg_t;
1406 
1407 /*** SNP EVENTS ***/
1408 
1418 PACKED_TYPEDEF_STRUCT
1419 {
1420  uint16_t connHandle;
1421  uint16_t connInterval;
1422  uint16_t slaveLatency;
1424  uint8_t addressType;
1425  uint8_t pAddr[6];
1426 } snpConnEstEvt_t;
1427 
1437 PACKED_TYPEDEF_STRUCT
1438 {
1439  uint16_t connHandle;
1440  uint8_t reason;
1442 
1452 PACKED_TYPEDEF_STRUCT
1453 {
1454  uint16_t connHandle;
1455  uint16_t connInterval;
1456  uint16_t slaveLatency;
1459 
1469 PACKED_TYPEDEF_STRUCT
1470 {
1471  uint8_t status;
1473 
1483 PACKED_TYPEDEF_STRUCT
1484 {
1485  uint8_t state;
1486  uint8_t status;
1488 
1498 PACKED_TYPEDEF_STRUCT
1499 {
1500  uint16_t opcode;
1501  uint8_t status;
1502 } snpErrorEvt_t;
1503 
1513 PACKED_TYPEDEF_STRUCT
1514 {
1515  uint16_t connHandle;
1516  uint16_t attMtuSize;
1518 
1528 PACKED_TYPEDEF_STRUCT
1529 {
1530  uint8_t display;
1531  uint8_t input;
1532  uint32_t numCmp;
1534 
1539 typedef union
1540 {
1549 } snpEventParam_t;
1550 
1558 PACKED_TYPEDEF_STRUCT
1559 {
1560  uint16_t event;
1562 } snpEvt_t;
1563 
1573 typedef struct
1574 {
1575  uint16_t intervalMin;
1576  uint16_t intervalMax;
1577  uint16_t latency;
1578  uint16_t timeout;
1580 
1583 /*********************************************************************
1584  * MACROS
1585  */
1586 
1591 #define SNP_CMD1_HDR_MASK 0xC0
1593 
1595 #define SNP_CMD1_HDR_POS 0x6
1596 
1598 #define SNP_GET_OPCODE_HDR_CMD1(cmd) (((cmd) & SNP_CMD1_HDR_MASK) >> SNP_CMD1_HDR_POS)
1599 
1601 #define SNP_CMD1_ID_MASK 0x3F
1602 
1604 #define SNP_GET_OPCODE_ID_CMD1(cmd) ((cmd) & SNP_CMD1_ID_MASK)
1605 
1608 /*********************************************************************
1609 *********************************************************************/
1610 
1611 #ifdef __cplusplus
1612 }
1613 #endif
1614 
1615 #endif /* SNP_H */
1616 
Parameter Structure for the ATT MTU size updated Event data.
Definition: snp.h:1513
uint16_t offset
2 Byte Offset of the characteristic to start writing to
Definition: snp.h:1090
uint8_t addressType
1 Byte Type of initiator address
Definition: snp.h:1424
Parameter Structure for the Error Event SNP_ERROR_EVT.
Definition: snp.h:1498
uint8_t perms
1 Byte Permissions of the attribute, see GATT Attribute Access Permissions Bit Fields, force to Read only
Definition: snp.h:955
uint16_t intervalMax
2 Byte
Definition: snp.h:1576
uint8_t status
1 Byte Status of the request list of status generated by the SNP.
Definition: snp.h:1501
Parameter Structure for SNP_updateConnParam.
Definition: snp.h:711
uint8_t perms
1 Byte Permissions of the attribute, see GATT Attribute Access Permissions Bit Fields, force to Read only
Definition: snp.h:973
Parameter Structure for the Security Event.
Definition: snp.h:1483
Parameter Structure for SNP_CHAR_READ_IND / @ ref SNP_charRead.
Definition: snp.h:1051
snpEventParam_t * pEvtParams
snpEventParam_t
Definition: snp.h:1561
snpGetRevisionRsp_t revisionRsp
Get revision Response.
Definition: snp.h:1338
uint16_t connInterval
2 Byte
Definition: snp.h:1455
Parameter Structure for the Characteristic Configuration Update Indication.
Definition: snp.h:1307
uint8_t * pData
Pointer to.
Definition: snp.h:1131
uint8_t status
1 Byte Command Status (SUCCESS or Error, list of status generated by the SNP.)
Definition: snp.h:1204
snpSetGattParamRsp_t setGattParamRsp
Set GATT parameter response.
Definition: snp.h:1398
snpAddCharDescDeclRsp_t addCharDescDeclRsp
Add characteristic descriptor Response.
Definition: snp.h:1385
uint16_t timeout
2 Byte
Definition: snp.h:1578
struct snpCharWriteCnf_t snpNotifIndCnf_t
Parameter Structure for SNP_sendNotifcnf_rsp - Same Structure as snpCharWriteCnf_t.
snpGetGattParamReq_t getGattParamReq
Get GATT parameter response.
Definition: snp.h:1399
uint8_t initiatorAddrType
1 Byte Initiator Address Type, Reserved for Future Use
Definition: snp.h:668
Connection parameters for the peripheral device.
Definition: snp.h:1573
snpGetRandRsp_t randRsp
Get Random Number Response.
Definition: snp.h:1341
snpHciCmdRsp_t hciCmdRsp
HCI command response (event)
Definition: snp.h:1345
snpConnEstEvt_t connEstEvt
Parameter Structure snpConnEstEvt_t.
Definition: snp.h:1541
Parameter Structure for SNP_setGATTParam / SNP_SET_GATT_PARAM_RSP.
Definition: snp.h:1224
Parameter Structure for SNP_getGATTParam / SNP_GET_GATT_PARAM_REQ.
Definition: snp.h:1292
Parameter Structure for the Characteristic Write Request Indication data.
Definition: snp.h:1085
snpRegisterServiceRsp_t registerService
Register service Response.
Definition: snp.h:1386
snpUpdateConnParamReq_t updateConnParamsReq
Update connection parameters indication.
Definition: snp.h:1360
uint16_t startHandle
2 Byte First attribute handle of the registered service
Definition: snp.h:1040
uint16_t attrHandle
2 Byte Attribute handle of the characteristic value.
Definition: snp.h:1281
uint16_t charValMaxLen
Definition: snp.h:867
uint8_t behavior
1 Byte Behavior of Advertisement on connection event, Adv. behavior when connection are established o...
Definition: snp.h:670
snpAddAttrUserDesc_t * pUserDesc
Pointer to Parameter Structure, snpAddAttrUserDesc_t.
Definition: snp.h:1007
snpSetGapParamReq_t setGapParamReq
Set GAP parameter Request.
Definition: snp.h:1364
uint16_t maxLen
Definition: snp.h:974
Parameter Structure for SNP_UPDATE_CONN_PARAM_CNF.
Definition: snp.h:746
uint16_t opcode
2 Byte HCI opcode that was executed in the request, list of all HCI commands allowed by the SNP...
Definition: snp.h:592
Parameter Structure for SNP_setAuthenticationData / SNP_SET_AUTHENTICATION_DATA_REQ.
Definition: snp.h:818
uint8_t status
1 Byte Status of the request (SUCCESS or Error, list of status generated by the SNP.)
Definition: snp.h:1280
uint16_t connHandle
2 Byte Handle of the connection
Definition: snp.h:1454
uint16_t connInterval
2 Byte
Definition: snp.h:1421
snpAddCharValueDeclReq_t addCharValueDecReq
Add characteristic value Request.
Definition: snp.h:1382
uint16_t charValProps
2 Byte property of the value attribute, see GATT Characteristic Properties Bit Fields ...
Definition: snp.h:865
uint16_t attrHandle
2 Byte Handle of the characteristic value attribute being read
Definition: snp.h:1070
uint8_t useWhiteList
1 Byte White List Filter Policy, Advertisement Filter Policy Type
Definition: snp.h:1324
snpSetSecParamRsp_t setSecParamRsp
Set Security Requirements response.
Definition: snp.h:1371
snpAddAttrGenLongUUID_t * pLongUUID
Pointer to Parameter Structure, snpAddAttrGenLongUUID_t.
Definition: snp.h:1004
uint16_t connHandle
2 Byte Handle of the connection
Definition: snp.h:1069
uint16_t connHandle
2 Byte Handle of the connection
Definition: snp.h:1087
uint8_t perms
1 Byte permissions of the attribute, GATT Attribute Access Permissions Bit Fields ...
Definition: snp.h:906
struct snpSetGattParamRsp_t snpAddServiceRsp_t
1 Byte Command Status Response
uint8_t charValPerms
1 Byte permissions of the value attribute, see GATT Attribute Access Permissions Bit Fields ...
Definition: snp.h:864
snpSetGapParamRsp_t setGapParamRsp
Set GAP parameter Response.
Definition: snp.h:1365
Parameter Structure for the Connection Established Event.
Definition: snp.h:1418
snpSetGattParamReq_t setGattParamReq
Set GATT parameter request.
Definition: snp.h:1397
snpCharReadCnf_t readCnf
Characteristic read confirmation.
Definition: snp.h:1390
struct snpSetGattParamReq_t snpGetGattParamRsp_t
Parameter Structure for SNP_getGATTParam / SNP_GET_GATT_PARAM_RSP.
Parameter Structure for SNP_writeCharCnf / SNP_CHAR_WRITE_CNF.
Definition: snp.h:1114
uint8_t type
1 Byte Type of Advertisement, see Advertisement Type
Definition: snp.h:660
uint8_t * pData
Pointer of Data to write/retrieved.
Definition: snp.h:1230
snpGetGattParamRsp_t getGattParamRsp
Get GATT parameter request.
Definition: snp.h:1400
uint32_t rand
32-bit Random Number generated by TRNG
Definition: snp.h:624
Parameter Structure for the Connection terminated Event.
Definition: snp.h:1437
uint16_t connHandle
2 Byte Handle of the connection
Definition: snp.h:1053
uint16_t attrHandle
2 Byte Attribute handle of the characteristic value.
Definition: snp.h:1242
snpMaskEventRsp_t maskEventCnf
event mask confirmation.
Definition: snp.h:1335
snpTermConnReq_t connTermReq
Connection terminated Request.
Definition: snp.h:1359
uint16_t unit
2 Byte Unit, as described by BLE Spec, Vol 3, Part G, Chapter 3.3
Definition: snp.h:922
uint16_t paramId
2 Byte GAP Parameter ID, GAP Parameter IDs
Definition: snp.h:803
uint16_t connHandle
2 Byte Connection Handle to terminate
Definition: snp.h:700
uint8_t * pData
Definition: snp.h:593
struct snpSetGattParamRsp_t snpSetGapParamRsp_t
1 Byte Command Status Response
Parameter Structure for SNP_addDescriptionValue.
Definition: snp.h:1000
snpUpdateConnParamCnf_t updateConnParamsCnf
Update connection parameters, request.
Definition: snp.h:1361
snpNotifIndCnf_t notifIndCnf
Indication Confirmation.
Definition: snp.h:1394
uint8_t state
1 Byte New Security State Security States
Definition: snp.h:1485
Parameter Structure for the Advertising state change Event.
Definition: snp.h:1469
Parameter Structure used to add a generic attribute descriptor (long UUID)
Definition: snp.h:971
snpAdvStatusEvt_t advStatusEvt
Parameter Structure snpAdvStatusEvt_t.
Definition: snp.h:1544
Parameter Structure used to add a Format attribute.
Definition: snp.h:918
Parameter Structure to add new Characteristic Description Response SNP_ADD_CHAR_DESC_DECL_RSP.
Definition: snp.h:1020
Parameter Structure for MITM Authentication data to be displayed.
Definition: snp.h:1528
uint16_t value
2 Byte Value to write to the CCCD
Definition: snp.h:1312
SNP Event Parameters.
Definition: snp.h:1539
uint8_t exponent
1 Byte Exponent, as described by BLE Spec, Vol 3, Part G, Chapter 3.3
Definition: snp.h:921
uint8_t paramID
1 Byte ID of the parameter to retrieved.
Definition: snp.h:1295
uint8_t header
1 Byte Header Field, SNP GATT Descriptors Header
Definition: snp.h:1002
uint16_t memMax
2 Byte maximum HEAP ever allocated since startup
Definition: snp.h:559
uint8_t input
1 Byte TRUE if device must input passcode.
Definition: snp.h:1531
struct snpSetGattParamRsp_t snpSetWhiteListRsp_t
1 Byte Command Status Response
uint8_t authenticate
1 Byte Reserved for future use
Definition: snp.h:1129
snpAuthenticationEvt_t authenticationEvt
Parameter Structure snpAuthenticationEvt_t.
Definition: snp.h:1548
uint16_t connHandle
2 Byte Handle of the connection
Definition: snp.h:1420
uint8_t type
1 Byte Type of the service to add. see Service Type
Definition: snp.h:834
snpStartAdvReq_t startAdv
Start advertising request.
Definition: snp.h:1354
uint8_t rspNeeded
1 Byte Indicate if the AP must answer this indication or not, Options for Response Needed Field ...
Definition: snp.h:1311
uint16_t maxLen
Definition: snp.h:956
Parameter Structure for the response to SNP_getRev.
Definition: snp.h:622
uint16_t offset
2 Byte Offset of the characteristic to start reading from
Definition: snp.h:1071
uint8_t option
1 Byte Type of disconnection requested. see GAP GATT Terminate connection request option field...
Definition: snp.h:701
snpUpdateConnParamEvt_t updateConnParamEvt
Parameter Structure snpUpdateConnParamEvt_t.
Definition: snp.h:1543
Parameter Structure for SNP_registerService / SNP_REGISTER_SERVICE_RSP.
Definition: snp.h:1037
uint16_t cccdHandle
2 Byte Handle of the characteristic value attribute to notify/indicate
Definition: snp.h:1310
snpCharCfgUpdatedInd_t charCfgUpdatedReq
Characteristic configuration updated indication.
Definition: snp.h:1403
snpAddAttrGenShortUUID_t * pShortUUID
Pointer to Parameter Structure, snpAddAttrGenShortUUID_t.
Definition: snp.h:1003
snpHciCmdReq_t hciCmdReq
HCI command request.
Definition: snp.h:1344
Parameter Structure for the Update Connection Parameter Event.
Definition: snp.h:1452
uint16_t maxLen
2 Byte Maximum possible length of the string, plus one byte for null terminator (range from 1 to 512)...
Definition: snp.h:939
uint16_t intervalMin
2 Byte
Definition: snp.h:1575
Parameter Structure for SNP_CHAR_READ_CNF / snpCharReadCnf_t.
Definition: snp.h:1066
snpCharWriteInd_t charWriteInd
Characteristic write request.
Definition: snp.h:1391
uint8_t gapRoleStatus
1 Byte Current state of the GAP Role ( gaprole_States_t)
Definition: snp.h:634
struct snpSetGapParamReq_t snpGetGapParamReq_t
Parameter Structure for SNP_getGapParam / SNP_GET_GAP_PARAM_REQ - Same Structure as snpSetGapParamReq...
uint16_t attMtuSize
2 Byte New ATT MTU Size negotiated between GATT client and GATT server.
Definition: snp.h:1516
snpCharWriteCnf_t charWriteCnf
Characteristic write confirmation.
Definition: snp.h:1392
struct snpCharWriteCnf_t snpCharCfgUpdatedRsp_t
Parameter Structure for SNP_processCharConfigUpdatedCnf / SNP_CCCD_UPDATED_CNF - Same Structure as sn...
uint8_t display
1 Byte TRUE if device must display passcode.
Definition: snp.h:1530
uint16_t slaveLatency
2 Byte
Definition: snp.h:1422
uint8_t status
1 Byte Status list of status generated by the SNP.
Definition: snp.h:1471
snpErrorEvt_t advErrorEvt
Parameter Structure snpErrorEvt_t.
Definition: snp.h:1546
uint8_t status
1 Byte Status of the request (SUCCESS or Error, list of status generated by the SNP.)
Definition: snp.h:802
snpAddCharValueDeclRsp_t addCharValueDecRsp
Add characteristic value Response.
Definition: snp.h:1383
uint8_t status
status of the request (SUCCESS or Error, list of status generated by the SNP.)
Definition: snp.h:748
Parameter Structure used for SNP_addCharValueDecl / SNP_ADD_CHAR_VAL_DECL_REQ.
Definition: snp.h:862
1 Byte Command Status Response
Definition: snp.h:1202
snpTestCmdRsp_t testCmdRsp
Test command response.
Definition: snp.h:1351
uint16_t attrHandle
2 Byte Attribute handle of the characteristic value.
Definition: snp.h:1268
uint8_t status
1 Byte status of the request (SUCCESS or Error, list of status generated by the SNP.)
Definition: snp.h:610
struct snpSetGapParamReq_t snpSetSecParamReq_t
Parameter Structure for SNP_setSecurityParams / SNP_SET_SECURITY_PARAM_REQ - Same Structure as snpSet...
Parameter Structure used to add a Client Characteristic Configuration Description Attribute...
Definition: snp.h:904
uint16_t opcode
2 Byte SNP opcode that triggered the error
Definition: snp.h:1500
uint16_t value
2 Byte Parameter Value set if for SET command
Definition: snp.h:788
uint16_t connHandle
handle of the connection the parameter update was intended for
Definition: snp.h:749
uint8_t * pData
Pointer of data value to set.
Definition: snp.h:1243
snpAddAttrFormat_t * pFormat
Pointer to Parameter Structure, snpAddAttrFormat_t.
Definition: snp.h:1006
snpSetWhiteListReq_t setWhiteListReq
Set the White List Filter Policy request.
Definition: snp.h:1376
SNP_CMD1_HDR_TYPE
list of subgroup
Definition: snp.h:72
uint16_t timeout
2 Byte Timeout of the advertisement.
Definition: snp.h:661
uint16_t connHandle
2 Byte Handle of the connection
Definition: snp.h:1439
uint8_t serviceID
1 Byte ID of the service containing the parameter to define
Definition: snp.h:1294
Add Service Request Structure for SNP_addService / SNP_ADD_SERVICE_REQ.
Definition: snp.h:832
snpSecurityEvt_t securityEvt
Parameter Structure snpSecurityEvt_t.
Definition: snp.h:1547
Parameter Structure for SNP_maskEvt.
Definition: snp.h:528
uint16_t opcode
Definition: snp.h:572
snpSetAdvDataCnf_t setAdvDataCnf
Set advertising data Response.
Definition: snp.h:1356
uint16_t connHandle
2 Byte handle of the connection to update parameters to.
Definition: snp.h:713
Parameter Structure for SNP_setWhiteListFilterPolicy / SNP_SET_WHITE_LIST_POLICY_REQ.
Definition: snp.h:1322
Parameter Structure for SNP_MASK_EVENT_RSP.
Definition: snp.h:542
uint16_t memSize
2 Byte total HEAP size
Definition: snp.h:560
uint8_t rspNeeded
1 Byte Indicate if the AP must answer this indication or not, Options for Response Needed Field ...
Definition: snp.h:1089
uint16_t connHandle
2 Byte Handle of the connection
Definition: snp.h:1117
uint8_t status
1 Byte Status of the request (SUCCESS or Error, list of status generated by the SNP.)
Definition: snp.h:1255
uint16_t memAlo
2 Byte HEAP allocated memory
Definition: snp.h:558
struct snpSetGattParamRsp_t snpSetAuthDataRsp_t
1 Byte Command Status Response
uint16_t event
2 Byte Event, list of asynchronous events generated by the SNP.
Definition: snp.h:1560
Parameter Structure for Response to SNP_addCharValueDecl / SNP_ADD_CHAR_VAL_DECL_RSP.
Definition: snp.h:884
uint16_t attrHandle
2 Byte Handle of the characteristic value attribute being written
Definition: snp.h:1088
uint8_t mgmtOption
1 Byte Reserved for future use
Definition: snp.h:866
struct snpSetGattParamRsp_t snpSetSecParamRsp_t
1 Byte Command Status Response
uint16_t snpVer
2 Byte Version of the SNP (major, minor)
Definition: snp.h:611
uint8_t * pData
Pointer to the advertisement data buffer to update, up to 31 Bytes.
Definition: snp.h:686
uint32_t numCmp
32 bit Numeric Comparison value to display, 0 if not used.
Definition: snp.h:1532
uint8_t status
1 Byte Status of the request (SUCCESS or Error, list of status generated by the SNP.)
Definition: snp.h:1039
uint16_t maskedEvent
Definition: snp.h:544
Parameter Structure used to add a generic attribute descriptor (short UUID)
Definition: snp.h:953
uint8_t status
1 Byte Status upon entering this state list of status generated by the SNP.
Definition: snp.h:1486
Parameter Structure for the Characteristic Notification and Indication Request data This is a packed ...
Definition: snp.h:1125
uint8_t status
1 Byte status of the request (SUCCESS or Error, list of status generated by the SNP.)
Definition: snp.h:591
uint16_t value
2 Byte Parameter Value retrieved.
Definition: snp.h:804
snpGetGapParamRsp_t getGapParamRsp
Get GAP parameter Response.
Definition: snp.h:1367
snpSetAuthDataReq_t setAuthDataReq
Set Authentication Data request.
Definition: snp.h:1372
uint8_t type
1 Byte Type of Advertisement data to update, see Adv. data buffer
Definition: snp.h:685
uint16_t attrHandle
2 Byte Attribute handle of the characteristic value.
Definition: snp.h:1256
uint16_t attrHandle
2 Byte Handle of the characteristic value attribute to notify/indicate
Definition: snp.h:1128
uint8_t status
1 Byte Status of the request (SUCCESS or Error, list of status generated by the SNP.)
Definition: snp.h:1068
snpSetAuthDataRsp_t setAuthDataRsp
Set Authentication Data response.
Definition: snp.h:1373
uint16_t intervalMin
2 Byte Minimum value for the connection event interval.
Definition: snp.h:714
uint8_t serviceID
Definition: snp.h:1226
uint8_t reason
1 Byte Reason of the termination connection termination reason.
Definition: snp.h:1440
Parameter Structure for SNP_setGapParam / SNP_SET_GAP_PARAM_REQ.
Definition: snp.h:785
uint8_t * pData
Pointer to data of the value to set.
Definition: snp.h:1282
uint16_t latency
2 Byte
Definition: snp.h:1577
snpGetStatusCmdRsp_t getStatusRsp
Get status Response.
Definition: snp.h:1348
uint16_t offset
2 Byte Offset of the characteristic to start reading from
Definition: snp.h:1055
snpGetGapParamReq_t getGapParamReq
Get GAP parameter Request.
Definition: snp.h:1366
uint8_t perms
1 Byte Permissions of the attribute, GATT Attribute Access Permissions Bit Fields, force to Read only
Definition: snp.h:938
Connection Termination Request Structure.
Definition: snp.h:698
uint16_t supervisionTimeout
2 Byte
Definition: snp.h:1457
uint16_t connHandle
2 Byte Handle of the connection
Definition: snp.h:1127
snpSetAdvDataReq_t setAdvDataReq
Set advertising data Request.
Definition: snp.h:1355
uint16_t desc
< 1 Byte Namespace, as described by BLE Spec, Vol 3, Part G, Chapter 3.3
Definition: snp.h:923
uint8_t status
1 Byte Status of the request (SUCCESS or Error, list of status generated by the SNP.)
Definition: snp.h:1116
uint8_t header
Definition: snp.h:1023
SNP Event Structure.
Definition: snp.h:1558
Parameter Structure for the Get GAP Parameter Value Response.
Definition: snp.h:800
Parameter Structure for SNP_getAttrValue / SNP_SET_ATTR_VALUE_REQ.
Definition: snp.h:1266
uint8_t status
1 Byte Command Status list of status generated by the SNP.
Definition: snp.h:1022
uint16_t endHandle
2 Byte Last attribute handle of the registered service
Definition: snp.h:1041
snpAddServiceRsp_t addServiceRsp
Add service response.
Definition: snp.h:1381
Parameter Structure for response to SNP_setAttrValue / SNP_SET_ATTR_VALUE_RSP.
Definition: snp.h:1253
uint16_t connHandle
2 Byte Handle of the connection
Definition: snp.h:1309
snpAddAttrCccd_t * pCCCD
Pointer to Parameter Structure, snpAddAttrCccd_t.
Definition: snp.h:1005
The SNP message. A union of all SNP message types.
Definition: snp.h:1331
uint16_t attrHandle
2 Byte Handle of the characteristic value attribute being read
Definition: snp.h:1054
snpSetWhiteListRsp_t setWhiteListRsp
Set the White List Filter Policy response.
Definition: snp.h:1377
uint16_t maxSize
2 Byte Max Size of the data to read
Definition: snp.h:1056
uint8_t status
1 Byte status of the request (SUCCESS or Error, list of status generated by the SNP.)
Definition: snp.h:886
struct snpSetGattParamRsp_t snpSetAdvDataCnf_t
1 Byte Command Status Response
snpATTMTUSizeEvt_t attMTUSizeEvt
Parameter Structure snpATTMTUSizeEvt_t.
Definition: snp.h:1545
Parameter Structure for SNP_startAdv.
Definition: snp.h:658
Parameter Structure for SNP_getRev.
Definition: snp.h:608
uint16_t connHandle
2 Byte Handle of the connection
Definition: snp.h:1515
uint32_t authData
4 Byte Authentication Data. 000000 - 999999 or TRUE/FALSE
Definition: snp.h:820
snpAddServiceReq_t addServiceReq
Add service request.
Definition: snp.h:1380
uint8_t format
1 Byte Format, as described by BLE Spec, Vol 3, Part G, Chapter 3.3
Definition: snp.h:920
uint16_t attrHandle
2 Byte attribute handle of the characteristic value.
Definition: snp.h:887
uint8_t * pData
Definition: snp.h:1091
uint16_t paramId
2 Byte GAP Parameter ID, GAP Parameter IDs or snpSetSecParamReq_t
Definition: snp.h:787
snpAddCharDescDeclReq_t addCharDescDeclReq
Add characteristic descriptor Request.
Definition: snp.h:1384
Parameter Structure for response to SNP_getAttrValue / SNP_SET_ATTR_VALUE_RSP.
Definition: snp.h:1278
Parameter Structure for SNP_setAttrValue / SNP_SET_ATTR_VALUE_REQ.
Definition: snp.h:1240
Parameter Structure for SNP_HCI_CMD_RSP.
Definition: snp.h:589
uint8_t * pData
Definition: snp.h:1072
Parameter Structure for the response to SNP_getStatus This is a packed structure. see Dealing with Pa...
Definition: snp.h:632
snpMaskEventReq_t maskEventReq
event mask request.
Definition: snp.h:1334
Parameter Structure for SNP_setAdvData.
Definition: snp.h:683
snpCharCfgUpdatedRsp_t charcfgUpdatedRsp
Characteristic configuration update response.
Definition: snp.h:1404
snpConnTermEvt_t connTermEvt
Parameter Structure snpConnTermEvt_t.
Definition: snp.h:1542
uint16_t initLen
2 Byte initial length of the string, plus one byte for null terminator (must be <= snpAddAttrUserDesc...
Definition: snp.h:940
snpCharReadInd_t readInd
Characteristic read request.
Definition: snp.h:1389
uint8_t * pDesc
Pointer to initial string (must be null terminated)
Definition: snp.h:941
uint16_t eventMask
Definition: snp.h:530
uint8_t type
1 Byte Type of the request, see SNP indication type
Definition: snp.h:1130
Parameter Structure used to add a User Descriptor attribute.
Definition: snp.h:936
snpSetSecParamReq_t setSecParamReq
Set the Security Requirements request.
Definition: snp.h:1370
Parameter Structure for SNP_executeHCIcmd.
Definition: snp.h:570
snpNotifIndReq_t notifIndReq
Notification or indication request.
Definition: snp.h:1393
uint16_t supervisionTimeout
2 Byte
Definition: snp.h:1423
Parameter Structure for SNP_executeTestCmd.
Definition: snp.h:556
uint16_t slaveLatency
2 Byte
Definition: snp.h:1456
Copyright 2017, Texas Instruments Incorporated