max_ble_hci.packet_defs

DOCSTRING

class ControllerOCF(value)[source]

Bases: Enum

BLE-defined Controller group Opcode Command Field values.

CONFIG_DATA_PATH = 131

Configure data path command.

HOST_BUFFER_SIZE = 51

Host buffer size command.

HOST_NUM_CMPL_PKTS = 53

Host number of completed packets command.

READ_AUTH_PAYLOAD_TO = 123

Read authenticated payload timeout command.

READ_TX_PWR_LVL = 45

Read TX power level command.

RESET = 3

Reset command.

SET_CONTROLLER_TO_HOST_FC = 49

Set controller to host flow control command.

SET_EVENT_MASK = 1

Set event mask command.

SET_EVENT_MASK_PAGE2 = 99

Set event mask page 2 command.

WRITE_AUTH_PAYLOAD_TO = 124

Write authenticated payload timeout command.

class InformationalOCF(value)[source]

Bases: Enum

BLE-defined Information group Opcode Command Field values.

READ_BD_ADDR = 9

Read BD address command.

READ_BUF_SIZE = 5

Read buffer size command.

READ_LOCAL_SUP_CMDS = 2

Read local supported commands command.

READ_LOCAL_SUP_CODECS = 13

Read local supported codecs command.

READ_LOCAL_SUP_CODEC_CAP = 14

Read local supported codec capabilities command.

READ_LOCAL_SUP_CONTROLLER_DLY = 15

Read local supported controller delay command.

READ_LOCAL_SUP_FEAT = 3

Read local supported features command.

READ_LOCAL_VER_INFO = 1

Read local version information command.

class LEControllerOCF(value)[source]

Bases: Enum

BLE-defined LE Controller group Opcode Command Field values.

ACCEPT_CIS_REQ = 102

Accept CIS request command.

ADD_DEV_PER_ADV_LIST = 71

Add devoce to periodic advertiser list command.

ADD_DEV_RES_LIST = 39

Add device to resolving list command.

ADD_DEV_WHITE_LIST = 17

Add device to filter accept list command.

BIG_CREATE_SYNC = 107

BIG create sync command.

BIG_TERMINATE_SYNC = 108

BIG terminate sync command.

CLEAR_ADV_SETS = 61

Clear advertising sets command.

CLEAR_PER_ADV_LIST = 73

Clear periodic advertiser list command.

CLEAR_RES_LIST = 41

Clear resolving list command.

CLEAR_WHITE_LIST = 16

Clear filter accept list command.

CONN_CTE_REQ_ENABLE = 86

Connection CTE request enable command.

CONN_CTE_RSP_ENABLE = 87

Connection CTE response enable command.

CONN_UPDATE = 19

Connection update command.

CREATE_BIG = 104

Create BIG command.

CREATE_BIG_TEST = 105

Create BIG test command.

CREATE_CIS = 100

Create CIS command.

CREATE_CONN = 13

Create connection command.

CREATE_CONN_CANCEL = 14

Create connection cancel command.

ENCRYPT = 23

Encrypt command.

ENHANCED_RECEIVER_TEST = 51

Enhanced receiver test command.

ENHANCED_TRANSMITTER_TEST = 52

Enhanced transmitter test command.

EXT_CREATE_CONN = 67

Extended create connection command.

GENERATE_DHKEY = 38

Generate DHKey command.

GENERATE_DHKEY_V2 = 94

Generate DHKey version2 command.

ISO_READ_TEST_COUNTERS = 114

ISO read test counters command.

ISO_RX_TEST = 113

ISO RX test command.

ISO_TEST_END = 115

ISO test end command.

ISO_TX_TEST = 112

ISO TX test command.

LTK_REQ_NEG_REPL = 27

Long term key request negative reply command.

LTK_REQ_REPL = 26

Long term key requency reply command.

MODIFY_SLEEP_CLK_ACC = 95

Modify sleep clock accuracy command.

PER_ADV_CREATE_SYNC = 68

Periodic advertising create sync command.

PER_ADV_CREATE_SYNC_CANCEL = 69

Periodic advertising create sync cancel command.

PER_ADV_SET_INFO_TRANSFER = 91

Periodic advertising set info transfer command.

PER_ADV_SYNC_TRANSFER = 90

Periodic advertising sync transfer command.

PER_ADV_TERM_SYNC = 70

Periodic advertising terminate sync command.

RAND = 24

Rand command.

READ_ADV_TX_POWER = 7

Read advertising physical channel TX power command.

READ_ANTENNA_INFO = 88

Read antenna information command.

READ_BUF_SIZE = 2

Read buffer size command.

READ_BUF_SIZE_V2 = 96

Read buffer size version2 command.

READ_CHAN_MAP = 21

Read channel map command.

READ_DEF_DATA_LEN = 35

Read suggested default data length command.

READ_ENHANCED_TX_POWER = 118

Enhanced read TX power level command.

Read ISO link quality command.

READ_ISO_TX_SYNC = 97

Read ISO TX sync command.

READ_LOCAL_P256_PUB_KEY = 37

Read local P-256 public key command.

READ_LOCAL_RES_ADDR = 44

Read local resolvable address command.

READ_LOCAL_SUP_FEAT = 3

Read local supported features command.

READ_MAX_ADV_DATA_LEN = 58

Read maximum advertising data length command.

READ_MAX_DATA_LEN = 47

Read maximum data length command.

READ_NUM_SUP_ADV_SETS = 59

Read number of supported advertising sets command.

READ_PEER_RES_ADDR = 43

Read peer resolvable address command.

READ_PER_ADV_LIST_SIZE = 74

Read periodic advertising list size command.

READ_PHY = 48

Read PHY command.

READ_REMOTE_FEAT = 22

Read remove features command.

READ_REMOTE_TX_POWER = 119

Read remote TX power command.

READ_RES_LIST_SIZE = 42

Read resolving list size command.

READ_RF_PATH_COMP = 76

Read RF path compensation command.

READ_SUP_STATES = 28

Read supported states command.

READ_TX_POWER = 75

Read TX power command.

READ_WHITE_LIST_SIZE = 15

Read fileter accept list size command.

RECEIVER_TEST = 29

Receiver test command.

RECEIVER_TEST_V3 = 79

Receiver test version3 command.

REJECT_CIS_REQ = 103

Reject CIS request command.

REMOVE_ADV_SET = 60

Remove advertising set command.

REMOVE_CIG = 101

Remove CIG command.

REMOVE_DEV_PER_ADV_LIST = 72

Remove device from periodic advertiser list command.

REMOVE_DEV_RES_LIST = 40

Remove device from resolving list command.

REMOVE_DEV_WHITE_LIST = 18

Remove device from filter accept list command.

REMOVE_ISO_DATA_PATH = 111

Remove ISO data path command.

REM_CONN_PARAM_NEG_REP = 33

Remote connection parameter request negative reply command.

REM_CONN_PARAM_REP = 32

Remote connection parameter request reply command.

REQUEST_PEER_SCA = 109

Request peer SCA command.

SETUP_ISO_DATA_PATH = 110

Setup ISO data path command.

SET_ADDR_RES_ENABLE = 45

Set address resolution enable command.

SET_ADV_DATA = 8

Set advertising data command.

SET_ADV_ENABLE = 10

Set advertising enable command.

SET_ADV_PARAM = 6

Set advertising parameters command.

SET_ADV_SET_RAND_ADDR = 53

Set advertising set random address command.

SET_CIG_PARAMS = 98

Set CIG parameters command.

SET_CIG_PARAMS_TEST = 99

Set CIG parameters test command.

SET_CONNLESS_CTE_TX_ENABLE = 82

Set connectionless CTE transmit enable command.

SET_CONNLESS_CTE_TX_PARAMS = 81

Set connectionless CTE transmit parameters command.

SET_CONNLESS_IQ_SAMP_ENABLE = 83

Set connectionless IQ sampling enable command.

SET_CONN_CTE_RX_PARAMS = 84

Set connection CTE receive parameters command.

SET_CONN_CTE_TX_PARAMS = 85

Set connection CTE transmit parameters command.

SET_DATA_LEN = 34

Set data length command.

Set data related address changes command.

SET_DEFAULT_PAST_PARAM = 93

Set default periodic advertising sync transfer parameters command.

SET_DEF_PHY = 49

Set default PHY command.

SET_DEF_SUBRATE = 125

Set default subrate command.

SET_EVENT_MASK = 1

Set event mask command.

SET_EXT_ADV_DATA = 55

Set extended advertising data command.

SET_EXT_ADV_ENABLE = 57

Set extended advertising enable command.

SET_EXT_ADV_PARAM = 54

Set extended advertising parameters command.

SET_EXT_SCAN_ENABLE = 66

Set extended scan enable command.

SET_EXT_SCAN_PARAM = 65

Set extended scan parameters command.

SET_EXT_SCAN_RESP_DATA = 56

Set extended scan response data command.

SET_HOST_CHAN_CLASS = 20

Set host channel classification command.

SET_HOST_FEATURE = 116

Set host feature command.

SET_PAST_PARAM = 92

Set periodic advertising sync transfer parameters command.

SET_PATH_LOSS_REPORTING_ENABLE = 121

Set path loss reporting enable command.

SET_PATH_LOSS_REPORTING_PARAMS = 120

Set path loss repoting parameters command.

SET_PER_ADV_DATA = 63

Set periodic advertising data command.

SET_PER_ADV_ENABLE = 64

Set periodic advertising enable command.

SET_PER_ADV_PARAM = 62

Set periodic advertising parameters command.

SET_PER_ADV_RCV_ENABLE = 89

Set periodic advertising receive enable command.

SET_PHY = 50

Set PHY command.

SET_PRIVACY_MODE = 78

Set privacy mode command.

SET_RAND_ADDR = 5

Set random address command.

SET_RES_PRIV_ADDR_TO = 46

Set resolvable private address timeout command.

SET_SCAN_ENABLE = 12

Set scan enable command.

SET_SCAN_PARAM = 11

Set scan parameters command.

SET_SCAN_RESP_DATA = 9

Set scan response data command.

SET_TX_POWER_REPORT_ENABLE = 122

Set TX power reporting enable command.

START_ENCRYPTION = 25

Enable encryption command.

SUBRATE_REQ = 126

Subrate request command.

TERMINATE_BIG = 106

Terminate BIG command.

TEST_END = 31

Test end command.

TRANSMITTER_TEST = 30

Transmitter test command.

TRANSMITTER_TEST_V3 = 80

Transmitter test version3 command.

WRITE_DEF_DATA_LEN = 36

Write suggested default data length command.

WRITE_RF_PATH_COMP = 77

Write RF path compensation command.

class LinkControlOCF(value)[source]

Bases: Enum

BLE-defined Link Control group Opcode Command Field values

DISCONNECT = 6

Disconnect command.

READ_REMOTE_VER_INFO = 29

Read remote version info command.

class NOpOCF(value)[source]

Bases: Enum

BLE-defined NOP group Opcode Command Field values.

NOP = 0

No operation.

class OCF[source]

Bases: object

Supported Opcode Command Field values.

CONTROLLER

Controller group OCF values.

alias of ControllerOCF

INFORMATIONAL

Informational group OCF values.

alias of InformationalOCF

LE_CONTROLLER

LE Controller group OCF values.

alias of LEControllerOCF

Link Control group OCF values.

alias of LinkControlOCF

Link Policy group OCF values.

NOP

NOP ground OCF values.

alias of NOpOCF

STATUS

Status group OCF values.

alias of StatusOCF

TESTING = None

Testing group OCF values.

VENDOR_SPEC

ADI Vendor Specific group OCF values.

alias of VendorSpecificOCF

class OGF(value)[source]

Bases: Enum

BLE-defined Opcode Group Field values.

CONTROLLER = 3

Controller group field.

INFORMATIONAL = 4

Informational group field.

LE_CONTROLLER = 8

LE controller group field.

Link control group field.

Link policy group field.

NOP = 0

No operation.

STATUS = 5

Status group field.

TESTING = 6

Testing group field.

VENDOR_SPEC = 63

Vendor specific group field.

class PacketType(value)[source]

Bases: Enum

BT standard packet types.

ASYNC = 2

Asynchronous Connection-Less packet type.

COMMAND = 1

Command packet type.

EVENT = 4

Event packet type.

EXTENDED = 9

Extended command packet type.

SYNC = 3

Synchronous packet type.

Note

Synchronous data packets are not used in BLE.

class StatusOCF(value)[source]

Bases: Enum

BLE-defined Status group Opcode Command Field values.

READ_RSSI = 5

Read RSSI command.

class VendorSpecificOCF(value)[source]

Bases: Enum

ADI Vendor Specific group Opcode Command Field values.

DEVICE_RESET = 962

reset the device

ENA_ACL_SINK = 995

Enable ACL sink command.

ENA_AUTO_GEN_ACL = 997

Enable autogenerate ACL command.

ENA_AUTO_GEN_ISO = 984

Enable autogenerate ISO packets command.

ENA_ISO_SINK = 983

Enable ISO sink command.

GENERATE_ACL = 996

Generate ACL command.

GENERATE_ISO = 981

Generate ISO packets command.

GET_ACL_TEST_REPORT = 1001

Get ACL test report command.

GET_ADV_STATS = 1019

Get advertising statistics command.

GET_AUX_ADV_STATS = 986

Get auxiliary advertising statistics command.

GET_AUX_SCAN_STATS = 987

Get auxiliary scan statistics command.

GET_CIS_STATS = 985

Get CIS statistics command.

GET_CONN_STATS = 1021

Get connection statistics command.

GET_ISO_TEST_REPORT = 982

Get ISO test report command.

GET_PDU_FILT_STATS = 1012

Get PDU filter statistics command.

GET_PEER_MIN_USED_CHAN = 1003

Get peer minimum number of used channels command.

GET_PER_CHAN_MAP = 990

Get periodic scan/advertising channel map command.

GET_PER_SCAN_STATS = 988

Get periodic scan statistics command.

GET_POOL_STATS = 1023

Get pool statistics command.

GET_RAND_ADDR = 1009

Get random address command.

GET_RSSI = 774

Get RSSI command.

GET_SCAN_STATS = 1020

Get scan statistics command.

GET_SYS_STATS = 1018

Get system statistics command.

GET_TEST_STATS = 1022

Get test statistics command.

MEMORY_ERASE = 961

Erase the memory

REG_READ = 769

Register read command.

REG_WRITE = 768

Register write command.

RESET_ADV_STATS = 775

PHY enable command.

RESET_CONN_STATS = 770

Reset connection statistics command.

RESET_SCAN_STATS = 776

PHY disable command.

RESET_TEST_STATS = 772

Reset test statistics command.

RX_TEST = 773

Receiver test command.

SET_ADV_TX_PWR = 1013

Set advertising TX power command.

SET_AUX_DELAY = 976

Set auxiliary packet offset delay command.

SET_BD_ADDR = 1008

Set BD address command.

SET_CHAN_MAP = 1016

Set channel map command.

SET_CONN_OP_FLAGS = 999

Set connection operational flags command.

SET_CONN_PHY_TX_PWR = 989

Set connection PHY TX power command.

SET_CONN_TX_PWR = 1014

Set connection TX power command.

SET_DIAG_MODE = 1017

Set diagnostic mode command.

SET_ENC_MODE = 1015

Set encryption mode command.

SET_EVENT_MASK = 993

Set event mask command.

SET_EXT_ADV_DEF_PHY_OPTS = 979

Set extended advertising default PHY options command.

SET_EXT_ADV_FRAG_LEN = 977

Set extended advertising data fragmentation length command.

SET_EXT_ADV_PHY_OPTS = 978

Set extended advertising PHY options command.

SET_FLASH_ADDR = 963

set flash address pointer

SET_LOCAL_FEAT = 1010

Set local features command.

SET_LOCAL_MIN_USED_CHAN = 1002

Set local minimum number of used channels command.

SET_OP_FLAGS = 1011

Set operational flags command.

SET_P256_PRIV_KEY = 1000

Set P-256 private key command.

SET_SCAN_CH_MAP = 992

Set scan channel map command.

SET_SNIFFER_ENABLE = 973

Set sniffer packet forwarding enable command.

SET_TX_TEST_ERR_PATT = 998

Set TX test error pattern command.

TX_TEST = 771

Transmitter test command.

VALIDATE_PUB_KEY_MODE = 1004

Set validate public key mode command.

WRITE_FLASH = 960

WRITE the firmware