BLE-Stack APIs  1.00.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 
483 #ifndef HCI_H
484 #define HCI_H
485 
486 #ifdef __cplusplus
487 extern "C"
488 {
489 #endif
490 
491 /*
492  * INCLUDES
493  */
494 #include "bcomdef.h"
495 #include "osal.h"
496 #include "ll.h"
497 #include "hal_assert.h"
498 
499 /*
500  * MACROS
501  */
502 
503 /*
504  * CONSTANTS
505  */
506 
515 #define HCI_SUCCESS 0x00
516 #define HCI_ERROR_CODE_UNKNOWN_HCI_CMD 0x01
517 #define HCI_ERROR_CODE_UNKNOWN_CONN_ID 0x02
518 #define HCI_ERROR_CODE_HW_FAILURE 0x03
519 #define HCI_ERROR_CODE_PAGE_TIMEOUT 0x04
520 #define HCI_ERROR_CODE_AUTH_FAILURE 0x05
521 #define HCI_ERROR_CODE_PIN_KEY_MISSING 0x06
522 #define HCI_ERROR_CODE_MEM_CAP_EXCEEDED 0x07
523 #define HCI_ERROR_CODE_CONN_TIMEOUT 0x08
524 #define HCI_ERROR_CODE_CONN_LIMIT_EXCEEDED 0x09
525 #define HCI_ERROR_CODE_SYNCH_CONN_LIMIT_EXCEEDED 0x0A
526 #define HCI_ERROR_CODE_ACL_CONN_ALREADY_EXISTS 0x0B
527 #define HCI_ERROR_CODE_CMD_DISALLOWED 0x0C
528 #define HCI_ERROR_CODE_CONN_REJ_LIMITED_RESOURCES 0x0D
529 #define HCI_ERROR_CODE_CONN_REJECTED_SECURITY_REASONS 0x0E
530 #define HCI_ERROR_CODE_CONN_REJECTED_UNACCEPTABLE_BDADDR 0x0F
531 #define HCI_ERROR_CODE_CONN_ACCEPT_TIMEOUT_EXCEEDED 0x10
532 #define HCI_ERROR_CODE_UNSUPPORTED_FEATURE_PARAM_VALUE 0x11
533 #define HCI_ERROR_CODE_INVALID_HCI_CMD_PARAMS 0x12
534 #define HCI_ERROR_CODE_REMOTE_USER_TERM_CONN 0x13
535 #define HCI_ERROR_CODE_REMOTE_DEVICE_TERM_CONN_LOW_RESOURCES 0x14
536 #define HCI_ERROR_CODE_REMOTE_DEVICE_TERM_CONN_POWER_OFF 0x15
537 #define HCI_ERROR_CODE_CONN_TERM_BY_LOCAL_HOST 0x16
538 #define HCI_ERROR_CODE_REPEATED_ATTEMPTS 0x17
539 #define HCI_ERROR_CODE_PAIRING_NOT_ALLOWED 0x18
540 #define HCI_ERROR_CODE_UNKNOWN_LMP_PDU 0x19
541 #define HCI_ERROR_CODE_UNSUPPORTED_REMOTE_FEATURE 0x1A
542 #define HCI_ERROR_CODE_SCO_OFFSET_REJ 0x1B
543 #define HCI_ERROR_CODE_SCO_INTERVAL_REJ 0x1C
544 #define HCI_ERROR_CODE_SCO_AIR_MODE_REJ 0x1D
545 #define HCI_ERROR_CODE_INVALID_LMP_PARAMS 0x1E
546 #define HCI_ERROR_CODE_UNSPECIFIED_ERROR 0x1F
547 #define HCI_ERROR_CODE_UNSUPPORTED_LMP_PARAM_VAL 0x20
548 #define HCI_ERROR_CODE_ROLE_CHANGE_NOT_ALLOWED 0x21
549 #define HCI_ERROR_CODE_LMP_LL_RESP_TIMEOUT 0x22
550 #define HCI_ERROR_CODE_LMP_ERR_TRANSACTION_COLLISION 0x23
551 #define HCI_ERROR_CODE_LMP_PDU_NOT_ALLOWED 0x24
552 #define HCI_ERROR_CODE_ENCRYPT_MODE_NOT_ACCEPTABLE 0x25
553 #define HCI_ERROR_CODE_LINK_KEY_CAN_NOT_BE_CHANGED 0x26
554 #define HCI_ERROR_CODE_REQ_QOS_NOT_SUPPORTED 0x27
555 #define HCI_ERROR_CODE_INSTANT_PASSED 0x28
556 #define HCI_ERROR_CODE_PAIRING_WITH_UNIT_KEY_NOT_SUPPORTED 0x29
557 #define HCI_ERROR_CODE_DIFFERENT_TRANSACTION_COLLISION 0x2A
558 #define HCI_ERROR_CODE_RESERVED1 0x2B
559 #define HCI_ERROR_CODE_QOS_UNACCEPTABLE_PARAM 0x2C
560 #define HCI_ERROR_CODE_QOS_REJ 0x2D
561 #define HCI_ERROR_CODE_CHAN_ASSESSMENT_NOT_SUPPORTED 0x2E
562 #define HCI_ERROR_CODE_INSUFFICIENT_SECURITY 0x2F
563 #define HCI_ERROR_CODE_PARAM_OUT_OF_MANDATORY_RANGE 0x30
564 #define HCI_ERROR_CODE_RESERVED2 0x31
565 #define HCI_ERROR_CODE_ROLE_SWITCH_PENDING 0x32
566 #define HCI_ERROR_CODE_RESERVED3 0x33
567 #define HCI_ERROR_CODE_RESERVED_SLOT_VIOLATION 0x34
568 #define HCI_ERROR_CODE_ROLE_SWITCH_FAILED 0x35
569 #define HCI_ERROR_CODE_EXTENDED_INQUIRY_RESP_TOO_LARGE 0x36
570 #define HCI_ERROR_CODE_SIMPLE_PAIRING_NOT_SUPPORTED_BY_HOST 0x37
571 #define HCI_ERROR_CODE_HOST_BUSY_PAIRING 0x38
572 #define HCI_ERROR_CODE_CONN_REJ_NO_SUITABLE_CHAN_FOUND 0x39
573 #define HCI_ERROR_CODE_CONTROLLER_BUSY 0x3A
574 #define HCI_ERROR_CODE_UNACCEPTABLE_CONN_PARAMETERS 0x3B
575 #define HCI_ERROR_CODE_DIRECTED_ADV_TIMEOUT 0x3C
576 #define HCI_ERROR_CODE_CONN_TERM_MIC_FAILURE 0x3D
577 #define HCI_ERROR_CODE_CONN_FAILED_TO_ESTABLISH 0x3E
578 #define HCI_ERROR_CODE_MAC_CONN_FAILED 0x3F
579 #define HCI_ERROR_CODE_COARSE_CLOCK_ADJUST_REJECTED 0x40
580 
586 #define HCI_MAX_NUM_CMD_BUFFERS LL_MAX_NUM_CMD_BUFFERS
587 #if defined(CC2540) || defined(CC2541) || defined(CC2541S)
588 #define HCI_MAX_NUM_DATA_BUFFERS LL_MAX_NUM_DATA_BUFFERS //<! Max Num Data Buffers
589 #endif // CC2540 | CC2541 | CC2541S
590 
591 // Send Data Packet Boundary Flags
592 #define FIRST_PKT_HOST_TO_CTRL LL_DATA_FIRST_PKT_HOST_TO_CTRL
593 #define CONTINUING_PKT LL_DATA_CONTINUATION_PKT
594 #define FIRST_PKT_CTRL_TO_HOST LL_DATA_FIRST_PKT_CTRL_TO_HOST
595 
596 
598 #define HCI_RSSI_NOT_AVAILABLE LL_RSSI_NOT_AVAILABLE
599 
603 #define HCI_DISCONNECT_AUTH_FAILURE HCI_ERROR_CODE_AUTH_FAILURE
604 #define HCI_DISCONNECT_REMOTE_USER_TERM HCI_ERROR_CODE_REMOTE_USER_TERM_CONN
605 #define HCI_DISCONNECT_REMOTE_DEV_LOW_RESOURCES HCI_ERROR_CODE_REMOTE_DEVICE_TERM_CONN_LOW_RESOURCES
606 #define HCI_DISCONNECT_REMOTE_DEV_POWER_OFF HCI_ERROR_CODE_REMOTE_DEVICE_TERM_CONN_POWER_OFF
607 #define HCI_DISCONNECT_UNSUPPORTED_REMOTE_FEATURE HCI_ERROR_CODE_UNSUPPORTED_REMOTE_FEATURE
608 #define HCI_DISCONNECT_KEY_PAIRING_NOT_SUPPORTED HCI_ERROR_CODE_PAIRING_WITH_UNIT_KEY_NOT_SUPPORTED
609 #define HCI_DISCONNECT_UNACCEPTABLE_CONN_INTERVAL HCI_ERROR_CODE_UNACCEPTABLE_CONN_INTERVAL
610 
615 // Tx Power Types
616 #define HCI_READ_CURRENT_TX_POWER_LEVEL LL_READ_CURRENT_TX_POWER_LEVEL
617 #define HCI_READ_MAX_TX_POWER_LEVEL LL_READ_MAX_TX_POWER_LEVEL
618 
623 #define HCI_CTRL_TO_HOST_FLOW_CTRL_OFF 0
624 #define HCI_CTRL_TO_HOST_FLOW_CTRL_ACL_ON_SYNCH_OFF 1
625 #define HCI_CTRL_TO_HOST_FLOW_CTRL_ACL_OFF_SYNCH_ON 2
626 #define HCI_CTRL_TO_HOST_FLOW_CTRL_ACL_ON_SYNCH_ON 3
627 
632 #define HCI_PUBLIC_DEVICE_ADDRESS LL_DEV_ADDR_TYPE_PUBLIC
633 #define HCI_RANDOM_DEVICE_ADDRESS LL_DEV_ADDR_TYPE_RANDOM
634 
639 #define HCI_CONNECTABLE_UNDIRECTED_ADV LL_ADV_CONNECTABLE_UNDIRECTED_EVT
640 #define HCI_CONNECTABLE_DIRECTED_HDC_ADV LL_ADV_CONNECTABLE_DIRECTED_HDC_EVT
641 #define HCI_SCANNABLE_UNDIRECTED LL_ADV_SCANNABLE_UNDIRECTED_EVT
642 #define HCI_NONCONNECTABLE_UNDIRECTED_ADV LL_ADV_NONCONNECTABLE_UNDIRECTED_EVT
643 #define HCI_CONNECTABLE_DIRECTED_LDC_ADV LL_ADV_CONNECTABLE_DIRECTED_LDC_EVT
644 
649 #define HCI_ADV_CHAN_37 LL_ADV_CHAN_37
650 #define HCI_ADV_CHAN_38 LL_ADV_CHAN_38
651 #define HCI_ADV_CHAN_39 LL_ADV_CHAN_39
652 #define HCI_ADV_CHAN_ALL (LL_ADV_CHAN_37 | LL_ADV_CHAN_38 | LL_ADV_CHAN_39)
653 
658 #define HCI_ADV_WL_POLICY_ANY_REQ LL_ADV_WL_POLICY_ANY_REQ
659 #define HCI_ADV_WL_POLICY_WL_SCAN_REQ LL_ADV_WL_POLICY_WL_SCAN_REQ
660 #define HCI_ADV_WL_POLICY_WL_CONNECT_IND LL_ADV_WL_POLICY_WL_CONNECT_IND
661 #define HCI_ADV_WL_POLICY_WL_ALL_REQ LL_ADV_WL_POLICY_WL_ALL_REQ
662 
667 #define HCI_ENABLE_ADV LL_ADV_MODE_ON
668 #define HCI_DISABLE_ADV LL_ADV_MODE_OFF
669 
674 #define HCI_SCAN_PASSIVE LL_SCAN_PASSIVE
675 #define HCI_SCAN_ACTIVE LL_SCAN_ACTIVE
676 
681 // Scan White List Policy
682 #define HCI_SCAN_WL_POLICY_ANY_ADV_PKTS LL_SCAN_WL_POLICY_ANY_ADV_PKTS
683 #define HCI_SCAN_WL_POLICY_USE_WHITE_LIST LL_SCAN_WL_POLICY_USE_WHITE_LIST
684 
689 // Scan Filtering
690 #define HCI_FILTER_REPORTS_DISABLE LL_FILTER_REPORTS_DISABLE
691 #define HCI_FILTER_REPORTS_ENABLE LL_FILTER_REPORTS_ENABLE
692 
697 // Scan Commands
698 #define HCI_SCAN_STOP LL_SCAN_STOP
699 #define HCI_SCAN_START LL_SCAN_START
700 
705 #define HCI_INIT_WL_POLICY_USE_PEER_ADDR LL_INIT_WL_POLICY_USE_PEER_ADDR
706 #define HCI_INIT_WL_POLICY_USE_WHITE_LIST LL_INIT_WL_POLICY_USE_WHITE_LIST
707 
712 #define HCI_ENCRYPTION_OFF LL_ENCRYPTION_OFF
713 #define HCI_ENCRYPTION_ON LL_ENCRYPTION_ON
714 
719 #define HCI_DIRECT_TEST_PAYLOAD_PRBS9 LL_DIRECT_TEST_PAYLOAD_PRBS9
720 #define HCI_DIRECT_TEST_PAYLOAD_0x0F LL_DIRECT_TEST_PAYLOAD_0x0F
721 #define HCI_DIRECT_TEST_PAYLOAD_0x55 LL_DIRECT_TEST_PAYLOAD_0x55
722 #define HCI_DIRECT_TEST_PAYLOAD_PRBS15 LL_DIRECT_TEST_PAYLOAD_PRBS15
723 #define HCI_DIRECT_TEST_PAYLOAD_0xFF LL_DIRECT_TEST_PAYLOAD_0xFF
724 #define HCI_DIRECT_TEST_PAYLOAD_0x00 LL_DIRECT_TEST_PAYLOAD_0x00
725 #define HCI_DIRECT_TEST_PAYLOAD_0xF0 LL_DIRECT_TEST_PAYLOAD_0xF0
726 #define HCI_DIRECT_TEST_PAYLOAD_0xAA LL_DIRECT_TEST_PAYLOAD_0xAA
727 
732 #define HCI_DTM_STANDARD_MODULATION_INDEX LL_DTM_STANDARD_MODULATION_INDEX
733 #define HCI_DTM_STABLE_MODULATION_INDEX LL_DTM_STABLE_MODULATION_INDEX
734 
739 #define HCI_EXT_DTM_TX_CONTINUOUS LL_EXT_DTM_TX_CONTINUOUS
740 
745 #define HCI_DISABLE_ADDR_RESOLUTION LL_DISABLE_ADDR_RESOLUTION
746 #define HCI_ENABLE_ADDR_RESOLUTION LL_ENABLE_ADDR_RESOLUTION
747 #define HCI_NETWORK_PRIVACY_MODE LL_NETWORK_PRIVACY_MODE
748 #define HCI_DEVICE_PRIVACY_MODE LL_DEVICE_PRIVACY_MODE
749 
754 #define HCI_PHY_USE_PHY_PARAM LL_PHY_USE_PHY_PARAM
755 #define HCI_PHY_USE_ANY_PHY LL_PHY_USE_ANY_PHY
756 
761 #define HCI_PHY_1_MBPS LL_PHY_1_MBPS
762 #define HCI_PHY_2_MBPS LL_PHY_2_MBPS
763 #define HCI_PHY_CODED LL_PHY_CODED
764 
769 #define HCI_PHY_OPT_NONE LL_PHY_OPT_NONE
770 #define HCI_PHY_OPT_S2 LL_PHY_OPT_S2
771 #define HCI_PHY_OPT_S8 LL_PHY_OPT_S8
772 
777 #define HCI_CHANNEL_SELECT_ALGO_1 LL_CHANNEL_SELECT_ALGO_1
778 #define HCI_CHANNEL_SELECT_ALGO_2 LL_CHANNEL_SELECT_ALGO_2
779 
784 #define HCI_EXT_RX_GAIN_STD LL_EXT_RX_GAIN_STD
785 #define HCI_EXT_RX_GAIN_HIGH LL_EXT_RX_GAIN_HIGH
786 
791 #if defined( CC26XX ) || defined( CC13XX )
792 #define HCI_EXT_TX_POWER_MINUS_21_DBM LL_EXT_TX_POWER_MINUS_21_DBM
793 #define HCI_EXT_TX_POWER_MINUS_18_DBM LL_EXT_TX_POWER_MINUS_18_DBM
794 #define HCI_EXT_TX_POWER_MINUS_15_DBM LL_EXT_TX_POWER_MINUS_15_DBM
795 #define HCI_EXT_TX_POWER_MINUS_12_DBM LL_EXT_TX_POWER_MINUS_12_DBM
796 #define HCI_EXT_TX_POWER_MINUS_9_DBM LL_EXT_TX_POWER_MINUS_9_DBM
797 #define HCI_EXT_TX_POWER_MINUS_6_DBM LL_EXT_TX_POWER_MINUS_6_DBM
798 #define HCI_EXT_TX_POWER_MINUS_3_DBM LL_EXT_TX_POWER_MINUS_3_DBM
799 #define HCI_EXT_TX_POWER_0_DBM LL_EXT_TX_POWER_0_DBM
800 #define HCI_EXT_TX_POWER_1_DBM LL_EXT_TX_POWER_1_DBM
801 #define HCI_EXT_TX_POWER_2_DBM LL_EXT_TX_POWER_2_DBM
802 #define HCI_EXT_TX_POWER_3_DBM LL_EXT_TX_POWER_3_DBM
803 #define HCI_EXT_TX_POWER_4_DBM LL_EXT_TX_POWER_4_DBM
804 #define HCI_EXT_TX_POWER_5_DBM LL_EXT_TX_POWER_5_DBM
805 #else // CC254x
806 #define HCI_EXT_TX_POWER_MINUS_23_DBM LL_EXT_TX_POWER_MINUS_23_DBM
807 #define HCI_EXT_TX_POWER_MINUS_6_DBM LL_EXT_TX_POWER_MINUS_6_DBM
808 #define HCI_EXT_TX_POWER_0_DBM LL_EXT_TX_POWER_0_DBM
809 #define HCI_EXT_TX_POWER_4_DBM LL_EXT_TX_POWER_4_DBM
810 #endif // CC26XX/CC13XX
811 
816 #define HCI_EXT_ENABLE_ONE_PKT_PER_EVT LL_EXT_ENABLE_ONE_PKT_PER_EVT
817 #define HCI_EXT_DISABLE_ONE_PKT_PER_EVT LL_EXT_DISABLE_ONE_PKT_PER_EVT
818 
820 
822 
825 #define HCI_EXT_ENABLE_CLK_DIVIDE_ON_HALT LL_EXT_ENABLE_CLK_DIVIDE_ON_HALT
826 #define HCI_EXT_DISABLE_CLK_DIVIDE_ON_HALT LL_EXT_DISABLE_CLK_DIVIDE_ON_HALT
827 
829 
831 
834 #define HCI_EXT_NV_IN_USE LL_EXT_NV_IN_USE
835 #define HCI_EXT_NV_NOT_IN_USE LL_EXT_NV_NOT_IN_USE
836 
841 #define HCI_EXT_ENABLE_FAST_TX_RESP_TIME LL_EXT_ENABLE_FAST_TX_RESP_TIME
842 #define HCI_EXT_DISABLE_FAST_TX_RESP_TIME LL_EXT_DISABLE_FAST_TX_RESP_TIME
843 
848 #define HCI_EXT_ENABLE_SL_OVERRIDE LL_EXT_ENABLE_SL_OVERRIDE
849 #define HCI_EXT_DISABLE_SL_OVERRIDE LL_EXT_DISABLE_SL_OVERRIDE
850 
855 #define HCI_EXT_TX_MODULATED_CARRIER LL_EXT_TX_MODULATED_CARRIER
856 #define HCI_EXT_TX_UNMODULATED_CARRIER LL_EXT_TX_UNMODULATED_CARRIER
857 
862 #define HCI_PTM_SET_FREQ_TUNE_DOWN LL_EXT_SET_FREQ_TUNE_DOWN
863 #define HCI_PTM_SET_FREQ_TUNE_UP LL_EXT_SET_FREQ_TUNE_UP
864 
866 
868 
871 #define HCI_EXT_PM_IO_PORT_P0 LL_EXT_PM_IO_PORT_P0
872 #define HCI_EXT_PM_IO_PORT_P1 LL_EXT_PM_IO_PORT_P1
873 #define HCI_EXT_PM_IO_PORT_P2 LL_EXT_PM_IO_PORT_P2
874 #define HCI_EXT_PM_IO_PORT_NONE LL_EXT_PM_IO_PORT_NONE
875 
876 #define HCI_EXT_PM_IO_PORT_PIN0 LL_EXT_PM_IO_PORT_PIN0
877 #define HCI_EXT_PM_IO_PORT_PIN1 LL_EXT_PM_IO_PORT_PIN1
878 #define HCI_EXT_PM_IO_PORT_PIN2 LL_EXT_PM_IO_PORT_PIN2
879 #define HCI_EXT_PM_IO_PORT_PIN3 LL_EXT_PM_IO_PORT_PIN3
880 #define HCI_EXT_PM_IO_PORT_PIN4 LL_EXT_PM_IO_PORT_PIN4
881 #define HCI_EXT_PM_IO_PORT_PIN5 LL_EXT_PM_IO_PORT_PIN5
882 #define HCI_EXT_PM_IO_PORT_PIN6 LL_EXT_PM_IO_PORT_PIN6
883 #define HCI_EXT_PM_IO_PORT_PIN7 LL_EXT_PM_IO_PORT_PIN7
884 
886 
891 #define HCI_EXT_PER_RESET LL_EXT_PER_RESET
892 #define HCI_EXT_PER_READ LL_EXT_PER_READ
893 
895 
897 
900 #define HCI_EXT_HALT_DURING_RF_DISABLE LL_EXT_HALT_DURING_RF_DISABLE
901 #define HCI_EXT_HALT_DURING_RF_ENABLE LL_EXT_HALT_DURING_RF_ENABLE
902 
904 
906 
909 #define HCI_EXT_SET_USER_REVISION LL_EXT_SET_USER_REVISION
910 #define HCI_EXT_READ_BUILD_REVISION LL_EXT_READ_BUILD_REVISION
911 
916 #define HCI_EXT_RESET_SYSTEM_HARD LL_EXT_RESET_SYSTEM_HARD
917 #define HCI_EXT_RESET_SYSTEM_SOFT LL_EXT_RESET_SYSTEM_SOFT
918 
920 
922 
925 #define HCI_EXT_DISABLE_OVERLAPPED_PROCESSING LL_EXT_DISABLE_OVERLAPPED_PROCESSING
926 #define HCI_EXT_ENABLE_OVERLAPPED_PROCESSING LL_EXT_ENABLE_OVERLAPPED_PROCESSING
927 
929 
931 
934 #define HCI_EXT_DISABLE_NUM_COMPL_PKTS_ON_EVENT LL_EXT_DISABLE_NUM_COMPL_PKTS_ON_EVENT
935 #define HCI_EXT_ENABLE_NUM_COMPL_PKTS_ON_EVENT LL_EXT_ENABLE_NUM_COMPL_PKTS_ON_EVENT
936 
941 #define HCI_EXT_DISABLE_SCAN_REQUEST_REPORT LL_EXT_DISABLE_SCAN_REQUEST_REPORT
942 #define HCI_EXT_ENABLE_SCAN_REQUEST_REPORT LL_EXT_ENABLE_SCAN_REQUEST_REPORT
943 
950 // HCI Link Type for Buffer Overflow
951 #define HCI_LINK_TYPE_SCO_BUFFER_OVERFLOW 0
952 #define HCI_LINK_TYPE_ACL_BUFFER_OVERFLOW 1
953 
957 /*
958  * TYPEDEFS
959  */
960 
962 typedef uint8 hciStatus_t;
964 
969 typedef struct
971 {
973  uint8 BLEEventCode;
974  uint8 status;
976  uint8 role;
977  uint8 peerAddrType;
978  uint8 peerAddr[B_ADDR_LEN];
979  uint16 connInterval;
980  uint16 connLatency;
981  uint16 connTimeout;
984 
986 typedef struct
987 {
989  uint8 BLEEventCode;
990  uint8 status;
992  uint8 role;
993  uint8 peerAddrType;
994  uint8 peerAddr[B_ADDR_LEN];
995  uint16 connInterval;
996  uint16 connLatency;
997  uint16 connTimeout;
999  // Note: These fields normally follow peerAddr. Put here for Host optimization.
1000  uint8 localRPA[B_ADDR_LEN];
1001  uint8 peerRPA[B_ADDR_LEN];
1003 
1006 {
1010 
1012 typedef struct
1013 {
1014  uint8 eventType;
1015  uint8 addrType;
1016  uint8 addr[B_ADDR_LEN];
1017  uint8 dataLen;
1018  uint8 rspData[B_MAX_ADV_LEN];
1019  int8 rssi;
1021 
1023 typedef struct
1024 {
1027  uint8 numDevices;
1030 
1032 typedef struct
1033 {
1036  uint8 eventType;
1038  uint8 peerAddr[B_ADDR_LEN];
1039  uint8 bleChan;
1040  int8 rssi;
1042 
1044 typedef struct
1045 {
1048  uint8 status;
1050  uint16 connInterval;
1051  uint16 connLatency;
1052  uint16 connTimeout;
1054 
1056 typedef struct
1057 {
1060  uint8 status;
1062  uint8 features[8];
1064 
1066 typedef struct
1067 {
1070  uint16 connHandle;
1071  uint8 reason;
1072  uint8 encEnable;
1074 
1076 typedef struct
1077 {
1080  uint16 connHandle;
1081  uint8 random[B_RANDOM_NUM_SIZE];
1084 
1086 typedef struct
1087 {
1089  uint8 numHandles;
1093 
1095 typedef struct
1096 {
1099  uint16 cmdOpcode;
1100  uint8 *pReturnParam;
1102 
1104 typedef struct
1105 {
1107  uint8 length;
1108  uint16 cmdOpcode;
1109  uint8 *pEventParam;
1111 
1113 typedef struct
1114 {
1116  uint8 cmdStatus;
1118  uint16 cmdOpcode;
1120 
1122 typedef struct
1123 {
1127 
1129 typedef struct
1130 {
1132  uint8 status;
1133  uint16 connHandle;
1134  uint8 reason;
1136 
1138 typedef struct
1139 {
1141  uint8 linkType;
1143 
1145 typedef struct
1146 {
1148  uint16 connHandle;
1150 
1152 typedef struct
1153 {
1156  uint8 status;
1157  uint16 connHandle;
1158  uint16 Interval_Min;
1159  uint16 Interval_Max;
1160  uint16 Latency;
1161  uint16 Timeout;
1163 
1165 typedef struct
1166 {
1169  uint8 status;
1170  uint16 connHandle;
1171  uint8 txPhy;
1172  uint8 rxPhy;
1174 
1176 typedef struct
1177 {
1180  uint16 connHandle;
1181  uint16 maxTxOctets;
1182  uint16 maxTxTime;
1183  uint16 maxRxOctets;
1184  uint16 maxRxTime;
1186 
1188 typedef struct
1189 {
1192  uint8 status;
1193  uint8 p256Key[LL_SC_P256_KEY_LEN];
1195 
1197 typedef struct
1198 {
1201  uint8 status;
1202  uint8 dhKey[LL_SC_DHKEY_LEN];
1204 
1206 typedef struct
1207 {
1208  uint8 status;
1209  uint16 dataPktLen;
1210  uint8 numDataPkts;
1212 
1214 typedef struct
1215 {
1218  uint16 connHandle;
1219  uint8 chSelAlgo;
1221 
1223 typedef struct
1224 {
1226  uint8 *pData;
1227 } hciPacket_t;
1228 
1230 typedef struct
1231 {
1233  uint8 pktType;
1234  uint16 connHandle;
1235  uint8 pbFlag;
1236  uint16 pktLen;
1237  uint8 *pData;
1238 } hciDataPacket_t;
1239 
1241 
1242 // OSAL HCI_DATA_EVENT message format. This message is used to forward incoming
1243 // data messages up to an application
1244 typedef struct
1245 {
1246  osal_event_hdr_t hdr;
1247  uint16 connHandle;
1248  uint8 pbFlag;
1249  uint16 len;
1250  uint8 *pData;
1251 } hciDataEvent_t;
1252 
1254 
1255 #if defined( CC26XX ) || defined( CC13XX )
1256 PACKED_TYPEDEF_STRUCT
1257 #else // CC254x
1258 typedef struct
1259 #endif // CC26XX/CC13XX
1260 {
1261  uint8 connId;
1262  uint8 role;
1263  uint8 addr[LL_DEVICE_ADDR_LEN];
1264  uint8 addrType;
1265 } hciConnInfo_t;
1266 
1267 #if defined( CC26XX ) || defined( CC13XX )
1268 PACKED_TYPEDEF_STRUCT
1269 #else // CC254x
1270 typedef struct
1271 #endif // CC26XX/CC13XX
1272 {
1273  uint16 numPkts;
1274  uint16 numCrcErr;
1275  uint16 numEvents;
1276  uint16 numMMissedEvents;
1277 } hciPER_t;
1278 
1281 /*
1282  * LOCAL VARIABLES
1283  */
1284 
1285 /*
1286  * GLOBAL VARIABLES
1287  */
1288 
1290 
1302 extern void *HCI_bm_alloc( uint16 size );
1303 
1305 
1306 
1322 extern uint8 HCI_ValidConnTimeParams( uint16 connIntervalMin,
1323  uint16 connIntervalMax,
1324  uint16 connLatency,
1325  uint16 connTimeout );
1326 
1333 extern void HCI_TestAppTaskRegister( uint8 taskID );
1334 
1341 extern void HCI_GAPTaskRegister( uint8 taskID );
1342 
1348 extern void HCI_L2CAPTaskRegister( uint8 taskID );
1349 
1355 extern void HCI_SMPTaskRegister( uint8 taskID );
1356 
1362 extern void HCI_ExtTaskRegister( uint8 taskID );
1363 
1390 extern hciStatus_t HCI_SendDataPkt( uint16 connHandle,
1391  uint8 pbFlag,
1392  uint16 pktLen,
1393  uint8 *pData );
1394 
1410 extern hciStatus_t HCI_DisconnectCmd( uint16 connHandle,
1411  uint8 reason );
1412 
1413 
1431 extern hciStatus_t HCI_ReadRemoteVersionInfoCmd( uint16 connHandle );
1432 
1433 
1448 extern hciStatus_t HCI_SetEventMaskCmd( uint8 *pMask );
1449 
1450 
1465 extern hciStatus_t HCI_SetEventMaskPage2Cmd( uint8 *pMask );
1466 
1467 
1476 extern hciStatus_t HCI_ResetCmd( void );
1477 
1489 extern hciStatus_t HCI_ReadTransmitPowerLevelCmd( uint16 connHandle,
1490  uint8 txPwrType );
1491 
1493 
1510 extern hciStatus_t HCI_SetControllerToHostFlowCtrlCmd( uint8 flowControlEnable );
1511 
1512 
1513 
1536 extern hciStatus_t HCI_HostBufferSizeCmd( uint16 hostAclPktLen,
1537  uint8 hostSyncPktLen,
1538  uint16 hostTotalNumAclPkts,
1539  uint16 hostTotalNumSyncPkts );
1540 
1542 
1575 extern hciStatus_t HCI_HostNumCompletedPktCmd( uint8 numHandles,
1576  uint16 *connHandles,
1577  uint16 *numCompletedPkts );
1578 
1579 
1592 extern hciStatus_t HCI_ReadAuthPayloadTimeoutCmd( uint16 connHandle,
1593  uint16 *aptoValue );
1594 
1595 
1607 extern hciStatus_t HCI_WriteAuthPayloadTimeoutCmd( uint16 connHandle,
1608  uint16 aptoValue );
1609 
1610 
1619 extern hciStatus_t HCI_ReadLocalVersionInfoCmd( void );
1620 
1621 
1630 extern hciStatus_t HCI_ReadLocalSupportedCommandsCmd( void );
1631 
1632 
1641 extern hciStatus_t HCI_ReadLocalSupportedFeaturesCmd( void );
1642 
1643 
1652 extern hciStatus_t HCI_ReadBDADDRCmd( void );
1653 
1654 
1672 extern hciStatus_t HCI_ReadRssiCmd( uint16 connHandle );
1673 
1688 extern hciStatus_t HCI_LE_SetEventMaskCmd( uint8 *pEventMask );
1689 
1690 
1699 extern hciStatus_t HCI_LE_ReadBufSizeCmd( void );
1700 
1701 
1710 extern hciStatus_t HCI_LE_ReadLocalSupportedFeaturesCmd( void );
1711 
1712 
1724 extern hciStatus_t HCI_LE_SetRandomAddressCmd( uint8 *pRandAddr );
1725 
1726 
1745 extern hciStatus_t HCI_LE_SetAdvParamCmd( uint16 advIntervalMin,
1746  uint16 advIntervalMax,
1747  uint8 advType,
1748  uint8 ownAddrType,
1749  uint8 directAddrType,
1750  uint8 *directAddr,
1751  uint8 advChannelMap,
1752  uint8 advFilterPolicy );
1753 
1754 
1766 extern hciStatus_t HCI_LE_SetAdvDataCmd( uint8 dataLen,
1767  uint8 *pData );
1768 
1769 
1781 extern hciStatus_t HCI_LE_SetScanRspDataCmd( uint8 dataLen,
1782  uint8 *pData );
1783 
1784 
1795 extern hciStatus_t HCI_LE_SetAdvEnableCmd( uint8 advEnable );
1796 
1797 
1806 extern hciStatus_t HCI_LE_ReadAdvChanTxPowerCmd( void );
1807 
1808 
1827 extern hciStatus_t HCI_LE_SetScanParamCmd( uint8 scanType,
1828  uint16 scanInterval,
1829  uint16 scanWindow,
1830  uint8 ownAddrType,
1831  uint8 filterPolicy );
1832 
1833 
1846 extern hciStatus_t HCI_LE_SetScanEnableCmd( uint8 scanEnable,
1847  uint8 filterDuplicates );
1848 
1849 
1876 extern hciStatus_t HCI_LE_CreateConnCmd( uint16 scanInterval,
1877  uint16 scanWindow,
1878  uint8 initFilterPolicy,
1879  uint8 addrTypePeer,
1880  uint8 *peerAddr,
1881  uint8 ownAddrType,
1882  uint16 connIntervalMin,
1883  uint16 connIntervalMax,
1884  uint16 connLatency,
1885  uint16 connTimeout,
1886  uint16 minLen,
1887  uint16 maxLen );
1888 
1889 
1898 extern hciStatus_t HCI_LE_CreateConnCancelCmd( void );
1899 
1900 
1909 extern hciStatus_t HCI_LE_ReadWhiteListSizeCmd( void );
1910 
1911 
1920 extern hciStatus_t HCI_LE_ClearWhiteListCmd( void );
1921 
1922 
1934 extern hciStatus_t HCI_LE_AddWhiteListCmd( uint8 addrType,
1935  uint8 *devAddr );
1936 
1937 
1950 extern hciStatus_t HCI_LE_RemoveWhiteListCmd( uint8 addrType,
1951  uint8 *devAddr );
1952 
1953 
1971 extern hciStatus_t HCI_LE_ConnUpdateCmd( uint16 connHandle,
1972  uint16 connIntervalMin,
1973  uint16 connIntervalMax,
1974  uint16 connLatency,
1975  uint16 connTimeout,
1976  uint16 minLen,
1977  uint16 maxLen );
1978 
1979 
1990 extern hciStatus_t HCI_LE_SetHostChanClassificationCmd( uint8 *chanMap );
1991 
1992 
2003 extern hciStatus_t HCI_LE_ReadChannelMapCmd( uint16 connHandle );
2004 
2005 
2017 extern hciStatus_t HCI_LE_ReadRemoteUsedFeaturesCmd( uint16 connHandle );
2018 
2019 
2039 extern hciStatus_t HCI_LE_EncryptCmd( uint8 *key,
2040  uint8 *plainText );
2041 
2042 
2065 extern hciStatus_t HCI_LE_RandCmd( void );
2066 
2067 
2083 extern hciStatus_t HCI_LE_StartEncyptCmd( uint16 connHandle,
2084  uint8 *random,
2085  uint8 *encDiv,
2086  uint8 *ltk );
2087 
2088 
2100 extern hciStatus_t HCI_LE_LtkReqReplyCmd( uint16 connHandle,
2101  uint8 *ltk );
2102 
2103 
2114 extern hciStatus_t HCI_LE_LtkReqNegReplyCmd( uint16 connHandle );
2115 
2116 
2125 extern hciStatus_t HCI_LE_ReadSupportedStatesCmd( void );
2126 
2127 
2141 extern hciStatus_t HCI_LE_ReceiverTestCmd( uint8 rxChan );
2142 
2143 
2160 extern hciStatus_t HCI_LE_TransmitterTestCmd( uint8 txChan,
2161  uint8 dataLen,
2162  uint8 pktPayload );
2163 
2164 
2176 extern hciStatus_t HCI_LE_TestEndCmd( void );
2177 
2178 // V4.1
2179 
2201 extern hciStatus_t HCI_LE_RemoteConnParamReqReplyCmd( uint16 connHandle,
2202  uint16 connIntervalMin,
2203  uint16 connIntervalMax,
2204  uint16 connLatency,
2205  uint16 connTimeout,
2206  uint16 minLen,
2207  uint16 maxLen );
2208 
2209 
2226 extern hciStatus_t HCI_LE_RemoteConnParamReqNegReplyCmd( uint16 connHandle,
2227  uint8 reason );
2228 
2229 
2230 // V4.2 - Extended Data Length
2231 
2247 extern hciStatus_t HCI_LE_SetDataLenCmd( uint16 connHandle,
2248  uint16 txOctets,
2249  uint16 txTime );
2250 
2251 
2264 extern hciStatus_t HCI_LE_ReadSuggestedDefaultDataLenCmd( void );
2265 
2266 
2282 extern hciStatus_t HCI_LE_WriteSuggestedDefaultDataLenCmd( uint16 txOctets,
2283  uint16 txTime );
2284 
2285 
2297 extern hciStatus_t HCI_LE_ReadMaxDataLenCmd( void );
2298 
2299 
2300 // V4.2 - Privacy 1.2
2301 
2319 extern hciStatus_t HCI_LE_AddDeviceToResolvingListCmd( uint8 peerIdAddrType,
2320  uint8 *peerIdAddr,
2321  uint8 *peerIRK,
2322  uint8 *localIRK );
2323 
2324 
2340 extern hciStatus_t HCI_LE_RemoveDeviceFromResolvingListCmd( uint8 peerIdAddrType,
2341  uint8 *peerIdAddr );
2342 
2343 
2356 extern hciStatus_t HCI_LE_ClearResolvingListCmd( void );
2357 
2358 
2371 extern hciStatus_t HCI_LE_ReadResolvingListSizeCmd( void );
2372 
2373 
2392 extern hciStatus_t HCI_LE_ReadPeerResolvableAddressCmd( uint8 peerIdAddrType,
2393  uint8 *peerIdAddr );
2394 
2395 
2414 extern hciStatus_t HCI_LE_ReadLocalResolvableAddressCmd( uint8 localIdAddrType,
2415  uint8 *localIdAddr );
2416 
2417 
2433 extern hciStatus_t HCI_LE_SetAddressResolutionEnableCmd( uint8 addrResolutionEnable );
2434 
2435 
2454 extern hciStatus_t HCI_LE_SetResolvablePrivateAddressTimeoutCmd( uint16 rpaTimeout );
2455 
2456 
2474 extern hciStatus_t HCI_LE_SetPrivacyModeCmd( uint8 peerIdAddrType,
2475  uint8 *peerIdAddr,
2476  uint8 privacyMode );
2477 
2478 
2479 // V4.2 - Secure Connections
2480 
2496 extern hciStatus_t HCI_LE_ReadLocalP256PublicKeyCmd( void );
2497 
2498 
2518 extern hciStatus_t HCI_LE_GenerateDHKeyCmd( uint8 *publicKey );
2519 
2520 
2521 // V5.0 - 2M and Coded PHY
2522 
2536 extern hciStatus_t HCI_LE_ReadPhyCmd( uint16 connHandle );
2537 
2538 
2560 extern hciStatus_t HCI_LE_SetDefaultPhyCmd( uint8 allPhys,
2561  uint8 txPhy,
2562  uint8 rxPhy );
2563 
2564 
2586 extern hciStatus_t HCI_LE_SetPhyCmd( uint16 connHandle,
2587  uint8 allPhys,
2588  uint8 txPhy,
2589  uint8 rxPhy,
2590  uint16 phyOpts );
2591 
2592 
2609 extern hciStatus_t HCI_LE_EnhancedRxTestCmd( uint8 rxChan,
2610  uint8 rxPhy,
2611  uint8 modIndex );
2612 
2613 
2631 extern hciStatus_t HCI_LE_EnhancedTxTestCmd( uint8 txChan,
2632  uint8 payloadLen,
2633  uint8 payloadType,
2634  uint8 txPhy );
2635 
2636 /*
2637 ** HCI Vendor Specific Commands: Link Layer Extensions
2638 */
2639 
2652 extern hciStatus_t HCI_EXT_SetRxGainCmd( uint8 rxGain );
2653 
2654 
2670 extern hciStatus_t HCI_EXT_SetTxPowerCmd( uint8 txPower );
2671 
2672 
2683 extern hciStatus_t HCI_EXT_OnePktPerEvtCmd( uint8 control );
2684 
2685 
2687 
2705 extern hciStatus_t HCI_EXT_ClkDivOnHaltCmd( uint8 control );
2706 
2727 extern hciStatus_t HCI_EXT_DeclareNvUsageCmd( uint8 mode );
2728 
2730 
2744 extern hciStatus_t HCI_EXT_DecryptCmd( uint8 *key,
2745  uint8 *encText );
2746 
2747 
2771 extern hciStatus_t HCI_EXT_SetLocalSupportedFeaturesCmd( uint8 *localFeatures );
2772 
2773 
2798 extern hciStatus_t HCI_EXT_SetFastTxResponseTimeCmd( uint8 control );
2799 
2801 
2820 extern hciStatus_t HCI_EXT_SetSlaveLatencyOverrideCmd( uint8 control );
2821 
2823 
2846 extern hciStatus_t HCI_EXT_ModemTestTxCmd( uint8 cwMode,
2847  uint8 txChan );
2848 
2849 
2871 extern hciStatus_t HCI_EXT_ModemHopTestTxCmd( void );
2872 
2873 
2898 extern hciStatus_t HCI_EXT_ModemTestRxCmd( uint8 rxChan );
2899 
2900 
2912 extern hciStatus_t HCI_EXT_EndModemTestCmd( void );
2913 
2914 
2940 extern hciStatus_t HCI_EXT_SetBDADDRCmd( uint8 *bdAddr );
2941 
2942 
2965 extern hciStatus_t HCI_EXT_SetSCACmd( uint16 scaInPPM );
2966 
2967 
2981 extern hciStatus_t HCI_EXT_EnablePTMCmd( void );
2982 
2983 
3002 extern hciStatus_t HCI_EXT_SetFreqTuneCmd( uint8 step );
3003 
3004 
3018 extern hciStatus_t HCI_EXT_SaveFreqTuneCmd( void );
3019 
3020 
3040 extern hciStatus_t HCI_EXT_SetMaxDtmTxPowerCmd( uint8 txPower );
3041 
3043 
3083 extern hciStatus_t HCI_EXT_MapPmIoPortCmd( uint8 ioPort, uint8 ioPin );
3084 
3086 
3102 extern hciStatus_t HCI_EXT_DisconnectImmedCmd( uint16 connHandle );
3103 
3104 
3124 extern hciStatus_t HCI_EXT_PacketErrorRateCmd( uint16 connHandle, uint8 command );
3125 
3126 
3165 extern hciStatus_t HCI_EXT_PERbyChanCmd( uint16 connHandle, perByChan_t *perByChan );
3166 
3167 
3169 
3178 extern hciStatus_t HCI_EXT_ExtendRfRangeCmd( void );
3179 
3193 extern hciStatus_t HCI_EXT_HaltDuringRfCmd( uint8 mode );
3194 
3196 
3249 extern hciStatus_t HCI_EXT_AdvEventNoticeCmd( uint8 taskID, uint16 taskEvent );
3250 
3251 
3308 extern hciStatus_t HCI_EXT_ScanEventNoticeCmd( uint8 taskID, uint16 taskEvent );
3309 
3310 
3365 extern hciStatus_t HCI_EXT_ConnEventNoticeCmd( uint16 connHandle, uint8 taskID, uint16 taskEvent );
3366 
3367 
3389 extern hciStatus_t HCI_EXT_BuildRevisionCmd( uint8 mode, uint16 userRevNum );
3390 
3392 
3419 extern hciStatus_t HCI_EXT_DelaySleepCmd( uint16 delay );
3420 
3422 
3440 extern hciStatus_t HCI_EXT_ResetSystemCmd( uint8 mode );
3441 
3442 // @cond NODOC
3443 
3454 extern hciStatus_t HCI_EXT_LLTestModeCmd( uint8 testCase );
3455 
3456 
3467 extern hciStatus_t HCI_EXT_OverlappedProcessingCmd( uint8 mode );
3468 
3470 
3491 extern hciStatus_t HCI_EXT_NumComplPktsLimitCmd( uint8 limit,
3492  uint8 flushOnEvt );
3493 
3494 
3530 extern hciStatus_t HCI_EXT_GetConnInfoCmd( uint8 *numAllocConns,
3531  uint8 *numActiveConns,
3532  hciConnInfo_t *activeConnInfo );
3533 
3551 extern hciStatus_t HCI_EXT_SetMaxDataLenCmd( uint16 txOctets,
3552  uint16 txTime,
3553  uint16 rxOctets,
3554  uint16 rxTime );
3555 
3606 extern hciStatus_t HCI_EXT_ScanReqRptCmd( uint8 mode );
3607 
3608 
3621 extern hciStatus_t HCI_EXT_SetDtmTxPktCntCmd( uint16 txPktCnt );
3622 
3623 
3624 #ifdef __cplusplus
3625 }
3626 #endif
3627 
3628 #endif /* HCI_H */
3629 
hciStatus_t HCI_EXT_PacketErrorRateCmd(uint16 connHandle, uint8 command)
Packet Error Rate Command.
osal_event_hdr_t hdr
osal event header
Definition: hci.h:1124
uint8 BLEEventCode
BLE Event Code.
Definition: hci.h:1047
uint8 status
status of event
Definition: hci.h:1060
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:1036
uint16 * pNumCompletedPackets
pointer to the number of completed packets array
Definition: hci.h:1091
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:1180
void HCI_TestAppTaskRegister(uint8 taskID)
HCI vendor specific registration for HCI Test Application.
uint8 status
status of event
Definition: hci.h:1048
uint8 status
status of event
Definition: hci.h:1169
uint8 addrType
public or random address type
Definition: hci.h:1015
uint8 pktType
packet type
Definition: hci.h:1233
uint8 BLEEventCode
BLE Event Code.
Definition: hci.h:1069
uint8 clockAccuracy
connection clock accuracy
Definition: hci.h:998
osal_event_hdr_t hdr
osal event header
Definition: hci.h:1216
uint16 Interval_Min
minimum connection interval
Definition: hci.h:1158
hciStatus_t HCI_LE_SetDefaultPhyCmd(uint8 allPhys, uint8 txPhy, uint8 rxPhy)
Set Default PHY.
HCI Packet event.
Definition: hci.h:1223
osal_event_hdr_t hdr
osal event header
Definition: hci.h:1078
#define B_RANDOM_NUM_SIZE
BLE Random Number Size.
Definition: bcomdef.h:130
uint8 numHandles
number of handles
Definition: hci.h:1089
uint8 * pReturnParam
pointer to the return parameter
Definition: hci.h:1100
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:1068
uint16 dataPktLen
data packet length
Definition: hci.h:1209
Command Status Event.
Definition: hci.h:1113
uint16 connHandle
connection handle
Definition: hci.h:1170
osal_event_hdr_t hdr
osal event header
Definition: hci.h:1178
osal_event_hdr_t hdr
osal event header
Definition: hci.h:1034
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:1122
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:993
uint8 status
status of event
Definition: hci.h:1132
hciStatus_t HCI_LE_RandCmd(void)
Generate a random number.
LE Advertising Report Event.
Definition: hci.h:1012
#define B_MAX_ADV_LEN
BLE Maximum Advertising Packet Length.
Definition: bcomdef.h:127
hciStatus_t HCI_LE_ReadResolvingListSizeCmd(void)
Read Resolving List Size.
LE Data Length Change Event.
Definition: hci.h:1176
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:1027
uint16 connectionHandle
connection handle
Definition: hci.h:975
uint16 connHandle
connection handle
Definition: hci.h:1234
uint8 BLEEventCode
BLE Event Code.
Definition: hci.h:1179
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:1058
hciStatus_t HCI_EXT_ScanReqRptCmd(uint8 mode)
Enable/disable Scan Request Reports.
LE Phy Update Complete Event.
Definition: hci.h:1165
osal_event_hdr_t hdr
osal event header
Definition: hci.h:1147
osal_event_hdr_t hdr
osal event header
Definition: hci.h:1088
uint8 BLEEventCode
BLE Event Code.
Definition: hci.h:1155
hciStatus_t HCI_LE_EnhancedRxTestCmd(uint8 rxChan, uint8 rxPhy, uint8 modIndex)
Start Enhanced RX Test.
uint8 BLEEventCode
BLE Event code.
Definition: hci.h:1191
osal_event_hdr_t hdr
osal event header
Definition: hci.h:1106
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:1131
hciStatus_t HCI_LE_SetHostChanClassificationCmd(uint8 *chanMap)
Update the current data channel map.
uint8 BLEEventCode
BLE Event Code.
Definition: hci.h:1200
union _hciEvt_BLEConnComplete_u_ hciEvt_BLEConnComplete_u
LE Connection Complete Event.
uint16 connInterval
connection interval
Definition: hci.h:979
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:1159
void HCI_ExtTaskRegister(uint8 taskID)
HCI vendor specific registration for Host extended commands.
uint8 length
length of parametric data, in bytes
Definition: hci.h:1107
hciStatus_t HCI_EXT_NumComplPktsLimitCmd(uint8 limit, uint8 flushOnEvt)
Set the Number of Completed Packets Limit.
uint16 connectionHandle
connection handle
Definition: hci.h:1061
uint8 BLEEventCode
BLE Event Code.
Definition: hci.h:1168
uint16 maxRxTime
maximum receive time
Definition: hci.h:1184
hciStatus_t HCI_ReadRssiCmd(uint16 connHandle)
Read RSSI of last packet.
uint8 status
status
Definition: hci.h:1192
uint16 connectionHandle
connection handle
Definition: hci.h:991
hciStatus_t HCI_LE_CreateConnCancelCmd(void)
Cancel connection.
uint16 connTimeout
connection supervision timeout
Definition: hci.h:1052
uint8 encEnable
encryption enabled or not
Definition: hci.h:1072
uint16 Latency
slave latency
Definition: hci.h:1160
hciStatus_t HCI_LE_ReadSupportedStatesCmd(void)
TRead the Controller&#39;s supported states.
uint16 connLatency
connection latency
Definition: hci.h:996
uint8 linkType
synchronous or asynchronous buffer overflow
Definition: hci.h:1141
hciStatus_t HCI_LE_ReadLocalP256PublicKeyCmd(void)
Read local P-256 Public Key.
Vendor Specific Command Complete Event.
Definition: hci.h:1104
osal_event_hdr_t hdr
osal event header
Definition: hci.h:1046
hciStatus_t HCI_EXT_DecryptCmd(uint8 *key, uint8 *encText)
Decrypt encrypted data using AES128.
hciStatus_t HCI_EXT_SetFreqTuneCmd(uint8 step)
Set Frequency Tuning.
hciStatus_t HCI_EXT_SetDtmTxPktCntCmd(uint16 txPktCnt)
Set the DTM transmit packet count.
Data structure for HCI Command Complete Event Return Parameter.
Definition: hci.h:1206
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_LE_EnhancedTxTestCmd(uint8 txChan, uint8 payloadLen, uint8 payloadType, uint8 txPhy)
Start Enhanced TX Test.
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:982
Disconnection Complete Event.
Definition: hci.h:1129
hciStatus_t HCI_EXT_SaveFreqTuneCmd(void)
Save the frequency tuning value to non-volatile memory.
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:1232
Authenticated Payload Timeout Expired Event.
Definition: hci.h:1145
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:1157
uint16 maxTxTime
maximum transmission time
Definition: hci.h:1182
hciStatus_t HCI_LE_SetEventMaskCmd(uint8 *pEventMask)
Set the HCI LE event mask.
int8 rssi
report RSSI
Definition: hci.h:1019
uint16 connLatency
connection latency
Definition: hci.h:1051
uint8 BLEEventCode
BLE Event Code.
Definition: hci.h:1026
uint8 * pData
data
Definition: hci.h:1237
hciStatus_t HCI_EXT_SetRxGainCmd(uint8 rxGain)
Set the receiver gain.
uint8 reason
reason
Definition: hci.h:1071
int8 rssi
report RSSI
Definition: hci.h:1040
uint8 BLEEventCode
BLE Event Code.
Definition: hci.h:1079
uint16 cmdOpcode
command opcode
Definition: hci.h:1118
uint8 chSelAlgo
channel selection algorithm
Definition: hci.h:1219
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:1225
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:1190
hciStatus_t HCI_EXT_ModemHopTestTxCmd(void)
Start Modem Hop Tx Test.
Command Complete Event.
Definition: hci.h:1095
uint8 rxPhy
RX PHY.
Definition: hci.h:1172
hciEvt_DevInfo_t * devInfo
pointer to the array of devInfo
Definition: hci.h:1028
LE Channel Selection Algorithm Event.
Definition: hci.h:1214
uint16 connHandle
connection handle
Definition: hci.h:1070
HCI Data Packet.
Definition: hci.h:1230
uint8 status
status
Definition: hci.h:1201
uint8 status
status of event
Definition: hci.h:974
uint16 connTimeout
connection supervision timeout
Definition: hci.h:997
uint16 Timeout
supervision timeout
Definition: hci.h:1161
LE Generate DHKey Complete Event.
Definition: hci.h:1197
uint16 * pConnectionHandle
pointer to the connection handle array
Definition: hci.h:1090
LE Remote Connection Parameter Request Event.
Definition: hci.h:1152
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:980
uint8 status
status of event
Definition: hci.h:1156
hciStatus_t HCI_ReadLocalSupportedCommandsCmd(void)
Read the locally supported commands.
uint8 BLEEventCode
BLE Event Code.
Definition: hci.h:1035
hciStatus_t HCI_EXT_ModemTestRxCmd(uint8 rxChan)
Start Modem Hop RX Test.
uint16 connInterval
connection interval
Definition: hci.h:995
uint8 bleChan
BLE channel.
Definition: hci.h:1039
uint8 eventType
advertisement or scan response event type
Definition: hci.h:1014
osal_event_hdr_t hdr
osal event header
Definition: hci.h:972
hciEvt_BLEEnhConnComplete_t enhEvt
enhanced connection complete event
Definition: hci.h:1008
hciStatus_t HCI_LE_SetAdvEnableCmd(uint8 advEnable)
Turn Advertising on or off.
osal_event_hdr_t hdr
osal event header
Definition: hci.h:988
hciStatus_t HCI_LE_ClearResolvingListCmd(void)
Remove all devices from the whitelist.
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:981
Type definitions and macros for BLE stack.
VS LE Scan Request Report Event.
Definition: hci.h:1032
hciStatus_t HCI_EXT_SetFastTxResponseTimeCmd(uint8 control)
Set Fast TX Response Time.
LE Encryption Change Event.
Definition: hci.h:1066
hciStatus_t HCI_EXT_BuildRevisionCmd(uint8 mode, uint16 userRevNum)
Set a user revision number or read the build revision number.
hciStatus_t HCI_LE_ReadPhyCmd(uint16 connHandle)
Read the current transmitter and receiver PHY.
hciStatus_t HCI_LE_SetScanRspDataCmd(uint8 dataLen, uint8 *pData)
Set the Advertising Scan Response data.
uint16 connInterval
connection interval
Definition: hci.h:1050
uint8 * pEventParam
event parameters
Definition: hci.h:1109
hciEvt_BLEConnComplete_t legEvt
connection complete event
Definition: hci.h:1007
hciStatus_t HCI_ReadTransmitPowerLevelCmd(uint16 connHandle, uint8 txPwrType)
Read the transmit power level.
uint8 cmdStatus
command status
Definition: hci.h:1116
LE Enhanced Connection Complete Event.
Definition: hci.h:986
hciStatus_t HCI_LE_SetPhyCmd(uint16 connHandle, uint8 allPhys, uint8 txPhy, uint8 rxPhy, uint16 phyOpts)
Request a change to the transmitter and receiver PHY for a connection.
uint16 connHandle
connection handle
Definition: hci.h:1148
uint16 cmdOpcode
command opcode
Definition: hci.h:1099
uint8 BLEEventCode
BLE Event Code.
Definition: hci.h:973
Number of Completed Packets Event.
Definition: hci.h:1086
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:989
uint8 txPhy
TX PHY.
Definition: hci.h:1171
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:1210
uint16 pktLen
packet length
Definition: hci.h:1236
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:1199
uint8 peerAddrType
peer address type
Definition: hci.h:977
osal_event_hdr_t hdr
osal event header
Definition: hci.h:1115
hciStatus_t HCI_LE_StartEncyptCmd(uint16 connHandle, uint8 *random, uint8 *encDiv, uint8 *ltk)
Start encryption in a connection.
hciStatus_t HCI_EXT_ConnEventNoticeCmd(uint16 connHandle, uint8 taskID, uint16 taskEvent)
Connection Event Notice Command.
uint16 cmdOpcode
command opcode
Definition: hci.h:1108
hciStatus_t HCI_EXT_ScanEventNoticeCmd(uint8 taskID, uint16 taskEvent)
Scan Event Notice Command.
uint8 reason
reason
Definition: hci.h:1134
uint8 numHciCmdPkt
number of HCI Command Packet
Definition: hci.h:1098
osal_event_hdr_t hdr
osal event header
Definition: hci.h:1154
uint8 hardwareCode
hardware error code
Definition: hci.h:1125
#define B_ADDR_LEN
Default Public and Random Address Length.
Definition: bcomdef.h:112
Data Buffer Overflow Event.
Definition: hci.h:1138
uint8 role
role of connection
Definition: hci.h:992
LE Connection Complete Event.
Definition: hci.h:970
uint8 numHciCmdPkt
number of HCI command packets
Definition: hci.h:1117
uint16 encryptedDiversifier
encrypted diversifier
Definition: hci.h:1082
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:1056
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:1037
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.
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.
uint16 connHandle
connection handle
Definition: hci.h:1218
uint8 status
status of event
Definition: hci.h:1208
hciStatus_t HCI_LE_ClearWhiteListCmd(void)
Clear the white list.
osal_event_hdr_t hdr
osal event header
Definition: hci.h:1097
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:1181
hciStatus_t HCI_ReadBDADDRCmd(void)
Read this device&#39;s BLE address (BDADDR).
osal_event_hdr_t hdr
osal event header
Definition: hci.h:1167
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:1005
LE Connection Update Complete Event.
Definition: hci.h:1044
uint8 BLEEventCode
BLE Event Code.
Definition: hci.h:1217
hciStatus_t HCI_EXT_SetTxPowerCmd(uint8 txPower)
Set the transmit power.
uint8 status
status of event
Definition: hci.h:990
hciStatus_t HCI_LE_WriteSuggestedDefaultDataLenCmd(uint16 txOctets, uint16 txTime)
Write Suggested Default Data Length.
LE Read P256 Public Key Complete Event.
Definition: hci.h:1188
hciStatus_t HCI_LE_SetScanEnableCmd(uint8 scanEnable, uint8 filterDuplicates)
Turn Scanning on or off.
uint8 dataLen
length of report data
Definition: hci.h:1017
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:1226
LE Advertising Packet Report Event.
Definition: hci.h:1023
hciStatus_t HCI_EXT_DisconnectImmedCmd(uint16 connHandle)
Disconnect the connection immediately.
uint16 connHandle
connection handle
Definition: hci.h:1133
uint8 BLEEventCode
BLE Event Code.
Definition: hci.h:1059
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:1235
uint16 maxRxOctets
maximum receive bytes
Definition: hci.h:1183
uint8 role
role of connection
Definition: hci.h:976
hciStatus_t HCI_ResetCmd(void)
Reset the Link Layer.
osal_event_hdr_t hdr
osal event header
Definition: hci.h:1140
hciStatus_t HCI_LE_SetPrivacyModeCmd(uint8 peerIdAddrType, uint8 *peerIdAddr, uint8 privacyMode)
Set Privacy Mode.
uint16 connectionHandle
connection handle
Definition: hci.h:1049
void HCI_GAPTaskRegister(uint8 taskID)
HCI vendor specific registration for Host GAP.
LE Long Term Key Requested Event.
Definition: hci.h:1076
osal_event_hdr_t hdr
osal event header
Definition: hci.h:1025
uint16 connHandle
connection handle
Definition: hci.h:1080
hciStatus_t HCI_EXT_GetConnInfoCmd(uint8 *numAllocConns, uint8 *numActiveConns, hciConnInfo_t *activeConnInfo)
Get Connection Info.
Copyright 2017, Texas Instruments Incorporated