TI BLE-Stack for Bluetooth API Documentation  3.03.01.00
hci.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 
455 #ifndef HCI_H
456 #define HCI_H
457 
458 #ifdef __cplusplus
459 extern "C"
460 {
461 #endif
462 
463 /*
464  * INCLUDES
465  */
466 #include "bcomdef.h"
467 #include "osal.h"
468 //#include "ll.h"
469 #include "ll_common.h"
470 #include "hal_assert.h"
471 
472 /*
473  * MACROS
474  */
475 
476 /*
477  * CONSTANTS
478  */
479 
488 #define HCI_SUCCESS 0x00
489 #define HCI_ERROR_CODE_UNKNOWN_HCI_CMD 0x01
490 #define HCI_ERROR_CODE_UNKNOWN_CONN_ID 0x02
491 #define HCI_ERROR_CODE_HW_FAILURE 0x03
492 #define HCI_ERROR_CODE_PAGE_TIMEOUT 0x04
493 #define HCI_ERROR_CODE_AUTH_FAILURE 0x05
494 #define HCI_ERROR_CODE_PIN_KEY_MISSING 0x06
495 #define HCI_ERROR_CODE_MEM_CAP_EXCEEDED 0x07
496 #define HCI_ERROR_CODE_CONN_TIMEOUT 0x08
497 #define HCI_ERROR_CODE_CONN_LIMIT_EXCEEDED 0x09
498 #define HCI_ERROR_CODE_SYNCH_CONN_LIMIT_EXCEEDED 0x0A
499 #define HCI_ERROR_CODE_ACL_CONN_ALREADY_EXISTS 0x0B
500 #define HCI_ERROR_CODE_CMD_DISALLOWED 0x0C
501 #define HCI_ERROR_CODE_CONN_REJ_LIMITED_RESOURCES 0x0D
502 #define HCI_ERROR_CODE_CONN_REJECTED_SECURITY_REASONS 0x0E
503 #define HCI_ERROR_CODE_CONN_REJECTED_UNACCEPTABLE_BDADDR 0x0F
504 #define HCI_ERROR_CODE_CONN_ACCEPT_TIMEOUT_EXCEEDED 0x10
505 #define HCI_ERROR_CODE_UNSUPPORTED_FEATURE_PARAM_VALUE 0x11
506 #define HCI_ERROR_CODE_INVALID_HCI_CMD_PARAMS 0x12
507 #define HCI_ERROR_CODE_REMOTE_USER_TERM_CONN 0x13
508 #define HCI_ERROR_CODE_REMOTE_DEVICE_TERM_CONN_LOW_RESOURCES 0x14
509 #define HCI_ERROR_CODE_REMOTE_DEVICE_TERM_CONN_POWER_OFF 0x15
510 #define HCI_ERROR_CODE_CONN_TERM_BY_LOCAL_HOST 0x16
511 #define HCI_ERROR_CODE_REPEATED_ATTEMPTS 0x17
512 #define HCI_ERROR_CODE_PAIRING_NOT_ALLOWED 0x18
513 #define HCI_ERROR_CODE_UNKNOWN_LMP_PDU 0x19
514 #define HCI_ERROR_CODE_UNSUPPORTED_REMOTE_FEATURE 0x1A
515 #define HCI_ERROR_CODE_SCO_OFFSET_REJ 0x1B
516 #define HCI_ERROR_CODE_SCO_INTERVAL_REJ 0x1C
517 #define HCI_ERROR_CODE_SCO_AIR_MODE_REJ 0x1D
518 #define HCI_ERROR_CODE_INVALID_LMP_PARAMS 0x1E
519 #define HCI_ERROR_CODE_UNSPECIFIED_ERROR 0x1F
520 #define HCI_ERROR_CODE_UNSUPPORTED_LMP_PARAM_VAL 0x20
521 #define HCI_ERROR_CODE_ROLE_CHANGE_NOT_ALLOWED 0x21
522 #define HCI_ERROR_CODE_LMP_LL_RESP_TIMEOUT 0x22
523 #define HCI_ERROR_CODE_LMP_ERR_TRANSACTION_COLLISION 0x23
524 #define HCI_ERROR_CODE_LMP_PDU_NOT_ALLOWED 0x24
525 #define HCI_ERROR_CODE_ENCRYPT_MODE_NOT_ACCEPTABLE 0x25
526 #define HCI_ERROR_CODE_LINK_KEY_CAN_NOT_BE_CHANGED 0x26
527 #define HCI_ERROR_CODE_REQ_QOS_NOT_SUPPORTED 0x27
528 #define HCI_ERROR_CODE_INSTANT_PASSED 0x28
529 #define HCI_ERROR_CODE_PAIRING_WITH_UNIT_KEY_NOT_SUPPORTED 0x29
530 #define HCI_ERROR_CODE_DIFFERENT_TRANSACTION_COLLISION 0x2A
531 #define HCI_ERROR_CODE_RESERVED1 0x2B
532 #define HCI_ERROR_CODE_QOS_UNACCEPTABLE_PARAM 0x2C
533 #define HCI_ERROR_CODE_QOS_REJ 0x2D
534 #define HCI_ERROR_CODE_CHAN_ASSESSMENT_NOT_SUPPORTED 0x2E
535 #define HCI_ERROR_CODE_INSUFFICIENT_SECURITY 0x2F
536 #define HCI_ERROR_CODE_PARAM_OUT_OF_MANDATORY_RANGE 0x30
537 #define HCI_ERROR_CODE_RESERVED2 0x31
538 #define HCI_ERROR_CODE_ROLE_SWITCH_PENDING 0x32
539 #define HCI_ERROR_CODE_RESERVED3 0x33
540 #define HCI_ERROR_CODE_RESERVED_SLOT_VIOLATION 0x34
541 #define HCI_ERROR_CODE_ROLE_SWITCH_FAILED 0x35
542 #define HCI_ERROR_CODE_EXTENDED_INQUIRY_RESP_TOO_LARGE 0x36
543 #define HCI_ERROR_CODE_SIMPLE_PAIRING_NOT_SUPPORTED_BY_HOST 0x37
544 #define HCI_ERROR_CODE_HOST_BUSY_PAIRING 0x38
545 #define HCI_ERROR_CODE_CONN_REJ_NO_SUITABLE_CHAN_FOUND 0x39
546 #define HCI_ERROR_CODE_CONTROLLER_BUSY 0x3A
547 #define HCI_ERROR_CODE_UNACCEPTABLE_CONN_PARAMETERS 0x3B
548 #define HCI_ERROR_CODE_DIRECTED_ADV_TIMEOUT 0x3C
549 #define HCI_ERROR_CODE_CONN_TERM_MIC_FAILURE 0x3D
550 #define HCI_ERROR_CODE_CONN_FAILED_TO_ESTABLISH 0x3E
551 #define HCI_ERROR_CODE_MAC_CONN_FAILED 0x3F
552 #define HCI_ERROR_CODE_COARSE_CLOCK_ADJUST_REJECTED 0x40
553 
559 #define HCI_MAX_NUM_CMD_BUFFERS LL_MAX_NUM_CMD_BUFFERS
560 #if defined(CC2540) || defined(CC2541) || defined(CC2541S)
561 #define HCI_MAX_NUM_DATA_BUFFERS LL_MAX_NUM_DATA_BUFFERS //<! Max Num Data Buffers
562 #endif // CC2540 | CC2541 | CC2541S
563 
564 // Send Data Packet Boundary Flags
565 #define FIRST_PKT_HOST_TO_CTRL LL_DATA_FIRST_PKT_HOST_TO_CTRL
566 #define CONTINUING_PKT LL_DATA_CONTINUATION_PKT
567 #define FIRST_PKT_CTRL_TO_HOST LL_DATA_FIRST_PKT_CTRL_TO_HOST
568 
569 
571 #define HCI_RSSI_NOT_AVAILABLE LL_RSSI_NOT_AVAILABLE
572 
576 #define HCI_DISCONNECT_AUTH_FAILURE HCI_ERROR_CODE_AUTH_FAILURE
577 #define HCI_DISCONNECT_REMOTE_USER_TERM HCI_ERROR_CODE_REMOTE_USER_TERM_CONN
578 #define HCI_DISCONNECT_REMOTE_DEV_LOW_RESOURCES HCI_ERROR_CODE_REMOTE_DEVICE_TERM_CONN_LOW_RESOURCES
579 #define HCI_DISCONNECT_REMOTE_DEV_POWER_OFF HCI_ERROR_CODE_REMOTE_DEVICE_TERM_CONN_POWER_OFF
580 #define HCI_DISCONNECT_UNSUPPORTED_REMOTE_FEATURE HCI_ERROR_CODE_UNSUPPORTED_REMOTE_FEATURE
581 #define HCI_DISCONNECT_KEY_PAIRING_NOT_SUPPORTED HCI_ERROR_CODE_PAIRING_WITH_UNIT_KEY_NOT_SUPPORTED
582 #define HCI_DISCONNECT_UNACCEPTABLE_CONN_INTERVAL HCI_ERROR_CODE_UNACCEPTABLE_CONN_INTERVAL
583 
588 // Tx Power Types
589 #define HCI_READ_CURRENT_TX_POWER_LEVEL LL_READ_CURRENT_TX_POWER_LEVEL
590 #define HCI_READ_MAX_TX_POWER_LEVEL LL_READ_MAX_TX_POWER_LEVEL
591 
596 #define HCI_CTRL_TO_HOST_FLOW_CTRL_OFF 0
597 #define HCI_CTRL_TO_HOST_FLOW_CTRL_ACL_ON_SYNCH_OFF 1
598 #define HCI_CTRL_TO_HOST_FLOW_CTRL_ACL_OFF_SYNCH_ON 2
599 #define HCI_CTRL_TO_HOST_FLOW_CTRL_ACL_ON_SYNCH_ON 3
600 
605 #define HCI_PUBLIC_DEVICE_ADDRESS LL_DEV_ADDR_TYPE_PUBLIC
606 #define HCI_RANDOM_DEVICE_ADDRESS LL_DEV_ADDR_TYPE_RANDOM
607 
612 #define HCI_CONNECTABLE_UNDIRECTED_ADV LL_ADV_CONNECTABLE_UNDIRECTED_EVT
613 #define HCI_CONNECTABLE_DIRECTED_HDC_ADV LL_ADV_CONNECTABLE_DIRECTED_HDC_EVT
614 #define HCI_SCANNABLE_UNDIRECTED LL_ADV_SCANNABLE_UNDIRECTED_EVT
615 #define HCI_NONCONNECTABLE_UNDIRECTED_ADV LL_ADV_NONCONNECTABLE_UNDIRECTED_EVT
616 #define HCI_CONNECTABLE_DIRECTED_LDC_ADV LL_ADV_CONNECTABLE_DIRECTED_LDC_EVT
617 
622 #define HCI_ADV_CHAN_37 LL_ADV_CHAN_37
623 #define HCI_ADV_CHAN_38 LL_ADV_CHAN_38
624 #define HCI_ADV_CHAN_39 LL_ADV_CHAN_39
625 #define HCI_ADV_CHAN_ALL (LL_ADV_CHAN_37 | LL_ADV_CHAN_38 | LL_ADV_CHAN_39)
626 
631 #define HCI_ADV_WL_POLICY_ANY_REQ LL_ADV_WL_POLICY_ANY_REQ
632 #define HCI_ADV_WL_POLICY_WL_SCAN_REQ LL_ADV_WL_POLICY_WL_SCAN_REQ
633 #define HCI_ADV_WL_POLICY_WL_CONNECT_REQ LL_ADV_WL_POLICY_WL_CONNECT_REQ
634 #define HCI_ADV_WL_POLICY_WL_ALL_REQ LL_ADV_WL_POLICY_WL_ALL_REQ
635 
640 #define HCI_ENABLE_ADV LL_ADV_MODE_ON
641 #define HCI_DISABLE_ADV LL_ADV_MODE_OFF
642 
647 #define HCI_SCAN_PASSIVE LL_SCAN_PASSIVE
648 #define HCI_SCAN_ACTIVE LL_SCAN_ACTIVE
649 
654 // Scan White List Policy
655 #define HCI_SCAN_WL_POLICY_ANY_ADV_PKTS LL_SCAN_WL_POLICY_ANY_ADV_PKTS
656 #define HCI_SCAN_WL_POLICY_USE_WHITE_LIST LL_SCAN_WL_POLICY_USE_WHITE_LIST
657 
662 // Scan Filtering
663 #define HCI_FILTER_REPORTS_DISABLE LL_FILTER_REPORTS_DISABLE
664 #define HCI_FILTER_REPORTS_ENABLE LL_FILTER_REPORTS_ENABLE
665 
670 // Scan Commands
671 #define HCI_SCAN_STOP LL_SCAN_STOP
672 #define HCI_SCAN_START LL_SCAN_START
673 
678 #define HCI_INIT_WL_POLICY_USE_PEER_ADDR LL_INIT_WL_POLICY_USE_PEER_ADDR
679 #define HCI_INIT_WL_POLICY_USE_WHITE_LIST LL_INIT_WL_POLICY_USE_WHITE_LIST
680 
685 #define HCI_ENCRYPTION_OFF LL_ENCRYPTION_OFF
686 #define HCI_ENCRYPTION_ON LL_ENCRYPTION_ON
687 
692 #define HCI_DIRECT_TEST_PAYLOAD_PRBS9 LL_DIRECT_TEST_PAYLOAD_PRBS9
693 #define HCI_DIRECT_TEST_PAYLOAD_0x0F LL_DIRECT_TEST_PAYLOAD_0x0F
694 #define HCI_DIRECT_TEST_PAYLOAD_0x55 LL_DIRECT_TEST_PAYLOAD_0x55
695 #define HCI_DIRECT_TEST_PAYLOAD_PRBS15 LL_DIRECT_TEST_PAYLOAD_PRBS15
696 #define HCI_DIRECT_TEST_PAYLOAD_0xFF LL_DIRECT_TEST_PAYLOAD_0xFF
697 #define HCI_DIRECT_TEST_PAYLOAD_0x00 LL_DIRECT_TEST_PAYLOAD_0x00
698 #define HCI_DIRECT_TEST_PAYLOAD_0xF0 LL_DIRECT_TEST_PAYLOAD_0xF0
699 #define HCI_DIRECT_TEST_PAYLOAD_0xAA LL_DIRECT_TEST_PAYLOAD_0xAA
700 
705 #define HCI_DTM_STANDARD_MODULATION_INDEX LL_DTM_STANDARD_MODULATION_INDEX
706 #define HCI_DTM_STABLE_MODULATION_INDEX LL_DTM_STABLE_MODULATION_INDEX
707 
712 #define HCI_DISABLE_ADDR_RESOLUTION LL_DISABLE_ADDR_RESOLUTION
713 #define HCI_ENABLE_ADDR_RESOLUTION LL_ENABLE_ADDR_RESOLUTION
714 
719 #define HCI_PHY_USE_PHY_PARAM LL_PHY_USE_PHY_PARAM
720 #define HCI_PHY_USE_ANY_PHY LL_PHY_USE_ANY_PHY
721 
726 #define HCI_PHY_1_MBPS LL_PHY_1_MBPS
727 #define HCI_PHY_2_MBPS LL_PHY_2_MBPS
728 
733 #define HCI_EXT_RX_GAIN_STD LL_EXT_RX_GAIN_STD
734 #define HCI_EXT_RX_GAIN_HIGH LL_EXT_RX_GAIN_HIGH
735 
740 #if defined( CC26XX ) || defined( CC13XX )
741 #define HCI_EXT_TX_POWER_MINUS_21_DBM LL_EXT_TX_POWER_MINUS_21_DBM
742 #define HCI_EXT_TX_POWER_MINUS_18_DBM LL_EXT_TX_POWER_MINUS_18_DBM
743 #define HCI_EXT_TX_POWER_MINUS_15_DBM LL_EXT_TX_POWER_MINUS_15_DBM
744 #define HCI_EXT_TX_POWER_MINUS_12_DBM LL_EXT_TX_POWER_MINUS_12_DBM
745 #define HCI_EXT_TX_POWER_MINUS_9_DBM LL_EXT_TX_POWER_MINUS_9_DBM
746 #define HCI_EXT_TX_POWER_MINUS_6_DBM LL_EXT_TX_POWER_MINUS_6_DBM
747 #define HCI_EXT_TX_POWER_MINUS_3_DBM LL_EXT_TX_POWER_MINUS_3_DBM
748 #define HCI_EXT_TX_POWER_0_DBM LL_EXT_TX_POWER_0_DBM
749 #define HCI_EXT_TX_POWER_1_DBM LL_EXT_TX_POWER_1_DBM
750 #define HCI_EXT_TX_POWER_2_DBM LL_EXT_TX_POWER_2_DBM
751 #define HCI_EXT_TX_POWER_3_DBM LL_EXT_TX_POWER_3_DBM
752 #define HCI_EXT_TX_POWER_4_DBM LL_EXT_TX_POWER_4_DBM
753 #define HCI_EXT_TX_POWER_5_DBM LL_EXT_TX_POWER_5_DBM
754 #else // CC254x
755 #define HCI_EXT_TX_POWER_MINUS_23_DBM LL_EXT_TX_POWER_MINUS_23_DBM
756 #define HCI_EXT_TX_POWER_MINUS_6_DBM LL_EXT_TX_POWER_MINUS_6_DBM
757 #define HCI_EXT_TX_POWER_0_DBM LL_EXT_TX_POWER_0_DBM
758 #define HCI_EXT_TX_POWER_4_DBM LL_EXT_TX_POWER_4_DBM
759 #endif // CC26XX/CC13XX
760 
765 #define HCI_EXT_ENABLE_ONE_PKT_PER_EVT LL_EXT_ENABLE_ONE_PKT_PER_EVT
766 #define HCI_EXT_DISABLE_ONE_PKT_PER_EVT LL_EXT_DISABLE_ONE_PKT_PER_EVT
767 
769 
771 
774 #define HCI_EXT_ENABLE_CLK_DIVIDE_ON_HALT LL_EXT_ENABLE_CLK_DIVIDE_ON_HALT
775 #define HCI_EXT_DISABLE_CLK_DIVIDE_ON_HALT LL_EXT_DISABLE_CLK_DIVIDE_ON_HALT
776 
778 
780 
783 #define HCI_EXT_NV_IN_USE LL_EXT_NV_IN_USE
784 #define HCI_EXT_NV_NOT_IN_USE LL_EXT_NV_NOT_IN_USE
785 
790 #define HCI_EXT_ENABLE_FAST_TX_RESP_TIME LL_EXT_ENABLE_FAST_TX_RESP_TIME
791 #define HCI_EXT_DISABLE_FAST_TX_RESP_TIME LL_EXT_DISABLE_FAST_TX_RESP_TIME
792 
797 #define HCI_EXT_ENABLE_SL_OVERRIDE LL_EXT_ENABLE_SL_OVERRIDE
798 #define HCI_EXT_DISABLE_SL_OVERRIDE LL_EXT_DISABLE_SL_OVERRIDE
799 
804 #define HCI_EXT_TX_MODULATED_CARRIER LL_EXT_TX_MODULATED_CARRIER
805 #define HCI_EXT_TX_UNMODULATED_CARRIER LL_EXT_TX_UNMODULATED_CARRIER
806 
811 #define HCI_PTM_SET_FREQ_TUNE_DOWN LL_EXT_SET_FREQ_TUNE_DOWN
812 #define HCI_PTM_SET_FREQ_TUNE_UP LL_EXT_SET_FREQ_TUNE_UP
813 
815 
817 
820 #define HCI_EXT_PM_IO_PORT_P0 LL_EXT_PM_IO_PORT_P0
821 #define HCI_EXT_PM_IO_PORT_P1 LL_EXT_PM_IO_PORT_P1
822 #define HCI_EXT_PM_IO_PORT_P2 LL_EXT_PM_IO_PORT_P2
823 #define HCI_EXT_PM_IO_PORT_NONE LL_EXT_PM_IO_PORT_NONE
824 
825 #define HCI_EXT_PM_IO_PORT_PIN0 LL_EXT_PM_IO_PORT_PIN0
826 #define HCI_EXT_PM_IO_PORT_PIN1 LL_EXT_PM_IO_PORT_PIN1
827 #define HCI_EXT_PM_IO_PORT_PIN2 LL_EXT_PM_IO_PORT_PIN2
828 #define HCI_EXT_PM_IO_PORT_PIN3 LL_EXT_PM_IO_PORT_PIN3
829 #define HCI_EXT_PM_IO_PORT_PIN4 LL_EXT_PM_IO_PORT_PIN4
830 #define HCI_EXT_PM_IO_PORT_PIN5 LL_EXT_PM_IO_PORT_PIN5
831 #define HCI_EXT_PM_IO_PORT_PIN6 LL_EXT_PM_IO_PORT_PIN6
832 #define HCI_EXT_PM_IO_PORT_PIN7 LL_EXT_PM_IO_PORT_PIN7
833 
835 
840 #define HCI_EXT_PER_RESET LL_EXT_PER_RESET
841 #define HCI_EXT_PER_READ LL_EXT_PER_READ
842 
844 
846 
849 #define HCI_EXT_HALT_DURING_RF_DISABLE LL_EXT_HALT_DURING_RF_DISABLE
850 #define HCI_EXT_HALT_DURING_RF_ENABLE LL_EXT_HALT_DURING_RF_ENABLE
851 
853 
855 
858 #define HCI_EXT_SET_USER_REVISION LL_EXT_SET_USER_REVISION
859 #define HCI_EXT_READ_BUILD_REVISION LL_EXT_READ_BUILD_REVISION
860 
865 #define HCI_EXT_RESET_SYSTEM_HARD LL_EXT_RESET_SYSTEM_HARD
866 #define HCI_EXT_RESET_SYSTEM_SOFT LL_EXT_RESET_SYSTEM_SOFT
867 
869 
871 
874 #define HCI_EXT_DISABLE_OVERLAPPED_PROCESSING LL_EXT_DISABLE_OVERLAPPED_PROCESSING
875 #define HCI_EXT_ENABLE_OVERLAPPED_PROCESSING LL_EXT_ENABLE_OVERLAPPED_PROCESSING
876 
878 
880 
883 #define HCI_EXT_DISABLE_NUM_COMPL_PKTS_ON_EVENT LL_EXT_DISABLE_NUM_COMPL_PKTS_ON_EVENT
884 #define HCI_EXT_ENABLE_NUM_COMPL_PKTS_ON_EVENT LL_EXT_ENABLE_NUM_COMPL_PKTS_ON_EVENT
885 
890 #define HCI_EXT_DISABLE_SCAN_REQUEST_REPORT LL_EXT_DISABLE_SCAN_REQUEST_REPORT
891 #define HCI_EXT_ENABLE_SCAN_REQUEST_REPORT LL_EXT_ENABLE_SCAN_REQUEST_REPORT
892 
899 // HCI Link Type for Buffer Overflow
900 #define HCI_LINK_TYPE_SCO_BUFFER_OVERFLOW 0
901 #define HCI_LINK_TYPE_ACL_BUFFER_OVERFLOW 1
902 
906 /*
907  * TYPEDEFS
908  */
909 
911 typedef uint8 hciStatus_t;
913 
918 typedef struct
920 {
922  uint8 BLEEventCode;
923  uint8 status;
925  uint8 role;
926  uint8 peerAddrType;
927  uint8 peerAddr[B_ADDR_LEN];
928  uint16 connInterval;
929  uint16 connLatency;
930  uint16 connTimeout;
933 
935 typedef struct
936 {
938  uint8 BLEEventCode;
939  uint8 status;
941  uint8 role;
942  uint8 peerAddrType;
943  uint8 peerAddr[B_ADDR_LEN];
944  uint16 connInterval;
945  uint16 connLatency;
946  uint16 connTimeout;
948  // Note: These fields normally follow peerAddr. Put here for Host optimization.
949  uint8 localRPA[B_ADDR_LEN];
950  uint8 peerRPA[B_ADDR_LEN];
952 
955 {
959 
961 typedef struct
962 {
963  uint8 eventType;
964  uint8 addrType;
965  uint8 addr[B_ADDR_LEN];
966  uint8 dataLen;
967  uint8 rspData[B_MAX_ADV_LEN];
968  int8 rssi;
970 
972 typedef struct
973 {
975  uint8 BLEEventCode;
976  uint8 numDevices;
979 
981 typedef struct
982 {
984  uint8 BLEEventCode;
985  uint8 eventType;
986  uint8 peerAddrType;
987  uint8 peerAddr[B_ADDR_LEN];
988  uint8 bleChan;
989  int8 rssi;
991 
993 typedef struct
994 {
996  uint8 BLEEventCode;
997  uint16 connHandle;
998  uint8 nextDataChan;
999  uint8 newChanMap[LL_NUM_BYTES_FOR_CHAN_MAP];
1001 
1003 typedef struct
1004 {
1007  uint8 status;
1009  uint16 connInterval;
1010  uint16 connLatency;
1011  uint16 connTimeout;
1013 
1015 typedef struct
1016 {
1019  uint8 status;
1021  uint8 features[8];
1023 
1025 typedef struct
1026 {
1029  uint16 connHandle;
1030  uint8 reason;
1031  uint8 encEnable;
1033 
1035 typedef struct
1036 {
1039  uint16 connHandle;
1040  uint8 random[B_RANDOM_NUM_SIZE];
1043 
1045 typedef struct
1046 {
1048  uint8 numHandles;
1052 
1054 typedef struct
1055 {
1058  uint16 cmdOpcode;
1059  uint8 *pReturnParam;
1061 
1063 typedef struct
1064 {
1066  uint8 length;
1067  uint16 cmdOpcode;
1068  uint8 *pEventParam;
1070 
1072 typedef struct
1073 {
1075  uint8 cmdStatus;
1077  uint16 cmdOpcode;
1079 
1081 typedef struct
1082 {
1086 
1088 typedef struct
1089 {
1091  uint8 status;
1092  uint16 connHandle;
1093  uint8 reason;
1095 
1097 typedef struct
1098 {
1100  uint8 linkType;
1102 
1104 typedef struct
1105 {
1107  uint16 connHandle;
1109 
1111 typedef struct
1112 {
1115  uint8 status;
1116  uint16 connHandle;
1117  uint16 Interval_Min;
1118  uint16 Interval_Max;
1119  uint16 Latency;
1120  uint16 Timeout;
1122 
1124 typedef struct
1125 {
1128  uint8 status;
1129  uint16 connHandle;
1130  uint8 txPhy;
1131  uint8 rxPhy;
1133 
1135 typedef struct
1136 {
1139  uint16 connHandle;
1140  uint16 maxTxOctets;
1141  uint16 maxTxTime;
1142  uint16 maxRxOctets;
1143  uint16 maxRxTime;
1145 
1147 typedef struct
1148 {
1151  uint8 status;
1152  uint8 p256Key[LL_SC_P256_KEY_LEN];
1154 
1156 typedef struct
1157 {
1160  uint8 status;
1161  uint8 dhKey[LL_SC_DHKEY_LEN];
1163 
1165 typedef struct
1166 {
1167  uint8 status;
1168  uint16 dataPktLen;
1169  uint8 numDataPkts;
1171 
1173 typedef struct
1174 {
1176  uint8 *pData;
1177 } hciPacket_t;
1178 
1180 typedef struct
1181 {
1183  uint8 pktType;
1184  uint16 connHandle;
1185  uint8 pbFlag;
1186  uint16 pktLen;
1187  uint8 *pData;
1188 } hciDataPacket_t;
1189 
1191 
1192 // OSAL HCI_DATA_EVENT message format. This message is used to forward incoming
1193 // data messages up to an application
1194 typedef struct
1195 {
1196  osal_event_hdr_t hdr;
1197  uint16 connHandle;
1198  uint8 pbFlag;
1199  uint16 len;
1200  uint8 *pData;
1201 } hciDataEvent_t;
1202 
1204 
1205 #if defined( CC26XX ) || defined( CC13XX )
1206 PACKED_TYPEDEF_STRUCT
1207 #else // CC254x
1208 typedef struct
1209 #endif // CC26XX/CC13XX
1210 {
1211  uint8 connId;
1212  uint8 role;
1213  uint8 addr[LL_DEVICE_ADDR_LEN];
1214  uint8 addrType;
1215 } hciConnInfo_t;
1216 
1217 #if defined( CC26XX ) || defined( CC13XX )
1218 PACKED_TYPEDEF_STRUCT
1219 #else // CC254x
1220 typedef struct
1221 #endif // CC26XX/CC13XX
1222 {
1223  uint32_t accessAddr;
1224  uint16_t connInterval;
1225  uint8_t hopValue;
1226  uint16_t mSCA;
1227  uint8_t nextChan;
1228  uint8_t chanMap[LL_NUM_BYTES_FOR_CHAN_MAP];
1229  uint8_t crcInit[LL_PKT_CRC_LEN];
1230 }hciActiveConnInfo_t;
1231 
1232 #if defined( CC26XX ) || defined( CC13XX )
1233 PACKED_TYPEDEF_STRUCT
1234 #else // CC254x
1235 typedef struct
1236 #endif // CC26XX/CC13XX
1237 {
1238  uint16 numPkts;
1239  uint16 numCrcErr;
1240  uint16 numEvents;
1241  uint16 numMMissedEvents;
1242 } hciPER_t;
1243 
1246 /*
1247  * LOCAL VARIABLES
1248  */
1249 
1250 /*
1251  * GLOBAL VARIABLES
1252  */
1253 
1255 
1267 extern void *HCI_bm_alloc( uint16 size );
1268 
1270 
1271 
1287 extern uint8 HCI_ValidConnTimeParams( uint16 connIntervalMin,
1288  uint16 connIntervalMax,
1289  uint16 connLatency,
1290  uint16 connTimeout );
1291 
1298 extern void HCI_TestAppTaskRegister( uint8 taskID );
1299 
1306 extern void HCI_GAPTaskRegister( uint8 taskID );
1307 
1313 extern void HCI_L2CAPTaskRegister( uint8 taskID );
1314 
1320 extern void HCI_SMPTaskRegister( uint8 taskID );
1321 
1327 extern void HCI_ExtTaskRegister( uint8 taskID );
1328 
1355 extern hciStatus_t HCI_SendDataPkt( uint16 connHandle,
1356  uint8 pbFlag,
1357  uint16 pktLen,
1358  uint8 *pData );
1359 
1375 extern hciStatus_t HCI_DisconnectCmd( uint16 connHandle,
1376  uint8 reason );
1377 
1378 
1396 extern hciStatus_t HCI_ReadRemoteVersionInfoCmd( uint16 connHandle );
1397 
1398 
1413 extern hciStatus_t HCI_SetEventMaskCmd( uint8 *pMask );
1414 
1415 
1430 extern hciStatus_t HCI_SetEventMaskPage2Cmd( uint8 *pMask );
1431 
1432 
1441 extern hciStatus_t HCI_ResetCmd( void );
1442 
1454 extern hciStatus_t HCI_ReadTransmitPowerLevelCmd( uint16 connHandle,
1455  uint8 txPwrType );
1456 
1458 
1475 extern hciStatus_t HCI_SetControllerToHostFlowCtrlCmd( uint8 flowControlEnable );
1476 
1477 
1478 
1501 extern hciStatus_t HCI_HostBufferSizeCmd( uint16 hostAclPktLen,
1502  uint8 hostSyncPktLen,
1503  uint16 hostTotalNumAclPkts,
1504  uint16 hostTotalNumSyncPkts );
1505 
1507 
1540 extern hciStatus_t HCI_HostNumCompletedPktCmd( uint8 numHandles,
1541  uint16 *connHandles,
1542  uint16 *numCompletedPkts );
1543 
1544 
1557 extern hciStatus_t HCI_ReadAuthPayloadTimeoutCmd( uint16 connHandle,
1558  uint16 *aptoValue );
1559 
1560 
1572 extern hciStatus_t HCI_WriteAuthPayloadTimeoutCmd( uint16 connHandle,
1573  uint16 aptoValue );
1574 
1575 
1584 extern hciStatus_t HCI_ReadLocalVersionInfoCmd( void );
1585 
1586 
1595 extern hciStatus_t HCI_ReadLocalSupportedCommandsCmd( void );
1596 
1597 
1606 extern hciStatus_t HCI_ReadLocalSupportedFeaturesCmd( void );
1607 
1608 
1617 extern hciStatus_t HCI_ReadBDADDRCmd( void );
1618 
1619 
1637 extern hciStatus_t HCI_ReadRssiCmd( uint16 connHandle );
1638 
1653 extern hciStatus_t HCI_LE_SetEventMaskCmd( uint8 *pEventMask );
1654 
1655 
1664 extern hciStatus_t HCI_LE_ReadBufSizeCmd( void );
1665 
1666 
1675 extern hciStatus_t HCI_LE_ReadLocalSupportedFeaturesCmd( void );
1676 
1677 
1689 extern hciStatus_t HCI_LE_SetRandomAddressCmd( uint8 *pRandAddr );
1690 
1691 
1710 extern hciStatus_t HCI_LE_SetAdvParamCmd( uint16 advIntervalMin,
1711  uint16 advIntervalMax,
1712  uint8 advType,
1713  uint8 ownAddrType,
1714  uint8 directAddrType,
1715  uint8 *directAddr,
1716  uint8 advChannelMap,
1717  uint8 advFilterPolicy );
1718 
1719 
1731 extern hciStatus_t HCI_LE_SetAdvDataCmd( uint8 dataLen,
1732  uint8 *pData );
1733 
1734 
1746 extern hciStatus_t HCI_LE_SetScanRspDataCmd( uint8 dataLen,
1747  uint8 *pData );
1748 
1749 
1760 extern hciStatus_t HCI_LE_SetAdvEnableCmd( uint8 advEnable );
1761 
1762 
1771 extern hciStatus_t HCI_LE_ReadAdvChanTxPowerCmd( void );
1772 
1773 
1792 extern hciStatus_t HCI_LE_SetScanParamCmd( uint8 scanType,
1793  uint16 scanInterval,
1794  uint16 scanWindow,
1795  uint8 ownAddrType,
1796  uint8 filterPolicy );
1797 
1798 
1811 extern hciStatus_t HCI_LE_SetScanEnableCmd( uint8 scanEnable,
1812  uint8 filterDuplicates );
1813 
1814 
1841 extern hciStatus_t HCI_LE_CreateConnCmd( uint16 scanInterval,
1842  uint16 scanWindow,
1843  uint8 initFilterPolicy,
1844  uint8 addrTypePeer,
1845  uint8 *peerAddr,
1846  uint8 ownAddrType,
1847  uint16 connIntervalMin,
1848  uint16 connIntervalMax,
1849  uint16 connLatency,
1850  uint16 connTimeout,
1851  uint16 minLen,
1852  uint16 maxLen );
1853 
1854 
1863 extern hciStatus_t HCI_LE_CreateConnCancelCmd( void );
1864 
1865 
1874 extern hciStatus_t HCI_LE_ReadWhiteListSizeCmd( void );
1875 
1876 
1885 extern hciStatus_t HCI_LE_ClearWhiteListCmd( void );
1886 
1887 
1899 extern hciStatus_t HCI_LE_AddWhiteListCmd( uint8 addrType,
1900  uint8 *devAddr );
1901 
1902 
1915 extern hciStatus_t HCI_LE_RemoveWhiteListCmd( uint8 addrType,
1916  uint8 *devAddr );
1917 
1918 
1936 extern hciStatus_t HCI_LE_ConnUpdateCmd( uint16 connHandle,
1937  uint16 connIntervalMin,
1938  uint16 connIntervalMax,
1939  uint16 connLatency,
1940  uint16 connTimeout,
1941  uint16 minLen,
1942  uint16 maxLen );
1943 
1944 
1955 extern hciStatus_t HCI_LE_SetHostChanClassificationCmd( uint8 *chanMap );
1956 
1957 
1968 extern hciStatus_t HCI_LE_ReadChannelMapCmd( uint16 connHandle );
1969 
1970 
1982 extern hciStatus_t HCI_LE_ReadRemoteUsedFeaturesCmd( uint16 connHandle );
1983 
1984 
2004 extern hciStatus_t HCI_LE_EncryptCmd( uint8 *key,
2005  uint8 *plainText );
2006 
2007 
2030 extern hciStatus_t HCI_LE_RandCmd( void );
2031 
2032 
2048 extern hciStatus_t HCI_LE_StartEncyptCmd( uint16 connHandle,
2049  uint8 *random,
2050  uint8 *encDiv,
2051  uint8 *ltk );
2052 
2053 
2065 extern hciStatus_t HCI_LE_LtkReqReplyCmd( uint16 connHandle,
2066  uint8 *ltk );
2067 
2068 
2079 extern hciStatus_t HCI_LE_LtkReqNegReplyCmd( uint16 connHandle );
2080 
2081 
2090 extern hciStatus_t HCI_LE_ReadSupportedStatesCmd( void );
2091 
2092 
2106 extern hciStatus_t HCI_LE_ReceiverTestCmd( uint8 rxChan );
2107 
2108 
2125 extern hciStatus_t HCI_LE_TransmitterTestCmd( uint8 txChan,
2126  uint8 dataLen,
2127  uint8 pktPayload );
2128 
2129 
2141 extern hciStatus_t HCI_LE_TestEndCmd( void );
2142 
2143 // V4.1
2144 
2166 extern hciStatus_t HCI_LE_RemoteConnParamReqReplyCmd( uint16 connHandle,
2167  uint16 connIntervalMin,
2168  uint16 connIntervalMax,
2169  uint16 connLatency,
2170  uint16 connTimeout,
2171  uint16 minLen,
2172  uint16 maxLen );
2173 
2174 
2191 extern hciStatus_t HCI_LE_RemoteConnParamReqNegReplyCmd( uint16 connHandle,
2192  uint8 reason );
2193 
2194 
2195 // V4.2 - Extended Data Length
2196 
2212 extern hciStatus_t HCI_LE_SetDataLenCmd( uint16 connHandle,
2213  uint16 txOctets,
2214  uint16 txTime );
2215 
2216 
2229 extern hciStatus_t HCI_LE_ReadSuggestedDefaultDataLenCmd( void );
2230 
2231 
2247 extern hciStatus_t HCI_LE_WriteSuggestedDefaultDataLenCmd( uint16 txOctets,
2248  uint16 txTime );
2249 
2250 
2262 extern hciStatus_t HCI_LE_ReadMaxDataLenCmd( void );
2263 
2264 
2265 // V4.2 - Privacy 1.2
2266 
2284 extern hciStatus_t HCI_LE_AddDeviceToResolvingListCmd( uint8 peerIdAddrType,
2285  uint8 *peerIdAddr,
2286  uint8 *peerIRK,
2287  uint8 *localIRK );
2288 
2289 
2305 extern hciStatus_t HCI_LE_RemoveDeviceFromResolvingListCmd( uint8 peerIdAddrType,
2306  uint8 *peerIdAddr );
2307 
2308 
2321 extern hciStatus_t HCI_LE_ClearResolvingListCmd( void );
2322 
2323 
2336 extern hciStatus_t HCI_LE_ReadResolvingListSizeCmd( void );
2337 
2338 
2357 extern hciStatus_t HCI_LE_ReadPeerResolvableAddressCmd( uint8 peerIdAddrType,
2358  uint8 *peerIdAddr );
2359 
2360 
2379 extern hciStatus_t HCI_LE_ReadLocalResolvableAddressCmd( uint8 localIdAddrType,
2380  uint8 *localIdAddr );
2381 
2382 
2398 extern hciStatus_t HCI_LE_SetAddressResolutionEnableCmd( uint8 addrResolutionEnable );
2399 
2400 
2419 extern hciStatus_t HCI_LE_SetResolvablePrivateAddressTimeoutCmd( uint16 rpaTimeout );
2420 
2421 
2422 // V4.2 - Secure Connections
2423 
2439 extern hciStatus_t HCI_LE_ReadLocalP256PublicKeyCmd( void );
2440 
2441 
2461 extern hciStatus_t HCI_LE_GenerateDHKeyCmd( uint8 *publicKey );
2462 
2464 
2465 // V5.0 - 2Mbps PHY
2466 
2477 extern hciStatus_t HCI_LE_ReadPhyCmd( uint16 connHandle );
2478 
2479 
2498 extern hciStatus_t HCI_LE_SetDefaultPhyCmd( uint8 allPhys,
2499  uint8 txPhy,
2500  uint8 rxPhy );
2501 
2502 
2519 extern hciStatus_t HCI_LE_SetPhyCmd( uint16 connHandle,
2520  uint8 allPhys,
2521  uint8 txPhy,
2522  uint8 rxPhy );
2523 
2524 
2541 extern hciStatus_t HCI_LE_EnhancedRxTestCmd( uint8 rxChan,
2542  uint8 rxPhy,
2543  uint8 modIndex );
2544 
2545 
2563 extern hciStatus_t HCI_LE_EnhancedTxTestCmd( uint8 txChan,
2564  uint8 payloadLen,
2565  uint8 payloadType,
2566  uint8 txPhy );
2567 
2569 
2570 /*
2571 ** HCI Vendor Specific Commands: Link Layer Extensions
2572 */
2573 
2586 extern hciStatus_t HCI_EXT_SetRxGainCmd( uint8 rxGain );
2587 
2588 
2604 extern hciStatus_t HCI_EXT_SetTxPowerCmd( uint8 txPower );
2605 
2606 
2617 extern hciStatus_t HCI_EXT_OnePktPerEvtCmd( uint8 control );
2618 
2619 
2621 
2639 extern hciStatus_t HCI_EXT_ClkDivOnHaltCmd( uint8 control );
2640 
2661 extern hciStatus_t HCI_EXT_DeclareNvUsageCmd( uint8 mode );
2662 
2664 
2678 extern hciStatus_t HCI_EXT_DecryptCmd( uint8 *key,
2679  uint8 *encText );
2680 
2681 
2705 extern hciStatus_t HCI_EXT_SetLocalSupportedFeaturesCmd( uint8 *localFeatures );
2706 
2707 
2734 extern hciStatus_t HCI_EXT_SetFastTxResponseTimeCmd( uint8 control );
2735 
2736 
2755 extern hciStatus_t HCI_EXT_SetSlaveLatencyOverrideCmd( uint8 control );
2756 
2757 
2780 extern hciStatus_t HCI_EXT_ModemTestTxCmd( uint8 cwMode,
2781  uint8 txChan );
2782 
2783 
2805 extern hciStatus_t HCI_EXT_ModemHopTestTxCmd( void );
2806 
2807 
2832 extern hciStatus_t HCI_EXT_ModemTestRxCmd( uint8 rxChan );
2833 
2834 
2846 extern hciStatus_t HCI_EXT_EndModemTestCmd( void );
2847 
2848 
2874 extern hciStatus_t HCI_EXT_SetBDADDRCmd( uint8 *bdAddr );
2875 
2876 
2899 extern hciStatus_t HCI_EXT_SetSCACmd( uint16 scaInPPM );
2900 
2901 
2915 extern hciStatus_t HCI_EXT_EnablePTMCmd( void );
2916 
2917 
2936 extern hciStatus_t HCI_EXT_SetFreqTuneCmd( uint8 step );
2937 
2938 
2952 extern hciStatus_t HCI_EXT_SaveFreqTuneCmd( void );
2953 
2954 
2974 extern hciStatus_t HCI_EXT_SetMaxDtmTxPowerCmd( uint8 txPower );
2975 
2977 
3017 extern hciStatus_t HCI_EXT_MapPmIoPortCmd( uint8 ioPort, uint8 ioPin );
3018 
3020 
3037 extern hciStatus_t HCI_EXT_DisconnectImmedCmd( uint16 connHandle );
3038 
3039 
3059 extern hciStatus_t HCI_EXT_PacketErrorRateCmd( uint16 connHandle, uint8 command );
3060 
3061 
3100 extern hciStatus_t HCI_EXT_PERbyChanCmd( uint16 connHandle, perByChan_t *perByChan );
3101 
3102 
3104 
3113 extern hciStatus_t HCI_EXT_ExtendRfRangeCmd( void );
3114 
3128 extern hciStatus_t HCI_EXT_HaltDuringRfCmd( uint8 mode );
3129 
3131 
3184 extern hciStatus_t HCI_EXT_AdvEventNoticeCmd( uint8 taskID, uint16 taskEvent );
3185 
3186 
3243 extern hciStatus_t HCI_EXT_ScanEventNoticeCmd( uint8 taskID, uint16 taskEvent );
3244 
3245 
3246 
3268 extern hciStatus_t HCI_EXT_BuildRevisionCmd( uint8 mode, uint16 userRevNum );
3269 
3271 
3298 extern hciStatus_t HCI_EXT_DelaySleepCmd( uint16 delay );
3299 
3301 
3319 extern hciStatus_t HCI_EXT_ResetSystemCmd( uint8 mode );
3320 
3321 // @cond NODOC
3322 
3333 extern hciStatus_t HCI_EXT_LLTestModeCmd( uint8 testCase );
3334 
3336 
3338 
3349 extern hciStatus_t HCI_EXT_OverlappedProcessingCmd( uint8 mode );
3350 
3352 
3373 extern hciStatus_t HCI_EXT_NumComplPktsLimitCmd( uint8 limit,
3374  uint8 flushOnEvt );
3375 
3376 
3412 extern hciStatus_t HCI_EXT_GetConnInfoCmd( uint8 *numAllocConns,
3413  uint8 *numActiveConns,
3414  hciConnInfo_t *activeConnInfo );
3415 
3437 extern hciStatus_t HCI_EXT_GetActiveConnInfoCmd( uint8 connId, hciActiveConnInfo_t *activeConnInfo );
3438 
3456 extern hciStatus_t HCI_EXT_SetMaxDataLenCmd( uint16 txOctets,
3457  uint16 txTime,
3458  uint16 rxOctets,
3459  uint16 rxTime );
3460 
3511 extern hciStatus_t HCI_EXT_ScanReqRptCmd( uint8 mode );
3512 
3513 
3514 #ifdef __cplusplus
3515 }
3516 #endif
3517 
3518 #endif /* HCI_H */
3519 
hciStatus_t HCI_EXT_PacketErrorRateCmd(uint16 connHandle, uint8 command)
Packet Error Rate Command.
osal_event_hdr_t hdr
osal event header
Definition: hci.h:1083
uint8 BLEEventCode
BLE Event Code.
Definition: hci.h:1006
uint8 status
status of event
Definition: hci.h:1019
This API allows the software components in the Z-Stack to be written independently of the specifics o...
uint8 eventType
scan request event type
Definition: hci.h:985
uint16 * pNumCompletedPackets
pointer to the number of completed packets array
Definition: hci.h:1050
hciStatus_t HCI_EXT_SetMaxDataLenCmd(uint16 txOctets, uint16 txTime, uint16 rxOctets, uint16 rxTime)
Set the maximum Rx and Tx Octets (in bytes) and Time (in us).
uint16 connHandle
connection handle
Definition: hci.h:1139
void HCI_TestAppTaskRegister(uint8 taskID)
HCI vendor specific registration for HCI Test Application.
uint8 status
status of event
Definition: hci.h:1007
uint8 status
status of event
Definition: hci.h:1128
uint8 addrType
public or random address type
Definition: hci.h:964
uint8 pktType
packet type
Definition: hci.h:1183
uint8 BLEEventCode
BLE Event Code.
Definition: hci.h:1028
uint8 clockAccuracy
connection clock accuracy
Definition: hci.h:947
uint16 Interval_Min
minimum connection interval
Definition: hci.h:1117
HCI Packet event.
Definition: hci.h:1173
osal_event_hdr_t hdr
osal event header
Definition: hci.h:1037
#define B_RANDOM_NUM_SIZE
BLE Random Number Size.
Definition: bcomdef.h:133
uint8 numHandles
number of handles
Definition: hci.h:1048
uint8 * pReturnParam
pointer to the return parameter
Definition: hci.h:1059
hciStatus_t HCI_LE_ReadRemoteUsedFeaturesCmd(uint16 connHandle)
Read the remote device&#39;s used features.
hciStatus_t HCI_LE_SetAddressResolutionEnableCmd(uint8 addrResolutionEnable)
Disable / Enable Address Resolution.
osal_event_hdr_t hdr
osal event header
Definition: hci.h:1027
uint16 dataPktLen
data packet length
Definition: hci.h:1168
uint8 BLEEventCode
BLE Event Code.
Definition: hci.h:996
Command Status Event.
Definition: hci.h:1072
uint16 connHandle
connection handle
Definition: hci.h:1129
osal_event_hdr_t hdr
osal event header
Definition: hci.h:1137
osal_event_hdr_t hdr
osal event header
Definition: hci.h:983
hciStatus_t HCI_LE_TestEndCmd(void)
End the Direct Test Mode test.
hciStatus_t HCI_LE_SetResolvablePrivateAddressTimeoutCmd(uint16 rpaTimeout)
Set Resolvable Private Address Timeout.
hciStatus_t HCI_EXT_AdvEventNoticeCmd(uint8 taskID, uint16 taskEvent)
Advertising Event Notice Command.
hciStatus_t HCI_EXT_SetMaxDtmTxPowerCmd(uint8 txPower)
Set the maximum transmit output power for DTM.
hciStatus_t HCI_LE_LtkReqNegReplyCmd(uint16 connHandle)
Send a negative LTK reply to the Controller.
Hardware Error Event.
Definition: hci.h:1081
hciStatus_t HCI_EXT_ModemTestTxCmd(uint8 cwMode, uint8 txChan)
Start Modem TX Test.
hciStatus_t HCI_LE_TransmitterTestCmd(uint8 txChan, uint8 dataLen, uint8 pktPayload)
This LE API is used to start the transmit Direct Test Mode test.
uint8 peerAddrType
peer address type
Definition: hci.h:942
uint8 status
status of event
Definition: hci.h:1091
hciStatus_t HCI_LE_RandCmd(void)
Generate a random number.
LE Advertising Report Event.
Definition: hci.h:961
#define B_MAX_ADV_LEN
BLE Maximum Advertising Packet Length.
Definition: bcomdef.h:130
uint8 nextDataChan
next channel
Definition: hci.h:998
hciStatus_t HCI_LE_ReadResolvingListSizeCmd(void)
Read Resolving List Size.
LE Data Length Change Event.
Definition: hci.h:1135
void HCI_SMPTaskRegister(uint8 taskID)
HCI vendor specific registration for Host SMP.
hciStatus_t HCI_SetEventMaskPage2Cmd(uint8 *pMask)
Set the HCI event mask page 2.
hciStatus_t HCI_LE_ReadLocalSupportedFeaturesCmd(void)
Read the LE locally supported features.
hciStatus_t HCI_LE_RemoteConnParamReqReplyCmd(uint16 connHandle, uint16 connIntervalMin, uint16 connIntervalMax, uint16 connLatency, uint16 connTimeout, uint16 minLen, uint16 maxLen)
Positively reply to the Conneciton Parameter Update Request.
hciStatus_t HCI_LE_ReadAdvChanTxPowerCmd(void)
Read transmit power when Advertising.
uint8 numDevices
number of discovered devices
Definition: hci.h:976
uint16 connectionHandle
connection handle
Definition: hci.h:924
uint16 connHandle
connection handle
Definition: hci.h:1184
uint8 BLEEventCode
BLE Event Code.
Definition: hci.h:1138
hciStatus_t HCI_EXT_EnablePTMCmd(void)
Enable Production Test Mode.
hciStatus_t HCI_LE_SetDataLenCmd(uint16 connHandle, uint16 txOctets, uint16 txTime)
Set Data Length.
osal_event_hdr_t hdr
osal event header
Definition: hci.h:1017
hciStatus_t HCI_EXT_ScanReqRptCmd(uint8 mode)
Enable/disable Scan Request Reports.
LE Phy Update Complete Event.
Definition: hci.h:1124
osal_event_hdr_t hdr
osal event header
Definition: hci.h:1106
osal_event_hdr_t hdr
osal event header
Definition: hci.h:1047
uint8 BLEEventCode
BLE Event Code.
Definition: hci.h:1114
uint8 BLEEventCode
BLE Event code.
Definition: hci.h:1150
osal_event_hdr_t hdr
osal event header
Definition: hci.h:1065
hciStatus_t HCI_WriteAuthPayloadTimeoutCmd(uint16 connHandle, uint16 aptoValue)
Used to write the connection&#39;s Authenticated Payload Timeout value.
osal_event_hdr_t hdr
osal event header
Definition: hci.h:1090
hciStatus_t HCI_LE_SetHostChanClassificationCmd(uint8 *chanMap)
Update the current data channel map.
uint8 BLEEventCode
BLE Event Code.
Definition: hci.h:1159
union _hciEvt_BLEConnComplete_u_ hciEvt_BLEConnComplete_u
LE Connection Complete Event.
uint16 connInterval
connection interval
Definition: hci.h:928
hciStatus_t HCI_LE_LtkReqReplyCmd(uint16 connHandle, uint8 *ltk)
Send a positive LTK reply to the controller.
uint16 Interval_Max
maximum connection interval
Definition: hci.h:1118
void HCI_ExtTaskRegister(uint8 taskID)
HCI vendor specific registration for Host extended commands.
uint8 length
length of parametric data, in bytes
Definition: hci.h:1066
hciStatus_t HCI_EXT_NumComplPktsLimitCmd(uint8 limit, uint8 flushOnEvt)
Set the Number of Completed Packets Limit.
uint16 connectionHandle
connection handle
Definition: hci.h:1020
uint8 BLEEventCode
BLE Event Code.
Definition: hci.h:1127
uint16 maxRxTime
maximum receive time
Definition: hci.h:1143
hciStatus_t HCI_ReadRssiCmd(uint16 connHandle)
Read RSSI of last packet.
uint8 status
status
Definition: hci.h:1151
uint16 connectionHandle
connection handle
Definition: hci.h:940
hciStatus_t HCI_LE_CreateConnCancelCmd(void)
Cancel connection.
uint16 connTimeout
connection supervision timeout
Definition: hci.h:1011
uint8 encEnable
encryption enabled or not
Definition: hci.h:1031
uint16 Latency
slave latency
Definition: hci.h:1119
hciStatus_t HCI_LE_ReadSupportedStatesCmd(void)
TRead the Controller&#39;s supported states.
uint16 connLatency
connection latency
Definition: hci.h:945
uint8 linkType
synchronous or asynchronous buffer overflow
Definition: hci.h:1100
hciStatus_t HCI_LE_ReadLocalP256PublicKeyCmd(void)
Read local P-256 Public Key.
Vendor Specific Command Complete Event.
Definition: hci.h:1063
osal_event_hdr_t hdr
osal event header
Definition: hci.h:1005
hciStatus_t HCI_EXT_DecryptCmd(uint8 *key, uint8 *encText)
Decrypt encrypted data using AES128.
hciStatus_t HCI_EXT_SetFreqTuneCmd(uint8 step)
Set Frequency Tuning.
Data structure for HCI Command Complete Event Return Parameter.
Definition: hci.h:1165
hciStatus_t HCI_LE_SetAdvParamCmd(uint16 advIntervalMin, uint16 advIntervalMax, uint8 advType, uint8 ownAddrType, uint8 directAddrType, uint8 *directAddr, uint8 advChannelMap, uint8 advFilterPolicy)
Set the Advertising parameters.
hciStatus_t HCI_SetEventMaskCmd(uint8 *pMask)
Set the HCI event mask.
hciStatus_t HCI_LE_AddWhiteListCmd(uint8 addrType, uint8 *devAddr)
Add a white list entry.
uint8 clockAccuracy
connection clock accuracy
Definition: hci.h:931
Disconnection Complete Event.
Definition: hci.h:1088
hciStatus_t HCI_EXT_SaveFreqTuneCmd(void)
Save the frequency tuning value to non-volatile memory.
hciStatus_t HCI_EXT_GetActiveConnInfoCmd(uint8 connId, hciActiveConnInfo_t *activeConnInfo)
This API is used to get connection related information required to follow the target connection with ...
hciStatus_t HCI_LE_ReadSuggestedDefaultDataLenCmd(void)
Read Suggested Default Data Length.
hciStatus_t HCI_EXT_ResetSystemCmd(uint8 mode)
Issue a soft or hard system reset.
osal_event_hdr_t hdr
OSAL Event header.
Definition: hci.h:1182
Authenticated Payload Timeout Expired Event.
Definition: hci.h:1104
hciStatus_t HCI_LE_CreateConnCmd(uint16 scanInterval, uint16 scanWindow, uint8 initFilterPolicy, uint8 addrTypePeer, uint8 *peerAddr, uint8 ownAddrType, uint16 connIntervalMin, uint16 connIntervalMax, uint16 connLatency, uint16 connTimeout, uint16 minLen, uint16 maxLen)
Create a connection.
hciStatus_t HCI_LE_ReadWhiteListSizeCmd(void)
Read the white list.
uint16 connHandle
connection handle
Definition: hci.h:1116
uint16 maxTxTime
maximum transmission time
Definition: hci.h:1141
hciStatus_t HCI_LE_SetEventMaskCmd(uint8 *pEventMask)
Set the HCI LE event mask.
int8 rssi
report RSSI
Definition: hci.h:968
uint16 connLatency
connection latency
Definition: hci.h:1010
uint8 BLEEventCode
BLE Event Code.
Definition: hci.h:975
uint8 * pData
data
Definition: hci.h:1187
hciStatus_t HCI_EXT_SetRxGainCmd(uint8 rxGain)
Set the receiver gain.
uint8 reason
reason
Definition: hci.h:1030
int8 rssi
report RSSI
Definition: hci.h:989
uint8 BLEEventCode
BLE Event Code.
Definition: hci.h:1038
uint16 cmdOpcode
command opcode
Definition: hci.h:1077
hciStatus_t HCI_ReadRemoteVersionInfoCmd(uint16 connHandle)
Request version information from the remote device in a connection.
osal_event_hdr_t hdr
OSAL event header.
Definition: hci.h:1175
hciStatus_t HCI_EXT_EndModemTestCmd(void)
Shutdown a modem test.
hciStatus_t HCI_LE_EncryptCmd(uint8 *key, uint8 *plainText)
Perform an encryption using AES128.
hciStatus_t HCI_ReadLocalVersionInfoCmd(void)
Read the local version information.
hciStatus_t HCI_LE_ReadBufSizeCmd(void)
Determine the maximum ACL data packet size allowed by the Controller.
hciStatus_t HCI_LE_ReadLocalResolvableAddressCmd(uint8 localIdAddrType, uint8 *localIdAddr)
Read Local Resolvable Private Address.
osal_event_hdr_t hdr
osal event header
Definition: hci.h:1149
hciStatus_t HCI_EXT_ModemHopTestTxCmd(void)
Start Modem Hop Tx Test.
Command Complete Event.
Definition: hci.h:1054
uint8 rxPhy
RX PHY.
Definition: hci.h:1131
hciEvt_DevInfo_t * devInfo
pointer to the array of devInfo
Definition: hci.h:977
uint16 connHandle
connection handle
Definition: hci.h:1029
HCI Data Packet.
Definition: hci.h:1180
uint8 status
status
Definition: hci.h:1160
uint8 status
status of event
Definition: hci.h:923
uint16 connTimeout
connection supervision timeout
Definition: hci.h:946
uint16 Timeout
supervision timeout
Definition: hci.h:1120
LE Generate DHKey Complete Event.
Definition: hci.h:1156
uint16 * pConnectionHandle
pointer to the connection handle array
Definition: hci.h:1049
LE Remote Connection Parameter Request Event.
Definition: hci.h:1111
uint8 HCI_ValidConnTimeParams(uint16 connIntervalMin, uint16 connIntervalMax, uint16 connLatency, uint16 connTimeout)
Checks that the connection time parameter ranges are valid.
hciStatus_t HCI_EXT_PERbyChanCmd(uint16 connHandle, perByChan_t *perByChan)
Packet Error Rate by Channel Command.
uint16 connLatency
connection latency
Definition: hci.h:929
uint8 status
status of event
Definition: hci.h:1115
hciStatus_t HCI_ReadLocalSupportedCommandsCmd(void)
Read the locally supported commands.
uint8 BLEEventCode
BLE Event Code.
Definition: hci.h:984
hciStatus_t HCI_EXT_ModemTestRxCmd(uint8 rxChan)
Start Modem Hop RX Test.
uint16 connInterval
connection interval
Definition: hci.h:944
uint8 bleChan
BLE channel.
Definition: hci.h:988
uint8 eventType
advertisement or scan response event type
Definition: hci.h:963
osal_event_hdr_t hdr
osal event header
Definition: hci.h:921
hciEvt_BLEEnhConnComplete_t enhEvt
enhanced connection complete event
Definition: hci.h:957
hciStatus_t HCI_LE_SetAdvEnableCmd(uint8 advEnable)
Turn Advertising on or off.
osal_event_hdr_t hdr
osal event header
Definition: hci.h:937
hciStatus_t HCI_LE_ClearResolvingListCmd(void)
Remove all devices from the whitelist.
hciStatus_t HCI_EXT_SetSlaveLatencyOverrideCmd(uint8 control)
Enable or disable suspending slave latency.
hciStatus_t HCI_EXT_OnePktPerEvtCmd(uint8 control)
Set whether a connection will be limited to one packet per event.
uint16 connTimeout
connection supervision timeout
Definition: hci.h:930
Type definitions and macros for BLE stack.
VS LE Scan Request Report Event.
Definition: hci.h:981
hciStatus_t HCI_EXT_SetFastTxResponseTimeCmd(uint8 control)
Set Fast TX Response Time.
LE Encryption Change Event.
Definition: hci.h:1025
hciStatus_t HCI_EXT_BuildRevisionCmd(uint8 mode, uint16 userRevNum)
Set a user revision number or read the build revision number.
hciStatus_t HCI_LE_SetScanRspDataCmd(uint8 dataLen, uint8 *pData)
Set the Advertising Scan Response data.
uint16 connInterval
connection interval
Definition: hci.h:1009
uint8 * pEventParam
event parameters
Definition: hci.h:1068
uint32_t len
Image length in bytes.
Definition: oad_image_header.h:662
hciEvt_BLEConnComplete_t legEvt
connection complete event
Definition: hci.h:956
hciStatus_t HCI_ReadTransmitPowerLevelCmd(uint16 connHandle, uint8 txPwrType)
Read the transmit power level.
uint8 cmdStatus
command status
Definition: hci.h:1075
LE Enhanced Connection Complete Event.
Definition: hci.h:935
uint16 connHandle
connection handle
Definition: hci.h:1107
uint16 cmdOpcode
command opcode
Definition: hci.h:1058
uint8 BLEEventCode
BLE Event Code.
Definition: hci.h:922
Number of Completed Packets Event.
Definition: hci.h:1045
hciStatus_t HCI_LE_ReadPeerResolvableAddressCmd(uint8 peerIdAddrType, uint8 *peerIdAddr)
Read the Peer Resolvable Address.
OSAL Event Header.
Definition: osal.h:92
hciStatus_t HCI_EXT_SetLocalSupportedFeaturesCmd(uint8 *localFeatures)
Write this device&#39;s supported features.
hciStatus_t HCI_LE_ReceiverTestCmd(uint8 rxChan)
Start the receiver Direct Test Mode test.
uint8 BLEEventCode
BLE Event Code.
Definition: hci.h:938
uint8 txPhy
TX PHY.
Definition: hci.h:1130
hciStatus_t HCI_LE_RemoveDeviceFromResolvingListCmd(uint8 peerIdAddrType, uint8 *peerIdAddr)
Remove a device from the whitelist.
hciStatus_t HCI_LE_RemoveWhiteListCmd(uint8 addrType, uint8 *devAddr)
Remove a white list entry.
uint8 numDataPkts
number of data packets
Definition: hci.h:1169
uint16 connHandle
connection handle
Definition: hci.h:997
uint16 pktLen
packet length
Definition: hci.h:1186
hciStatus_t HCI_EXT_SetBDADDRCmd(uint8 *bdAddr)
Set this device&#39;s BLE address (BDADDR).
osal_event_hdr_t hdr
osal event header
Definition: hci.h:1158
uint8 peerAddrType
peer address type
Definition: hci.h:926
osal_event_hdr_t hdr
osal event header
Definition: hci.h:1074
hciStatus_t HCI_LE_StartEncyptCmd(uint16 connHandle, uint8 *random, uint8 *encDiv, uint8 *ltk)
Start encryption in a connection.
uint16 cmdOpcode
command opcode
Definition: hci.h:1067
hciStatus_t HCI_EXT_ScanEventNoticeCmd(uint8 taskID, uint16 taskEvent)
Scan Event Notice Command.
uint8 reason
reason
Definition: hci.h:1093
uint8 numHciCmdPkt
number of HCI Command Packet
Definition: hci.h:1057
osal_event_hdr_t hdr
osal event header
Definition: hci.h:1113
uint8 hardwareCode
hardware error code
Definition: hci.h:1084
#define B_ADDR_LEN
Default Public and Random Address Length.
Definition: bcomdef.h:115
Data Buffer Overflow Event.
Definition: hci.h:1097
uint8 role
role of connection
Definition: hci.h:941
LE Connection Complete Event.
Definition: hci.h:919
uint8 numHciCmdPkt
number of HCI command packets
Definition: hci.h:1076
uint16 encryptedDiversifier
encrypted diversifier
Definition: hci.h:1041
hciStatus_t HCI_LE_AddDeviceToResolvingListCmd(uint8 peerIdAddrType, uint8 *peerIdAddr, uint8 *peerIRK, uint8 *localIRK)
Add a device to the resolving list.
LE Read Remote Used Features Complete Event.
Definition: hci.h:1015
hciStatus_t HCI_DisconnectCmd(uint16 connHandle, uint8 reason)
Terminate a connection.
hciStatus_t HCI_LE_SetAdvDataCmd(uint8 dataLen, uint8 *pData)
Set the Advertising data.
uint8 peerAddrType
peer address type
Definition: hci.h:986
hciStatus_t HCI_LE_SetRandomAddressCmd(uint8 *pRandAddr)
Set this device&#39;s Random address.
hciStatus_t HCI_LE_SetScanParamCmd(uint8 scanType, uint16 scanInterval, uint16 scanWindow, uint8 ownAddrType, uint8 filterPolicy)
Set the Scan parameters.
void HCI_L2CAPTaskRegister(uint8 taskID)
HCI vendor specific registration for Host L2CAP.
VS LE Channel Map Update Event.
Definition: hci.h:993
hciStatus_t HCI_ReadLocalSupportedFeaturesCmd(void)
Read the locally supported features.
hciStatus_t HCI_LE_ReadChannelMapCmd(uint16 connHandle)
Read a connection&#39;s data channel map.
uint8 status
status of event
Definition: hci.h:1167
osal_event_hdr_t hdr
osal event header
Definition: hci.h:995
hciStatus_t HCI_LE_ClearWhiteListCmd(void)
Clear the white list.
osal_event_hdr_t hdr
osal event header
Definition: hci.h:1056
hciStatus_t HCI_LE_ReadMaxDataLenCmd(void)
Read max data length.
hciStatus_t HCI_EXT_SetSCACmd(uint16 scaInPPM)
Set this device&#39;s Sleep Clock Accuracy.
uint16 maxTxOctets
maximum transmission bytes
Definition: hci.h:1140
hciStatus_t HCI_ReadBDADDRCmd(void)
Read this device&#39;s BLE address (BDADDR).
osal_event_hdr_t hdr
osal event header
Definition: hci.h:1126
hciStatus_t HCI_HostNumCompletedPktCmd(uint8 numHandles, uint16 *connHandles, uint16 *numCompletedPkts)
Set the number of HCI daata packets completed per connection handle.
hciStatus_t HCI_LE_GenerateDHKeyCmd(uint8 *publicKey)
Generate Diffie-Hellman Key.
hciStatus_t HCI_ReadAuthPayloadTimeoutCmd(uint16 connHandle, uint16 *aptoValue)
Read the connection&#39;s Authenticated Payload Timeout value.
LE Connection Complete Event.
Definition: hci.h:954
LE Connection Update Complete Event.
Definition: hci.h:1003
hciStatus_t HCI_EXT_SetTxPowerCmd(uint8 txPower)
Set the transmit power.
uint8 status
status of event
Definition: hci.h:939
hciStatus_t HCI_LE_WriteSuggestedDefaultDataLenCmd(uint16 txOctets, uint16 txTime)
Write Suggested Default Data Length.
LE Read P256 Public Key Complete Event.
Definition: hci.h:1147
hciStatus_t HCI_LE_SetScanEnableCmd(uint8 scanEnable, uint8 filterDuplicates)
Turn Scanning on or off.
uint8 dataLen
length of report data
Definition: hci.h:966
hciStatus_t HCI_SendDataPkt(uint16 connHandle, uint8 pbFlag, uint16 pktLen, uint8 *pData)
Send an ACL data packet over a connection.
uint8 * pData
data
Definition: hci.h:1176
LE Advertising Packet Report Event.
Definition: hci.h:972
hciStatus_t HCI_EXT_DisconnectImmedCmd(uint16 connHandle)
Disconnect the connection immediately.
uint16 connHandle
connection handle
Definition: hci.h:1092
uint8 BLEEventCode
BLE Event Code.
Definition: hci.h:1018
hciStatus_t HCI_LE_RemoteConnParamReqNegReplyCmd(uint16 connHandle, uint8 reason)
Negatively reply to the Conneciton Parameter Update Request.
hciStatus_t HCI_LE_ConnUpdateCmd(uint16 connHandle, uint16 connIntervalMin, uint16 connIntervalMax, uint16 connLatency, uint16 connTimeout, uint16 minLen, uint16 maxLen)
Update the connection parameters.
uint8 pbFlag
flag
Definition: hci.h:1185
uint16 maxRxOctets
maximum receive bytes
Definition: hci.h:1142
uint8 role
role of connection
Definition: hci.h:925
hciStatus_t HCI_ResetCmd(void)
Reset the Link Layer.
osal_event_hdr_t hdr
osal event header
Definition: hci.h:1099
uint16 connectionHandle
connection handle
Definition: hci.h:1008
void HCI_GAPTaskRegister(uint8 taskID)
HCI vendor specific registration for Host GAP.
LE Long Term Key Requested Event.
Definition: hci.h:1035
osal_event_hdr_t hdr
osal event header
Definition: hci.h:974
uint16 connHandle
connection handle
Definition: hci.h:1039
hciStatus_t HCI_EXT_GetConnInfoCmd(uint8 *numAllocConns, uint8 *numActiveConns, hciConnInfo_t *activeConnInfo)
Get Connection Info.
© Copyright 1995-2019, Texas Instruments Incorporated. All rights reserved.
Trademarks | Privacy policy | Terms of use | Terms of sale