TI BLE Stack API Documentation  2.03.09
hci.h
Go to the documentation of this file.
1 /******************************************************************************
2 
3  @file hci.h
4 
5  @brief This file contains the Host Controller Interface (HCI) API. It provides
6  the defines, types, and functions for all supported
7  Bluetooth Low Energy (BLE) commands.
8 
9  All Bluetooth and BLE commands are based on:
10  Bluetooth Core Specification, V4.0.0, Vol. 2, Part E.
11 
12  Group: WCS, BTS
13  $Target Device: DEVICES $
14 
15  ******************************************************************************
16  $License: TISD 2009 $
17  ******************************************************************************
18  $Release Name: PACKAGE NAME $
19  $Release Date: PACKAGE RELEASE DATE $
20  *****************************************************************************/
21 
460 #ifndef HCI_H
461 #define HCI_H
462 
463 #ifdef __cplusplus
464 extern "C"
465 {
466 #endif
467 
468 /*
469  * INCLUDES
470  */
471 #include "bcomdef.h"
472 #include "osal.h"
473 #include "ll.h"
474 #include "hal_assert.h"
475 
476 /*
477  * MACROS
478  */
479 
480 /*
481  * CONSTANTS
482  */
483 
492 #define HCI_SUCCESS 0x00
493 #define HCI_ERROR_CODE_UNKNOWN_HCI_CMD 0x01
494 #define HCI_ERROR_CODE_UNKNOWN_CONN_ID 0x02
495 #define HCI_ERROR_CODE_HW_FAILURE 0x03
496 #define HCI_ERROR_CODE_PAGE_TIMEOUT 0x04
497 #define HCI_ERROR_CODE_AUTH_FAILURE 0x05
498 #define HCI_ERROR_CODE_PIN_KEY_MISSING 0x06
499 #define HCI_ERROR_CODE_MEM_CAP_EXCEEDED 0x07
500 #define HCI_ERROR_CODE_CONN_TIMEOUT 0x08
501 #define HCI_ERROR_CODE_CONN_LIMIT_EXCEEDED 0x09
502 #define HCI_ERROR_CODE_SYNCH_CONN_LIMIT_EXCEEDED 0x0A
503 #define HCI_ERROR_CODE_ACL_CONN_ALREADY_EXISTS 0x0B
504 #define HCI_ERROR_CODE_CMD_DISALLOWED 0x0C
505 #define HCI_ERROR_CODE_CONN_REJ_LIMITED_RESOURCES 0x0D
506 #define HCI_ERROR_CODE_CONN_REJECTED_SECURITY_REASONS 0x0E
507 #define HCI_ERROR_CODE_CONN_REJECTED_UNACCEPTABLE_BDADDR 0x0F
508 #define HCI_ERROR_CODE_CONN_ACCEPT_TIMEOUT_EXCEEDED 0x10
509 #define HCI_ERROR_CODE_UNSUPPORTED_FEATURE_PARAM_VALUE 0x11
510 #define HCI_ERROR_CODE_INVALID_HCI_CMD_PARAMS 0x12
511 #define HCI_ERROR_CODE_REMOTE_USER_TERM_CONN 0x13
512 #define HCI_ERROR_CODE_REMOTE_DEVICE_TERM_CONN_LOW_RESOURCES 0x14
513 #define HCI_ERROR_CODE_REMOTE_DEVICE_TERM_CONN_POWER_OFF 0x15
514 #define HCI_ERROR_CODE_CONN_TERM_BY_LOCAL_HOST 0x16
515 #define HCI_ERROR_CODE_REPEATED_ATTEMPTS 0x17
516 #define HCI_ERROR_CODE_PAIRING_NOT_ALLOWED 0x18
517 #define HCI_ERROR_CODE_UNKNOWN_LMP_PDU 0x19
518 #define HCI_ERROR_CODE_UNSUPPORTED_REMOTE_FEATURE 0x1A
519 #define HCI_ERROR_CODE_SCO_OFFSET_REJ 0x1B
520 #define HCI_ERROR_CODE_SCO_INTERVAL_REJ 0x1C
521 #define HCI_ERROR_CODE_SCO_AIR_MODE_REJ 0x1D
522 #define HCI_ERROR_CODE_INVALID_LMP_PARAMS 0x1E
523 #define HCI_ERROR_CODE_UNSPECIFIED_ERROR 0x1F
524 #define HCI_ERROR_CODE_UNSUPPORTED_LMP_PARAM_VAL 0x20
525 #define HCI_ERROR_CODE_ROLE_CHANGE_NOT_ALLOWED 0x21
526 #define HCI_ERROR_CODE_LMP_LL_RESP_TIMEOUT 0x22
527 #define HCI_ERROR_CODE_LMP_ERR_TRANSACTION_COLLISION 0x23
528 #define HCI_ERROR_CODE_LMP_PDU_NOT_ALLOWED 0x24
529 #define HCI_ERROR_CODE_ENCRYPT_MODE_NOT_ACCEPTABLE 0x25
530 #define HCI_ERROR_CODE_LINK_KEY_CAN_NOT_BE_CHANGED 0x26
531 #define HCI_ERROR_CODE_REQ_QOS_NOT_SUPPORTED 0x27
532 #define HCI_ERROR_CODE_INSTANT_PASSED 0x28
533 #define HCI_ERROR_CODE_PAIRING_WITH_UNIT_KEY_NOT_SUPPORTED 0x29
534 #define HCI_ERROR_CODE_DIFFERENT_TRANSACTION_COLLISION 0x2A
535 #define HCI_ERROR_CODE_RESERVED1 0x2B
536 #define HCI_ERROR_CODE_QOS_UNACCEPTABLE_PARAM 0x2C
537 #define HCI_ERROR_CODE_QOS_REJ 0x2D
538 #define HCI_ERROR_CODE_CHAN_ASSESSMENT_NOT_SUPPORTED 0x2E
539 #define HCI_ERROR_CODE_INSUFFICIENT_SECURITY 0x2F
540 #define HCI_ERROR_CODE_PARAM_OUT_OF_MANDATORY_RANGE 0x30
541 #define HCI_ERROR_CODE_RESERVED2 0x31
542 #define HCI_ERROR_CODE_ROLE_SWITCH_PENDING 0x32
543 #define HCI_ERROR_CODE_RESERVED3 0x33
544 #define HCI_ERROR_CODE_RESERVED_SLOT_VIOLATION 0x34
545 #define HCI_ERROR_CODE_ROLE_SWITCH_FAILED 0x35
546 #define HCI_ERROR_CODE_EXTENDED_INQUIRY_RESP_TOO_LARGE 0x36
547 #define HCI_ERROR_CODE_SIMPLE_PAIRING_NOT_SUPPORTED_BY_HOST 0x37
548 #define HCI_ERROR_CODE_HOST_BUSY_PAIRING 0x38
549 #define HCI_ERROR_CODE_CONN_REJ_NO_SUITABLE_CHAN_FOUND 0x39
550 #define HCI_ERROR_CODE_CONTROLLER_BUSY 0x3A
551 #define HCI_ERROR_CODE_UNACCEPTABLE_CONN_PARAMETERS 0x3B
552 #define HCI_ERROR_CODE_DIRECTED_ADV_TIMEOUT 0x3C
553 #define HCI_ERROR_CODE_CONN_TERM_MIC_FAILURE 0x3D
554 #define HCI_ERROR_CODE_CONN_FAILED_TO_ESTABLISH 0x3E
555 #define HCI_ERROR_CODE_MAC_CONN_FAILED 0x3F
556 #define HCI_ERROR_CODE_COARSE_CLOCK_ADJUST_REJECTED 0x40
557 
563 #define HCI_MAX_NUM_CMD_BUFFERS LL_MAX_NUM_CMD_BUFFERS
564 #if defined(CC2540) || defined(CC2541) || defined(CC2541S)
565 #define HCI_MAX_NUM_DATA_BUFFERS LL_MAX_NUM_DATA_BUFFERS //<! Max Num Data Buffers
566 #endif // CC2540 | CC2541 | CC2541S
567 
568 /*
569 ** HCI Command API Parameters
570 */
571 
572 // Send Data Packet Boundary Flags
573 #define FIRST_PKT_HOST_TO_CTRL LL_DATA_FIRST_PKT_HOST_TO_CTRL
574 #define CONTINUING_PKT LL_DATA_CONTINUATION_PKT
575 #define FIRST_PKT_CTRL_TO_HOST LL_DATA_FIRST_PKT_CTRL_TO_HOST
576 
577 
579 #define HCI_RSSI_NOT_AVAILABLE LL_RSSI_NOT_AVAILABLE
580 
584 #define HCI_DISCONNECT_AUTH_FAILURE HCI_ERROR_CODE_AUTH_FAILURE
585 #define HCI_DISCONNECT_REMOTE_USER_TERM HCI_ERROR_CODE_REMOTE_USER_TERM_CONN
586 #define HCI_DISCONNECT_REMOTE_DEV_LOW_RESOURCES HCI_ERROR_CODE_REMOTE_DEVICE_TERM_CONN_LOW_RESOURCES
587 #define HCI_DISCONNECT_REMOTE_DEV_POWER_OFF HCI_ERROR_CODE_REMOTE_DEVICE_TERM_CONN_POWER_OFF
588 #define HCI_DISCONNECT_UNSUPPORTED_REMOTE_FEATURE HCI_ERROR_CODE_UNSUPPORTED_REMOTE_FEATURE
589 #define HCI_DISCONNECT_KEY_PAIRING_NOT_SUPPORTED HCI_ERROR_CODE_PAIRING_WITH_UNIT_KEY_NOT_SUPPORTED
590 #define HCI_DISCONNECT_UNACCEPTABLE_CONN_INTERVAL HCI_ERROR_CODE_UNACCEPTABLE_CONN_INTERVAL
591 
596 // Tx Power Types
597 #define HCI_READ_CURRENT_TX_POWER_LEVEL LL_READ_CURRENT_TX_POWER_LEVEL
598 #define HCI_READ_MAX_TX_POWER_LEVEL LL_READ_MAX_TX_POWER_LEVEL
599 
604 #define HCI_CTRL_TO_HOST_FLOW_CTRL_OFF 0
605 #define HCI_CTRL_TO_HOST_FLOW_CTRL_ACL_ON_SYNCH_OFF 1
606 #define HCI_CTRL_TO_HOST_FLOW_CTRL_ACL_OFF_SYNCH_ON 2
607 #define HCI_CTRL_TO_HOST_FLOW_CTRL_ACL_ON_SYNCH_ON 3
608 
613 #define HCI_PUBLIC_DEVICE_ADDRESS LL_DEV_ADDR_TYPE_PUBLIC
614 #define HCI_RANDOM_DEVICE_ADDRESS LL_DEV_ADDR_TYPE_RANDOM
615 
620 #define HCI_CONNECTABLE_UNDIRECTED_ADV LL_ADV_CONNECTABLE_UNDIRECTED_EVT
621 #define HCI_CONNECTABLE_DIRECTED_HDC_ADV LL_ADV_CONNECTABLE_DIRECTED_HDC_EVT
622 #define HCI_SCANNABLE_UNDIRECTED LL_ADV_SCANNABLE_UNDIRECTED_EVT
623 #define HCI_NONCONNECTABLE_UNDIRECTED_ADV LL_ADV_NONCONNECTABLE_UNDIRECTED_EVT
624 #define HCI_CONNECTABLE_DIRECTED_LDC_ADV LL_ADV_CONNECTABLE_DIRECTED_LDC_EVT
625 
630 #define HCI_ADV_CHAN_37 LL_ADV_CHAN_37
631 #define HCI_ADV_CHAN_38 LL_ADV_CHAN_38
632 #define HCI_ADV_CHAN_39 LL_ADV_CHAN_39
633 #define HCI_ADV_CHAN_ALL (LL_ADV_CHAN_37 | LL_ADV_CHAN_38 | LL_ADV_CHAN_39)
634 
639 #define HCI_ADV_WL_POLICY_ANY_REQ LL_ADV_WL_POLICY_ANY_REQ
640 #define HCI_ADV_WL_POLICY_WL_SCAN_REQ LL_ADV_WL_POLICY_WL_SCAN_REQ
641 #define HCI_ADV_WL_POLICY_WL_CONNECT_REQ LL_ADV_WL_POLICY_WL_CONNECT_REQ
642 #define HCI_ADV_WL_POLICY_WL_ALL_REQ LL_ADV_WL_POLICY_WL_ALL_REQ
643 
648 #define HCI_ENABLE_ADV LL_ADV_MODE_ON
649 #define HCI_DISABLE_ADV LL_ADV_MODE_OFF
650 
655 #define HCI_SCAN_PASSIVE LL_SCAN_PASSIVE
656 #define HCI_SCAN_ACTIVE LL_SCAN_ACTIVE
657 
662 // Scan White List Policy
663 #define HCI_SCAN_WL_POLICY_ANY_ADV_PKTS LL_SCAN_WL_POLICY_ANY_ADV_PKTS
664 #define HCI_SCAN_WL_POLICY_USE_WHITE_LIST LL_SCAN_WL_POLICY_USE_WHITE_LIST
665 
670 // Scan Filtering
671 #define HCI_FILTER_REPORTS_DISABLE LL_FILTER_REPORTS_DISABLE
672 #define HCI_FILTER_REPORTS_ENABLE LL_FILTER_REPORTS_ENABLE
673 
678 // Scan Commands
679 #define HCI_SCAN_STOP LL_SCAN_STOP
680 #define HCI_SCAN_START LL_SCAN_START
681 
686 #define HCI_INIT_WL_POLICY_USE_PEER_ADDR LL_INIT_WL_POLICY_USE_PEER_ADDR
687 #define HCI_INIT_WL_POLICY_USE_WHITE_LIST LL_INIT_WL_POLICY_USE_WHITE_LIST
688 
693 #define HCI_ENCRYPTION_OFF LL_ENCRYPTION_OFF
694 #define HCI_ENCRYPTION_ON LL_ENCRYPTION_ON
695 
700 #define HCI_DIRECT_TEST_PAYLOAD_PRBS9 LL_DIRECT_TEST_PAYLOAD_PRBS9
701 #define HCI_DIRECT_TEST_PAYLOAD_0x0F LL_DIRECT_TEST_PAYLOAD_0x0F
702 #define HCI_DIRECT_TEST_PAYLOAD_0x55 LL_DIRECT_TEST_PAYLOAD_0x55
703 #define HCI_DIRECT_TEST_PAYLOAD_PRBS15 LL_DIRECT_TEST_PAYLOAD_PRBS15
704 #define HCI_DIRECT_TEST_PAYLOAD_0xFF LL_DIRECT_TEST_PAYLOAD_0xFF
705 #define HCI_DIRECT_TEST_PAYLOAD_0x00 LL_DIRECT_TEST_PAYLOAD_0x00
706 #define HCI_DIRECT_TEST_PAYLOAD_0xF0 LL_DIRECT_TEST_PAYLOAD_0xF0
707 #define HCI_DIRECT_TEST_PAYLOAD_0xAA LL_DIRECT_TEST_PAYLOAD_0xAA
708 
713 #define HCI_DTM_STANDARD_MODULATION_INDEX LL_DTM_STANDARD_MODULATION_INDEX
714 #define HCI_DTM_STABLE_MODULATION_INDEX LL_DTM_STABLE_MODULATION_INDEX
715 
720 #define HCI_DISABLE_ADDR_RESOLUTION LL_DISABLE_ADDR_RESOLUTION
721 #define HCI_ENABLE_ADDR_RESOLUTION LL_ENABLE_ADDR_RESOLUTION
722 
727 #define HCI_PHY_USE_PHY_PARAM LL_PHY_USE_PHY_PARAM
728 #define HCI_PHY_USE_ANY_PHY LL_PHY_USE_ANY_PHY
729 
734 #define HCI_PHY_1_MBPS LL_PHY_1_MBPS
735 #define HCI_PHY_2_MBPS LL_PHY_2_MBPS
736 
741 #define HCI_EXT_RX_GAIN_STD LL_EXT_RX_GAIN_STD
742 #define HCI_EXT_RX_GAIN_HIGH LL_EXT_RX_GAIN_HIGH
743 
748 #if defined( CC26XX ) || defined( CC13XX )
749 #define HCI_EXT_TX_POWER_MINUS_21_DBM LL_EXT_TX_POWER_MINUS_21_DBM
750 #define HCI_EXT_TX_POWER_MINUS_18_DBM LL_EXT_TX_POWER_MINUS_18_DBM
751 #define HCI_EXT_TX_POWER_MINUS_15_DBM LL_EXT_TX_POWER_MINUS_15_DBM
752 #define HCI_EXT_TX_POWER_MINUS_12_DBM LL_EXT_TX_POWER_MINUS_12_DBM
753 #define HCI_EXT_TX_POWER_MINUS_9_DBM LL_EXT_TX_POWER_MINUS_9_DBM
754 #define HCI_EXT_TX_POWER_MINUS_6_DBM LL_EXT_TX_POWER_MINUS_6_DBM
755 #define HCI_EXT_TX_POWER_MINUS_3_DBM LL_EXT_TX_POWER_MINUS_3_DBM
756 #define HCI_EXT_TX_POWER_0_DBM LL_EXT_TX_POWER_0_DBM
757 #define HCI_EXT_TX_POWER_1_DBM LL_EXT_TX_POWER_1_DBM
758 #define HCI_EXT_TX_POWER_2_DBM LL_EXT_TX_POWER_2_DBM
759 #define HCI_EXT_TX_POWER_3_DBM LL_EXT_TX_POWER_3_DBM
760 #define HCI_EXT_TX_POWER_4_DBM LL_EXT_TX_POWER_4_DBM
761 #define HCI_EXT_TX_POWER_5_DBM LL_EXT_TX_POWER_5_DBM
762 #else // CC254x
763 #define HCI_EXT_TX_POWER_MINUS_23_DBM LL_EXT_TX_POWER_MINUS_23_DBM
764 #define HCI_EXT_TX_POWER_MINUS_6_DBM LL_EXT_TX_POWER_MINUS_6_DBM
765 #define HCI_EXT_TX_POWER_0_DBM LL_EXT_TX_POWER_0_DBM
766 #define HCI_EXT_TX_POWER_4_DBM LL_EXT_TX_POWER_4_DBM
767 #endif // CC26XX/CC13XX
768 
773 #define HCI_EXT_ENABLE_ONE_PKT_PER_EVT LL_EXT_ENABLE_ONE_PKT_PER_EVT
774 #define HCI_EXT_DISABLE_ONE_PKT_PER_EVT LL_EXT_DISABLE_ONE_PKT_PER_EVT
775 
780 #define HCI_EXT_ENABLE_CLK_DIVIDE_ON_HALT LL_EXT_ENABLE_CLK_DIVIDE_ON_HALT
781 #define HCI_EXT_DISABLE_CLK_DIVIDE_ON_HALT LL_EXT_DISABLE_CLK_DIVIDE_ON_HALT
782 
787 #define HCI_EXT_NV_IN_USE LL_EXT_NV_IN_USE
788 #define HCI_EXT_NV_NOT_IN_USE LL_EXT_NV_NOT_IN_USE
789 
794 #define HCI_EXT_ENABLE_FAST_TX_RESP_TIME LL_EXT_ENABLE_FAST_TX_RESP_TIME
795 #define HCI_EXT_DISABLE_FAST_TX_RESP_TIME LL_EXT_DISABLE_FAST_TX_RESP_TIME
796 
801 #define HCI_EXT_ENABLE_SL_OVERRIDE LL_EXT_ENABLE_SL_OVERRIDE
802 #define HCI_EXT_DISABLE_SL_OVERRIDE LL_EXT_DISABLE_SL_OVERRIDE
803 
808 #define HCI_EXT_TX_MODULATED_CARRIER LL_EXT_TX_MODULATED_CARRIER
809 #define HCI_EXT_TX_UNMODULATED_CARRIER LL_EXT_TX_UNMODULATED_CARRIER
810 
815 #define HCI_PTM_SET_FREQ_TUNE_DOWN LL_EXT_SET_FREQ_TUNE_DOWN
816 #define HCI_PTM_SET_FREQ_TUNE_UP LL_EXT_SET_FREQ_TUNE_UP
817 
821 #define HCI_EXT_PM_IO_PORT_P0 LL_EXT_PM_IO_PORT_P0
822 #define HCI_EXT_PM_IO_PORT_P1 LL_EXT_PM_IO_PORT_P1
823 #define HCI_EXT_PM_IO_PORT_P2 LL_EXT_PM_IO_PORT_P2
824 #define HCI_EXT_PM_IO_PORT_NONE LL_EXT_PM_IO_PORT_NONE
825 
826 #define HCI_EXT_PM_IO_PORT_PIN0 LL_EXT_PM_IO_PORT_PIN0
827 #define HCI_EXT_PM_IO_PORT_PIN1 LL_EXT_PM_IO_PORT_PIN1
828 #define HCI_EXT_PM_IO_PORT_PIN2 LL_EXT_PM_IO_PORT_PIN2
829 #define HCI_EXT_PM_IO_PORT_PIN3 LL_EXT_PM_IO_PORT_PIN3
830 #define HCI_EXT_PM_IO_PORT_PIN4 LL_EXT_PM_IO_PORT_PIN4
831 #define HCI_EXT_PM_IO_PORT_PIN5 LL_EXT_PM_IO_PORT_PIN5
832 #define HCI_EXT_PM_IO_PORT_PIN6 LL_EXT_PM_IO_PORT_PIN6
833 #define HCI_EXT_PM_IO_PORT_PIN7 LL_EXT_PM_IO_PORT_PIN7
834 
839 #define HCI_EXT_PER_RESET LL_EXT_PER_RESET
840 #define HCI_EXT_PER_READ LL_EXT_PER_READ
841 
846 #define HCI_EXT_HALT_DURING_RF_DISABLE LL_EXT_HALT_DURING_RF_DISABLE
847 #define HCI_EXT_HALT_DURING_RF_ENABLE LL_EXT_HALT_DURING_RF_ENABLE
848 
853 #define HCI_EXT_SET_USER_REVISION LL_EXT_SET_USER_REVISION
854 #define HCI_EXT_READ_BUILD_REVISION LL_EXT_READ_BUILD_REVISION
855 
860 #define HCI_EXT_RESET_SYSTEM_HARD LL_EXT_RESET_SYSTEM_HARD
861 #define HCI_EXT_RESET_SYSTEM_SOFT LL_EXT_RESET_SYSTEM_SOFT
862 
867 #define HCI_EXT_DISABLE_OVERLAPPED_PROCESSING LL_EXT_DISABLE_OVERLAPPED_PROCESSING
868 #define HCI_EXT_ENABLE_OVERLAPPED_PROCESSING LL_EXT_ENABLE_OVERLAPPED_PROCESSING
869 
874 #define HCI_EXT_DISABLE_NUM_COMPL_PKTS_ON_EVENT LL_EXT_DISABLE_NUM_COMPL_PKTS_ON_EVENT
875 #define HCI_EXT_ENABLE_NUM_COMPL_PKTS_ON_EVENT LL_EXT_ENABLE_NUM_COMPL_PKTS_ON_EVENT
876 
881 #define HCI_EXT_DISABLE_SCAN_REQUEST_REPORT LL_EXT_DISABLE_SCAN_REQUEST_REPORT
882 #define HCI_EXT_ENABLE_SCAN_REQUEST_REPORT LL_EXT_ENABLE_SCAN_REQUEST_REPORT
883 
890 // HCI Link Type for Buffer Overflow
891 #define HCI_LINK_TYPE_SCO_BUFFER_OVERFLOW 0
892 #define HCI_LINK_TYPE_ACL_BUFFER_OVERFLOW 1
893 
897 /*
898  * TYPEDEFS
899  */
900 
902 typedef uint8 hciStatus_t;
904 
909 typedef struct
911 {
913  uint8 BLEEventCode;
914  uint8 status;
916  uint8 role;
917  uint8 peerAddrType;
918  uint8 peerAddr[B_ADDR_LEN];
919  uint16 connInterval;
920  uint16 connLatency;
921  uint16 connTimeout;
924 
926 typedef struct
927 {
929  uint8 BLEEventCode;
930  uint8 status;
932  uint8 role;
933  uint8 peerAddrType;
934  uint8 peerAddr[B_ADDR_LEN];
935  uint16 connInterval;
936  uint16 connLatency;
937  uint16 connTimeout;
939  // Note: These fields normally follow peerAddr. Put here for Host optimization.
940  uint8 localRPA[B_ADDR_LEN];
941  uint8 peerRPA[B_ADDR_LEN];
943 
946 {
950 
952 typedef struct
953 {
954  uint8 eventType;
955  uint8 addrType;
956  uint8 addr[B_ADDR_LEN];
957  uint8 dataLen;
958  uint8 rspData[B_MAX_ADV_LEN];
959  int8 rssi;
961 
963 typedef struct
964 {
966  uint8 BLEEventCode;
967  uint8 numDevices;
970 
972 typedef struct
973 {
975  uint8 BLEEventCode;
976  uint8 eventType;
977  uint8 peerAddrType;
978  uint8 peerAddr[B_ADDR_LEN];
979  uint8 ownAddrType;
980  uint8 ownAddr[B_ADDR_LEN];
981  uint8 bleChan;
982  int8 rssi;
984 
986 typedef struct
987 {
989  uint8 BLEEventCode;
990  uint8 status;
992  uint16 connInterval;
993  uint16 connLatency;
994  uint16 connTimeout;
996 
998 typedef struct
999 {
1002  uint8 status;
1004  uint8 features[8];
1006 
1008 typedef struct
1009 {
1012  uint16 connHandle;
1013  uint8 reason;
1014  uint8 encEnable;
1016 
1018 typedef struct
1019 {
1022  uint16 connHandle;
1023  uint8 random[B_RANDOM_NUM_SIZE];
1026 
1028 typedef struct
1029 {
1031  uint8 numHandles;
1035 
1037 typedef struct
1038 {
1041  uint16 cmdOpcode;
1042  uint8 *pReturnParam;
1044 
1046 typedef struct
1047 {
1049  uint8 length;
1050  uint16 cmdOpcode;
1051  uint8 *pEventParam;
1053 
1055 typedef struct
1056 {
1058  uint8 cmdStatus;
1060  uint16 cmdOpcode;
1062 
1064 typedef struct
1065 {
1069 
1071 typedef struct
1072 {
1074  uint8 status;
1075  uint16 connHandle;
1076  uint8 reason;
1078 
1080 typedef struct
1081 {
1083  uint8 linkType;
1085 
1087 typedef struct
1088 {
1090  uint16 connHandle;
1092 
1094 typedef struct
1095 {
1098  uint8 status;
1099  uint16 connHandle;
1100  uint16 Interval_Min;
1101  uint16 Interval_Max;
1102  uint16 Latency;
1103  uint16 Timeout;
1105 
1107 typedef struct
1108 {
1111  uint8 status;
1112  uint16 connHandle;
1113  uint8 txPhy;
1114  uint8 rxPhy;
1116 
1118 typedef struct
1119 {
1122  uint16 connHandle;
1123  uint16 maxTxOctets;
1124  uint16 maxTxTime;
1125  uint16 maxRxOctets;
1126  uint16 maxRxTime;
1128 
1130 typedef struct
1131 {
1134  uint8 status;
1135  uint8 p256Key[LL_SC_P256_KEY_LEN];
1137 
1139 typedef struct
1140 {
1143  uint8 status;
1144  uint8 dhKey[LL_SC_DHKEY_LEN];
1146 
1148 typedef struct
1149 {
1150  uint8 status;
1151  uint16 dataPktLen;
1152  uint8 numDataPkts;
1154 
1156 typedef struct
1157 {
1159  uint8 *pData;
1160 } hciPacket_t;
1161 
1163 typedef struct
1164 {
1166  uint8 pktType;
1167  uint16 connHandle;
1168  uint8 pbFlag;
1169  uint16 pktLen;
1170  uint8 *pData;
1171 } hciDataPacket_t;
1172 
1174 
1175 // OSAL HCI_DATA_EVENT message format. This message is used to forward incoming
1176 // data messages up to an application
1177 typedef struct
1178 {
1179  osal_event_hdr_t hdr;
1180  uint16 connHandle;
1181  uint8 pbFlag;
1182  uint16 len;
1183  uint8 *pData;
1184 } hciDataEvent_t;
1185 
1187 
1188 #if defined( CC26XX ) || defined( CC13XX )
1189 PACKED_TYPEDEF_STRUCT
1190 #else // CC254x
1191 typedef struct
1192 #endif // CC26XX/CC13XX
1193 {
1194  uint8 connId;
1195  uint8 role;
1196  uint8 addr[LL_DEVICE_ADDR_LEN];
1197  uint8 addrType;
1198 } hciConnInfo_t;
1199 
1200 #if defined( CC26XX ) || defined( CC13XX )
1201 PACKED_TYPEDEF_STRUCT
1202 #else // CC254x
1203 typedef struct
1204 #endif // CC26XX/CC13XX
1205 {
1206  uint16 numPkts;
1207  uint16 numCrcErr;
1208  uint16 numEvents;
1210 } hciPER_t;
1211 
1214 /*
1215  * LOCAL VARIABLES
1216  */
1217 
1218 /*
1219  * GLOBAL VARIABLES
1220  */
1221 
1223 
1224 /*
1225 ** HCI Support Functions
1226 */
1227 
1246 extern void *HCI_bm_alloc( uint16 size );
1247 
1249 
1250 
1265 extern uint8 HCI_ValidConnTimeParams( uint16 connIntervalMin,
1266  uint16 connIntervalMax,
1267  uint16 connLatency,
1268  uint16 connTimeout );
1269 
1277 extern void HCI_TestAppTaskRegister( uint8 taskID );
1278 
1285 extern void HCI_GAPTaskRegister( uint8 taskID );
1286 
1292 extern void HCI_L2CAPTaskRegister( uint8 taskID );
1293 
1299 extern void HCI_SMPTaskRegister( uint8 taskID );
1300 
1306 extern void HCI_ExtTaskRegister( uint8 taskID );
1307 
1308 
1327 extern hciStatus_t HCI_SendDataPkt( uint16 connHandle,
1328  uint8 pbFlag,
1329  uint16 pktLen,
1330  uint8 *pData );
1331 
1350 extern hciStatus_t HCI_DisconnectCmd( uint16 connHandle,
1351  uint8 reason );
1352 
1353 
1365 extern hciStatus_t HCI_ReadRemoteVersionInfoCmd( uint16 connHandle );
1366 
1367 
1378 extern hciStatus_t HCI_SetEventMaskCmd( uint8 *pMask );
1379 
1380 
1391 extern hciStatus_t HCI_SetEventMaskPage2Cmd( uint8 *pMask );
1392 
1393 
1401 extern hciStatus_t HCI_ResetCmd( void );
1402 
1414 extern hciStatus_t HCI_ReadTransmitPowerLevelCmd( uint16 connHandle,
1415  uint8 txPwrType );
1416 
1417 
1433 extern hciStatus_t HCI_SetControllerToHostFlowCtrlCmd( uint8 flowControlEnable );
1434 
1435 
1456 extern hciStatus_t HCI_HostBufferSizeCmd( uint16 hostAclPktLen,
1457  uint8 hostSyncPktLen,
1458  uint16 hostTotalNumAclPkts,
1459  uint16 hostTotalNumSyncPkts );
1460 
1461 
1489 extern hciStatus_t HCI_HostNumCompletedPktCmd( uint8 numHandles,
1490  uint16 *connHandles,
1491  uint16 *numCompletedPkts );
1492 
1493 
1503 extern hciStatus_t HCI_ReadAuthPayloadTimeoutCmd( uint16 connHandle,
1504  uint16 *aptoValue );
1505 
1506 
1515 extern hciStatus_t HCI_WriteAuthPayloadTimeoutCmd( uint16 connHandle,
1516  uint16 aptoValue );
1517 
1518 
1526 extern hciStatus_t HCI_ReadLocalVersionInfoCmd( void );
1527 
1528 
1536 extern hciStatus_t HCI_ReadLocalSupportedCommandsCmd( void );
1537 
1538 
1546 extern hciStatus_t HCI_ReadLocalSupportedFeaturesCmd( void );
1547 
1548 
1556 extern hciStatus_t HCI_ReadBDADDRCmd( void );
1557 
1558 
1575 extern hciStatus_t HCI_ReadRssiCmd( uint16 connHandle );
1576 
1587 extern hciStatus_t HCI_LE_SetEventMaskCmd( uint8 *pEventMask );
1588 
1589 
1598 extern hciStatus_t HCI_LE_ReadBufSizeCmd( void );
1599 
1600 
1608 extern hciStatus_t HCI_LE_ReadLocalSupportedFeaturesCmd( void );
1609 
1610 
1620 extern hciStatus_t HCI_LE_SetRandomAddressCmd( uint8 *pRandAddr );
1621 
1622 
1655 extern hciStatus_t HCI_LE_SetAdvParamCmd( uint16 advIntervalMin,
1656  uint16 advIntervalMax,
1657  uint8 advType,
1658  uint8 ownAddrType,
1659  uint8 directAddrType,
1660  uint8 *directAddr,
1661  uint8 advChannelMap,
1662  uint8 advFilterPolicy );
1663 
1664 
1675 extern hciStatus_t HCI_LE_SetAdvDataCmd( uint8 dataLen,
1676  uint8 *pData );
1677 
1678 
1689 extern hciStatus_t HCI_LE_SetScanRspDataCmd( uint8 dataLen,
1690  uint8 *pData );
1691 
1692 
1702 extern hciStatus_t HCI_LE_SetAdvEnableCmd( uint8 advEnable );
1703 
1704 
1712 extern hciStatus_t HCI_LE_ReadAdvChanTxPowerCmd( void );
1713 
1714 
1734 extern hciStatus_t HCI_LE_SetScanParamCmd( uint8 scanType,
1735  uint16 scanInterval,
1736  uint16 scanWindow,
1737  uint8 ownAddrType,
1738  uint8 filterPolicy );
1739 
1740 
1753 extern hciStatus_t HCI_LE_SetScanEnableCmd( uint8 scanEnable,
1754  uint8 filterDuplicates );
1755 
1756 
1788 extern hciStatus_t HCI_LE_CreateConnCmd( uint16 scanInterval,
1789  uint16 scanWindow,
1790  uint8 initFilterPolicy,
1791  uint8 addrTypePeer,
1792  uint8 *peerAddr,
1793  uint8 ownAddrType,
1794  uint16 connIntervalMin,
1795  uint16 connIntervalMax,
1796  uint16 connLatency,
1797  uint16 connTimeout,
1798  uint16 minLen,
1799  uint16 maxLen );
1800 
1801 
1809 extern hciStatus_t HCI_LE_CreateConnCancelCmd( void );
1810 
1811 
1819 extern hciStatus_t HCI_LE_ReadWhiteListSizeCmd( void );
1820 
1821 
1829 extern hciStatus_t HCI_LE_ClearWhiteListCmd( void );
1830 
1831 
1842 extern hciStatus_t HCI_LE_AddWhiteListCmd( uint8 addrType,
1843  uint8 *devAddr );
1844 
1845 
1857 extern hciStatus_t HCI_LE_RemoveWhiteListCmd( uint8 addrType,
1858  uint8 *devAddr );
1859 
1860 
1877 extern hciStatus_t HCI_LE_ConnUpdateCmd( uint16 connHandle,
1878  uint16 connIntervalMin,
1879  uint16 connIntervalMax,
1880  uint16 connLatency,
1881  uint16 connTimeout,
1882  uint16 minLen,
1883  uint16 maxLen );
1884 
1885 
1895 extern hciStatus_t HCI_LE_SetHostChanClassificationCmd( uint8 *chanMap );
1896 
1897 
1907 extern hciStatus_t HCI_LE_ReadChannelMapCmd( uint16 connHandle );
1908 
1909 
1920 extern hciStatus_t HCI_LE_ReadRemoteUsedFeaturesCmd( uint16 connHandle );
1921 
1922 
1935 extern hciStatus_t HCI_LE_EncryptCmd( uint8 *key,
1936  uint8 *plainText );
1937 
1938 
1946 extern hciStatus_t HCI_LE_RandCmd( void );
1947 
1948 
1963 extern hciStatus_t HCI_LE_StartEncyptCmd( uint16 connHandle,
1964  uint8 *random,
1965  uint8 *encDiv,
1966  uint8 *ltk );
1967 
1968 
1980 extern hciStatus_t HCI_LE_LtkReqReplyCmd( uint16 connHandle,
1981  uint8 *ltk );
1982 
1983 
1994 extern hciStatus_t HCI_LE_LtkReqNegReplyCmd( uint16 connHandle );
1995 
1996 
2004 extern hciStatus_t HCI_LE_ReadSupportedStatesCmd( void );
2005 
2006 
2019 extern hciStatus_t HCI_LE_ReceiverTestCmd( uint8 rxChan );
2020 
2021 
2043 extern hciStatus_t HCI_LE_TransmitterTestCmd( uint8 txChan,
2044  uint8 dataLen,
2045  uint8 pktPayload );
2046 
2047 
2058 extern hciStatus_t HCI_LE_TestEndCmd( void );
2059 
2060 // V4.1
2061 
2080 extern hciStatus_t HCI_LE_RemoteConnParamReqReplyCmd( uint16 connHandle,
2081  uint16 connIntervalMin,
2082  uint16 connIntervalMax,
2083  uint16 connLatency,
2084  uint16 connTimeout,
2085  uint16 minLen,
2086  uint16 maxLen );
2087 
2088 
2104 extern hciStatus_t HCI_LE_RemoteConnParamReqNegReplyCmd( uint16 connHandle,
2105  uint8 reason );
2106 
2107 
2108 // V4.2 - Extended Data Length
2109 
2122 extern hciStatus_t HCI_LE_SetDataLenCmd( uint16 connHandle,
2123  uint16 txOctets,
2124  uint16 txTime );
2125 
2126 
2136 extern hciStatus_t HCI_LE_ReadSuggestedDefaultDataLenCmd( void );
2137 
2138 
2151 extern hciStatus_t HCI_LE_WriteSuggestedDefaultDataLenCmd( uint16 txOctets,
2152  uint16 txTime );
2153 
2154 
2163 extern hciStatus_t HCI_LE_ReadMaxDataLenCmd( void );
2164 
2165 
2166 // V4.2 - Privacy 1.2
2167 
2183 extern hciStatus_t HCI_LE_AddDeviceToResolvingListCmd( uint8 peerIdAddrType,
2184  uint8 *peerIdAddr,
2185  uint8 *peerIRK,
2186  uint8 *localIRK );
2187 
2188 
2202 extern hciStatus_t HCI_LE_RemoveDeviceFromResolvingListCmd( uint8 peerIdAddrType,
2203  uint8 *peerIdAddr );
2204 
2205 
2215 extern hciStatus_t HCI_LE_ClearResolvingListCmd( void );
2216 
2217 
2227 extern hciStatus_t HCI_LE_ReadResolvingListSizeCmd( void );
2228 
2229 
2246 extern hciStatus_t HCI_LE_ReadPeerResolvableAddressCmd( uint8 peerIdAddrType,
2247  uint8 *peerIdAddr );
2248 
2249 
2266 extern hciStatus_t HCI_LE_ReadLocalResolvableAddressCmd( uint8 localIdAddrType,
2267  uint8 *localIdAddr );
2268 
2269 
2283 extern hciStatus_t HCI_LE_SetAddressResolutionEnableCmd( uint8 addrResolutionEnable );
2284 
2285 
2301 extern hciStatus_t HCI_LE_SetResolvablePrivateAddressTimeoutCmd( uint16 rpaTimeout );
2302 
2303 
2304 // V4.2 - Secure Connections
2305 
2319 extern hciStatus_t HCI_LE_ReadLocalP256PublicKeyCmd( void );
2320 
2321 
2339 extern hciStatus_t HCI_LE_GenerateDHKeyCmd( uint8 *publicKey );
2340 
2341 
2342 // V5.0 - 2Mbps PHY
2343 
2351 extern hciStatus_t HCI_LE_ReadPhyCmd( uint16 connHandle );
2352 
2353 
2367 extern hciStatus_t HCI_LE_SetDefaultPhyCmd( uint8 allPhys,
2368  uint8 txPhy,
2369  uint8 rxPhy );
2370 
2371 
2383 extern hciStatus_t HCI_LE_SetPhyCmd( uint16 connHandle,
2384  uint8 allPhys,
2385  uint8 txPhy,
2386  uint8 rxPhy );
2387 
2388 
2403 extern hciStatus_t HCI_LE_EnhancedRxTestCmd( uint8 rxChan,
2404  uint8 rxPhy,
2405  uint8 modIndex );
2406 
2407 
2422 extern hciStatus_t HCI_LE_EnhancedTxTestCmd( uint8 txChan,
2423  uint8 payloadLen,
2424  uint8 payloadType,
2425  uint8 txPhy );
2426 
2427 /*
2428 ** HCI Vendor Specific Commands: Link Layer Extensions
2429 */
2430 
2440 extern hciStatus_t HCI_EXT_SetRxGainCmd( uint8 rxGain );
2441 
2442 
2469 extern hciStatus_t HCI_EXT_SetTxPowerCmd( uint8 txPower );
2470 
2471 
2483 extern hciStatus_t HCI_EXT_OnePktPerEvtCmd( uint8 control );
2484 
2485 
2496 extern hciStatus_t HCI_EXT_ClkDivOnHaltCmd( uint8 control );
2497 
2498 
2510 extern hciStatus_t HCI_EXT_DeclareNvUsageCmd( uint8 mode );
2511 
2512 
2524 extern hciStatus_t HCI_EXT_DecryptCmd( uint8 *key,
2525  uint8 *encText );
2526 
2527 
2538 extern hciStatus_t HCI_EXT_SetLocalSupportedFeaturesCmd( uint8 *localFeatures );
2539 
2540 
2552 extern hciStatus_t HCI_EXT_SetFastTxResponseTimeCmd( uint8 control );
2553 
2554 
2566 extern hciStatus_t HCI_EXT_SetSlaveLatencyOverrideCmd( uint8 control );
2567 
2587 extern hciStatus_t HCI_EXT_ModemTestTxCmd( uint8 cwMode,
2588  uint8 txChan );
2589 
2590 
2608 extern hciStatus_t HCI_EXT_ModemHopTestTxCmd( void );
2609 
2610 
2629 extern hciStatus_t HCI_EXT_ModemTestRxCmd( uint8 rxChan );
2630 
2631 
2639 extern hciStatus_t HCI_EXT_EndModemTestCmd( void );
2640 
2641 
2657 extern hciStatus_t HCI_EXT_SetBDADDRCmd( uint8 *bdAddr );
2658 
2659 
2678 extern hciStatus_t HCI_EXT_SetSCACmd( uint16 scaInPPM );
2679 
2680 
2691 extern hciStatus_t HCI_EXT_EnablePTMCmd( void );
2692 
2693 
2705 extern hciStatus_t HCI_EXT_SetFreqTuneCmd( uint8 step );
2706 
2707 
2716 extern hciStatus_t HCI_EXT_SaveFreqTuneCmd( void );
2717 
2718 
2746 extern hciStatus_t HCI_EXT_SetMaxDtmTxPowerCmd( uint8 txPower );
2747 
2791 extern hciStatus_t HCI_EXT_MapPmIoPortCmd( uint8 ioPort, uint8 ioPin );
2792 
2806 extern hciStatus_t HCI_EXT_DisconnectImmedCmd( uint16 connHandle );
2807 
2808 
2821 extern hciStatus_t HCI_EXT_PacketErrorRateCmd( uint16 connHandle, uint8 command );
2822 
2823 
2843 extern hciStatus_t HCI_EXT_PERbyChanCmd( uint16 connHandle, perByChan_t *perByChan );
2844 
2845 
2854 extern hciStatus_t HCI_EXT_ExtendRfRangeCmd( void );
2855 
2856 
2870 extern hciStatus_t HCI_EXT_HaltDuringRfCmd( uint8 mode );
2871 
2872 
2885 extern hciStatus_t HCI_EXT_AdvEventNoticeCmd( uint8 taskID, uint16 taskEvent );
2886 
2887 
2902 extern hciStatus_t HCI_EXT_ScanEventNoticeCmd( uint8 taskID, uint16 taskEvent );
2903 
2904 
2920 extern hciStatus_t HCI_EXT_ConnEventNoticeCmd( uint16 connHandle, uint8 taskID, uint16 taskEvent );
2921 
2922 
2933 extern hciStatus_t HCI_EXT_BuildRevisionCmd( uint8 mode, uint16 userRevNum );
2934 
2935 
2943 extern hciStatus_t HCI_EXT_DelaySleepCmd( uint16 delay );
2944 
2945 
2956 extern hciStatus_t HCI_EXT_ResetSystemCmd( uint8 mode );
2957 
2958 
2966 extern hciStatus_t HCI_EXT_LLTestModeCmd( uint8 testCase );
2967 
2968 
2978 extern hciStatus_t HCI_EXT_OverlappedProcessingCmd( uint8 mode );
2979 
2980 
2995 extern hciStatus_t HCI_EXT_NumComplPktsLimitCmd( uint8 limit,
2996  uint8 flushOnEvt );
2997 
2998 
3027 extern hciStatus_t HCI_EXT_GetConnInfoCmd( uint8 *numAllocConns,
3028  uint8 *numActiveConns,
3029  hciConnInfo_t *activeConnInfo );
3030 
3031 
3046 extern hciStatus_t HCI_EXT_SetMaxDataLenCmd( uint16 txOctets,
3047  uint16 txTime,
3048  uint16 rxOctets,
3049  uint16 rxTime );
3050 
3051 
3060 extern hciStatus_t HCI_EXT_ScanReqRptCmd( uint8 mode );
3061 
3062 
3071 extern hciStatus_t HCI_EXT_ScanReqRptCmd( uint8 mode );
3072 
3073 
3074 #ifdef __cplusplus
3075 }
3076 #endif
3077 
3078 #endif /* HCI_H */
osal_event_hdr_t hdr
osal event header
Definition: hci.h:928
hciStatus_t HCI_EXT_OverlappedProcessingCmd(uint8 mode)
This HCI Extension API is used to enable or disable overlapped processing.
uint16 pktLen
packet length
Definition: hci.h:1169
uint8 pbFlag
flag
Definition: hci.h:1168
hciStatus_t HCI_EXT_ExtendRfRangeCmd(void)
This HCI Extension API is used to Extend Rf Range using the TI CC2590 2.4 GHz RF Front End device...
uint8 status
status of event
Definition: hci.h:1098
uint8 role
device connection role
Definition: hci.h:1195
hciStatus_t HCI_EXT_ScanEventNoticeCmd(uint8 taskID, uint16 taskEvent)
Scan Event Notice Command.
osal_event_hdr_t hdr
osal event header
Definition: hci.h:988
hciStatus_t HCI_LE_SetDataLenCmd(uint16 connHandle, uint16 txOctets, uint16 txTime)
Set Data Length.
hciStatus_t HCI_LE_ReadChannelMapCmd(uint16 connHandle)
Read a connection&#39;s data channel map.
LE Read P256 Public Key Complete Event.
Definition: hci.h:1130
hciEvt_BLEConnComplete_t legEvt
connection complete event
Definition: hci.h:947
hciStatus_t HCI_LE_ReadLocalResolvableAddressCmd(uint8 localIdAddrType, uint8 *localIdAddr)
Read Local Resolvable Private Address.
union _hciEvt_BLEConnComplete_u_ hciEvt_BLEConnComplete_u
LE Connection Complete Event.
hciEvt_DevInfo_t * devInfo
pointer to the array of devInfo
Definition: hci.h:968
uint16 connectionHandle
connection handle
Definition: hci.h:931
hciStatus_t HCI_EXT_NumComplPktsLimitCmd(uint8 limit, uint8 flushOnEvt)
This HCI Extension API is used to set the minimum number of completed packets which must be met befor...
LE Advertising Packet Report Event.
Definition: hci.h:963
uint8 clockAccuracy
connection clock accuracy
Definition: hci.h:922
uint16 connectionHandle
connection handle
Definition: hci.h:1003
uint16 cmdOpcode
command opcode
Definition: hci.h:1041
uint16 maxRxTime
maximum receive time
Definition: hci.h:1126
uint8 * pEventParam
event parameters
Definition: hci.h:1051
uint8 status
status of event
Definition: hci.h:990
uint8 BLEEventCode
BLE Event code.
Definition: hci.h:1133
void HCI_ExtTaskRegister(uint8 taskID)
HCI vendor specific registration for Host extended commands.
uint16 connHandle
connection handle
Definition: hci.h:1099
osal_event_hdr_t hdr
osal event header
Definition: hci.h:1089
hciStatus_t HCI_LE_ClearWhiteListCmd(void)
Clear the white list.
uint8 BLEEventCode
BLE Event Code.
Definition: hci.h:1097
uint16 maxTxOctets
maximum transmission bytes
Definition: hci.h:1123
uint8 encEnable
encryption enabled or not
Definition: hci.h:1014
hciStatus_t HCI_EXT_ModemHopTestTxCmd(void)
Start Modem Hop Tx Test.
uint16 * pNumCompletedPackets
pointer to the number of completed packets array
Definition: hci.h:1033
uint16 connLatency
connection latency
Definition: hci.h:993
hciEvt_BLEEnhConnComplete_t enhEvt
enhanced connection complete event
Definition: hci.h:948
osal_event_hdr_t hdr
osal event header
Definition: hci.h:1120
uint16 connTimeout
connection supervision timeout
Definition: hci.h:994
osal_event_hdr_t hdr
osal event header
Definition: hci.h:965
uint16 connTimeout
connection supervision timeout
Definition: hci.h:921
hciStatus_t HCI_LE_EnhancedTxTestCmd(uint8 txChan, uint8 payloadLen, uint8 payloadType, uint8 txPhy)
Start Enhanced TX Test.
uint16 connInterval
connection interval
Definition: hci.h:935
uint8 reason
reason
Definition: hci.h:1013
uint16 cmdOpcode
command opcode
Definition: hci.h:1050
int8 rssi
report RSSI
Definition: hci.h:959
hciStatus_t HCI_LE_WriteSuggestedDefaultDataLenCmd(uint16 txOctets, uint16 txTime)
Write Suggested Default Data Length.
uint16 connHandle
connection handle
Definition: hci.h:1122
hciStatus_t HCI_WriteAuthPayloadTimeoutCmd(uint16 connHandle, uint16 aptoValue)
Used to write the connection&#39;s Authenticated Payload Timeout value.
uint8 clockAccuracy
connection clock accuracy
Definition: hci.h:938
hciStatus_t HCI_HostNumCompletedPktCmd(uint8 numHandles, uint16 *connHandles, uint16 *numCompletedPkts)
This BT API is used by the Host to notify the Controller of the number of HCI data packets that have ...
void HCI_SMPTaskRegister(uint8 taskID)
HCI vendor specific registration for Host SMP.
#define B_ADDR_LEN
Default Public and Random Address Length.
Definition: bcomdef.h:114
hciStatus_t HCI_ReadTransmitPowerLevelCmd(uint16 connHandle, uint8 txPwrType)
Read the transmit power level.
hciStatus_t HCI_ReadLocalSupportedCommandsCmd(void)
Read the locally supported commands.
hciStatus_t HCI_LE_ReadLocalP256PublicKeyCmd(void)
Read local P-256 Public Key.
hciStatus_t HCI_LE_ConnUpdateCmd(uint16 connHandle, uint16 connIntervalMin, uint16 connIntervalMax, uint16 connLatency, uint16 connTimeout, uint16 minLen, uint16 maxLen)
Update the connection parameters.
hciStatus_t HCI_EXT_SetFreqTuneCmd(uint8 step)
This HCI Extension API is used to set the frequency tuning up or down. Setting the mode up/down decre...
uint8 addrType
peer device address type
Definition: hci.h:1197
LE Encryption Change Event.
Definition: hci.h:1008
uint16 connHandle
connection handle
Definition: hci.h:1022
uint16 dataPktLen
data packet length
Definition: hci.h:1151
hciStatus_t HCI_EXT_SetSCACmd(uint16 scaInPPM)
This API is used to set this device&#39;s Sleep Clock Accuracy.
hciStatus_t HCI_EXT_MapPmIoPortCmd(uint8 ioPort, uint8 ioPin)
This HCI Extension API is used to configure and map a CC254x I/O Port as a General Purpose I/O (GPIO)...
uint16 numPkts
total number of rx packets
Definition: hci.h:1206
osal_event_hdr_t hdr
OSAL Event header.
Definition: hci.h:1165
LE Read Remote Used Features Complete Event.
Definition: hci.h:998
hciStatus_t HCI_EXT_ConnEventNoticeCmd(uint16 connHandle, uint8 taskID, uint16 taskEvent)
This HCI Extension API is used to enable or disable a notification to the specified task using the sp...
uint16 connectionHandle
connection handle
Definition: hci.h:991
uint8 reason
reason
Definition: hci.h:1076
uint16 connHandle
connection handle
Definition: hci.h:1012
void HCI_TestAppTaskRegister(uint8 taskID)
HCI vendor specific registration for HCI Test Application.
osal_event_hdr_t hdr
OSAL event header.
Definition: hci.h:1158
osal_event_hdr_t hdr
osal event header
Definition: hci.h:912
int8 rssi
report RSSI
Definition: hci.h:982
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_SetScanEnableCmd(uint8 scanEnable, uint8 filterDuplicates)
Turn Scanning on or off.
uint8 BLEEventCode
BLE Event Code.
Definition: hci.h:975
hciStatus_t HCI_EXT_DecryptCmd(uint8 *key, uint8 *encText)
This HCI Extension API is used to decrypt encrypted data using AES128.
uint8 status
status of event
Definition: hci.h:1150
uint16 numEvents
number of connection events
Definition: hci.h:1208
osal_event_hdr_t hdr
osal event header
Definition: hci.h:1141
hciStatus_t HCI_LE_LtkReqNegReplyCmd(uint16 connHandle)
This LE API is used by the Host to send to the Controller a negative LTK reply.
uint16 encryptedDiversifier
encrypted diversifier
Definition: hci.h:1024
uint8 peerAddrType
peer address type
Definition: hci.h:917
hciStatus_t HCI_EXT_LLTestModeCmd(uint8 testCase)
This HCI Extension API is used to send a LL Test Mode test case.
uint8 BLEEventCode
BLE Event Code.
Definition: hci.h:929
uint8 dataLen
length of report data
Definition: hci.h:957
hciStatus_t HCI_EXT_DelaySleepCmd(uint16 delay)
This HCI Extension API is used set the sleep delay.
hciStatus_t HCI_LE_SetAddressResolutionEnableCmd(uint8 addrResolutionEnable)
Disable / Enable Address Resolution.
hciStatus_t HCI_LE_AddWhiteListCmd(uint8 addrType, uint8 *devAddr)
Add a white list entry.
hciStatus_t HCI_LE_RandCmd(void)
Generate a random number.
hciStatus_t HCI_LE_SetAdvEnableCmd(uint8 advEnable)
Turn Advertising on or off.
hciStatus_t HCI_LE_ReadSuggestedDefaultDataLenCmd(void)
Read Suggested Default Data Length.
hciStatus_t HCI_LE_SetScanParamCmd(uint8 scanType, uint16 scanInterval, uint16 scanWindow, uint8 ownAddrType, uint8 filterPolicy)
Set the Scan parameters.
LE Data Length Change Event.
Definition: hci.h:1118
uint8 connId
device connection handle
Definition: hci.h:1194
hciStatus_t HCI_HostBufferSizeCmd(uint16 hostAclPktLen, uint8 hostSyncPktLen, uint16 hostTotalNumAclPkts, uint16 hostTotalNumSyncPkts)
This BT API is used by the Host to notify the Controller of the maximum size ACL buffer size the Cont...
uint8 status
status
Definition: hci.h:1143
uint16 connHandle
connection handle
Definition: hci.h:1075
hciStatus_t HCI_EXT_DisconnectImmedCmd(uint16 connHandle)
This HCI Extension API is used to disconnect the connection immediately.
hciStatus_t HCI_DisconnectCmd(uint16 connHandle, uint8 reason)
This BT API is used to terminate a connection.
osal_event_hdr_t hdr
osal event header
Definition: hci.h:1039
uint8 * pData
data
Definition: hci.h:1170
hciStatus_t HCI_LE_ReceiverTestCmd(uint8 rxChan)
Start the receiver Direct Test Mode test.
uint8 ownAddrType
public or random address type
Definition: hci.h:979
hciStatus_t HCI_ResetCmd(void)
Reset the Link Layer.
hciStatus_t HCI_LE_AddDeviceToResolvingListCmd(uint8 peerIdAddrType, uint8 *peerIdAddr, uint8 *peerIRK, uint8 *localIRK)
Add a device to the resolving list.
hciStatus_t HCI_EXT_EndModemTestCmd(void)
This API is used to shutdown a modem test. A complete Controller reset will take place.
hciStatus_t HCI_LE_RemoveWhiteListCmd(uint8 addrType, uint8 *devAddr)
Remove a white list entry.
uint8 status
status of event
Definition: hci.h:1002
uint16 connInterval
connection interval
Definition: hci.h:919
hciStatus_t HCI_EXT_AdvEventNoticeCmd(uint8 taskID, uint16 taskEvent)
This HCI Extension API is used to enable or disable a notification to the specified task using the sp...
osal_event_hdr_t hdr
osal event header
Definition: hci.h:1066
uint8 addrType
public or random address type
Definition: hci.h:955
hciStatus_t HCI_LE_ReadPeerResolvableAddressCmd(uint8 peerIdAddrType, uint8 *peerIdAddr)
Read the Peer Resolvable Address.
hciStatus_t HCI_EXT_SaveFreqTuneCmd(void)
This HCI Extension API is used to save the frequency tuning value to flash.
uint8 BLEEventCode
BLE Event Code.
Definition: hci.h:1021
Command Complete Event.
Definition: hci.h:1037
LE Generate DHKey Complete Event.
Definition: hci.h:1139
uint16 Interval_Max
maximum connection interval
Definition: hci.h:1101
hciStatus_t HCI_LE_SetPhyCmd(uint16 connHandle, uint8 allPhys, uint8 txPhy, uint8 rxPhy)
This LE API is used to request a change to the transmitter and receiver PHY for a connection...
hciStatus_t HCI_LE_StartEncyptCmd(uint16 connHandle, uint8 *random, uint8 *encDiv, uint8 *ltk)
Start encryption in a connection.
Vendor Specific Command Complete Event.
Definition: hci.h:1046
hciStatus_t HCI_SetEventMaskCmd(uint8 *pMask)
This BT API is used to set the HCI event mask, which is used to determine which events are supported...
hciStatus_t HCI_ReadBDADDRCmd(void)
Read this device&#39;s BLE address (BDADDR).
uint8 hardwareCode
hardware error code
Definition: hci.h:1067
uint16 connHandle
connection handle
Definition: hci.h:1167
hciStatus_t HCI_EXT_ModemTestTxCmd(uint8 cwMode, uint8 txChan)
This API is used start a continuous transmitter modem test, using either a modulated or unmodulated c...
Command Status Event.
Definition: hci.h:1055
osal_event_hdr_t hdr
osal event header
Definition: hci.h:1073
hciStatus_t HCI_EXT_SetMaxDtmTxPowerCmd(uint8 txPower)
This HCI Extension API is used to set the maximum transmit output power for Direct Test Mode...
uint8 BLEEventCode
BLE Event Code.
Definition: hci.h:1121
hciStatus_t HCI_EXT_SetLocalSupportedFeaturesCmd(uint8 *localFeatures)
This HCI Extension API is used to write this device&#39;s supported features.
hciStatus_t HCI_LE_RemoveDeviceFromResolvingListCmd(uint8 peerIdAddrType, uint8 *peerIdAddr)
Remove a device from the whitelist.
uint8 eventType
scan request event type
Definition: hci.h:976
LE Connection Complete Event.
Definition: hci.h:945
uint8 pktType
packet type
Definition: hci.h:1166
hciStatus_t HCI_LE_ReadMaxDataLenCmd(void)
Read max data length.
hciStatus_t HCI_EXT_GetConnInfoCmd(uint8 *numAllocConns, uint8 *numActiveConns, hciConnInfo_t *activeConnInfo)
Get Connection Info.
uint16 connLatency
connection latency
Definition: hci.h:936
uint8 * pReturnParam
pointer to the return parameter
Definition: hci.h:1042
osal_event_hdr_t hdr
osal event header
Definition: hci.h:1109
uint16 connHandle
connection handle
Definition: hci.h:1090
hciStatus_t HCI_SetControllerToHostFlowCtrlCmd(uint8 flowControlEnable)
This BT API is used by the Host to turn flow control on or off for data sent from the Controller to H...
Number of Completed Packets Event.
Definition: hci.h:1028
uint8 status
status
Definition: hci.h:1134
uint8 HCI_ValidConnTimeParams(uint16 connIntervalMin, uint16 connIntervalMax, uint16 connLatency, uint16 connTimeout)
This API is used to check that the connection time parameter ranges are valid, and that the connectio...
hciStatus_t HCI_LE_ReadBufSizeCmd(void)
This LE API is used by the Host to determine the maximum ACL data packet size allowed by the Controll...
uint8 role
role of connection
Definition: hci.h:916
hciStatus_t HCI_ReadRssiCmd(uint16 connHandle)
Read RSSI of last packet.
hciStatus_t HCI_EXT_ModemTestRxCmd(uint8 rxChan)
Start Modem Hop RX Test.
uint16 * pConnectionHandle
pointer to the connection handle array
Definition: hci.h:1032
LE Connection Update Complete Event.
Definition: hci.h:986
HCI Data Packet.
Definition: hci.h:1163
uint8 numHciCmdPkt
number of HCI Command Packet
Definition: hci.h:1040
hciStatus_t HCI_SendDataPkt(uint16 connHandle, uint8 pbFlag, uint16 pktLen, uint8 *pData)
This API is used to send a ACL data packet over a connection.
Definition: hci.h:1203
hciStatus_t HCI_EXT_SetFastTxResponseTimeCmd(uint8 control)
This HCI Extension API is used to set whether transmit data is sent as soon as possible even when sla...
uint8 numDataPkts
number of data packets
Definition: hci.h:1152
hciStatus_t HCI_ReadAuthPayloadTimeoutCmd(uint16 connHandle, uint16 *aptoValue)
Read the connection&#39;s Authenticated Payload Timeout value.
hciStatus_t HCI_LE_SetDefaultPhyCmd(uint8 allPhys, uint8 txPhy, uint8 rxPhy)
Set Default PHY.
hciStatus_t HCI_LE_RemoteConnParamReqReplyCmd(uint16 connHandle, uint16 connIntervalMin, uint16 connIntervalMax, uint16 connLatency, uint16 connTimeout, uint16 minLen, uint16 maxLen)
This LE API is used to positively reply to the HCI LE Remote Connection Parameter Request event from ...
uint16 connectionHandle
connection handle
Definition: hci.h:915
LE Enhanced Connection Complete Event.
Definition: hci.h:926
hciStatus_t HCI_LE_ReadLocalSupportedFeaturesCmd(void)
Read the LE locally supported features.
void HCI_GAPTaskRegister(uint8 taskID)
HCI vendor specific registration for Host GAP.
hciStatus_t HCI_LE_LtkReqReplyCmd(uint16 connHandle, uint8 *ltk)
This LE API is used by the Host to send to the Controller a positive LTK reply.
hciStatus_t HCI_ReadRemoteVersionInfoCmd(uint16 connHandle)
This BT API is used to request version information from the the remote device in a connection...
hciStatus_t HCI_LE_TransmitterTestCmd(uint8 txChan, uint8 dataLen, uint8 pktPayload)
This LE API is used to start the transmit Direct Test Mode test.
osal_event_hdr_t hdr
osal event header
Definition: hci.h:1030
Definition: osal.h:89
osal_event_hdr_t hdr
osal event header
Definition: hci.h:1057
osal_event_hdr_t hdr
osal event header
Definition: hci.h:1048
#define B_MAX_ADV_LEN
BLE Maximum Advertising Packet Length.
Definition: bcomdef.h:129
uint8 * pData
data
Definition: hci.h:1159
hciStatus_t HCI_LE_CreateConnCancelCmd(void)
Cancel connection.
uint8 status
status of event
Definition: hci.h:930
uint16 connInterval
connection interval
Definition: hci.h:992
hciStatus_t HCI_LE_ReadAdvChanTxPowerCmd(void)
Read transmit power when Advertising.
hciStatus_t HCI_LE_RemoteConnParamReqNegReplyCmd(uint16 connHandle, uint8 reason)
Negatively reply to the Conneciton Parameter Update Request.
osal_event_hdr_t hdr
osal event header
Definition: hci.h:974
hciStatus_t HCI_EXT_PERbyChanCmd(uint16 connHandle, perByChan_t *perByChan)
This HCI Extension API is used to start or end Packet Error Rate by Channel counter accumulation for ...
hciStatus_t HCI_LE_GenerateDHKeyCmd(uint8 *publicKey)
Generate Diffie-Hellman Key.
VS LE Scan Request Report Event.
Definition: hci.h:972
LE Remote Connection Parameter Request Event.
Definition: hci.h:1094
hciStatus_t HCI_LE_SetAdvDataCmd(uint8 dataLen, uint8 *pData)
Set the Advertising data.
Disconnection Complete Event.
Definition: hci.h:1071
hciStatus_t HCI_LE_ReadSupportedStatesCmd(void)
Read the Controller&#39;s supported states.
hciStatus_t HCI_EXT_OnePktPerEvtCmd(uint8 control)
This HCI Extension API is used to set whether a connection will be limited to one packet per event...
uint8 txPhy
TX PHY.
Definition: hci.h:1113
hciStatus_t HCI_LE_SetRandomAddressCmd(uint8 *pRandAddr)
Set this device&#39;s Random address.
uint8 status
status of event
Definition: hci.h:1111
uint8 BLEEventCode
BLE Event Code.
Definition: hci.h:913
hciStatus_t HCI_EXT_SetRxGainCmd(uint8 rxGain)
Set the receiver gain.
uint8 eventType
advertisement or scan response event type
Definition: hci.h:954
uint8 BLEEventCode
BLE Event Code.
Definition: hci.h:1001
uint16 connHandle
connection handle
Definition: hci.h:1112
osal_event_hdr_t hdr
osal event header
Definition: hci.h:1082
hciStatus_t HCI_LE_ReadResolvingListSizeCmd(void)
Read Resolving List Size.
hciStatus_t HCI_EXT_ClkDivOnHaltCmd(uint8 control)
Set whether the system clock will be divided when the MCU is halted.
hciStatus_t HCI_LE_EnhancedRxTestCmd(uint8 rxChan, uint8 rxPhy, uint8 modIndex)
Start Enhanced RX Test.
uint8 numHandles
number of handles
Definition: hci.h:1031
hciStatus_t HCI_SetEventMaskPage2Cmd(uint8 *pMask)
This BT API is used to set the HCI event mask page 2, which is used to determine which events are sup...
hciStatus_t HCI_EXT_ResetSystemCmd(uint8 mode)
This HCI Extension API is used to issue a soft or hard system reset.
HCI Packet event.
Definition: hci.h:1156
hciStatus_t HCI_LE_ReadWhiteListSizeCmd(void)
Read the white list.
hciStatus_t HCI_LE_SetHostChanClassificationCmd(uint8 *chanMap)
Update the current data channel map.
uint8 length
length of parametric data, in bytes
Definition: hci.h:1049
uint8 BLEEventCode
BLE Event Code.
Definition: hci.h:1011
uint16 connLatency
connection latency
Definition: hci.h:920
uint8 BLEEventCode
BLE Event Code.
Definition: hci.h:989
hciStatus_t HCI_EXT_SetBDADDRCmd(uint8 *bdAddr)
This API is used to set this device&#39;s BLE address (BDADDR).
hciStatus_t HCI_EXT_SetMaxDataLenCmd(uint16 txOctets, uint16 txTime, uint16 rxOctets, uint16 rxTime)
This LE API is used to set the maximum supported Rx and Tx Octets (in bytes) and Time (in us)...
hciStatus_t HCI_LE_TestEndCmd(void)
End the Direct Test Mode test.
hciStatus_t HCI_ReadLocalVersionInfoCmd(void)
Read the local version information.
Hardware Error Event.
Definition: hci.h:1064
hciStatus_t HCI_EXT_BuildRevisionCmd(uint8 mode, uint16 userRevNum)
This HCI Extension API is used set a user revision number or read the build revision number...
hciStatus_t HCI_LE_ClearResolvingListCmd(void)
Remove all devices from the whitelist.
Authenticated Payload Timeout Expired Event.
Definition: hci.h:1087
hciStatus_t HCI_LE_SetEventMaskCmd(uint8 *pEventMask)
This LE API is used to set the HCI LE event mask, which is used to determine which LE events are supp...
hciStatus_t HCI_EXT_HaltDuringRfCmd(uint8 mode)
Halt During RF Command.
uint16 maxTxTime
maximum transmission time
Definition: hci.h:1124
hciStatus_t HCI_EXT_EnablePTMCmd(void)
This HCI Extension API is used to enable Production Test Mode.
uint8 BLEEventCode
BLE Event Code.
Definition: hci.h:1142
uint16 Interval_Min
minimum connection interval
Definition: hci.h:1100
hciStatus_t HCI_EXT_SetSlaveLatencyOverrideCmd(uint8 control)
This HCI Extension API is used to to enable or disable suspending slave latency.
LE Phy Update Complete Event.
Definition: hci.h:1107
hciStatus_t HCI_ReadLocalSupportedFeaturesCmd(void)
Read the locally supported features.
osal_event_hdr_t hdr
osal event header
Definition: hci.h:1020
uint8 bleChan
BLE channel.
Definition: hci.h:981
uint16 numMMissedEvents
number missed connection events
Definition: hci.h:1209
osal_event_hdr_t hdr
osal event header
Definition: hci.h:1000
uint8 peerAddrType
peer address type
Definition: hci.h:977
hciStatus_t HCI_LE_EncryptCmd(uint8 *key, uint8 *plainText)
Perform an encryption using AES128.
uint8 role
role of connection
Definition: hci.h:932
Definition: hci.h:1191
hciStatus_t HCI_EXT_SetTxPowerCmd(uint8 txPower)
Set the transmit power.
hciStatus_t HCI_LE_ReadRemoteUsedFeaturesCmd(uint16 connHandle)
Read the remote device&#39;s used features.
Data structure for HCI Command Complete Event Return Parameter.
Definition: hci.h:1148
uint8 peerAddrType
peer address type
Definition: hci.h:933
#define B_RANDOM_NUM_SIZE
BLE Random Number Size.
Definition: bcomdef.h:132
hciStatus_t HCI_EXT_PacketErrorRateCmd(uint16 connHandle, uint8 command)
This function is used to Reset or Read the Packet Error Rate counters for a connection.
uint16 connTimeout
connection supervision timeout
Definition: hci.h:937
osal_event_hdr_t hdr
osal event header
Definition: hci.h:1096
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.
LE Connection Complete Event.
Definition: hci.h:910
void HCI_L2CAPTaskRegister(uint8 taskID)
HCI vendor specific registration for Host L2CAP.
uint16 numCrcErr
number rx packets with CRC error
Definition: hci.h:1207
uint16 maxRxOctets
maximum receive bytes
Definition: hci.h:1125
hciStatus_t HCI_EXT_DeclareNvUsageCmd(uint8 mode)
This HCI Extension API is used to indicate to the Controller whether or not the Host will be using th...
uint16 cmdOpcode
command opcode
Definition: hci.h:1060
uint16 Latency
slave latency
Definition: hci.h:1102
uint8 status
status of event
Definition: hci.h:914
uint8 numDevices
number of discovered devices
Definition: hci.h:967
uint8 BLEEventCode
BLE Event Code.
Definition: hci.h:966
Data Buffer Overflow Event.
Definition: hci.h:1080
uint16 Timeout
supervision timeout
Definition: hci.h:1103
hciStatus_t HCI_LE_ReadPhyCmd(uint16 connHandle)
Read the current transmitter and receiver PHY.
LE Advertising Report Event.
Definition: hci.h:952
uint8 BLEEventCode
BLE Event Code.
Definition: hci.h:1110
uint8 numHciCmdPkt
number of HCI command packets
Definition: hci.h:1059
uint8 rxPhy
RX PHY.
Definition: hci.h:1114
uint8 linkType
synchronous or asynchronous buffer overflow
Definition: hci.h:1083
osal_event_hdr_t hdr
osal event header
Definition: hci.h:1010
hciStatus_t HCI_LE_SetScanRspDataCmd(uint8 dataLen, uint8 *pData)
Set the Advertising Scan Response data.
LE Long Term Key Requested Event.
Definition: hci.h:1018
osal_event_hdr_t hdr
osal event header
Definition: hci.h:1132
uint8 cmdStatus
command status
Definition: hci.h:1058
hciStatus_t HCI_LE_SetResolvablePrivateAddressTimeoutCmd(uint16 rpaTimeout)
Set Resolvable Private Address Timeout.
hciStatus_t HCI_EXT_ScanReqRptCmd(uint8 mode)
This LE API is used to enable/disable Scan Request Reports.
uint8 status
status of event
Definition: hci.h:1074