max_ble_hci.packet_codes — MAX BLE HCI 0.1.0 documentation

# max_ble_hci.packet_codes

Contains definitions for BLE standard codes utilized in HCI packet creation/parsing.

class EventCode(value)

  Bases: `Enum`

  Supported HCI Event Codes

  AUTH_PAYLOAD_TIMEOUT_EXPIRED = 87

    Authenticated payload timeout expired event.

  COMMAND_COMPLETE = 14

    Command complete event.

  COMMAND_STATUS = 15

    Command status event.

  DATA_BUFF_OVERFLOW = 26

    Data buffer overflow event.

  DICON_COMPLETE = 5

    Disconnection complete event.

  ENC_CHANGE = 8

    Encryption change event.

  ENC_KEY_REFRESH_COMPLETE = 48

    Encryption key refresh complete event.

  HARDWARE_ERROR = 16

    Hardware error event.

  LE_META = 62

    LE meta event.

  NUM_COMPLETED_PACKETS = 19

    Number of completed packets event.

  READ_REMOTE_VERSION_INFO_COMPLETE = 12

    Read remote version information complete event.

  VENDOR_SPEC = 255

    Vendor specific event.

class EventSubcode(value)

  Bases: `Enum`

  Supported LE Meta event subcodes.

  ADVERTISING_REPORT = 2

    Advertising report event.

  ADVERTISING_SET_TERMINATED = 18

    Advertising set terminated event.

  BIGINFO_ADVERTISING_REPORT = 34

    BIGInfo advertising report event.

  BIG_SYNC_ESTABLISHED = 29

    BIG sync established event.

  BIG_SYNC_LOST = 30

    BIG sync list event.

  CHANNEL_SELECTION_ALGORITHM = 20

    Channel selection algorithm event.

  CIS_ESTABLISHED = 25

    CIS established event.

  CIS_REQUEST = 26

    CIS request event.

  CONNECTIONLESS_IQ_REPORT = 21

    Connectionless IQ report event.

  CONNECTION_COMPLETE = 1

    Connection complete event.

  CONNECTION_IQ_REPORT = 22

    Connection IQ report event.

  CONNECTION_UPDATE = 3

    Connection update complete event.

  CREATE_BIG_COMPLETE = 27

    Create BIG complete event.

  CTE_REQUEST_FAILED = 23

    CTE request failed event.

  DATA_LENGTH_CHANGE = 7

    Data length change event.

  DIRECTED_ADVERTISIING_REPORT = 11

    Directed advertising report event.

  ENHANCED_CONNECTION_COMPLETE = 10

    Enhanced connection complete event.

  EXTENDED_ADVERTISING_REPORT = 13

    Extended advertising report event.

  GENERATE_DHKEY_COMPLETE = 9

    Generate DHKey complete event.

  LONG_TERM_KEY_REQUEST = 5

    Long term key request event.

  PATH_LOSS_THRESHOLD = 32

    Path loss threshold event.

  PERIODIC_ADVERTISING_REPORT = 15

    Periodic advertising report event.

  PERIODIC_ADVERTISING_SYNC_ESTABLISHED = 14

    Periodic advertising sync established event.

  PERIODIC_ADVERTISING_SYNC_LOST = 16

    Periodic advertising sync lost event.

  PERIODIC_ADVERTISING_SYNC_TRANSER_RECEIVED = 24

    Periodic advertising sync transfer received event.

  PHY_UPDATE_COMPLETE = 12

    PHY update complete event.

  READ_LOCAL_P256_PUBLIC_KEY_COMPLETE = 8

    Read local P-256 public key complete event.

  READ_REMOTE_FEATURES_COMPLETE = 4

    Read remote feature complete event.

  REMOTE_CONNECTION_PARAMETER_REQUEST = 6

    Remote connection parameter request event.

  REQUEST_PEER_SCA_COMPLETE = 31

    Request peeer SCA complete event.

  SCAN_REQUEST_RECEIVED = 19

    Scan request received event.

  SCAN_TIMEOUT = 17

    Scan timeout event.

  TERMINATE_BIG_COMPLETE = 28

    Terminate BIG complete event.

  TRANSMIT_POWER_REPORTING = 33

    Transmit power reporting event.

class StatusCode(value)

  Bases: `Enum`

  BLE-defined status codes.

  DECODE_FAILURE = 255

    ADI vendor specific, returns when the status is not properly set.

  ERROR_CODE_ACL_CONN_ALREADY_EXISTS = 11

    Connection already exists.

  ERROR_CODE_ADV_TIMEOUT = 60

    Advertising timeout.

  ERROR_CODE_AUTH_FAILURE = 5

    Authentication failure.

  ERROR_CODE_CHAN_ASSESSMENT_NOT_SUPPORTED = 46

    Channel classification not supported error.

  ERROR_CODE_CMD_DISALLOWED = 12

    Command disallowed.

  ERROR_CODE_COARSE_CLK_ADJ_REJ = 64

    Coarse cloack adjustment rejected but will try to adjust clock using clock dragging.

  ERROR_CODE_CONN_ACCEPT_TIMEOUT_EXCEEDED = 16

    Connection accept timeout exceeded.

  ERROR_CODE_CONN_FAILED_TO_ESTABLISH = 62

    Connection failed to be established / Synchronization timeout.

  ERROR_CODE_CONN_LIMIT_EXCEEDED = 9

    Connection limit exceeded.

  ERROR_CODE_CONN_REJECTED_SECURITY_REASONS = 14

    Connection rejected due to security reasons.

  ERROR_CODE_CONN_REJECTED_UNACCEPTABLE_BDADDR = 15

    Connection rejected dur to unacceptable BD address.

  ERROR_CODE_CONN_REJ_LIMITED_RESOURCES = 13

    connection rejection due to limited resources.

  ERROR_CODE_CONN_REJ_NO_SUITABLE_CHAN_FOUND = 57

    Connection rejected dur to no suitable channel found.

  ERROR_CODE_CONN_TERM_BY_LOCAL_HOST = 22

    Connection terminated by local host.

  ERROR_CODE_CONN_TERM_MIC_FAILURE = 61

    Connection terminated due to MIC failure.

  ERROR_CODE_CONN_TIMEOUT = 8

    Connection timeout.

  ERROR_CODE_CONTROLLER_BUSY = 58

    Controller busy.

  ERROR_CODE_DIFFERENT_TRANSACTION_COLLISION = 42

    Different transaction collision.

  ERROR_CODE_ENCRYPT_MODE_NOT_ACCEPTABLE = 37

    Encryption mode not acceptable.

  ERROR_CODE_EXTENDED_INQUIRY_RESP_TOO_LARGE = 54

    Extended inquiry response too large.

  ERROR_CODE_HOST_BUSY_PAIRING = 56

    Host busy - pairing.

  ERROR_CODE_HW_FAILURE = 3

    Hardware failure.

  ERROR_CODE_INSTANT_PASSED = 40

    Instance passed.

  ERROR_CODE_INSUFFICIENT_SECURITY = 47

    Insufficient security.

  ERROR_CODE_INVALID_HCI_CMD_PARAMS = 18

    Invalid HCI command parameters.

  ERROR_CODE_INVALID_LMP_PARAMS = 30

    Invalid LMP parameters / Invalid LL parameters.

  ERROR_CODE_LIMIT_REACHED = 67

    Limit reached.

  ERROR_CODE_LINK_KEY_CAN_NOT_BE_CHANGED = 38

    Link key cannot be changed.

  ERROR_CODE_LMP_ERR_TRANSACTION_COLLISION = 35

    LMP error transaction collision / LL procedure collision.

  ERROR_CODE_LMP_LL_RESP_TIMEOUT = 34

    LMP response timeout / LL response timeout.

  ERROR_CODE_LMP_PDU_NOT_ALLOWED = 36

    LMP PDU not allowed.

  ERROR_CODE_MAC_CONN_FAILED = 63

    MAC connection failed [previously used].

  ERROR_CODE_MEM_CAP_EXCEEDED = 7

    Memory capacity exceeded.

  ERROR_CODE_OP_CANCELLED_BY_HOST = 68

    Operation cancelled by host.

  ERROR_CODE_PAGE_TIMEOUT = 4

    Page timeout.

  ERROR_CODE_PAIRING_NOT_ALLOWED = 24

    Pairing not allowed.

  ERROR_CODE_PAIRING_WITH_UNIT_KEY_NOT_SUPPORTED = 41

    Pairing with unit key not supported.

  ERROR_CODE_PARAM_OUT_OF_MANDATORY_RANGE = 48

    Parameter out of mandatory range.

  ERROR_CODE_PIN_KEY_MISSING = 6

    PIN or key missing.

  ERROR_CODE_PKT_TOO_LONG = 69

    Packet too long.

  ERROR_CODE_QOS_REJ = 45

    QoS rejected.

  ERROR_CODE_QOS_UNACCEPTABLE_PARAM = 44

    QoS unacceptable parameter.

  ERROR_CODE_REMOTE_DEVICE_TERM_CONN_LOW_RESOURCES = 20

    Remote device terminated connection due to low resources.

  ERROR_CODE_REMOTE_DEVICE_TERM_CONN_POWER_OFF = 21

    Remote device terminated connection due to power off.

  ERROR_CODE_REMOTE_USER_TERM_CONN = 19

    Remote user terminated connection.

  ERROR_CODE_REPEATED_ATTEMPTS = 23

    Repeated attempts.

  ERROR_CODE_REQ_QOS_NOT_SUPPORTED = 39

    Requested QoS not supported.

  ERROR_CODE_RESERVED1 = 43

    Reserved for future use.

  ERROR_CODE_RESERVED2 = 49

    Reserved for future use.

  ERROR_CODE_RESERVED3 = 51

    Reserved for future use.

  ERROR_CODE_RESERVED_SLOT_VIOLATION = 52

    Reserved slot violation.

  ERROR_CODE_ROLE_CHANGE_NOT_ALLOWED = 33

    Role change not allowed.

  ERROR_CODE_ROLE_SWITCH_FAILED = 53

    Role switch failed.

  ERROR_CODE_ROLE_SWITCH_PENDING = 50

    Role switch pending.

  ERROR_CODE_SCO_AIR_MODE_REJ = 29

    SCO air mode rejected.

  ERROR_CODE_SCO_INTERVAL_REJ = 28

    SCO interval rejected.

  ERROR_CODE_SCO_OFFSET_REJ = 27

    SCO offset rejected.

  ERROR_CODE_SIMPLE_PAIRING_NOT_SUPPORTED_BY_HOST = 55

    Secure simple pairing not supported by host.

  ERROR_CODE_SYNCH_CONN_LIMIT_EXCEEDED = 10

    Synchronous connection limit to a device exceeded.

  ERROR_CODE_TYPE0_SUBMAP_NOT_DEF = 65

    Type0 submap noot defined.

  ERROR_CODE_UNACCEPTABLE_CONN_INTERVAL = 59

    Unacceptable connection parameters.

  ERROR_CODE_UNKNOWN_ADV_ID = 66

    Unknown advertising identifier.

  ERROR_CODE_UNKNOWN_CONN_ID = 2

    Unknown connection identifier.

  ERROR_CODE_UNKNOWN_HCI_CMD = 1

    Unknown HCI command error.

  ERROR_CODE_UNKNOWN_LMP_PDU = 25

    Unknown LMP PDU.

  ERROR_CODE_UNSPECIFIED_ERROR = 31

    Unspecified error.

  ERROR_CODE_UNSUPPORTED_FEATURE_PARAM_VALUE = 17

    Unsupported feature or parameter value.

  ERROR_CODE_UNSUPPORTED_LMP_PARAM_VAL = 32

    Unsupported LMP parameter value / Unsupported LL parameter value.

  ERROR_CODE_UNSUPPORTED_REMOTE_FEATURE = 26

    Unsupported remote feature.

  SUCCESS = 0

    Success.