bumble 0.0.222__py3-none-any.whl → 0.0.224__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- bumble/_version.py +2 -2
- bumble/apps/controller_info.py +90 -114
- bumble/apps/controller_loopback.py +11 -9
- bumble/apps/gg_bridge.py +1 -1
- bumble/apps/hci_bridge.py +3 -1
- bumble/apps/l2cap_bridge.py +1 -1
- bumble/apps/rfcomm_bridge.py +1 -1
- bumble/apps/scan.py +10 -4
- bumble/apps/speaker/speaker.py +1 -1
- bumble/apps/usb_probe.py +15 -2
- bumble/att.py +97 -32
- bumble/avctp.py +1 -1
- bumble/avdtp.py +3 -3
- bumble/avrcp.py +366 -190
- bumble/bridge.py +10 -2
- bumble/controller.py +14 -1
- bumble/core.py +1 -1
- bumble/device.py +999 -577
- bumble/drivers/intel.py +45 -39
- bumble/drivers/rtk.py +102 -43
- bumble/gatt.py +2 -2
- bumble/gatt_client.py +5 -4
- bumble/gatt_server.py +100 -1
- bumble/hci.py +1367 -844
- bumble/hid.py +2 -2
- bumble/host.py +339 -157
- bumble/l2cap.py +13 -6
- bumble/pandora/l2cap.py +1 -1
- bumble/profiles/battery_service.py +25 -34
- bumble/profiles/heart_rate_service.py +130 -121
- bumble/rfcomm.py +1 -1
- bumble/sdp.py +2 -2
- bumble/smp.py +8 -3
- bumble/snoop.py +111 -1
- bumble/transport/android_netsim.py +1 -1
- bumble/vendor/android/hci.py +108 -86
- bumble/vendor/zephyr/hci.py +24 -18
- {bumble-0.0.222.dist-info → bumble-0.0.224.dist-info}/METADATA +4 -3
- {bumble-0.0.222.dist-info → bumble-0.0.224.dist-info}/RECORD +43 -43
- {bumble-0.0.222.dist-info → bumble-0.0.224.dist-info}/WHEEL +1 -1
- {bumble-0.0.222.dist-info → bumble-0.0.224.dist-info}/entry_points.txt +0 -0
- {bumble-0.0.222.dist-info → bumble-0.0.224.dist-info}/licenses/LICENSE +0 -0
- {bumble-0.0.222.dist-info → bumble-0.0.224.dist-info}/top_level.txt +0 -0
bumble/hci.py
CHANGED
|
@@ -29,6 +29,7 @@ from dataclasses import field
|
|
|
29
29
|
from typing import (
|
|
30
30
|
Any,
|
|
31
31
|
ClassVar,
|
|
32
|
+
Generic,
|
|
32
33
|
Literal,
|
|
33
34
|
TypeVar,
|
|
34
35
|
cast,
|
|
@@ -77,7 +78,7 @@ def indent_lines(string):
|
|
|
77
78
|
return '\n'.join([' ' + line for line in string.split('\n')])
|
|
78
79
|
|
|
79
80
|
|
|
80
|
-
def map_null_terminated_utf8_string(utf8_bytes):
|
|
81
|
+
def map_null_terminated_utf8_string(utf8_bytes: bytes) -> str | bytes:
|
|
81
82
|
try:
|
|
82
83
|
terminator = utf8_bytes.find(0)
|
|
83
84
|
if terminator < 0:
|
|
@@ -87,7 +88,7 @@ def map_null_terminated_utf8_string(utf8_bytes):
|
|
|
87
88
|
return utf8_bytes
|
|
88
89
|
|
|
89
90
|
|
|
90
|
-
def map_class_of_device(class_of_device):
|
|
91
|
+
def map_class_of_device(class_of_device: int) -> str:
|
|
91
92
|
(
|
|
92
93
|
service_classes,
|
|
93
94
|
major_device_class,
|
|
@@ -208,7 +209,7 @@ def metadata(
|
|
|
208
209
|
HCI_VENDOR_OGF = 0x3F
|
|
209
210
|
|
|
210
211
|
# Specification Version
|
|
211
|
-
class SpecificationVersion(
|
|
212
|
+
class SpecificationVersion(SpecableEnum):
|
|
212
213
|
BLUETOOTH_CORE_1_0B = 0
|
|
213
214
|
BLUETOOTH_CORE_1_1 = 1
|
|
214
215
|
BLUETOOTH_CORE_1_2 = 2
|
|
@@ -397,8 +398,9 @@ HCI_LE_CS_SUBEVENT_RESULT_EVENT = 0x31
|
|
|
397
398
|
HCI_LE_CS_SUBEVENT_RESULT_CONTINUE_EVENT = 0x32
|
|
398
399
|
HCI_LE_CS_TEST_END_COMPLETE_EVENT = 0x33
|
|
399
400
|
HCI_LE_MONITORED_ADVERTISERS_REPORT_EVENT = 0x34
|
|
400
|
-
|
|
401
|
-
|
|
401
|
+
HCI_LE_FRAME_SPACE_UPDATE_COMPLETE_EVENT = 0x35
|
|
402
|
+
HCI_LE_UTP_RECEIVE_EVENT = 0x36
|
|
403
|
+
HCI_LE_CONNECTION_RATE_CHANGE_EVENT = 0x37
|
|
402
404
|
|
|
403
405
|
|
|
404
406
|
# HCI Command
|
|
@@ -735,10 +737,86 @@ HCI_LE_CLEAR_MONITORED_ADVERTISERS_LIST_COMMAND = hci_c
|
|
|
735
737
|
HCI_LE_READ_MONITORED_ADVERTISERS_LIST_SIZE_COMMAND = hci_command_op_code(0x08, 0x009B)
|
|
736
738
|
HCI_LE_ENABLE_MONITORING_ADVERTISERS_COMMAND = hci_command_op_code(0x08, 0x009C)
|
|
737
739
|
HCI_LE_FRAME_SPACE_UPDATE_COMMAND = hci_command_op_code(0x08, 0x009D)
|
|
740
|
+
HCI_LE_SET_RESOLVABLE_PRIVATE_ADDRESS_TIMEOUT_V2_COMMAND = hci_command_op_code(0x08, 0x009E)
|
|
741
|
+
HCI_LE_ENABLE_UTP_OTA_MODE_COMMAND = hci_command_op_code(0x08, 0x009F)
|
|
742
|
+
HCI_LE_UTP_SEND_COMMAND = hci_command_op_code(0x08, 0x00A0)
|
|
743
|
+
HCI_LE_CONNECTION_RATE_REQUEST_COMMAND = hci_command_op_code(0x08, 0x00A1)
|
|
744
|
+
HCI_LE_SET_DEFAULT_RATE_PARAMETERS_COMMAND = hci_command_op_code(0x08, 0x00A2)
|
|
745
|
+
HCI_LE_READ_MINIMUM_SUPPORTED_CONNECTION_INTERVAL_COMMAND = hci_command_op_code(0x08, 0x00A3)
|
|
738
746
|
|
|
739
747
|
|
|
740
748
|
# HCI Error Codes
|
|
741
749
|
# See Bluetooth spec Vol 2, Part D - 1.3 LIST OF ERROR CODES
|
|
750
|
+
class HCI_ErrorCode(SpecableEnum):
|
|
751
|
+
SUCCESS = 0x00
|
|
752
|
+
UNKNOWN_HCI_COMMAND_ERROR = 0x01
|
|
753
|
+
UNKNOWN_CONNECTION_IDENTIFIER_ERROR = 0x02
|
|
754
|
+
HARDWARE_FAILURE_ERROR = 0x03
|
|
755
|
+
PAGE_TIMEOUT_ERROR = 0x04
|
|
756
|
+
AUTHENTICATION_FAILURE_ERROR = 0x05
|
|
757
|
+
PIN_OR_KEY_MISSING_ERROR = 0x06
|
|
758
|
+
MEMORY_CAPACITY_EXCEEDED_ERROR = 0x07
|
|
759
|
+
CONNECTION_TIMEOUT_ERROR = 0x08
|
|
760
|
+
CONNECTION_LIMIT_EXCEEDED_ERROR = 0x09
|
|
761
|
+
SYNCHRONOUS_CONNECTION_LIMIT_TO_A_DEVICE_EXCEEDED_ERROR = 0x0A
|
|
762
|
+
CONNECTION_ALREADY_EXISTS_ERROR = 0x0B
|
|
763
|
+
COMMAND_DISALLOWED_ERROR = 0x0C
|
|
764
|
+
CONNECTION_REJECTED_DUE_TO_LIMITED_RESOURCES_ERROR = 0x0D
|
|
765
|
+
CONNECTION_REJECTED_DUE_TO_SECURITY_REASONS_ERROR = 0x0E
|
|
766
|
+
CONNECTION_REJECTED_DUE_TO_UNACCEPTABLE_BD_ADDR_ERROR = 0x0F
|
|
767
|
+
CONNECTION_ACCEPT_TIMEOUT_ERROR = 0x10
|
|
768
|
+
UNSUPPORTED_FEATURE_OR_PARAMETER_VALUE_ERROR = 0x11
|
|
769
|
+
INVALID_COMMAND_PARAMETERS_ERROR = 0x12
|
|
770
|
+
REMOTE_USER_TERMINATED_CONNECTION_ERROR = 0x13
|
|
771
|
+
REMOTE_DEVICE_TERMINATED_CONNECTION_DUE_TO_LOW_RESOURCES_ERROR = 0x14
|
|
772
|
+
REMOTE_DEVICE_TERMINATED_CONNECTION_DUE_TO_POWER_OFF_ERROR = 0x15
|
|
773
|
+
CONNECTION_TERMINATED_BY_LOCAL_HOST_ERROR = 0x16
|
|
774
|
+
REPEATED_ATTEMPTS_ERROR = 0X17
|
|
775
|
+
PAIRING_NOT_ALLOWED_ERROR = 0X18
|
|
776
|
+
UNKNOWN_LMP_PDU_ERROR = 0X19
|
|
777
|
+
UNSUPPORTED_REMOTE_FEATURE_ERROR = 0X1A
|
|
778
|
+
SCO_OFFSET_REJECTED_ERROR = 0X1B
|
|
779
|
+
SCO_INTERVAL_REJECTED_ERROR = 0X1C
|
|
780
|
+
SCO_AIR_MODE_REJECTED_ERROR = 0X1D
|
|
781
|
+
INVALID_LMP_OR_LL_PARAMETERS_ERROR = 0X1E
|
|
782
|
+
UNSPECIFIED_ERROR_ERROR = 0X1F
|
|
783
|
+
UNSUPPORTED_LMP_OR_LL_PARAMETER_VALUE_ERROR = 0X20
|
|
784
|
+
ROLE_CHANGE_NOT_ALLOWED_ERROR = 0X21
|
|
785
|
+
LMP_OR_LL_RESPONSE_TIMEOUT_ERROR = 0X22
|
|
786
|
+
LMP_ERROR_TRANSACTION_COLLISION_OR_LL_PROCEDURE_COLLISION_ERROR = 0X23
|
|
787
|
+
LMP_PDU_NOT_ALLOWED_ERROR = 0X24
|
|
788
|
+
ENCRYPTION_MODE_NOT_ACCEPTABLE_ERROR = 0X25
|
|
789
|
+
LINK_KEY_CANNOT_BE_CHANGED_ERROR = 0X26
|
|
790
|
+
REQUESTED_QOS_NOT_SUPPORTED_ERROR = 0X27
|
|
791
|
+
INSTANT_PASSED_ERROR = 0X28
|
|
792
|
+
PAIRING_WITH_UNIT_KEY_NOT_SUPPORTED_ERROR = 0X29
|
|
793
|
+
DIFFERENT_TRANSACTION_COLLISION_ERROR = 0X2A
|
|
794
|
+
RESERVED_FOR_FUTURE_USE = 0X2B
|
|
795
|
+
QOS_UNACCEPTABLE_PARAMETER_ERROR = 0X2C
|
|
796
|
+
QOS_REJECTED_ERROR = 0X2D
|
|
797
|
+
CHANNEL_CLASSIFICATION_NOT_SUPPORTED_ERROR = 0X2E
|
|
798
|
+
INSUFFICIENT_SECURITY_ERROR = 0X2F
|
|
799
|
+
PARAMETER_OUT_OF_MANDATORY_RANGE_ERROR = 0X30
|
|
800
|
+
ROLE_SWITCH_PENDING_ERROR = 0X32
|
|
801
|
+
RESERVED_SLOT_VIOLATION_ERROR = 0X34
|
|
802
|
+
ROLE_SWITCH_FAILED_ERROR = 0X35
|
|
803
|
+
EXTENDED_INQUIRY_RESPONSE_TOO_LARGE_ERROR = 0X36
|
|
804
|
+
SECURE_SIMPLE_PAIRING_NOT_SUPPORTED_BY_HOST_ERROR = 0X37
|
|
805
|
+
HOST_BUSY_PAIRING_ERROR = 0X38
|
|
806
|
+
CONNECTION_REJECTED_DUE_TO_NO_SUITABLE_CHANNEL_FOUND_ERROR = 0X39
|
|
807
|
+
CONTROLLER_BUSY_ERROR = 0X3A
|
|
808
|
+
UNACCEPTABLE_CONNECTION_PARAMETERS_ERROR = 0X3B
|
|
809
|
+
ADVERTISING_TIMEOUT_ERROR = 0X3C
|
|
810
|
+
CONNECTION_TERMINATED_DUE_TO_MIC_FAILURE_ERROR = 0X3D
|
|
811
|
+
CONNECTION_FAILED_TO_BE_ESTABLISHED_ERROR = 0X3E
|
|
812
|
+
COARSE_CLOCK_ADJUSTMENT_REJECTED_BUT_WILL_TRY_TO_ADJUST_USING_CLOCK_DRAGGING_ERROR = 0X40
|
|
813
|
+
TYPE0_SUBMAP_NOT_DEFINED_ERROR = 0X41
|
|
814
|
+
UNKNOWN_ADVERTISING_IDENTIFIER_ERROR = 0X42
|
|
815
|
+
LIMIT_REACHED_ERROR = 0X43
|
|
816
|
+
OPERATION_CANCELLED_BY_HOST_ERROR = 0X44
|
|
817
|
+
PACKET_TOO_LONG_ERROR = 0X45
|
|
818
|
+
|
|
819
|
+
# For backwards compatibility.
|
|
742
820
|
HCI_SUCCESS = 0x00
|
|
743
821
|
HCI_UNKNOWN_HCI_COMMAND_ERROR = 0x01
|
|
744
822
|
HCI_UNKNOWN_CONNECTION_IDENTIFIER_ERROR = 0x02
|
|
@@ -808,13 +886,15 @@ HCI_OPERATION_CANCELLED_BY_HOST_ERROR
|
|
|
808
886
|
HCI_PACKET_TOO_LONG_ERROR = 0X45
|
|
809
887
|
|
|
810
888
|
HCI_ERROR_NAMES = {
|
|
811
|
-
error_code:
|
|
812
|
-
if error_name.startswith('HCI_') and error_name.endswith('_ERROR')
|
|
889
|
+
error_code: error_code.name for error_code in HCI_ErrorCode
|
|
813
890
|
}
|
|
814
|
-
HCI_ERROR_NAMES[HCI_SUCCESS] = 'HCI_SUCCESS'
|
|
815
891
|
|
|
816
892
|
# Command Status codes
|
|
817
|
-
|
|
893
|
+
class HCI_CommandStatus(SpecableEnum):
|
|
894
|
+
PENDING = 0x00
|
|
895
|
+
|
|
896
|
+
# For backward compatibility
|
|
897
|
+
HCI_COMMAND_STATUS_PENDING = HCI_CommandStatus.PENDING
|
|
818
898
|
|
|
819
899
|
|
|
820
900
|
class Phy(SpecableEnum):
|
|
@@ -1325,6 +1405,12 @@ HCI_SUPPORTED_COMMANDS_MASKS = {
|
|
|
1325
1405
|
HCI_LE_CLEAR_MONITORED_ADVERTISERS_LIST_COMMAND : 1 << (47*8+7),
|
|
1326
1406
|
HCI_LE_READ_MONITORED_ADVERTISERS_LIST_SIZE_COMMAND : 1 << (48*8+0),
|
|
1327
1407
|
HCI_LE_FRAME_SPACE_UPDATE_COMMAND : 1 << (48*8+1),
|
|
1408
|
+
HCI_LE_SET_RESOLVABLE_PRIVATE_ADDRESS_TIMEOUT_V2_COMMAND : 1 << (48*8+2),
|
|
1409
|
+
HCI_LE_ENABLE_UTP_OTA_MODE_COMMAND : 1 << (48*8+3),
|
|
1410
|
+
HCI_LE_UTP_SEND_COMMAND : 1 << (48*8+4),
|
|
1411
|
+
HCI_LE_CONNECTION_RATE_REQUEST_COMMAND : 1 << (48*8+5),
|
|
1412
|
+
HCI_LE_SET_DEFAULT_RATE_PARAMETERS_COMMAND : 1 << (48*8+6),
|
|
1413
|
+
HCI_LE_READ_MINIMUM_SUPPORTED_CONNECTION_INTERVAL_COMMAND : 1 << (48*8+7)
|
|
1328
1414
|
}
|
|
1329
1415
|
|
|
1330
1416
|
# LE Supported Features
|
|
@@ -1382,6 +1468,14 @@ class LeFeature(SpecableEnum):
|
|
|
1382
1468
|
LL_EXTENDED_FEATURE_SET = 63
|
|
1383
1469
|
MONITORING_ADVERTISERS = 64
|
|
1384
1470
|
FRAME_SPACE_UPDATE = 65
|
|
1471
|
+
UTP_OTA_MODE = 66
|
|
1472
|
+
UTP_HCI_MODE = 67
|
|
1473
|
+
LL_OTA_UTP_IND_MAXIMUM_LENGTH_0 = 68
|
|
1474
|
+
LL_OTA_UTP_IND_MAXIMUM_LENGTH_1 = 69
|
|
1475
|
+
SHORTER_CONNECTION_INTERVALS = 72
|
|
1476
|
+
SHORTER_CONNECTION_INTERVALS_HOST_SUPPORT = 73
|
|
1477
|
+
LE_FLUSHABLE_ACL_DATA = 74
|
|
1478
|
+
|
|
1385
1479
|
|
|
1386
1480
|
class LeFeatureMask(utils.CompatibleIntFlag):
|
|
1387
1481
|
LE_ENCRYPTION = 1 << LeFeature.LE_ENCRYPTION
|
|
@@ -1436,6 +1530,13 @@ class LeFeatureMask(utils.CompatibleIntFlag):
|
|
|
1436
1530
|
LL_EXTENDED_FEATURE_SET = 1 << LeFeature.LL_EXTENDED_FEATURE_SET
|
|
1437
1531
|
MONITORING_ADVERTISERS = 1 << LeFeature.MONITORING_ADVERTISERS
|
|
1438
1532
|
FRAME_SPACE_UPDATE = 1 << LeFeature.FRAME_SPACE_UPDATE
|
|
1533
|
+
UTP_OTA_MODE = 1 << LeFeature.UTP_OTA_MODE
|
|
1534
|
+
UTP_HCI_MODE = 1 << LeFeature.UTP_HCI_MODE
|
|
1535
|
+
LL_OTA_UTP_IND_MAXIMUM_LENGTH_0 = 1 << LeFeature.LL_OTA_UTP_IND_MAXIMUM_LENGTH_0
|
|
1536
|
+
LL_OTA_UTP_IND_MAXIMUM_LENGTH_1 = 1 << LeFeature.LL_OTA_UTP_IND_MAXIMUM_LENGTH_1
|
|
1537
|
+
SHORTER_CONNECTION_INTERVALS = 1 << LeFeature.SHORTER_CONNECTION_INTERVALS
|
|
1538
|
+
SHORTER_CONNECTION_INTERVALS_HOST_SUPPORT = 1 << LeFeature.SHORTER_CONNECTION_INTERVALS_HOST_SUPPORT
|
|
1539
|
+
LE_FLUSHABLE_ACL_DATA = 1 << LeFeature.LE_FLUSHABLE_ACL_DATA
|
|
1439
1540
|
|
|
1440
1541
|
class LmpFeature(SpecableEnum):
|
|
1441
1542
|
# Page 0 (Legacy LMP features)
|
|
@@ -1727,6 +1828,8 @@ class HCI_StatusError(ProtocolError):
|
|
|
1727
1828
|
# Generic HCI object
|
|
1728
1829
|
# -----------------------------------------------------------------------------
|
|
1729
1830
|
class HCI_Object:
|
|
1831
|
+
fields: Fields
|
|
1832
|
+
|
|
1730
1833
|
@staticmethod
|
|
1731
1834
|
def init_from_fields(hci_object, fields, values):
|
|
1732
1835
|
if isinstance(values, dict):
|
|
@@ -2090,9 +2193,9 @@ class Address:
|
|
|
2090
2193
|
RANDOM_IDENTITY_ADDRESS = AddressType.RANDOM_IDENTITY
|
|
2091
2194
|
|
|
2092
2195
|
# Type declarations
|
|
2093
|
-
NIL: Address
|
|
2094
|
-
ANY: Address
|
|
2095
|
-
ANY_RANDOM: Address
|
|
2196
|
+
NIL: ClassVar[Address]
|
|
2197
|
+
ANY: ClassVar[Address]
|
|
2198
|
+
ANY_RANDOM: ClassVar[Address]
|
|
2096
2199
|
|
|
2097
2200
|
# pylint: disable-next=unnecessary-lambda
|
|
2098
2201
|
ADDRESS_TYPE_SPEC = {'size': 1, 'mapper': lambda x: Address.address_type_name(x)}
|
|
@@ -2204,38 +2307,38 @@ class Address:
|
|
|
2204
2307
|
|
|
2205
2308
|
self.address_type = address_type
|
|
2206
2309
|
|
|
2207
|
-
def clone(self):
|
|
2310
|
+
def clone(self) -> Address:
|
|
2208
2311
|
return Address(self.address_bytes, self.address_type)
|
|
2209
2312
|
|
|
2210
2313
|
@property
|
|
2211
|
-
def is_public(self):
|
|
2314
|
+
def is_public(self) -> bool:
|
|
2212
2315
|
return self.address_type in (
|
|
2213
2316
|
self.PUBLIC_DEVICE_ADDRESS,
|
|
2214
2317
|
self.PUBLIC_IDENTITY_ADDRESS,
|
|
2215
2318
|
)
|
|
2216
2319
|
|
|
2217
2320
|
@property
|
|
2218
|
-
def is_random(self):
|
|
2321
|
+
def is_random(self) -> bool:
|
|
2219
2322
|
return not self.is_public
|
|
2220
2323
|
|
|
2221
2324
|
@property
|
|
2222
|
-
def is_resolved(self):
|
|
2325
|
+
def is_resolved(self) -> bool:
|
|
2223
2326
|
return self.address_type in (
|
|
2224
2327
|
self.PUBLIC_IDENTITY_ADDRESS,
|
|
2225
2328
|
self.RANDOM_IDENTITY_ADDRESS,
|
|
2226
2329
|
)
|
|
2227
2330
|
|
|
2228
2331
|
@property
|
|
2229
|
-
def is_resolvable(self):
|
|
2332
|
+
def is_resolvable(self) -> bool:
|
|
2230
2333
|
return self.address_type == self.RANDOM_DEVICE_ADDRESS and (
|
|
2231
2334
|
self.address_bytes[5] >> 6 == 1
|
|
2232
2335
|
)
|
|
2233
2336
|
|
|
2234
2337
|
@property
|
|
2235
|
-
def is_static(self):
|
|
2338
|
+
def is_static(self) -> bool:
|
|
2236
2339
|
return self.is_random and (self.address_bytes[5] >> 6 == 3)
|
|
2237
2340
|
|
|
2238
|
-
def to_string(self, with_type_qualifier=True):
|
|
2341
|
+
def to_string(self, with_type_qualifier: bool = True) -> str:
|
|
2239
2342
|
'''
|
|
2240
2343
|
String representation of the address, MSB first, with an optional type
|
|
2241
2344
|
qualifier.
|
|
@@ -2245,23 +2348,23 @@ class Address:
|
|
|
2245
2348
|
return result
|
|
2246
2349
|
return result + '/P'
|
|
2247
2350
|
|
|
2248
|
-
def __bytes__(self):
|
|
2351
|
+
def __bytes__(self) -> bytes:
|
|
2249
2352
|
return self.address_bytes
|
|
2250
2353
|
|
|
2251
|
-
def __hash__(self):
|
|
2354
|
+
def __hash__(self) -> int:
|
|
2252
2355
|
return hash(self.address_bytes)
|
|
2253
2356
|
|
|
2254
|
-
def __eq__(self, other):
|
|
2357
|
+
def __eq__(self, other: Any) -> bool:
|
|
2255
2358
|
return (
|
|
2256
2359
|
isinstance(other, Address)
|
|
2257
2360
|
and self.address_bytes == other.address_bytes
|
|
2258
2361
|
and self.is_public == other.is_public
|
|
2259
2362
|
)
|
|
2260
2363
|
|
|
2261
|
-
def __str__(self):
|
|
2364
|
+
def __str__(self) -> str:
|
|
2262
2365
|
return self.to_string()
|
|
2263
2366
|
|
|
2264
|
-
def __repr__(self):
|
|
2367
|
+
def __repr__(self) -> str:
|
|
2265
2368
|
return f'Address({self.to_string(False)}/{self.address_type_name(self.address_type)})'
|
|
2266
2369
|
|
|
2267
2370
|
|
|
@@ -2300,30 +2403,34 @@ class HCI_Packet:
|
|
|
2300
2403
|
Abstract Base class for HCI packets
|
|
2301
2404
|
'''
|
|
2302
2405
|
|
|
2303
|
-
hci_packet_type:
|
|
2406
|
+
hci_packet_type: int
|
|
2304
2407
|
|
|
2305
|
-
@
|
|
2306
|
-
def from_bytes(packet: bytes) -> HCI_Packet:
|
|
2307
|
-
|
|
2408
|
+
@classmethod
|
|
2409
|
+
def from_bytes(cls, packet: bytes) -> HCI_Packet:
|
|
2410
|
+
try:
|
|
2411
|
+
packet_type = packet[0]
|
|
2308
2412
|
|
|
2309
|
-
|
|
2310
|
-
|
|
2413
|
+
if packet_type == HCI_COMMAND_PACKET:
|
|
2414
|
+
return HCI_Command.from_bytes(packet)
|
|
2311
2415
|
|
|
2312
|
-
|
|
2313
|
-
|
|
2416
|
+
if packet_type == HCI_ACL_DATA_PACKET:
|
|
2417
|
+
return HCI_AclDataPacket.from_bytes(packet)
|
|
2314
2418
|
|
|
2315
|
-
|
|
2316
|
-
|
|
2419
|
+
if packet_type == HCI_SYNCHRONOUS_DATA_PACKET:
|
|
2420
|
+
return HCI_SynchronousDataPacket.from_bytes(packet)
|
|
2317
2421
|
|
|
2318
|
-
|
|
2319
|
-
|
|
2422
|
+
if packet_type == HCI_EVENT_PACKET:
|
|
2423
|
+
return HCI_Event.from_bytes(packet)
|
|
2320
2424
|
|
|
2321
|
-
|
|
2322
|
-
|
|
2425
|
+
if packet_type == HCI_ISO_DATA_PACKET:
|
|
2426
|
+
return HCI_IsoDataPacket.from_bytes(packet)
|
|
2323
2427
|
|
|
2324
|
-
|
|
2428
|
+
return HCI_CustomPacket(packet)
|
|
2429
|
+
except Exception as e:
|
|
2430
|
+
logger.error(f'error parsing HCI packet [{packet.hex()}]: {e}')
|
|
2431
|
+
raise
|
|
2325
2432
|
|
|
2326
|
-
def __init__(self, name):
|
|
2433
|
+
def __init__(self, name: str) -> None:
|
|
2327
2434
|
self.name = name
|
|
2328
2435
|
|
|
2329
2436
|
def __bytes__(self) -> bytes:
|
|
@@ -2335,7 +2442,7 @@ class HCI_Packet:
|
|
|
2335
2442
|
|
|
2336
2443
|
# -----------------------------------------------------------------------------
|
|
2337
2444
|
class HCI_CustomPacket(HCI_Packet):
|
|
2338
|
-
def __init__(self, payload):
|
|
2445
|
+
def __init__(self, payload: bytes) -> None:
|
|
2339
2446
|
super().__init__('HCI_CUSTOM_PACKET')
|
|
2340
2447
|
self.hci_packet_type = payload[0]
|
|
2341
2448
|
self.payload = payload
|
|
@@ -2355,7 +2462,6 @@ class HCI_Command(HCI_Packet):
|
|
|
2355
2462
|
command_classes: dict[int, type[HCI_Command]] = {}
|
|
2356
2463
|
op_code: int
|
|
2357
2464
|
fields: Fields = ()
|
|
2358
|
-
return_parameters_fields: Fields = ()
|
|
2359
2465
|
_parameters: bytes = b''
|
|
2360
2466
|
|
|
2361
2467
|
_Command = TypeVar("_Command", bound="HCI_Command")
|
|
@@ -2424,20 +2530,6 @@ class HCI_Command(HCI_Packet):
|
|
|
2424
2530
|
return subclass.name
|
|
2425
2531
|
return f'[OGF=0x{op_code >> 10:02x}, OCF=0x{op_code & 0x3FF:04x}]'
|
|
2426
2532
|
|
|
2427
|
-
@classmethod
|
|
2428
|
-
def create_return_parameters(cls, **kwargs):
|
|
2429
|
-
return HCI_Object(cls.return_parameters_fields, **kwargs)
|
|
2430
|
-
|
|
2431
|
-
@classmethod
|
|
2432
|
-
def parse_return_parameters(cls, parameters):
|
|
2433
|
-
if not cls.return_parameters_fields:
|
|
2434
|
-
return None
|
|
2435
|
-
return_parameters = HCI_Object.from_bytes(
|
|
2436
|
-
parameters, 0, cls.return_parameters_fields
|
|
2437
|
-
)
|
|
2438
|
-
return_parameters.fields = cls.return_parameters_fields
|
|
2439
|
-
return return_parameters
|
|
2440
|
-
|
|
2441
2533
|
def __init__(
|
|
2442
2534
|
self,
|
|
2443
2535
|
parameters: bytes | None = None,
|
|
@@ -2485,10 +2577,98 @@ class HCI_Command(HCI_Packet):
|
|
|
2485
2577
|
HCI_Command.register_commands(globals())
|
|
2486
2578
|
|
|
2487
2579
|
|
|
2580
|
+
# -----------------------------------------------------------------------------
|
|
2581
|
+
class HCI_AsyncCommand(HCI_Command):
|
|
2582
|
+
'''
|
|
2583
|
+
HCI Commands for which the expected response is an HCI_Command_Status_Event.
|
|
2584
|
+
'''
|
|
2585
|
+
|
|
2586
|
+
|
|
2587
|
+
# -----------------------------------------------------------------------------
|
|
2588
|
+
class HCI_ReturnParameters(HCI_Object):
|
|
2589
|
+
@classmethod
|
|
2590
|
+
def from_parameters(cls, parameters: bytes) -> Self:
|
|
2591
|
+
return cls(**HCI_Object.dict_from_bytes(parameters, 0, cls.fields))
|
|
2592
|
+
|
|
2593
|
+
|
|
2594
|
+
@dataclasses.dataclass
|
|
2595
|
+
class HCI_GenericReturnParameters(HCI_ReturnParameters):
|
|
2596
|
+
fields = [('data', '*')]
|
|
2597
|
+
data: bytes = field(metadata=metadata('*'))
|
|
2598
|
+
|
|
2599
|
+
|
|
2600
|
+
@dataclasses.dataclass
|
|
2601
|
+
class HCI_StatusReturnParameters(HCI_ReturnParameters):
|
|
2602
|
+
status: HCI_ErrorCode = field(metadata=HCI_ErrorCode.type_metadata(1))
|
|
2603
|
+
|
|
2604
|
+
@classmethod
|
|
2605
|
+
def from_parameters(cls, parameters: bytes) -> Self | HCI_StatusReturnParameters:
|
|
2606
|
+
status = HCI_ErrorCode(parameters[0])
|
|
2607
|
+
|
|
2608
|
+
if status != HCI_ErrorCode.SUCCESS:
|
|
2609
|
+
# Don't parse further, just return the status.
|
|
2610
|
+
return HCI_StatusReturnParameters(status=status)
|
|
2611
|
+
|
|
2612
|
+
return cls(**HCI_Object.dict_from_bytes(parameters, 0, cls.fields))
|
|
2613
|
+
|
|
2614
|
+
|
|
2615
|
+
@dataclasses.dataclass
|
|
2616
|
+
class HCI_GenericStatusReturnParameters(HCI_StatusReturnParameters):
|
|
2617
|
+
data: bytes = field(metadata=metadata('*'))
|
|
2618
|
+
|
|
2619
|
+
|
|
2620
|
+
@dataclasses.dataclass
|
|
2621
|
+
class HCI_StatusAndAddressReturnParameters(HCI_StatusReturnParameters):
|
|
2622
|
+
bd_addr: Address = field(metadata=metadata(Address.parse_address))
|
|
2623
|
+
|
|
2624
|
+
|
|
2625
|
+
@dataclasses.dataclass
|
|
2626
|
+
class HCI_StatusAndConnectionHandleReturnParameters(HCI_StatusReturnParameters):
|
|
2627
|
+
connection_handle: int = field(metadata=metadata(2))
|
|
2628
|
+
|
|
2629
|
+
|
|
2630
|
+
_RP = TypeVar('_RP', bound=HCI_ReturnParameters)
|
|
2631
|
+
|
|
2632
|
+
|
|
2633
|
+
class HCI_SyncCommand(HCI_Command, Generic[_RP]):
|
|
2634
|
+
'''
|
|
2635
|
+
HCI Commands for which the expected response is an HCI_Command_Complete_Event.
|
|
2636
|
+
'''
|
|
2637
|
+
|
|
2638
|
+
return_parameters_class: type[_RP]
|
|
2639
|
+
|
|
2640
|
+
_SyncCommand = TypeVar("_SyncCommand", bound="HCI_SyncCommand")
|
|
2641
|
+
|
|
2642
|
+
@classmethod
|
|
2643
|
+
def sync_command(
|
|
2644
|
+
cls: type[_SyncCommand], return_parameters_class: type[_RP]
|
|
2645
|
+
) -> Callable[[type[_SyncCommand]], type[_SyncCommand]]:
|
|
2646
|
+
'''
|
|
2647
|
+
Decorator used to declare and register subclasses and setup their
|
|
2648
|
+
`return_parameters_class` attribute.
|
|
2649
|
+
'''
|
|
2650
|
+
|
|
2651
|
+
_SyncCommand = TypeVar("_SyncCommand", bound="HCI_SyncCommand")
|
|
2652
|
+
|
|
2653
|
+
def inner(cls: type[_SyncCommand]) -> type[_SyncCommand]:
|
|
2654
|
+
cls = HCI_Command.command(cls)
|
|
2655
|
+
cls.return_parameters_class = return_parameters_class
|
|
2656
|
+
return_parameters_class.fields = HCI_Object.fields_from_dataclass(
|
|
2657
|
+
cls.return_parameters_class
|
|
2658
|
+
)
|
|
2659
|
+
return cls
|
|
2660
|
+
|
|
2661
|
+
return inner
|
|
2662
|
+
|
|
2663
|
+
@classmethod
|
|
2664
|
+
def parse_return_parameters(cls, parameters: bytes) -> _RP:
|
|
2665
|
+
return cls.return_parameters_class.from_parameters(parameters)
|
|
2666
|
+
|
|
2667
|
+
|
|
2488
2668
|
# -----------------------------------------------------------------------------
|
|
2489
2669
|
@HCI_Command.command
|
|
2490
2670
|
@dataclasses.dataclass
|
|
2491
|
-
class HCI_Inquiry_Command(
|
|
2671
|
+
class HCI_Inquiry_Command(HCI_AsyncCommand):
|
|
2492
2672
|
'''
|
|
2493
2673
|
See Bluetooth spec @ 7.1.1 Inquiry Command
|
|
2494
2674
|
'''
|
|
@@ -2501,9 +2681,9 @@ class HCI_Inquiry_Command(HCI_Command):
|
|
|
2501
2681
|
|
|
2502
2682
|
|
|
2503
2683
|
# -----------------------------------------------------------------------------
|
|
2504
|
-
@
|
|
2684
|
+
@HCI_SyncCommand.sync_command(HCI_StatusReturnParameters)
|
|
2505
2685
|
@dataclasses.dataclass
|
|
2506
|
-
class HCI_Inquiry_Cancel_Command(
|
|
2686
|
+
class HCI_Inquiry_Cancel_Command(HCI_SyncCommand[HCI_StatusReturnParameters]):
|
|
2507
2687
|
'''
|
|
2508
2688
|
See Bluetooth spec @ 7.1.2 Inquiry Cancel Command
|
|
2509
2689
|
'''
|
|
@@ -2512,7 +2692,7 @@ class HCI_Inquiry_Cancel_Command(HCI_Command):
|
|
|
2512
2692
|
# -----------------------------------------------------------------------------
|
|
2513
2693
|
@HCI_Command.command
|
|
2514
2694
|
@dataclasses.dataclass
|
|
2515
|
-
class HCI_Create_Connection_Command(
|
|
2695
|
+
class HCI_Create_Connection_Command(HCI_AsyncCommand):
|
|
2516
2696
|
'''
|
|
2517
2697
|
See Bluetooth spec @ 7.1.5 Create Connection Command
|
|
2518
2698
|
'''
|
|
@@ -2528,7 +2708,7 @@ class HCI_Create_Connection_Command(HCI_Command):
|
|
|
2528
2708
|
# -----------------------------------------------------------------------------
|
|
2529
2709
|
@HCI_Command.command
|
|
2530
2710
|
@dataclasses.dataclass
|
|
2531
|
-
class HCI_Disconnect_Command(
|
|
2711
|
+
class HCI_Disconnect_Command(HCI_AsyncCommand):
|
|
2532
2712
|
'''
|
|
2533
2713
|
See Bluetooth spec @ 7.1.6 Disconnect Command
|
|
2534
2714
|
'''
|
|
@@ -2538,25 +2718,22 @@ class HCI_Disconnect_Command(HCI_Command):
|
|
|
2538
2718
|
|
|
2539
2719
|
|
|
2540
2720
|
# -----------------------------------------------------------------------------
|
|
2541
|
-
@
|
|
2721
|
+
@HCI_SyncCommand.sync_command(HCI_StatusAndAddressReturnParameters)
|
|
2542
2722
|
@dataclasses.dataclass
|
|
2543
|
-
class HCI_Create_Connection_Cancel_Command(
|
|
2723
|
+
class HCI_Create_Connection_Cancel_Command(
|
|
2724
|
+
HCI_SyncCommand[HCI_StatusAndAddressReturnParameters]
|
|
2725
|
+
):
|
|
2544
2726
|
'''
|
|
2545
2727
|
See Bluetooth spec @ 7.1.7 Create Connection Cancel Command
|
|
2546
2728
|
'''
|
|
2547
2729
|
|
|
2548
2730
|
bd_addr: Address = field(metadata=metadata(Address.parse_address))
|
|
2549
2731
|
|
|
2550
|
-
return_parameters_fields = [
|
|
2551
|
-
('status', STATUS_SPEC),
|
|
2552
|
-
('bd_addr', Address.parse_address),
|
|
2553
|
-
]
|
|
2554
|
-
|
|
2555
2732
|
|
|
2556
2733
|
# -----------------------------------------------------------------------------
|
|
2557
2734
|
@HCI_Command.command
|
|
2558
2735
|
@dataclasses.dataclass
|
|
2559
|
-
class HCI_Accept_Connection_Request_Command(
|
|
2736
|
+
class HCI_Accept_Connection_Request_Command(HCI_AsyncCommand):
|
|
2560
2737
|
'''
|
|
2561
2738
|
See Bluetooth spec @ 7.1.8 Accept Connection Request Command
|
|
2562
2739
|
'''
|
|
@@ -2568,7 +2745,7 @@ class HCI_Accept_Connection_Request_Command(HCI_Command):
|
|
|
2568
2745
|
# -----------------------------------------------------------------------------
|
|
2569
2746
|
@HCI_Command.command
|
|
2570
2747
|
@dataclasses.dataclass
|
|
2571
|
-
class HCI_Reject_Connection_Request_Command(
|
|
2748
|
+
class HCI_Reject_Connection_Request_Command(HCI_AsyncCommand):
|
|
2572
2749
|
'''
|
|
2573
2750
|
See Bluetooth spec @ 7.1.9 Reject Connection Request Command
|
|
2574
2751
|
'''
|
|
@@ -2578,9 +2755,11 @@ class HCI_Reject_Connection_Request_Command(HCI_Command):
|
|
|
2578
2755
|
|
|
2579
2756
|
|
|
2580
2757
|
# -----------------------------------------------------------------------------
|
|
2581
|
-
@
|
|
2758
|
+
@HCI_SyncCommand.sync_command(HCI_StatusAndAddressReturnParameters)
|
|
2582
2759
|
@dataclasses.dataclass
|
|
2583
|
-
class HCI_Link_Key_Request_Reply_Command(
|
|
2760
|
+
class HCI_Link_Key_Request_Reply_Command(
|
|
2761
|
+
HCI_SyncCommand[HCI_StatusAndAddressReturnParameters]
|
|
2762
|
+
):
|
|
2584
2763
|
'''
|
|
2585
2764
|
See Bluetooth spec @ 7.1.10 Link Key Request Reply Command
|
|
2586
2765
|
'''
|
|
@@ -2590,25 +2769,24 @@ class HCI_Link_Key_Request_Reply_Command(HCI_Command):
|
|
|
2590
2769
|
|
|
2591
2770
|
|
|
2592
2771
|
# -----------------------------------------------------------------------------
|
|
2593
|
-
@
|
|
2772
|
+
@HCI_SyncCommand.sync_command(HCI_StatusAndAddressReturnParameters)
|
|
2594
2773
|
@dataclasses.dataclass
|
|
2595
|
-
class HCI_Link_Key_Request_Negative_Reply_Command(
|
|
2774
|
+
class HCI_Link_Key_Request_Negative_Reply_Command(
|
|
2775
|
+
HCI_SyncCommand[HCI_StatusAndAddressReturnParameters]
|
|
2776
|
+
):
|
|
2596
2777
|
'''
|
|
2597
2778
|
See Bluetooth spec @ 7.1.11 Link Key Request Negative Reply Command
|
|
2598
2779
|
'''
|
|
2599
2780
|
|
|
2600
2781
|
bd_addr: Address = field(metadata=metadata(Address.parse_address))
|
|
2601
2782
|
|
|
2602
|
-
return_parameters_fields = [
|
|
2603
|
-
('status', STATUS_SPEC),
|
|
2604
|
-
('bd_addr', Address.parse_address),
|
|
2605
|
-
]
|
|
2606
|
-
|
|
2607
2783
|
|
|
2608
2784
|
# -----------------------------------------------------------------------------
|
|
2609
|
-
@
|
|
2785
|
+
@HCI_SyncCommand.sync_command(HCI_StatusAndAddressReturnParameters)
|
|
2610
2786
|
@dataclasses.dataclass
|
|
2611
|
-
class HCI_PIN_Code_Request_Reply_Command(
|
|
2787
|
+
class HCI_PIN_Code_Request_Reply_Command(
|
|
2788
|
+
HCI_SyncCommand[HCI_StatusAndAddressReturnParameters]
|
|
2789
|
+
):
|
|
2612
2790
|
'''
|
|
2613
2791
|
See Bluetooth spec @ 7.1.12 PIN Code Request Reply Command
|
|
2614
2792
|
'''
|
|
@@ -2617,32 +2795,24 @@ class HCI_PIN_Code_Request_Reply_Command(HCI_Command):
|
|
|
2617
2795
|
pin_code_length: int = field(metadata=metadata(1))
|
|
2618
2796
|
pin_code: bytes = field(metadata=metadata(16))
|
|
2619
2797
|
|
|
2620
|
-
return_parameters_fields = [
|
|
2621
|
-
('status', STATUS_SPEC),
|
|
2622
|
-
('bd_addr', Address.parse_address),
|
|
2623
|
-
]
|
|
2624
|
-
|
|
2625
2798
|
|
|
2626
2799
|
# -----------------------------------------------------------------------------
|
|
2627
|
-
@
|
|
2800
|
+
@HCI_SyncCommand.sync_command(HCI_StatusAndAddressReturnParameters)
|
|
2628
2801
|
@dataclasses.dataclass
|
|
2629
|
-
class HCI_PIN_Code_Request_Negative_Reply_Command(
|
|
2802
|
+
class HCI_PIN_Code_Request_Negative_Reply_Command(
|
|
2803
|
+
HCI_SyncCommand[HCI_StatusAndAddressReturnParameters]
|
|
2804
|
+
):
|
|
2630
2805
|
'''
|
|
2631
2806
|
See Bluetooth spec @ 7.1.13 PIN Code Request Negative Reply Command
|
|
2632
2807
|
'''
|
|
2633
2808
|
|
|
2634
2809
|
bd_addr: Address = field(metadata=metadata(Address.parse_address))
|
|
2635
2810
|
|
|
2636
|
-
return_parameters_fields = [
|
|
2637
|
-
('status', STATUS_SPEC),
|
|
2638
|
-
('bd_addr', Address.parse_address),
|
|
2639
|
-
]
|
|
2640
|
-
|
|
2641
2811
|
|
|
2642
2812
|
# -----------------------------------------------------------------------------
|
|
2643
2813
|
@HCI_Command.command
|
|
2644
2814
|
@dataclasses.dataclass
|
|
2645
|
-
class HCI_Change_Connection_Packet_Type_Command(
|
|
2815
|
+
class HCI_Change_Connection_Packet_Type_Command(HCI_AsyncCommand):
|
|
2646
2816
|
'''
|
|
2647
2817
|
See Bluetooth spec @ 7.1.14 Change Connection Packet Type Command
|
|
2648
2818
|
'''
|
|
@@ -2654,7 +2824,7 @@ class HCI_Change_Connection_Packet_Type_Command(HCI_Command):
|
|
|
2654
2824
|
# -----------------------------------------------------------------------------
|
|
2655
2825
|
@HCI_Command.command
|
|
2656
2826
|
@dataclasses.dataclass
|
|
2657
|
-
class HCI_Authentication_Requested_Command(
|
|
2827
|
+
class HCI_Authentication_Requested_Command(HCI_AsyncCommand):
|
|
2658
2828
|
'''
|
|
2659
2829
|
See Bluetooth spec @ 7.1.15 Authentication Requested Command
|
|
2660
2830
|
'''
|
|
@@ -2665,7 +2835,7 @@ class HCI_Authentication_Requested_Command(HCI_Command):
|
|
|
2665
2835
|
# -----------------------------------------------------------------------------
|
|
2666
2836
|
@HCI_Command.command
|
|
2667
2837
|
@dataclasses.dataclass
|
|
2668
|
-
class HCI_Set_Connection_Encryption_Command(
|
|
2838
|
+
class HCI_Set_Connection_Encryption_Command(HCI_AsyncCommand):
|
|
2669
2839
|
'''
|
|
2670
2840
|
See Bluetooth spec @ 7.1.16 Set Connection Encryption Command
|
|
2671
2841
|
'''
|
|
@@ -2677,7 +2847,7 @@ class HCI_Set_Connection_Encryption_Command(HCI_Command):
|
|
|
2677
2847
|
# -----------------------------------------------------------------------------
|
|
2678
2848
|
@HCI_Command.command
|
|
2679
2849
|
@dataclasses.dataclass
|
|
2680
|
-
class HCI_Remote_Name_Request_Command(
|
|
2850
|
+
class HCI_Remote_Name_Request_Command(HCI_AsyncCommand):
|
|
2681
2851
|
'''
|
|
2682
2852
|
See Bluetooth spec @ 7.1.19 Remote Name Request Command
|
|
2683
2853
|
'''
|
|
@@ -2695,7 +2865,7 @@ class HCI_Remote_Name_Request_Command(HCI_Command):
|
|
|
2695
2865
|
# -----------------------------------------------------------------------------
|
|
2696
2866
|
@HCI_Command.command
|
|
2697
2867
|
@dataclasses.dataclass
|
|
2698
|
-
class HCI_Read_Remote_Supported_Features_Command(
|
|
2868
|
+
class HCI_Read_Remote_Supported_Features_Command(HCI_AsyncCommand):
|
|
2699
2869
|
'''
|
|
2700
2870
|
See Bluetooth spec @ 7.1.21 Read Remote Supported Features Command
|
|
2701
2871
|
'''
|
|
@@ -2706,7 +2876,7 @@ class HCI_Read_Remote_Supported_Features_Command(HCI_Command):
|
|
|
2706
2876
|
# -----------------------------------------------------------------------------
|
|
2707
2877
|
@HCI_Command.command
|
|
2708
2878
|
@dataclasses.dataclass
|
|
2709
|
-
class HCI_Read_Remote_Extended_Features_Command(
|
|
2879
|
+
class HCI_Read_Remote_Extended_Features_Command(HCI_AsyncCommand):
|
|
2710
2880
|
'''
|
|
2711
2881
|
See Bluetooth spec @ 7.1.22 Read Remote Extended Features Command
|
|
2712
2882
|
'''
|
|
@@ -2718,7 +2888,7 @@ class HCI_Read_Remote_Extended_Features_Command(HCI_Command):
|
|
|
2718
2888
|
# -----------------------------------------------------------------------------
|
|
2719
2889
|
@HCI_Command.command
|
|
2720
2890
|
@dataclasses.dataclass
|
|
2721
|
-
class HCI_Read_Remote_Version_Information_Command(
|
|
2891
|
+
class HCI_Read_Remote_Version_Information_Command(HCI_AsyncCommand):
|
|
2722
2892
|
'''
|
|
2723
2893
|
See Bluetooth spec @ 7.1.23 Read Remote Version Information Command
|
|
2724
2894
|
'''
|
|
@@ -2729,9 +2899,9 @@ class HCI_Read_Remote_Version_Information_Command(HCI_Command):
|
|
|
2729
2899
|
# -----------------------------------------------------------------------------
|
|
2730
2900
|
@HCI_Command.command
|
|
2731
2901
|
@dataclasses.dataclass
|
|
2732
|
-
class HCI_Read_Clock_Offset_Command(
|
|
2902
|
+
class HCI_Read_Clock_Offset_Command(HCI_AsyncCommand):
|
|
2733
2903
|
'''
|
|
2734
|
-
See Bluetooth spec @ 7.1.
|
|
2904
|
+
See Bluetooth spec @ 7.1.24 Read Clock Offset Command
|
|
2735
2905
|
'''
|
|
2736
2906
|
|
|
2737
2907
|
connection_handle: int = field(metadata=metadata(2))
|
|
@@ -2740,7 +2910,7 @@ class HCI_Read_Clock_Offset_Command(HCI_Command):
|
|
|
2740
2910
|
# -----------------------------------------------------------------------------
|
|
2741
2911
|
@HCI_Command.command
|
|
2742
2912
|
@dataclasses.dataclass
|
|
2743
|
-
class HCI_Reject_Synchronous_Connection_Request_Command(
|
|
2913
|
+
class HCI_Reject_Synchronous_Connection_Request_Command(HCI_AsyncCommand):
|
|
2744
2914
|
'''
|
|
2745
2915
|
See Bluetooth spec @ 7.1.28 Reject Synchronous Connection Request Command
|
|
2746
2916
|
'''
|
|
@@ -2750,9 +2920,11 @@ class HCI_Reject_Synchronous_Connection_Request_Command(HCI_Command):
|
|
|
2750
2920
|
|
|
2751
2921
|
|
|
2752
2922
|
# -----------------------------------------------------------------------------
|
|
2753
|
-
@
|
|
2923
|
+
@HCI_SyncCommand.sync_command(HCI_StatusAndAddressReturnParameters)
|
|
2754
2924
|
@dataclasses.dataclass
|
|
2755
|
-
class HCI_IO_Capability_Request_Reply_Command(
|
|
2925
|
+
class HCI_IO_Capability_Request_Reply_Command(
|
|
2926
|
+
HCI_SyncCommand[HCI_StatusAndAddressReturnParameters]
|
|
2927
|
+
):
|
|
2756
2928
|
'''
|
|
2757
2929
|
See Bluetooth spec @ 7.1.29 IO Capability Request Reply Command
|
|
2758
2930
|
'''
|
|
@@ -2764,48 +2936,39 @@ class HCI_IO_Capability_Request_Reply_Command(HCI_Command):
|
|
|
2764
2936
|
metadata=AuthenticationRequirements.type_metadata(1)
|
|
2765
2937
|
)
|
|
2766
2938
|
|
|
2767
|
-
return_parameters_fields = [
|
|
2768
|
-
('status', STATUS_SPEC),
|
|
2769
|
-
('bd_addr', Address.parse_address),
|
|
2770
|
-
]
|
|
2771
|
-
|
|
2772
2939
|
|
|
2773
2940
|
# -----------------------------------------------------------------------------
|
|
2774
|
-
@
|
|
2941
|
+
@HCI_SyncCommand.sync_command(HCI_StatusAndAddressReturnParameters)
|
|
2775
2942
|
@dataclasses.dataclass
|
|
2776
|
-
class HCI_User_Confirmation_Request_Reply_Command(
|
|
2943
|
+
class HCI_User_Confirmation_Request_Reply_Command(
|
|
2944
|
+
HCI_SyncCommand[HCI_StatusAndAddressReturnParameters]
|
|
2945
|
+
):
|
|
2777
2946
|
'''
|
|
2778
2947
|
See Bluetooth spec @ 7.1.30 User Confirmation Request Reply Command
|
|
2779
2948
|
'''
|
|
2780
2949
|
|
|
2781
2950
|
bd_addr: Address = field(metadata=metadata(Address.parse_address))
|
|
2782
2951
|
|
|
2783
|
-
return_parameters_fields = [
|
|
2784
|
-
('status', STATUS_SPEC),
|
|
2785
|
-
('bd_addr', Address.parse_address),
|
|
2786
|
-
]
|
|
2787
|
-
|
|
2788
2952
|
|
|
2789
2953
|
# -----------------------------------------------------------------------------
|
|
2790
|
-
@
|
|
2954
|
+
@HCI_SyncCommand.sync_command(HCI_StatusAndAddressReturnParameters)
|
|
2791
2955
|
@dataclasses.dataclass
|
|
2792
|
-
class HCI_User_Confirmation_Request_Negative_Reply_Command(
|
|
2956
|
+
class HCI_User_Confirmation_Request_Negative_Reply_Command(
|
|
2957
|
+
HCI_SyncCommand[HCI_StatusAndAddressReturnParameters]
|
|
2958
|
+
):
|
|
2793
2959
|
'''
|
|
2794
2960
|
See Bluetooth spec @ 7.1.31 User Confirmation Request Negative Reply Command
|
|
2795
2961
|
'''
|
|
2796
2962
|
|
|
2797
2963
|
bd_addr: Address = field(metadata=metadata(Address.parse_address))
|
|
2798
2964
|
|
|
2799
|
-
return_parameters_fields = [
|
|
2800
|
-
('status', STATUS_SPEC),
|
|
2801
|
-
('bd_addr', Address.parse_address),
|
|
2802
|
-
]
|
|
2803
|
-
|
|
2804
2965
|
|
|
2805
2966
|
# -----------------------------------------------------------------------------
|
|
2806
|
-
@
|
|
2967
|
+
@HCI_SyncCommand.sync_command(HCI_StatusAndAddressReturnParameters)
|
|
2807
2968
|
@dataclasses.dataclass
|
|
2808
|
-
class HCI_User_Passkey_Request_Reply_Command(
|
|
2969
|
+
class HCI_User_Passkey_Request_Reply_Command(
|
|
2970
|
+
HCI_SyncCommand[HCI_StatusAndAddressReturnParameters]
|
|
2971
|
+
):
|
|
2809
2972
|
'''
|
|
2810
2973
|
See Bluetooth spec @ 7.1.32 User Passkey Request Reply Command
|
|
2811
2974
|
'''
|
|
@@ -2813,32 +2976,26 @@ class HCI_User_Passkey_Request_Reply_Command(HCI_Command):
|
|
|
2813
2976
|
bd_addr: Address = field(metadata=metadata(Address.parse_address))
|
|
2814
2977
|
numeric_value: int = field(metadata=metadata(4))
|
|
2815
2978
|
|
|
2816
|
-
return_parameters_fields = [
|
|
2817
|
-
('status', STATUS_SPEC),
|
|
2818
|
-
('bd_addr', Address.parse_address),
|
|
2819
|
-
]
|
|
2820
|
-
|
|
2821
2979
|
|
|
2822
2980
|
# -----------------------------------------------------------------------------
|
|
2823
|
-
@
|
|
2981
|
+
@HCI_SyncCommand.sync_command(HCI_StatusAndAddressReturnParameters)
|
|
2824
2982
|
@dataclasses.dataclass
|
|
2825
|
-
class HCI_User_Passkey_Request_Negative_Reply_Command(
|
|
2983
|
+
class HCI_User_Passkey_Request_Negative_Reply_Command(
|
|
2984
|
+
HCI_SyncCommand[HCI_StatusAndAddressReturnParameters]
|
|
2985
|
+
):
|
|
2826
2986
|
'''
|
|
2827
2987
|
See Bluetooth spec @ 7.1.33 User Passkey Request Negative Reply Command
|
|
2828
2988
|
'''
|
|
2829
2989
|
|
|
2830
2990
|
bd_addr: Address = field(metadata=metadata(Address.parse_address))
|
|
2831
2991
|
|
|
2832
|
-
return_parameters_fields = [
|
|
2833
|
-
('status', STATUS_SPEC),
|
|
2834
|
-
('bd_addr', Address.parse_address),
|
|
2835
|
-
]
|
|
2836
|
-
|
|
2837
2992
|
|
|
2838
2993
|
# -----------------------------------------------------------------------------
|
|
2839
|
-
@
|
|
2994
|
+
@HCI_SyncCommand.sync_command(HCI_StatusAndAddressReturnParameters)
|
|
2840
2995
|
@dataclasses.dataclass
|
|
2841
|
-
class HCI_Remote_OOB_Data_Request_Reply_Command(
|
|
2996
|
+
class HCI_Remote_OOB_Data_Request_Reply_Command(
|
|
2997
|
+
HCI_SyncCommand[HCI_StatusAndAddressReturnParameters]
|
|
2998
|
+
):
|
|
2842
2999
|
'''
|
|
2843
3000
|
See Bluetooth spec @ 7.1.34 Remote OOB Data Request Reply Command
|
|
2844
3001
|
'''
|
|
@@ -2847,32 +3004,26 @@ class HCI_Remote_OOB_Data_Request_Reply_Command(HCI_Command):
|
|
|
2847
3004
|
c: bytes = field(metadata=metadata(16))
|
|
2848
3005
|
r: bytes = field(metadata=metadata(16))
|
|
2849
3006
|
|
|
2850
|
-
return_parameters_fields = [
|
|
2851
|
-
('status', STATUS_SPEC),
|
|
2852
|
-
('bd_addr', Address.parse_address),
|
|
2853
|
-
]
|
|
2854
|
-
|
|
2855
3007
|
|
|
2856
3008
|
# -----------------------------------------------------------------------------
|
|
2857
|
-
@
|
|
3009
|
+
@HCI_SyncCommand.sync_command(HCI_StatusAndAddressReturnParameters)
|
|
2858
3010
|
@dataclasses.dataclass
|
|
2859
|
-
class HCI_Remote_OOB_Data_Request_Negative_Reply_Command(
|
|
3011
|
+
class HCI_Remote_OOB_Data_Request_Negative_Reply_Command(
|
|
3012
|
+
HCI_SyncCommand[HCI_StatusAndAddressReturnParameters]
|
|
3013
|
+
):
|
|
2860
3014
|
'''
|
|
2861
3015
|
See Bluetooth spec @ 7.1.35 Remote OOB Data Request Negative Reply Command
|
|
2862
3016
|
'''
|
|
2863
3017
|
|
|
2864
3018
|
bd_addr: Address = field(metadata=metadata(Address.parse_address))
|
|
2865
3019
|
|
|
2866
|
-
return_parameters_fields = [
|
|
2867
|
-
('status', STATUS_SPEC),
|
|
2868
|
-
('bd_addr', Address.parse_address),
|
|
2869
|
-
]
|
|
2870
|
-
|
|
2871
3020
|
|
|
2872
3021
|
# -----------------------------------------------------------------------------
|
|
2873
|
-
@
|
|
3022
|
+
@HCI_SyncCommand.sync_command(HCI_StatusAndAddressReturnParameters)
|
|
2874
3023
|
@dataclasses.dataclass
|
|
2875
|
-
class HCI_IO_Capability_Request_Negative_Reply_Command(
|
|
3024
|
+
class HCI_IO_Capability_Request_Negative_Reply_Command(
|
|
3025
|
+
HCI_SyncCommand[HCI_StatusAndAddressReturnParameters]
|
|
3026
|
+
):
|
|
2876
3027
|
'''
|
|
2877
3028
|
See Bluetooth spec @ 7.1.36 IO Capability Request Negative Reply Command
|
|
2878
3029
|
'''
|
|
@@ -2880,16 +3031,11 @@ class HCI_IO_Capability_Request_Negative_Reply_Command(HCI_Command):
|
|
|
2880
3031
|
bd_addr: Address = field(metadata=metadata(Address.parse_address))
|
|
2881
3032
|
reason: int = field(metadata=metadata(1))
|
|
2882
3033
|
|
|
2883
|
-
return_parameters_fields = [
|
|
2884
|
-
('status', STATUS_SPEC),
|
|
2885
|
-
('bd_addr', Address.parse_address),
|
|
2886
|
-
]
|
|
2887
|
-
|
|
2888
3034
|
|
|
2889
3035
|
# -----------------------------------------------------------------------------
|
|
2890
3036
|
@HCI_Command.command
|
|
2891
3037
|
@dataclasses.dataclass
|
|
2892
|
-
class HCI_Enhanced_Setup_Synchronous_Connection_Command(
|
|
3038
|
+
class HCI_Enhanced_Setup_Synchronous_Connection_Command(HCI_AsyncCommand):
|
|
2893
3039
|
'''
|
|
2894
3040
|
See Bluetooth spec @ 7.1.45 Enhanced Setup Synchronous Connection Command
|
|
2895
3041
|
'''
|
|
@@ -2954,7 +3100,7 @@ class HCI_Enhanced_Setup_Synchronous_Connection_Command(HCI_Command):
|
|
|
2954
3100
|
# -----------------------------------------------------------------------------
|
|
2955
3101
|
@HCI_Command.command
|
|
2956
3102
|
@dataclasses.dataclass
|
|
2957
|
-
class HCI_Enhanced_Accept_Synchronous_Connection_Request_Command(
|
|
3103
|
+
class HCI_Enhanced_Accept_Synchronous_Connection_Request_Command(HCI_AsyncCommand):
|
|
2958
3104
|
'''
|
|
2959
3105
|
See Bluetooth spec @ 7.1.46 Enhanced Accept Synchronous Connection Request Command
|
|
2960
3106
|
'''
|
|
@@ -2990,7 +3136,7 @@ class HCI_Enhanced_Accept_Synchronous_Connection_Request_Command(HCI_Command):
|
|
|
2990
3136
|
# -----------------------------------------------------------------------------
|
|
2991
3137
|
@HCI_Command.command
|
|
2992
3138
|
@dataclasses.dataclass
|
|
2993
|
-
class HCI_Truncated_Page_Command(
|
|
3139
|
+
class HCI_Truncated_Page_Command(HCI_AsyncCommand):
|
|
2994
3140
|
'''
|
|
2995
3141
|
See Bluetooth spec @ 7.1.47 Truncated Page Command
|
|
2996
3142
|
'''
|
|
@@ -3001,25 +3147,34 @@ class HCI_Truncated_Page_Command(HCI_Command):
|
|
|
3001
3147
|
|
|
3002
3148
|
|
|
3003
3149
|
# -----------------------------------------------------------------------------
|
|
3004
|
-
@
|
|
3150
|
+
@HCI_SyncCommand.sync_command(HCI_StatusAndAddressReturnParameters)
|
|
3005
3151
|
@dataclasses.dataclass
|
|
3006
|
-
class HCI_Truncated_Page_Cancel_Command(
|
|
3152
|
+
class HCI_Truncated_Page_Cancel_Command(
|
|
3153
|
+
HCI_SyncCommand[HCI_StatusAndAddressReturnParameters]
|
|
3154
|
+
):
|
|
3007
3155
|
'''
|
|
3008
3156
|
See Bluetooth spec @ 7.1.48 Truncated Page Cancel Command
|
|
3009
3157
|
'''
|
|
3010
3158
|
|
|
3011
3159
|
bd_addr: Address = field(metadata=metadata(Address.parse_address))
|
|
3012
3160
|
|
|
3013
|
-
return_parameters_fields = [
|
|
3014
|
-
('status', STATUS_SPEC),
|
|
3015
|
-
('bd_addr', Address.parse_address),
|
|
3016
|
-
]
|
|
3017
|
-
|
|
3018
3161
|
|
|
3019
3162
|
# -----------------------------------------------------------------------------
|
|
3020
|
-
@HCI_Command.command
|
|
3021
3163
|
@dataclasses.dataclass
|
|
3022
|
-
class
|
|
3164
|
+
class HCI_Set_Connectionless_Peripheral_Broadcast_ReturnParameters(
|
|
3165
|
+
HCI_StatusReturnParameters
|
|
3166
|
+
):
|
|
3167
|
+
lt_addr: int = field(metadata=metadata(1))
|
|
3168
|
+
interval: int = field(metadata=metadata(2))
|
|
3169
|
+
|
|
3170
|
+
|
|
3171
|
+
@HCI_SyncCommand.sync_command(
|
|
3172
|
+
HCI_Set_Connectionless_Peripheral_Broadcast_ReturnParameters
|
|
3173
|
+
)
|
|
3174
|
+
@dataclasses.dataclass
|
|
3175
|
+
class HCI_Set_Connectionless_Peripheral_Broadcast_Command(
|
|
3176
|
+
HCI_SyncCommand[HCI_Set_Connectionless_Peripheral_Broadcast_ReturnParameters]
|
|
3177
|
+
):
|
|
3023
3178
|
'''
|
|
3024
3179
|
See Bluetooth spec @ 7.1.49 Set Connectionless Peripheral Broadcast Command
|
|
3025
3180
|
'''
|
|
@@ -3032,17 +3187,25 @@ class HCI_Set_Connectionless_Peripheral_Broadcast_Command(HCI_Command):
|
|
|
3032
3187
|
interval_max: int = field(metadata=metadata(2))
|
|
3033
3188
|
supervision_timeout: int = field(metadata=metadata(2))
|
|
3034
3189
|
|
|
3035
|
-
return_parameters_fields = [
|
|
3036
|
-
('status', STATUS_SPEC),
|
|
3037
|
-
('lt_addr', 1),
|
|
3038
|
-
('interval', 2),
|
|
3039
|
-
]
|
|
3040
|
-
|
|
3041
3190
|
|
|
3042
3191
|
# -----------------------------------------------------------------------------
|
|
3043
|
-
@HCI_Command.command
|
|
3044
3192
|
@dataclasses.dataclass
|
|
3045
|
-
class
|
|
3193
|
+
class HCI_Set_Connectionless_Peripheral_Broadcast_Receive_ReturnParameters(
|
|
3194
|
+
HCI_StatusReturnParameters
|
|
3195
|
+
):
|
|
3196
|
+
bd_addr: Address = field(metadata=metadata(Address.parse_address))
|
|
3197
|
+
lt_addr: int = field(metadata=metadata(1))
|
|
3198
|
+
|
|
3199
|
+
|
|
3200
|
+
@HCI_SyncCommand.sync_command(
|
|
3201
|
+
HCI_Set_Connectionless_Peripheral_Broadcast_Receive_ReturnParameters
|
|
3202
|
+
)
|
|
3203
|
+
@dataclasses.dataclass
|
|
3204
|
+
class HCI_Set_Connectionless_Peripheral_Broadcast_Receive_Command(
|
|
3205
|
+
HCI_SyncCommand[
|
|
3206
|
+
HCI_Set_Connectionless_Peripheral_Broadcast_Receive_ReturnParameters
|
|
3207
|
+
]
|
|
3208
|
+
):
|
|
3046
3209
|
'''
|
|
3047
3210
|
See Bluetooth spec @ 7.1.50 Set Connectionless Peripheral Broadcast Receive Command
|
|
3048
3211
|
'''
|
|
@@ -3059,17 +3222,11 @@ class HCI_Set_Connectionless_Peripheral_Broadcast_Receive_Command(HCI_Command):
|
|
|
3059
3222
|
packet_type: int = field(metadata=metadata(2))
|
|
3060
3223
|
afh_channel_map: bytes = field(metadata=metadata(10))
|
|
3061
3224
|
|
|
3062
|
-
return_parameters_fields = [
|
|
3063
|
-
('status', STATUS_SPEC),
|
|
3064
|
-
('bd_addr', Address.parse_address),
|
|
3065
|
-
('lt_addr', 1),
|
|
3066
|
-
]
|
|
3067
|
-
|
|
3068
3225
|
|
|
3069
3226
|
# -----------------------------------------------------------------------------
|
|
3070
3227
|
@HCI_Command.command
|
|
3071
3228
|
@dataclasses.dataclass
|
|
3072
|
-
class HCI_Start_Synchronization_Train_Command(
|
|
3229
|
+
class HCI_Start_Synchronization_Train_Command(HCI_AsyncCommand):
|
|
3073
3230
|
'''
|
|
3074
3231
|
See Bluetooth spec @ 7.1.51 Start Synchronization Train Command
|
|
3075
3232
|
'''
|
|
@@ -3078,7 +3235,7 @@ class HCI_Start_Synchronization_Train_Command(HCI_Command):
|
|
|
3078
3235
|
# -----------------------------------------------------------------------------
|
|
3079
3236
|
@HCI_Command.command
|
|
3080
3237
|
@dataclasses.dataclass
|
|
3081
|
-
class HCI_Receive_Synchronization_Train_Command(
|
|
3238
|
+
class HCI_Receive_Synchronization_Train_Command(HCI_AsyncCommand):
|
|
3082
3239
|
'''
|
|
3083
3240
|
See Bluetooth spec @ 7.1.52 Receive Synchronization Train Command
|
|
3084
3241
|
'''
|
|
@@ -3090,9 +3247,11 @@ class HCI_Receive_Synchronization_Train_Command(HCI_Command):
|
|
|
3090
3247
|
|
|
3091
3248
|
|
|
3092
3249
|
# -----------------------------------------------------------------------------
|
|
3093
|
-
@
|
|
3250
|
+
@HCI_SyncCommand.sync_command(HCI_StatusReturnParameters)
|
|
3094
3251
|
@dataclasses.dataclass
|
|
3095
|
-
class HCI_Remote_OOB_Extended_Data_Request_Reply_Command(
|
|
3252
|
+
class HCI_Remote_OOB_Extended_Data_Request_Reply_Command(
|
|
3253
|
+
HCI_SyncCommand[HCI_StatusReturnParameters]
|
|
3254
|
+
):
|
|
3096
3255
|
'''
|
|
3097
3256
|
See Bluetooth spec @ 7.1.53 Remote OOB Extended Data Request Reply Command
|
|
3098
3257
|
'''
|
|
@@ -3103,16 +3262,11 @@ class HCI_Remote_OOB_Extended_Data_Request_Reply_Command(HCI_Command):
|
|
|
3103
3262
|
c_256: bytes = field(metadata=metadata(16))
|
|
3104
3263
|
r_256: bytes = field(metadata=metadata(16))
|
|
3105
3264
|
|
|
3106
|
-
return_parameters_fields = [
|
|
3107
|
-
('status', STATUS_SPEC),
|
|
3108
|
-
('bd_addr', Address.parse_address),
|
|
3109
|
-
]
|
|
3110
|
-
|
|
3111
3265
|
|
|
3112
3266
|
# -----------------------------------------------------------------------------
|
|
3113
3267
|
@HCI_Command.command
|
|
3114
3268
|
@dataclasses.dataclass
|
|
3115
|
-
class HCI_Sniff_Mode_Command(
|
|
3269
|
+
class HCI_Sniff_Mode_Command(HCI_AsyncCommand):
|
|
3116
3270
|
'''
|
|
3117
3271
|
See Bluetooth spec @ 7.2.2 Sniff Mode Command
|
|
3118
3272
|
'''
|
|
@@ -3127,7 +3281,7 @@ class HCI_Sniff_Mode_Command(HCI_Command):
|
|
|
3127
3281
|
# -----------------------------------------------------------------------------
|
|
3128
3282
|
@HCI_Command.command
|
|
3129
3283
|
@dataclasses.dataclass
|
|
3130
|
-
class HCI_Exit_Sniff_Mode_Command(
|
|
3284
|
+
class HCI_Exit_Sniff_Mode_Command(HCI_AsyncCommand):
|
|
3131
3285
|
'''
|
|
3132
3286
|
See Bluetooth spec @ 7.2.3 Exit Sniff Mode Command
|
|
3133
3287
|
'''
|
|
@@ -3138,7 +3292,7 @@ class HCI_Exit_Sniff_Mode_Command(HCI_Command):
|
|
|
3138
3292
|
# -----------------------------------------------------------------------------
|
|
3139
3293
|
@HCI_Command.command
|
|
3140
3294
|
@dataclasses.dataclass
|
|
3141
|
-
class HCI_Switch_Role_Command(
|
|
3295
|
+
class HCI_Switch_Role_Command(HCI_AsyncCommand):
|
|
3142
3296
|
'''
|
|
3143
3297
|
See Bluetooth spec @ 7.2.8 Switch Role Command
|
|
3144
3298
|
'''
|
|
@@ -3148,9 +3302,11 @@ class HCI_Switch_Role_Command(HCI_Command):
|
|
|
3148
3302
|
|
|
3149
3303
|
|
|
3150
3304
|
# -----------------------------------------------------------------------------
|
|
3151
|
-
@
|
|
3305
|
+
@HCI_SyncCommand.sync_command(HCI_StatusAndConnectionHandleReturnParameters)
|
|
3152
3306
|
@dataclasses.dataclass
|
|
3153
|
-
class HCI_Write_Link_Policy_Settings_Command(
|
|
3307
|
+
class HCI_Write_Link_Policy_Settings_Command(
|
|
3308
|
+
HCI_SyncCommand[HCI_StatusAndConnectionHandleReturnParameters]
|
|
3309
|
+
):
|
|
3154
3310
|
'''
|
|
3155
3311
|
See Bluetooth spec @ 7.2.10 Write Link Policy Settings Command
|
|
3156
3312
|
'''
|
|
@@ -3160,9 +3316,11 @@ class HCI_Write_Link_Policy_Settings_Command(HCI_Command):
|
|
|
3160
3316
|
|
|
3161
3317
|
|
|
3162
3318
|
# -----------------------------------------------------------------------------
|
|
3163
|
-
@
|
|
3319
|
+
@HCI_SyncCommand.sync_command(HCI_StatusReturnParameters)
|
|
3164
3320
|
@dataclasses.dataclass
|
|
3165
|
-
class HCI_Write_Default_Link_Policy_Settings_Command(
|
|
3321
|
+
class HCI_Write_Default_Link_Policy_Settings_Command(
|
|
3322
|
+
HCI_SyncCommand[HCI_StatusReturnParameters]
|
|
3323
|
+
):
|
|
3166
3324
|
'''
|
|
3167
3325
|
See Bluetooth spec @ 7.2.12 Write Default Link Policy Settings Command
|
|
3168
3326
|
'''
|
|
@@ -3171,9 +3329,11 @@ class HCI_Write_Default_Link_Policy_Settings_Command(HCI_Command):
|
|
|
3171
3329
|
|
|
3172
3330
|
|
|
3173
3331
|
# -----------------------------------------------------------------------------
|
|
3174
|
-
@
|
|
3332
|
+
@HCI_SyncCommand.sync_command(HCI_StatusAndConnectionHandleReturnParameters)
|
|
3175
3333
|
@dataclasses.dataclass
|
|
3176
|
-
class HCI_Sniff_Subrating_Command(
|
|
3334
|
+
class HCI_Sniff_Subrating_Command(
|
|
3335
|
+
HCI_SyncCommand[HCI_StatusAndConnectionHandleReturnParameters]
|
|
3336
|
+
):
|
|
3177
3337
|
'''
|
|
3178
3338
|
See Bluetooth spec @ 7.2.14 Sniff Subrating Command
|
|
3179
3339
|
'''
|
|
@@ -3185,9 +3345,9 @@ class HCI_Sniff_Subrating_Command(HCI_Command):
|
|
|
3185
3345
|
|
|
3186
3346
|
|
|
3187
3347
|
# -----------------------------------------------------------------------------
|
|
3188
|
-
@
|
|
3348
|
+
@HCI_SyncCommand.sync_command(HCI_StatusReturnParameters)
|
|
3189
3349
|
@dataclasses.dataclass
|
|
3190
|
-
class HCI_Set_Event_Mask_Command(
|
|
3350
|
+
class HCI_Set_Event_Mask_Command(HCI_SyncCommand[HCI_StatusReturnParameters]):
|
|
3191
3351
|
'''
|
|
3192
3352
|
See Bluetooth spec @ 7.3.1 Set Event Mask Command
|
|
3193
3353
|
'''
|
|
@@ -3210,18 +3370,18 @@ class HCI_Set_Event_Mask_Command(HCI_Command):
|
|
|
3210
3370
|
|
|
3211
3371
|
|
|
3212
3372
|
# -----------------------------------------------------------------------------
|
|
3213
|
-
@
|
|
3373
|
+
@HCI_SyncCommand.sync_command(HCI_StatusReturnParameters)
|
|
3214
3374
|
@dataclasses.dataclass
|
|
3215
|
-
class HCI_Reset_Command(
|
|
3375
|
+
class HCI_Reset_Command(HCI_SyncCommand[HCI_StatusReturnParameters]):
|
|
3216
3376
|
'''
|
|
3217
3377
|
See Bluetooth spec @ 7.3.2 Reset Command
|
|
3218
3378
|
'''
|
|
3219
3379
|
|
|
3220
3380
|
|
|
3221
3381
|
# -----------------------------------------------------------------------------
|
|
3222
|
-
@
|
|
3382
|
+
@HCI_SyncCommand.sync_command(HCI_StatusReturnParameters)
|
|
3223
3383
|
@dataclasses.dataclass
|
|
3224
|
-
class HCI_Set_Event_Filter_Command(
|
|
3384
|
+
class HCI_Set_Event_Filter_Command(HCI_SyncCommand[HCI_StatusReturnParameters]):
|
|
3225
3385
|
'''
|
|
3226
3386
|
See Bluetooth spec @ 7.3.3 Set Event Filter Command
|
|
3227
3387
|
'''
|
|
@@ -3231,9 +3391,17 @@ class HCI_Set_Event_Filter_Command(HCI_Command):
|
|
|
3231
3391
|
|
|
3232
3392
|
|
|
3233
3393
|
# -----------------------------------------------------------------------------
|
|
3234
|
-
@HCI_Command.command
|
|
3235
3394
|
@dataclasses.dataclass
|
|
3236
|
-
class
|
|
3395
|
+
class HCI_Read_Stored_Link_Key_ReturnParameters(HCI_StatusReturnParameters):
|
|
3396
|
+
max_num_keys: int = field(metadata=metadata(2))
|
|
3397
|
+
num_keys_read: int = field(metadata=metadata(2))
|
|
3398
|
+
|
|
3399
|
+
|
|
3400
|
+
@HCI_SyncCommand.sync_command(HCI_Read_Stored_Link_Key_ReturnParameters)
|
|
3401
|
+
@dataclasses.dataclass
|
|
3402
|
+
class HCI_Read_Stored_Link_Key_Command(
|
|
3403
|
+
HCI_SyncCommand[HCI_Read_Stored_Link_Key_ReturnParameters]
|
|
3404
|
+
):
|
|
3237
3405
|
'''
|
|
3238
3406
|
See Bluetooth spec @ 7.3.8 Read Stored Link Key Command
|
|
3239
3407
|
'''
|
|
@@ -3241,17 +3409,18 @@ class HCI_Read_Stored_Link_Key_Command(HCI_Command):
|
|
|
3241
3409
|
bd_addr: Address = field(metadata=metadata(Address.parse_address))
|
|
3242
3410
|
read_all_flag: int = field(metadata=metadata(1))
|
|
3243
3411
|
|
|
3244
|
-
return_parameters_fields = [
|
|
3245
|
-
('status', STATUS_SPEC),
|
|
3246
|
-
('max_num_keys', 2),
|
|
3247
|
-
('num_keys_read', 2),
|
|
3248
|
-
]
|
|
3249
|
-
|
|
3250
3412
|
|
|
3251
3413
|
# -----------------------------------------------------------------------------
|
|
3252
|
-
@HCI_Command.command
|
|
3253
3414
|
@dataclasses.dataclass
|
|
3254
|
-
class
|
|
3415
|
+
class HCI_Delete_Stored_Link_Key_ReturnParameters(HCI_StatusReturnParameters):
|
|
3416
|
+
num_keys_deleted: int = field(metadata=metadata(2))
|
|
3417
|
+
|
|
3418
|
+
|
|
3419
|
+
@HCI_SyncCommand.sync_command(HCI_Delete_Stored_Link_Key_ReturnParameters)
|
|
3420
|
+
@dataclasses.dataclass
|
|
3421
|
+
class HCI_Delete_Stored_Link_Key_Command(
|
|
3422
|
+
HCI_SyncCommand[HCI_Delete_Stored_Link_Key_ReturnParameters]
|
|
3423
|
+
):
|
|
3255
3424
|
'''
|
|
3256
3425
|
See Bluetooth spec @ 7.3.10 Delete Stored Link Key Command
|
|
3257
3426
|
'''
|
|
@@ -3259,13 +3428,11 @@ class HCI_Delete_Stored_Link_Key_Command(HCI_Command):
|
|
|
3259
3428
|
bd_addr: Address = field(metadata=metadata(Address.parse_address))
|
|
3260
3429
|
delete_all_flag: int = field(metadata=metadata(1))
|
|
3261
3430
|
|
|
3262
|
-
return_parameters_fields = [('status', STATUS_SPEC), ('num_keys_deleted', 2)]
|
|
3263
|
-
|
|
3264
3431
|
|
|
3265
3432
|
# -----------------------------------------------------------------------------
|
|
3266
|
-
@
|
|
3433
|
+
@HCI_SyncCommand.sync_command(HCI_StatusReturnParameters)
|
|
3267
3434
|
@dataclasses.dataclass
|
|
3268
|
-
class HCI_Write_Local_Name_Command(
|
|
3435
|
+
class HCI_Write_Local_Name_Command(HCI_SyncCommand[HCI_StatusReturnParameters]):
|
|
3269
3436
|
'''
|
|
3270
3437
|
See Bluetooth spec @ 7.3.11 Write Local Name Command
|
|
3271
3438
|
'''
|
|
@@ -3276,23 +3443,29 @@ class HCI_Write_Local_Name_Command(HCI_Command):
|
|
|
3276
3443
|
|
|
3277
3444
|
|
|
3278
3445
|
# -----------------------------------------------------------------------------
|
|
3279
|
-
@HCI_Command.command
|
|
3280
3446
|
@dataclasses.dataclass
|
|
3281
|
-
class
|
|
3447
|
+
class HCI_Read_Local_Name_ReturnParameters(HCI_StatusReturnParameters):
|
|
3448
|
+
local_name: bytes = field(
|
|
3449
|
+
metadata=metadata({'size': 248, 'mapper': map_null_terminated_utf8_string})
|
|
3450
|
+
)
|
|
3451
|
+
|
|
3452
|
+
|
|
3453
|
+
@HCI_SyncCommand.sync_command(HCI_Read_Local_Name_ReturnParameters)
|
|
3454
|
+
@dataclasses.dataclass
|
|
3455
|
+
class HCI_Read_Local_Name_Command(
|
|
3456
|
+
HCI_SyncCommand[HCI_Read_Local_Name_ReturnParameters]
|
|
3457
|
+
):
|
|
3282
3458
|
'''
|
|
3283
3459
|
See Bluetooth spec @ 7.3.12 Read Local Name Command
|
|
3284
3460
|
'''
|
|
3285
3461
|
|
|
3286
|
-
return_parameters_fields = [
|
|
3287
|
-
('status', STATUS_SPEC),
|
|
3288
|
-
('local_name', {'size': 248, 'mapper': map_null_terminated_utf8_string}),
|
|
3289
|
-
]
|
|
3290
|
-
|
|
3291
3462
|
|
|
3292
3463
|
# -----------------------------------------------------------------------------
|
|
3293
|
-
@
|
|
3464
|
+
@HCI_SyncCommand.sync_command(HCI_StatusReturnParameters)
|
|
3294
3465
|
@dataclasses.dataclass
|
|
3295
|
-
class HCI_Write_Connection_Accept_Timeout_Command(
|
|
3466
|
+
class HCI_Write_Connection_Accept_Timeout_Command(
|
|
3467
|
+
HCI_SyncCommand[HCI_StatusReturnParameters]
|
|
3468
|
+
):
|
|
3296
3469
|
'''
|
|
3297
3470
|
See Bluetooth spec @ 7.3.14 Write Connection Accept Timeout Command
|
|
3298
3471
|
'''
|
|
@@ -3301,9 +3474,9 @@ class HCI_Write_Connection_Accept_Timeout_Command(HCI_Command):
|
|
|
3301
3474
|
|
|
3302
3475
|
|
|
3303
3476
|
# -----------------------------------------------------------------------------
|
|
3304
|
-
@
|
|
3477
|
+
@HCI_SyncCommand.sync_command(HCI_StatusReturnParameters)
|
|
3305
3478
|
@dataclasses.dataclass
|
|
3306
|
-
class HCI_Write_Page_Timeout_Command(
|
|
3479
|
+
class HCI_Write_Page_Timeout_Command(HCI_SyncCommand[HCI_StatusReturnParameters]):
|
|
3307
3480
|
'''
|
|
3308
3481
|
See Bluetooth spec @ 7.3.16 Write Page Timeout Command
|
|
3309
3482
|
'''
|
|
@@ -3312,9 +3485,9 @@ class HCI_Write_Page_Timeout_Command(HCI_Command):
|
|
|
3312
3485
|
|
|
3313
3486
|
|
|
3314
3487
|
# -----------------------------------------------------------------------------
|
|
3315
|
-
@
|
|
3488
|
+
@HCI_SyncCommand.sync_command(HCI_StatusReturnParameters)
|
|
3316
3489
|
@dataclasses.dataclass
|
|
3317
|
-
class HCI_Write_Scan_Enable_Command(
|
|
3490
|
+
class HCI_Write_Scan_Enable_Command(HCI_SyncCommand[HCI_StatusReturnParameters]):
|
|
3318
3491
|
'''
|
|
3319
3492
|
See Bluetooth spec @ 7.3.18 Write Scan Enable Command
|
|
3320
3493
|
'''
|
|
@@ -3323,24 +3496,26 @@ class HCI_Write_Scan_Enable_Command(HCI_Command):
|
|
|
3323
3496
|
|
|
3324
3497
|
|
|
3325
3498
|
# -----------------------------------------------------------------------------
|
|
3326
|
-
@HCI_Command.command
|
|
3327
3499
|
@dataclasses.dataclass
|
|
3328
|
-
class
|
|
3500
|
+
class HCI_Read_Page_Scan_Activity_ReturnParameters(HCI_StatusReturnParameters):
|
|
3501
|
+
page_scan_interval: int = field(metadata=metadata(2))
|
|
3502
|
+
page_scan_window: int = field(metadata=metadata(2))
|
|
3503
|
+
|
|
3504
|
+
|
|
3505
|
+
@HCI_SyncCommand.sync_command(HCI_Read_Page_Scan_Activity_ReturnParameters)
|
|
3506
|
+
@dataclasses.dataclass
|
|
3507
|
+
class HCI_Read_Page_Scan_Activity_Command(
|
|
3508
|
+
HCI_SyncCommand[HCI_Read_Page_Scan_Activity_ReturnParameters]
|
|
3509
|
+
):
|
|
3329
3510
|
'''
|
|
3330
3511
|
See Bluetooth spec @ 7.3.19 Read Page Scan Activity Command
|
|
3331
3512
|
'''
|
|
3332
3513
|
|
|
3333
|
-
return_parameters_fields = [
|
|
3334
|
-
('status', STATUS_SPEC),
|
|
3335
|
-
('page_scan_interval', 2),
|
|
3336
|
-
('page_scan_window', 2),
|
|
3337
|
-
]
|
|
3338
|
-
|
|
3339
3514
|
|
|
3340
3515
|
# -----------------------------------------------------------------------------
|
|
3341
|
-
@
|
|
3516
|
+
@HCI_SyncCommand.sync_command(HCI_StatusReturnParameters)
|
|
3342
3517
|
@dataclasses.dataclass
|
|
3343
|
-
class HCI_Write_Page_Scan_Activity_Command(
|
|
3518
|
+
class HCI_Write_Page_Scan_Activity_Command(HCI_SyncCommand[HCI_StatusReturnParameters]):
|
|
3344
3519
|
'''
|
|
3345
3520
|
See Bluetooth spec @ 7.3.20 Write Page Scan Activity Command
|
|
3346
3521
|
'''
|
|
@@ -3350,9 +3525,11 @@ class HCI_Write_Page_Scan_Activity_Command(HCI_Command):
|
|
|
3350
3525
|
|
|
3351
3526
|
|
|
3352
3527
|
# -----------------------------------------------------------------------------
|
|
3353
|
-
@
|
|
3528
|
+
@HCI_SyncCommand.sync_command(HCI_StatusReturnParameters)
|
|
3354
3529
|
@dataclasses.dataclass
|
|
3355
|
-
class HCI_Write_Inquiry_Scan_Activity_Command(
|
|
3530
|
+
class HCI_Write_Inquiry_Scan_Activity_Command(
|
|
3531
|
+
HCI_SyncCommand[HCI_StatusReturnParameters]
|
|
3532
|
+
):
|
|
3356
3533
|
'''
|
|
3357
3534
|
See Bluetooth spec @ 7.3.22 Write Inquiry Scan Activity Command
|
|
3358
3535
|
'''
|
|
@@ -3362,23 +3539,27 @@ class HCI_Write_Inquiry_Scan_Activity_Command(HCI_Command):
|
|
|
3362
3539
|
|
|
3363
3540
|
|
|
3364
3541
|
# -----------------------------------------------------------------------------
|
|
3365
|
-
@HCI_Command.command
|
|
3366
3542
|
@dataclasses.dataclass
|
|
3367
|
-
class
|
|
3543
|
+
class HCI_Read_Authentication_Enable_ReturnParameters(HCI_StatusReturnParameters):
|
|
3544
|
+
authentication_enable: int = field(metadata=metadata(1))
|
|
3545
|
+
|
|
3546
|
+
|
|
3547
|
+
@HCI_SyncCommand.sync_command(HCI_Read_Authentication_Enable_ReturnParameters)
|
|
3548
|
+
@dataclasses.dataclass
|
|
3549
|
+
class HCI_Read_Authentication_Enable_Command(
|
|
3550
|
+
HCI_SyncCommand[HCI_Read_Authentication_Enable_ReturnParameters]
|
|
3551
|
+
):
|
|
3368
3552
|
'''
|
|
3369
3553
|
See Bluetooth spec @ 7.3.23 Read Authentication Enable Command
|
|
3370
3554
|
'''
|
|
3371
3555
|
|
|
3372
|
-
return_parameters_fields = [
|
|
3373
|
-
('status', STATUS_SPEC),
|
|
3374
|
-
('authentication_enable', 1),
|
|
3375
|
-
]
|
|
3376
|
-
|
|
3377
3556
|
|
|
3378
3557
|
# -----------------------------------------------------------------------------
|
|
3379
|
-
@
|
|
3558
|
+
@HCI_SyncCommand.sync_command(HCI_StatusReturnParameters)
|
|
3380
3559
|
@dataclasses.dataclass
|
|
3381
|
-
class HCI_Write_Authentication_Enable_Command(
|
|
3560
|
+
class HCI_Write_Authentication_Enable_Command(
|
|
3561
|
+
HCI_SyncCommand[HCI_StatusReturnParameters]
|
|
3562
|
+
):
|
|
3382
3563
|
'''
|
|
3383
3564
|
See Bluetooth spec @ 7.3.24 Write Authentication Enable Command
|
|
3384
3565
|
'''
|
|
@@ -3387,23 +3568,27 @@ class HCI_Write_Authentication_Enable_Command(HCI_Command):
|
|
|
3387
3568
|
|
|
3388
3569
|
|
|
3389
3570
|
# -----------------------------------------------------------------------------
|
|
3390
|
-
@HCI_Command.command
|
|
3391
3571
|
@dataclasses.dataclass
|
|
3392
|
-
class
|
|
3572
|
+
class HCI_Read_Class_Of_Device_ReturnParameters(HCI_StatusReturnParameters):
|
|
3573
|
+
class_of_device: int = field(
|
|
3574
|
+
metadata=metadata({'size': 3, 'mapper': map_class_of_device})
|
|
3575
|
+
)
|
|
3576
|
+
|
|
3577
|
+
|
|
3578
|
+
@HCI_SyncCommand.sync_command(HCI_Read_Class_Of_Device_ReturnParameters)
|
|
3579
|
+
@dataclasses.dataclass
|
|
3580
|
+
class HCI_Read_Class_Of_Device_Command(
|
|
3581
|
+
HCI_SyncCommand[HCI_Read_Class_Of_Device_ReturnParameters]
|
|
3582
|
+
):
|
|
3393
3583
|
'''
|
|
3394
3584
|
See Bluetooth spec @ 7.3.25 Read Class of Device Command
|
|
3395
3585
|
'''
|
|
3396
3586
|
|
|
3397
|
-
return_parameters_fields = [
|
|
3398
|
-
('status', STATUS_SPEC),
|
|
3399
|
-
('class_of_device', COD_SPEC),
|
|
3400
|
-
]
|
|
3401
|
-
|
|
3402
3587
|
|
|
3403
3588
|
# -----------------------------------------------------------------------------
|
|
3404
|
-
@
|
|
3589
|
+
@HCI_SyncCommand.sync_command(HCI_StatusReturnParameters)
|
|
3405
3590
|
@dataclasses.dataclass
|
|
3406
|
-
class HCI_Write_Class_Of_Device_Command(
|
|
3591
|
+
class HCI_Write_Class_Of_Device_Command(HCI_SyncCommand[HCI_StatusReturnParameters]):
|
|
3407
3592
|
'''
|
|
3408
3593
|
See Bluetooth spec @ 7.3.26 Write Class of Device Command
|
|
3409
3594
|
'''
|
|
@@ -3412,20 +3597,25 @@ class HCI_Write_Class_Of_Device_Command(HCI_Command):
|
|
|
3412
3597
|
|
|
3413
3598
|
|
|
3414
3599
|
# -----------------------------------------------------------------------------
|
|
3415
|
-
@HCI_Command.command
|
|
3416
3600
|
@dataclasses.dataclass
|
|
3417
|
-
class
|
|
3601
|
+
class HCI_Read_Voice_Setting_ReturnParameters(HCI_StatusReturnParameters):
|
|
3602
|
+
voice_setting: int = field(metadata=metadata(2))
|
|
3603
|
+
|
|
3604
|
+
|
|
3605
|
+
@HCI_SyncCommand.sync_command(HCI_Read_Voice_Setting_ReturnParameters)
|
|
3606
|
+
@dataclasses.dataclass
|
|
3607
|
+
class HCI_Read_Voice_Setting_Command(
|
|
3608
|
+
HCI_SyncCommand[HCI_Read_Voice_Setting_ReturnParameters]
|
|
3609
|
+
):
|
|
3418
3610
|
'''
|
|
3419
3611
|
See Bluetooth spec @ 7.3.27 Read Voice Setting Command
|
|
3420
3612
|
'''
|
|
3421
3613
|
|
|
3422
|
-
return_parameters_fields = [('status', STATUS_SPEC), ('voice_setting', 2)]
|
|
3423
|
-
|
|
3424
3614
|
|
|
3425
3615
|
# -----------------------------------------------------------------------------
|
|
3426
|
-
@
|
|
3616
|
+
@HCI_SyncCommand.sync_command(HCI_StatusReturnParameters)
|
|
3427
3617
|
@dataclasses.dataclass
|
|
3428
|
-
class HCI_Write_Voice_Setting_Command(
|
|
3618
|
+
class HCI_Write_Voice_Setting_Command(HCI_SyncCommand[HCI_StatusReturnParameters]):
|
|
3429
3619
|
'''
|
|
3430
3620
|
See Bluetooth spec @ 7.3.28 Write Voice Setting Command
|
|
3431
3621
|
'''
|
|
@@ -3434,23 +3624,29 @@ class HCI_Write_Voice_Setting_Command(HCI_Command):
|
|
|
3434
3624
|
|
|
3435
3625
|
|
|
3436
3626
|
# -----------------------------------------------------------------------------
|
|
3437
|
-
@HCI_Command.command
|
|
3438
3627
|
@dataclasses.dataclass
|
|
3439
|
-
class
|
|
3628
|
+
class HCI_Read_Synchronous_Flow_Control_Enable_ReturnParameters(
|
|
3629
|
+
HCI_StatusReturnParameters
|
|
3630
|
+
):
|
|
3631
|
+
synchronous_flow_control_enable: int = field(metadata=metadata(1))
|
|
3632
|
+
|
|
3633
|
+
|
|
3634
|
+
@HCI_SyncCommand.sync_command(HCI_Read_Synchronous_Flow_Control_Enable_ReturnParameters)
|
|
3635
|
+
@dataclasses.dataclass
|
|
3636
|
+
class HCI_Read_Synchronous_Flow_Control_Enable_Command(
|
|
3637
|
+
HCI_SyncCommand[HCI_Read_Synchronous_Flow_Control_Enable_ReturnParameters]
|
|
3638
|
+
):
|
|
3440
3639
|
'''
|
|
3441
3640
|
See Bluetooth spec @ 7.3.36 Read Synchronous Flow Control Enable Command
|
|
3442
3641
|
'''
|
|
3443
3642
|
|
|
3444
|
-
return_parameters_fields = [
|
|
3445
|
-
('status', STATUS_SPEC),
|
|
3446
|
-
('synchronous_flow_control_enable', 1),
|
|
3447
|
-
]
|
|
3448
|
-
|
|
3449
3643
|
|
|
3450
3644
|
# -----------------------------------------------------------------------------
|
|
3451
|
-
@
|
|
3645
|
+
@HCI_SyncCommand.sync_command(HCI_StatusReturnParameters)
|
|
3452
3646
|
@dataclasses.dataclass
|
|
3453
|
-
class HCI_Write_Synchronous_Flow_Control_Enable_Command(
|
|
3647
|
+
class HCI_Write_Synchronous_Flow_Control_Enable_Command(
|
|
3648
|
+
HCI_SyncCommand[HCI_StatusReturnParameters]
|
|
3649
|
+
):
|
|
3454
3650
|
'''
|
|
3455
3651
|
See Bluetooth spec @ 7.3.37 Write Synchronous Flow Control Enable Command
|
|
3456
3652
|
'''
|
|
@@ -3459,9 +3655,11 @@ class HCI_Write_Synchronous_Flow_Control_Enable_Command(HCI_Command):
|
|
|
3459
3655
|
|
|
3460
3656
|
|
|
3461
3657
|
# -----------------------------------------------------------------------------
|
|
3462
|
-
@
|
|
3658
|
+
@HCI_SyncCommand.sync_command(HCI_StatusReturnParameters)
|
|
3463
3659
|
@dataclasses.dataclass
|
|
3464
|
-
class HCI_Set_Controller_To_Host_Flow_Control_Command(
|
|
3660
|
+
class HCI_Set_Controller_To_Host_Flow_Control_Command(
|
|
3661
|
+
HCI_SyncCommand[HCI_StatusReturnParameters]
|
|
3662
|
+
):
|
|
3465
3663
|
'''
|
|
3466
3664
|
See Bluetooth spec @ 7.3.38 Set Controller To Host Flow Control command
|
|
3467
3665
|
'''
|
|
@@ -3470,9 +3668,9 @@ class HCI_Set_Controller_To_Host_Flow_Control_Command(HCI_Command):
|
|
|
3470
3668
|
|
|
3471
3669
|
|
|
3472
3670
|
# -----------------------------------------------------------------------------
|
|
3473
|
-
@
|
|
3671
|
+
@HCI_SyncCommand.sync_command(HCI_StatusReturnParameters)
|
|
3474
3672
|
@dataclasses.dataclass
|
|
3475
|
-
class HCI_Host_Buffer_Size_Command(
|
|
3673
|
+
class HCI_Host_Buffer_Size_Command(HCI_SyncCommand[HCI_StatusReturnParameters]):
|
|
3476
3674
|
'''
|
|
3477
3675
|
See Bluetooth spec @ 7.3.39 Host Buffer Size Command
|
|
3478
3676
|
'''
|
|
@@ -3484,9 +3682,16 @@ class HCI_Host_Buffer_Size_Command(HCI_Command):
|
|
|
3484
3682
|
|
|
3485
3683
|
|
|
3486
3684
|
# -----------------------------------------------------------------------------
|
|
3487
|
-
@HCI_Command.command
|
|
3488
3685
|
@dataclasses.dataclass
|
|
3489
|
-
class
|
|
3686
|
+
class HCI_Write_Link_Supervision_Timeout_ReturnParameters(HCI_StatusReturnParameters):
|
|
3687
|
+
handle: int = field(metadata=metadata(2))
|
|
3688
|
+
|
|
3689
|
+
|
|
3690
|
+
@HCI_SyncCommand.sync_command(HCI_Write_Link_Supervision_Timeout_ReturnParameters)
|
|
3691
|
+
@dataclasses.dataclass
|
|
3692
|
+
class HCI_Write_Link_Supervision_Timeout_Command(
|
|
3693
|
+
HCI_SyncCommand[HCI_Write_Link_Supervision_Timeout_ReturnParameters]
|
|
3694
|
+
):
|
|
3490
3695
|
'''
|
|
3491
3696
|
See Bluetooth spec @ 7.3.42 Write Link Supervision Timeout Command
|
|
3492
3697
|
'''
|
|
@@ -3494,42 +3699,44 @@ class HCI_Write_Link_Supervision_Timeout_Command(HCI_Command):
|
|
|
3494
3699
|
handle: int = field(metadata=metadata(2))
|
|
3495
3700
|
link_supervision_timeout: int = field(metadata=metadata(2))
|
|
3496
3701
|
|
|
3497
|
-
return_parameters_fields = [
|
|
3498
|
-
('status', STATUS_SPEC),
|
|
3499
|
-
('handle', 2),
|
|
3500
|
-
]
|
|
3501
|
-
|
|
3502
3702
|
|
|
3503
3703
|
# -----------------------------------------------------------------------------
|
|
3504
|
-
@HCI_Command.command
|
|
3505
3704
|
@dataclasses.dataclass
|
|
3506
|
-
class
|
|
3705
|
+
class HCI_Read_Number_Of_Supported_IAC_ReturnParameters(HCI_StatusReturnParameters):
|
|
3706
|
+
num_support_iac: int = field(metadata=metadata(1))
|
|
3707
|
+
|
|
3708
|
+
|
|
3709
|
+
@HCI_SyncCommand.sync_command(HCI_Read_Number_Of_Supported_IAC_ReturnParameters)
|
|
3710
|
+
@dataclasses.dataclass
|
|
3711
|
+
class HCI_Read_Number_Of_Supported_IAC_Command(
|
|
3712
|
+
HCI_SyncCommand[HCI_Read_Number_Of_Supported_IAC_ReturnParameters]
|
|
3713
|
+
):
|
|
3507
3714
|
'''
|
|
3508
3715
|
See Bluetooth spec @ 7.3.43 Read Number Of Supported IAC Command
|
|
3509
3716
|
'''
|
|
3510
3717
|
|
|
3511
|
-
return_parameters_fields = [('status', STATUS_SPEC), ('num_support_iac', 1)]
|
|
3512
|
-
|
|
3513
3718
|
|
|
3514
3719
|
# -----------------------------------------------------------------------------
|
|
3515
|
-
@HCI_Command.command
|
|
3516
3720
|
@dataclasses.dataclass
|
|
3517
|
-
class
|
|
3721
|
+
class HCI_Read_Current_IAC_LAP_ReturnParameters(HCI_StatusReturnParameters):
|
|
3722
|
+
num_support_iac: int = field(metadata=metadata(1))
|
|
3723
|
+
iac_lap: bytes = field(metadata=metadata('*')) # TODO: should be parsed as an array
|
|
3724
|
+
|
|
3725
|
+
|
|
3726
|
+
@HCI_SyncCommand.sync_command(HCI_Read_Current_IAC_LAP_ReturnParameters)
|
|
3727
|
+
@dataclasses.dataclass
|
|
3728
|
+
class HCI_Read_Current_IAC_LAP_Command(
|
|
3729
|
+
HCI_SyncCommand[HCI_Read_Current_IAC_LAP_ReturnParameters]
|
|
3730
|
+
):
|
|
3518
3731
|
'''
|
|
3519
3732
|
See Bluetooth spec @ 7.3.44 Read Current IAC LAP Command
|
|
3520
3733
|
'''
|
|
3521
3734
|
|
|
3522
|
-
return_parameters_fields = [
|
|
3523
|
-
('status', STATUS_SPEC),
|
|
3524
|
-
('num_current_iac', 1),
|
|
3525
|
-
('iac_lap', '*'), # TODO: this should be parsed as an array
|
|
3526
|
-
]
|
|
3527
|
-
|
|
3528
3735
|
|
|
3529
3736
|
# -----------------------------------------------------------------------------
|
|
3530
|
-
@
|
|
3737
|
+
@HCI_SyncCommand.sync_command(HCI_StatusReturnParameters)
|
|
3531
3738
|
@dataclasses.dataclass
|
|
3532
|
-
class HCI_Write_Inquiry_Scan_Type_Command(
|
|
3739
|
+
class HCI_Write_Inquiry_Scan_Type_Command(HCI_SyncCommand[HCI_StatusReturnParameters]):
|
|
3533
3740
|
'''
|
|
3534
3741
|
See Bluetooth spec @ 7.3.48 Write Inquiry Scan Type Command
|
|
3535
3742
|
'''
|
|
@@ -3538,9 +3745,9 @@ class HCI_Write_Inquiry_Scan_Type_Command(HCI_Command):
|
|
|
3538
3745
|
|
|
3539
3746
|
|
|
3540
3747
|
# -----------------------------------------------------------------------------
|
|
3541
|
-
@
|
|
3748
|
+
@HCI_SyncCommand.sync_command(HCI_StatusReturnParameters)
|
|
3542
3749
|
@dataclasses.dataclass
|
|
3543
|
-
class HCI_Write_Inquiry_Mode_Command(
|
|
3750
|
+
class HCI_Write_Inquiry_Mode_Command(HCI_SyncCommand[HCI_StatusReturnParameters]):
|
|
3544
3751
|
'''
|
|
3545
3752
|
See Bluetooth spec @ 7.3.50 Write Inquiry Mode Command
|
|
3546
3753
|
'''
|
|
@@ -3549,20 +3756,25 @@ class HCI_Write_Inquiry_Mode_Command(HCI_Command):
|
|
|
3549
3756
|
|
|
3550
3757
|
|
|
3551
3758
|
# -----------------------------------------------------------------------------
|
|
3552
|
-
@HCI_Command.command
|
|
3553
3759
|
@dataclasses.dataclass
|
|
3554
|
-
class
|
|
3760
|
+
class HCI_Read_Page_Scan_Type_ReturnParameters(HCI_StatusReturnParameters):
|
|
3761
|
+
page_scan_type: int = field(metadata=metadata(1))
|
|
3762
|
+
|
|
3763
|
+
|
|
3764
|
+
@HCI_SyncCommand.sync_command(HCI_Read_Page_Scan_Type_ReturnParameters)
|
|
3765
|
+
@dataclasses.dataclass
|
|
3766
|
+
class HCI_Read_Page_Scan_Type_Command(
|
|
3767
|
+
HCI_SyncCommand[HCI_Read_Page_Scan_Type_ReturnParameters]
|
|
3768
|
+
):
|
|
3555
3769
|
'''
|
|
3556
3770
|
See Bluetooth spec @ 7.3.51 Read Page Scan Type Command
|
|
3557
3771
|
'''
|
|
3558
3772
|
|
|
3559
|
-
return_parameters_fields = [('status', STATUS_SPEC), ('page_scan_type', 1)]
|
|
3560
|
-
|
|
3561
3773
|
|
|
3562
3774
|
# -----------------------------------------------------------------------------
|
|
3563
|
-
@
|
|
3775
|
+
@HCI_SyncCommand.sync_command(HCI_StatusReturnParameters)
|
|
3564
3776
|
@dataclasses.dataclass
|
|
3565
|
-
class HCI_Write_Page_Scan_Type_Command(
|
|
3777
|
+
class HCI_Write_Page_Scan_Type_Command(HCI_SyncCommand[HCI_StatusReturnParameters]):
|
|
3566
3778
|
'''
|
|
3567
3779
|
See Bluetooth spec @ 7.3.52 Write Page Scan Type Command
|
|
3568
3780
|
'''
|
|
@@ -3571,23 +3783,27 @@ class HCI_Write_Page_Scan_Type_Command(HCI_Command):
|
|
|
3571
3783
|
|
|
3572
3784
|
|
|
3573
3785
|
# -----------------------------------------------------------------------------
|
|
3574
|
-
@
|
|
3786
|
+
@HCI_SyncCommand.sync_command(HCI_StatusReturnParameters)
|
|
3575
3787
|
@dataclasses.dataclass
|
|
3576
|
-
class HCI_Write_Extended_Inquiry_Response_Command(
|
|
3788
|
+
class HCI_Write_Extended_Inquiry_Response_Command(
|
|
3789
|
+
HCI_SyncCommand[HCI_StatusReturnParameters]
|
|
3790
|
+
):
|
|
3577
3791
|
'''
|
|
3578
3792
|
See Bluetooth spec @ 7.3.56 Write Extended Inquiry Response Command
|
|
3579
3793
|
'''
|
|
3580
3794
|
|
|
3581
3795
|
fec_required: int = field(metadata=metadata(1))
|
|
3582
|
-
extended_inquiry_response:
|
|
3796
|
+
extended_inquiry_response: bytes = field(
|
|
3583
3797
|
metadata=metadata({'size': 240, 'serializer': lambda x: padded_bytes(x, 240)})
|
|
3584
3798
|
)
|
|
3585
3799
|
|
|
3586
3800
|
|
|
3587
3801
|
# -----------------------------------------------------------------------------
|
|
3588
|
-
@
|
|
3802
|
+
@HCI_SyncCommand.sync_command(HCI_StatusReturnParameters)
|
|
3589
3803
|
@dataclasses.dataclass
|
|
3590
|
-
class HCI_Write_Simple_Pairing_Mode_Command(
|
|
3804
|
+
class HCI_Write_Simple_Pairing_Mode_Command(
|
|
3805
|
+
HCI_SyncCommand[HCI_StatusReturnParameters]
|
|
3806
|
+
):
|
|
3591
3807
|
'''
|
|
3592
3808
|
See Bluetooth spec @ 7.3.59 Write Simple Pairing Mode Command
|
|
3593
3809
|
'''
|
|
@@ -3596,49 +3812,62 @@ class HCI_Write_Simple_Pairing_Mode_Command(HCI_Command):
|
|
|
3596
3812
|
|
|
3597
3813
|
|
|
3598
3814
|
# -----------------------------------------------------------------------------
|
|
3599
|
-
@HCI_Command.command
|
|
3600
3815
|
@dataclasses.dataclass
|
|
3601
|
-
class
|
|
3816
|
+
class HCI_Read_Local_OOB_Data_ReturnParameters(HCI_StatusReturnParameters):
|
|
3817
|
+
c: bytes = field(metadata=metadata(16))
|
|
3818
|
+
r: bytes = field(metadata=metadata(16))
|
|
3819
|
+
|
|
3820
|
+
|
|
3821
|
+
@HCI_SyncCommand.sync_command(HCI_Read_Local_OOB_Data_ReturnParameters)
|
|
3822
|
+
@dataclasses.dataclass
|
|
3823
|
+
class HCI_Read_Local_OOB_Data_Command(
|
|
3824
|
+
HCI_SyncCommand[HCI_Read_Local_OOB_Data_ReturnParameters]
|
|
3825
|
+
):
|
|
3602
3826
|
'''
|
|
3603
3827
|
See Bluetooth spec @ 7.3.60 Read Local OOB Data Command
|
|
3604
3828
|
'''
|
|
3605
3829
|
|
|
3606
|
-
return_parameters_fields = [
|
|
3607
|
-
('status', STATUS_SPEC),
|
|
3608
|
-
('c', 16),
|
|
3609
|
-
('r', 16),
|
|
3610
|
-
]
|
|
3611
|
-
|
|
3612
3830
|
|
|
3613
3831
|
# -----------------------------------------------------------------------------
|
|
3614
|
-
@HCI_Command.command
|
|
3615
3832
|
@dataclasses.dataclass
|
|
3616
|
-
class
|
|
3833
|
+
class HCI_Read_Inquiry_Response_Transmit_Power_Level_ReturnParameters(
|
|
3834
|
+
HCI_StatusReturnParameters
|
|
3835
|
+
):
|
|
3836
|
+
tx_power: int = field(metadata=metadata(-1))
|
|
3837
|
+
|
|
3838
|
+
|
|
3839
|
+
@HCI_SyncCommand.sync_command(
|
|
3840
|
+
HCI_Read_Inquiry_Response_Transmit_Power_Level_ReturnParameters
|
|
3841
|
+
)
|
|
3842
|
+
@dataclasses.dataclass
|
|
3843
|
+
class HCI_Read_Inquiry_Response_Transmit_Power_Level_Command(
|
|
3844
|
+
HCI_SyncCommand[HCI_Read_Inquiry_Response_Transmit_Power_Level_ReturnParameters]
|
|
3845
|
+
):
|
|
3617
3846
|
'''
|
|
3618
3847
|
See Bluetooth spec @ 7.3.61 Read Inquiry Response Transmit Power Level Command
|
|
3619
3848
|
'''
|
|
3620
3849
|
|
|
3621
|
-
return_parameters_fields = [('status', STATUS_SPEC), ('tx_power', -1)]
|
|
3622
|
-
|
|
3623
3850
|
|
|
3624
3851
|
# -----------------------------------------------------------------------------
|
|
3625
|
-
@HCI_Command.command
|
|
3626
3852
|
@dataclasses.dataclass
|
|
3627
|
-
class
|
|
3853
|
+
class HCI_Read_Default_Erroneous_Data_ReturnParameters(HCI_StatusReturnParameters):
|
|
3854
|
+
erroneous_data_reporting: int = field(metadata=metadata(1))
|
|
3855
|
+
|
|
3856
|
+
|
|
3857
|
+
@HCI_SyncCommand.sync_command(HCI_Read_Default_Erroneous_Data_ReturnParameters)
|
|
3858
|
+
@dataclasses.dataclass
|
|
3859
|
+
class HCI_Read_Default_Erroneous_Data_Reporting_Command(
|
|
3860
|
+
HCI_SyncCommand[HCI_Read_Default_Erroneous_Data_ReturnParameters]
|
|
3861
|
+
):
|
|
3628
3862
|
'''
|
|
3629
3863
|
See Bluetooth spec @ 7.3.64 Read Default Erroneous Data Reporting Command
|
|
3630
3864
|
'''
|
|
3631
3865
|
|
|
3632
|
-
return_parameters_fields = [
|
|
3633
|
-
('status', STATUS_SPEC),
|
|
3634
|
-
('erroneous_data_reporting', 1),
|
|
3635
|
-
]
|
|
3636
|
-
|
|
3637
3866
|
|
|
3638
3867
|
# -----------------------------------------------------------------------------
|
|
3639
|
-
@
|
|
3868
|
+
@HCI_SyncCommand.sync_command(HCI_StatusReturnParameters)
|
|
3640
3869
|
@dataclasses.dataclass
|
|
3641
|
-
class HCI_Set_Event_Mask_Page_2_Command(
|
|
3870
|
+
class HCI_Set_Event_Mask_Page_2_Command(HCI_SyncCommand[HCI_StatusReturnParameters]):
|
|
3642
3871
|
'''
|
|
3643
3872
|
See Bluetooth spec @ 7.3.69 Set Event Mask Page 2 Command
|
|
3644
3873
|
'''
|
|
@@ -3661,24 +3890,26 @@ class HCI_Set_Event_Mask_Page_2_Command(HCI_Command):
|
|
|
3661
3890
|
|
|
3662
3891
|
|
|
3663
3892
|
# -----------------------------------------------------------------------------
|
|
3664
|
-
@HCI_Command.command
|
|
3665
3893
|
@dataclasses.dataclass
|
|
3666
|
-
class
|
|
3894
|
+
class HCI_Read_LE_Host_Support_ReturnParameters(HCI_StatusReturnParameters):
|
|
3895
|
+
le_supported_host: int = field(metadata=metadata(1))
|
|
3896
|
+
unused: int = field(metadata=metadata(1))
|
|
3897
|
+
|
|
3898
|
+
|
|
3899
|
+
@HCI_SyncCommand.sync_command(HCI_Read_LE_Host_Support_ReturnParameters)
|
|
3900
|
+
@dataclasses.dataclass
|
|
3901
|
+
class HCI_Read_LE_Host_Support_Command(
|
|
3902
|
+
HCI_SyncCommand[HCI_Read_LE_Host_Support_ReturnParameters]
|
|
3903
|
+
):
|
|
3667
3904
|
'''
|
|
3668
3905
|
See Bluetooth spec @ 7.3.78 Read LE Host Support Command
|
|
3669
3906
|
'''
|
|
3670
3907
|
|
|
3671
|
-
return_parameters_fields = [
|
|
3672
|
-
('status', STATUS_SPEC),
|
|
3673
|
-
('le_supported_host', 1),
|
|
3674
|
-
('unused', 1),
|
|
3675
|
-
]
|
|
3676
|
-
|
|
3677
3908
|
|
|
3678
3909
|
# -----------------------------------------------------------------------------
|
|
3679
|
-
@
|
|
3910
|
+
@HCI_SyncCommand.sync_command(HCI_StatusReturnParameters)
|
|
3680
3911
|
@dataclasses.dataclass
|
|
3681
|
-
class HCI_Write_LE_Host_Support_Command(
|
|
3912
|
+
class HCI_Write_LE_Host_Support_Command(HCI_SyncCommand[HCI_StatusReturnParameters]):
|
|
3682
3913
|
'''
|
|
3683
3914
|
See Bluetooth spec @ 7.3.79 Write LE Host Support Command
|
|
3684
3915
|
'''
|
|
@@ -3688,9 +3919,11 @@ class HCI_Write_LE_Host_Support_Command(HCI_Command):
|
|
|
3688
3919
|
|
|
3689
3920
|
|
|
3690
3921
|
# -----------------------------------------------------------------------------
|
|
3691
|
-
@
|
|
3922
|
+
@HCI_SyncCommand.sync_command(HCI_StatusReturnParameters)
|
|
3692
3923
|
@dataclasses.dataclass
|
|
3693
|
-
class HCI_Write_Secure_Connections_Host_Support_Command(
|
|
3924
|
+
class HCI_Write_Secure_Connections_Host_Support_Command(
|
|
3925
|
+
HCI_SyncCommand[HCI_StatusReturnParameters]
|
|
3926
|
+
):
|
|
3694
3927
|
'''
|
|
3695
3928
|
See Bluetooth spec @ 7.3.92 Write Secure Connections Host Support Command
|
|
3696
3929
|
'''
|
|
@@ -3699,9 +3932,11 @@ class HCI_Write_Secure_Connections_Host_Support_Command(HCI_Command):
|
|
|
3699
3932
|
|
|
3700
3933
|
|
|
3701
3934
|
# -----------------------------------------------------------------------------
|
|
3702
|
-
@
|
|
3935
|
+
@HCI_SyncCommand.sync_command(HCI_StatusReturnParameters)
|
|
3703
3936
|
@dataclasses.dataclass
|
|
3704
|
-
class HCI_Write_Authenticated_Payload_Timeout_Command(
|
|
3937
|
+
class HCI_Write_Authenticated_Payload_Timeout_Command(
|
|
3938
|
+
HCI_SyncCommand[HCI_StatusReturnParameters]
|
|
3939
|
+
):
|
|
3705
3940
|
'''
|
|
3706
3941
|
See Bluetooth spec @ 7.3.94 Write Authenticated Payload Timeout Command
|
|
3707
3942
|
'''
|
|
@@ -3711,209 +3946,251 @@ class HCI_Write_Authenticated_Payload_Timeout_Command(HCI_Command):
|
|
|
3711
3946
|
|
|
3712
3947
|
|
|
3713
3948
|
# -----------------------------------------------------------------------------
|
|
3714
|
-
@HCI_Command.command
|
|
3715
3949
|
@dataclasses.dataclass
|
|
3716
|
-
class
|
|
3950
|
+
class HCI_Read_Local_OOB_Extended_Data_ReturnParameters(HCI_StatusReturnParameters):
|
|
3951
|
+
le_supported_host: int = field(metadata=metadata(1))
|
|
3952
|
+
c_192: bytes = field(metadata=metadata(16))
|
|
3953
|
+
r_192: bytes = field(metadata=metadata(16))
|
|
3954
|
+
c_256: bytes = field(metadata=metadata(16))
|
|
3955
|
+
r_256: bytes = field(metadata=metadata(16))
|
|
3956
|
+
|
|
3957
|
+
|
|
3958
|
+
@HCI_SyncCommand.sync_command(HCI_Read_Local_OOB_Extended_Data_ReturnParameters)
|
|
3959
|
+
@dataclasses.dataclass
|
|
3960
|
+
class HCI_Read_Local_OOB_Extended_Data_Command(
|
|
3961
|
+
HCI_SyncCommand[HCI_Read_Local_OOB_Extended_Data_ReturnParameters]
|
|
3962
|
+
):
|
|
3717
3963
|
'''
|
|
3718
3964
|
See Bluetooth spec @ 7.3.95 Read Local OOB Extended Data Command
|
|
3719
3965
|
'''
|
|
3720
3966
|
|
|
3721
|
-
return_parameters_fields = [
|
|
3722
|
-
('status', STATUS_SPEC),
|
|
3723
|
-
('c_192', 16),
|
|
3724
|
-
('r_192', 16),
|
|
3725
|
-
('c_256', 16),
|
|
3726
|
-
('r_256', 16),
|
|
3727
|
-
]
|
|
3728
|
-
|
|
3729
3967
|
|
|
3730
3968
|
# -----------------------------------------------------------------------------
|
|
3731
|
-
@HCI_Command.command
|
|
3732
3969
|
@dataclasses.dataclass
|
|
3733
|
-
class
|
|
3970
|
+
class HCI_Read_Local_Version_Information_ReturnParameters(HCI_StatusReturnParameters):
|
|
3971
|
+
hci_version: int = field(metadata=SpecificationVersion.type_metadata(1))
|
|
3972
|
+
hci_subversion: int = field(metadata=metadata(2))
|
|
3973
|
+
lmp_version: int = field(metadata=SpecificationVersion.type_metadata(1))
|
|
3974
|
+
company_identifier: int = field(metadata=metadata(2))
|
|
3975
|
+
lmp_subversion: int = field(metadata=metadata(2))
|
|
3976
|
+
|
|
3977
|
+
|
|
3978
|
+
@HCI_SyncCommand.sync_command(HCI_Read_Local_Version_Information_ReturnParameters)
|
|
3979
|
+
@dataclasses.dataclass
|
|
3980
|
+
class HCI_Read_Local_Version_Information_Command(
|
|
3981
|
+
HCI_SyncCommand[HCI_Read_Local_Version_Information_ReturnParameters]
|
|
3982
|
+
):
|
|
3734
3983
|
'''
|
|
3735
3984
|
See Bluetooth spec @ 7.4.1 Read Local Version Information Command
|
|
3736
3985
|
'''
|
|
3737
3986
|
|
|
3738
|
-
return_parameters_fields = [
|
|
3739
|
-
('status', STATUS_SPEC),
|
|
3740
|
-
('hci_version', 1),
|
|
3741
|
-
('hci_subversion', 2),
|
|
3742
|
-
('lmp_version', 1),
|
|
3743
|
-
('company_identifier', 2),
|
|
3744
|
-
('lmp_subversion', 2),
|
|
3745
|
-
]
|
|
3746
|
-
|
|
3747
3987
|
|
|
3748
3988
|
# -----------------------------------------------------------------------------
|
|
3749
|
-
@HCI_Command.command
|
|
3750
3989
|
@dataclasses.dataclass
|
|
3751
|
-
class
|
|
3990
|
+
class HCI_Read_Local_Supported_Commands_ReturnParameters(HCI_StatusReturnParameters):
|
|
3991
|
+
supported_commands: bytes = field(metadata=metadata(64))
|
|
3992
|
+
|
|
3993
|
+
|
|
3994
|
+
@HCI_SyncCommand.sync_command(HCI_Read_Local_Supported_Commands_ReturnParameters)
|
|
3995
|
+
@dataclasses.dataclass
|
|
3996
|
+
class HCI_Read_Local_Supported_Commands_Command(
|
|
3997
|
+
HCI_SyncCommand[HCI_Read_Local_Supported_Commands_ReturnParameters]
|
|
3998
|
+
):
|
|
3752
3999
|
'''
|
|
3753
4000
|
See Bluetooth spec @ 7.4.2 Read Local Supported Commands Command
|
|
3754
4001
|
'''
|
|
3755
4002
|
|
|
3756
|
-
return_parameters_fields = [('status', STATUS_SPEC), ('supported_commands', 64)]
|
|
3757
|
-
|
|
3758
4003
|
|
|
3759
4004
|
# -----------------------------------------------------------------------------
|
|
3760
|
-
@HCI_Command.command
|
|
3761
4005
|
@dataclasses.dataclass
|
|
3762
|
-
class
|
|
4006
|
+
class HCI_Read_Local_Supported_Features_ReturnParameters(HCI_StatusReturnParameters):
|
|
4007
|
+
lmp_features: bytes = field(metadata=metadata(8))
|
|
4008
|
+
|
|
4009
|
+
|
|
4010
|
+
@HCI_SyncCommand.sync_command(HCI_Read_Local_Supported_Features_ReturnParameters)
|
|
4011
|
+
@dataclasses.dataclass
|
|
4012
|
+
class HCI_Read_Local_Supported_Features_Command(
|
|
4013
|
+
HCI_SyncCommand[HCI_Read_Local_Supported_Features_ReturnParameters]
|
|
4014
|
+
):
|
|
3763
4015
|
'''
|
|
3764
4016
|
See Bluetooth spec @ 7.4.3 Read Local Supported Features Command
|
|
3765
4017
|
'''
|
|
3766
4018
|
|
|
3767
|
-
return_parameters_fields = [
|
|
3768
|
-
('status', STATUS_SPEC),
|
|
3769
|
-
('lmp_features', 8),
|
|
3770
|
-
]
|
|
3771
|
-
|
|
3772
4019
|
|
|
3773
4020
|
# -----------------------------------------------------------------------------
|
|
3774
|
-
@HCI_Command.command
|
|
3775
4021
|
@dataclasses.dataclass
|
|
3776
|
-
class
|
|
4022
|
+
class HCI_Read_Local_Extended_Features_ReturnParameters(HCI_StatusReturnParameters):
|
|
4023
|
+
page_number: int = field(metadata=metadata(1))
|
|
4024
|
+
maximum_page_number: int = field(metadata=metadata(1))
|
|
4025
|
+
extended_lmp_features: bytes = field(metadata=metadata(8))
|
|
4026
|
+
|
|
4027
|
+
|
|
4028
|
+
@HCI_SyncCommand.sync_command(HCI_Read_Local_Extended_Features_ReturnParameters)
|
|
4029
|
+
@dataclasses.dataclass
|
|
4030
|
+
class HCI_Read_Local_Extended_Features_Command(
|
|
4031
|
+
HCI_SyncCommand[HCI_Read_Local_Extended_Features_ReturnParameters]
|
|
4032
|
+
):
|
|
3777
4033
|
'''
|
|
3778
4034
|
See Bluetooth spec @ 7.4.4 Read Local Extended Features Command
|
|
3779
4035
|
'''
|
|
3780
4036
|
|
|
3781
4037
|
page_number: int = field(metadata=metadata(1))
|
|
3782
4038
|
|
|
3783
|
-
return_parameters_fields = [
|
|
3784
|
-
('status', STATUS_SPEC),
|
|
3785
|
-
('page_number', 1),
|
|
3786
|
-
('maximum_page_number', 1),
|
|
3787
|
-
('extended_lmp_features', 8),
|
|
3788
|
-
]
|
|
3789
|
-
|
|
3790
4039
|
|
|
3791
4040
|
# -----------------------------------------------------------------------------
|
|
3792
|
-
@HCI_Command.command
|
|
3793
4041
|
@dataclasses.dataclass
|
|
3794
|
-
class
|
|
4042
|
+
class HCI_Read_Buffer_Size_ReturnParameters(HCI_StatusReturnParameters):
|
|
4043
|
+
hc_acl_data_packet_length: int = field(metadata=metadata(2))
|
|
4044
|
+
hc_synchronous_data_packet_length: int = field(metadata=metadata(1))
|
|
4045
|
+
hc_total_num_acl_data_packets: int = field(metadata=metadata(2))
|
|
4046
|
+
hc_total_num_synchronous_data_packets: int = field(metadata=metadata(2))
|
|
4047
|
+
|
|
4048
|
+
|
|
4049
|
+
@HCI_SyncCommand.sync_command(HCI_Read_Buffer_Size_ReturnParameters)
|
|
4050
|
+
@dataclasses.dataclass
|
|
4051
|
+
class HCI_Read_Buffer_Size_Command(
|
|
4052
|
+
HCI_SyncCommand[HCI_Read_Buffer_Size_ReturnParameters]
|
|
4053
|
+
):
|
|
3795
4054
|
'''
|
|
3796
4055
|
See Bluetooth spec @ 7.4.5 Read Buffer Size Command
|
|
3797
4056
|
'''
|
|
3798
4057
|
|
|
3799
|
-
return_parameters_fields = [
|
|
3800
|
-
('status', STATUS_SPEC),
|
|
3801
|
-
('hc_acl_data_packet_length', 2),
|
|
3802
|
-
('hc_synchronous_data_packet_length', 1),
|
|
3803
|
-
('hc_total_num_acl_data_packets', 2),
|
|
3804
|
-
('hc_total_num_synchronous_data_packets', 2),
|
|
3805
|
-
]
|
|
3806
|
-
|
|
3807
4058
|
|
|
3808
4059
|
# -----------------------------------------------------------------------------
|
|
3809
|
-
@HCI_Command.command
|
|
3810
4060
|
@dataclasses.dataclass
|
|
3811
|
-
class
|
|
4061
|
+
class HCI_Read_BD_ADDR_ReturnParameters(HCI_StatusReturnParameters):
|
|
4062
|
+
bd_addr: Address = field(metadata=metadata(Address.parse_address))
|
|
4063
|
+
|
|
4064
|
+
|
|
4065
|
+
@HCI_SyncCommand.sync_command(HCI_Read_BD_ADDR_ReturnParameters)
|
|
4066
|
+
@dataclasses.dataclass
|
|
4067
|
+
class HCI_Read_BD_ADDR_Command(HCI_SyncCommand[HCI_Read_BD_ADDR_ReturnParameters]):
|
|
3812
4068
|
'''
|
|
3813
4069
|
See Bluetooth spec @ 7.4.6 Read BD_ADDR Command
|
|
3814
4070
|
'''
|
|
3815
4071
|
|
|
3816
|
-
return_parameters_fields = [
|
|
3817
|
-
('status', STATUS_SPEC),
|
|
3818
|
-
('bd_addr', Address.parse_address),
|
|
3819
|
-
]
|
|
3820
|
-
|
|
3821
4072
|
|
|
3822
4073
|
# -----------------------------------------------------------------------------
|
|
3823
|
-
@HCI_Command.command
|
|
3824
4074
|
@dataclasses.dataclass
|
|
3825
|
-
class
|
|
3826
|
-
|
|
3827
|
-
|
|
3828
|
-
|
|
3829
|
-
|
|
3830
|
-
|
|
3831
|
-
|
|
3832
|
-
[("standard_codec_ids", 1)],
|
|
3833
|
-
[("vendor_specific_codec_ids", 4)],
|
|
3834
|
-
]
|
|
4075
|
+
class HCI_Read_Local_Supported_Codecs_ReturnParameters(HCI_StatusReturnParameters):
|
|
4076
|
+
standard_codec_ids: Sequence[CodecID] = field(
|
|
4077
|
+
metadata=CodecID.type_metadata(1, list_begin=True, list_end=True)
|
|
4078
|
+
)
|
|
4079
|
+
vendor_specific_codec_ids: Sequence[int] = field(
|
|
4080
|
+
metadata=metadata(4, list_begin=True, list_end=True)
|
|
4081
|
+
)
|
|
3835
4082
|
|
|
3836
4083
|
|
|
3837
|
-
|
|
3838
|
-
@HCI_Command.command
|
|
4084
|
+
@HCI_SyncCommand.sync_command(HCI_Read_Local_Supported_Codecs_ReturnParameters)
|
|
3839
4085
|
@dataclasses.dataclass
|
|
3840
|
-
class
|
|
4086
|
+
class HCI_Read_Local_Supported_Codecs_Command(
|
|
4087
|
+
HCI_SyncCommand[HCI_Read_Local_Supported_Codecs_ReturnParameters]
|
|
4088
|
+
):
|
|
3841
4089
|
'''
|
|
3842
4090
|
See Bluetooth spec @ 7.4.8 Read Local Supported Codecs Command
|
|
3843
4091
|
'''
|
|
3844
4092
|
|
|
3845
|
-
return_parameters_fields = [
|
|
3846
|
-
("status", STATUS_SPEC),
|
|
3847
|
-
[("standard_codec_ids", 1), ("standard_codec_transports", 1)],
|
|
3848
|
-
[("vendor_specific_codec_ids", 4), ("vendor_specific_codec_transports", 1)],
|
|
3849
|
-
]
|
|
3850
4093
|
|
|
4094
|
+
# -----------------------------------------------------------------------------
|
|
4095
|
+
@dataclasses.dataclass
|
|
4096
|
+
class HCI_Read_Local_Supported_Codecs_V2_ReturnParameters(HCI_StatusReturnParameters):
|
|
3851
4097
|
class Transport(SpecableFlag):
|
|
3852
4098
|
BR_EDR_ACL = 1 << 0
|
|
3853
4099
|
BR_EDR_SCO = 1 << 1
|
|
3854
4100
|
LE_CIS = 1 << 2
|
|
3855
4101
|
LE_BIS = 1 << 3
|
|
3856
4102
|
|
|
4103
|
+
standard_codec_ids: Sequence[CodecID] = field(
|
|
4104
|
+
metadata=CodecID.type_metadata(1, list_begin=True)
|
|
4105
|
+
)
|
|
4106
|
+
standard_codec_transports: Sequence[Transport] = field(
|
|
4107
|
+
metadata=Transport.type_metadata(1, list_end=True)
|
|
4108
|
+
)
|
|
4109
|
+
vendor_specific_codec_ids: Sequence[int] = field(
|
|
4110
|
+
metadata=metadata(4, list_begin=True)
|
|
4111
|
+
)
|
|
4112
|
+
vendor_specific_codec_transports: Sequence[Transport] = field(
|
|
4113
|
+
metadata=Transport.type_metadata(1, list_end=True)
|
|
4114
|
+
)
|
|
4115
|
+
|
|
4116
|
+
|
|
4117
|
+
@HCI_SyncCommand.sync_command(HCI_Read_Local_Supported_Codecs_V2_ReturnParameters)
|
|
4118
|
+
@dataclasses.dataclass
|
|
4119
|
+
class HCI_Read_Local_Supported_Codecs_V2_Command(
|
|
4120
|
+
HCI_SyncCommand[HCI_Read_Local_Supported_Codecs_V2_ReturnParameters]
|
|
4121
|
+
):
|
|
4122
|
+
'''
|
|
4123
|
+
See Bluetooth spec @ 7.4.8 Read Local Supported Codecs Command
|
|
4124
|
+
'''
|
|
4125
|
+
|
|
3857
4126
|
|
|
3858
4127
|
# -----------------------------------------------------------------------------
|
|
3859
|
-
@HCI_Command.command
|
|
3860
4128
|
@dataclasses.dataclass
|
|
3861
|
-
class
|
|
4129
|
+
class HCI_Read_RSSI_ReturnParameters(HCI_StatusReturnParameters):
|
|
4130
|
+
handle: int = field(metadata=metadata(2))
|
|
4131
|
+
rssi: int = field(metadata=metadata(-1))
|
|
4132
|
+
|
|
4133
|
+
|
|
4134
|
+
@HCI_SyncCommand.sync_command(HCI_Read_RSSI_ReturnParameters)
|
|
4135
|
+
@dataclasses.dataclass
|
|
4136
|
+
class HCI_Read_RSSI_Command(HCI_SyncCommand[HCI_Read_RSSI_ReturnParameters]):
|
|
3862
4137
|
'''
|
|
3863
4138
|
See Bluetooth spec @ 7.5.4 Read RSSI Command
|
|
3864
4139
|
'''
|
|
3865
4140
|
|
|
3866
4141
|
handle: int = field(metadata=metadata(2))
|
|
3867
4142
|
|
|
3868
|
-
return_parameters_fields = [('status', STATUS_SPEC), ('handle', 2), ('rssi', -1)]
|
|
3869
|
-
|
|
3870
4143
|
|
|
3871
4144
|
# -----------------------------------------------------------------------------
|
|
3872
|
-
@HCI_Command.command
|
|
3873
4145
|
@dataclasses.dataclass
|
|
3874
|
-
class
|
|
4146
|
+
class HCI_Read_Encryption_Key_Size_ReturnParameters(HCI_StatusReturnParameters):
|
|
4147
|
+
connection_handle: int = field(metadata=metadata(2))
|
|
4148
|
+
key_size: int = field(metadata=metadata(1))
|
|
4149
|
+
|
|
4150
|
+
|
|
4151
|
+
@HCI_SyncCommand.sync_command(HCI_Read_Encryption_Key_Size_ReturnParameters)
|
|
4152
|
+
@dataclasses.dataclass
|
|
4153
|
+
class HCI_Read_Encryption_Key_Size_Command(
|
|
4154
|
+
HCI_SyncCommand[HCI_Read_Encryption_Key_Size_ReturnParameters]
|
|
4155
|
+
):
|
|
3875
4156
|
'''
|
|
3876
4157
|
See Bluetooth spec @ 7.5.7 Read Encryption Key Size Command
|
|
3877
4158
|
'''
|
|
3878
4159
|
|
|
3879
4160
|
connection_handle: int = field(metadata=metadata(2))
|
|
3880
4161
|
|
|
3881
|
-
return_parameters_fields = [
|
|
3882
|
-
('status', STATUS_SPEC),
|
|
3883
|
-
('connection_handle', 2),
|
|
3884
|
-
('key_size', 1),
|
|
3885
|
-
]
|
|
3886
|
-
|
|
3887
4162
|
|
|
3888
4163
|
# -----------------------------------------------------------------------------
|
|
3889
|
-
@HCI_Command.command
|
|
3890
4164
|
@dataclasses.dataclass
|
|
3891
|
-
class
|
|
4165
|
+
class HCI_Read_Loopback_Mode_ReturnParameters(HCI_StatusReturnParameters):
|
|
4166
|
+
loopback_mode: LoopbackMode = field(metadata=LoopbackMode.type_metadata(1))
|
|
4167
|
+
|
|
4168
|
+
|
|
4169
|
+
@HCI_SyncCommand.sync_command(HCI_Read_Loopback_Mode_ReturnParameters)
|
|
4170
|
+
@dataclasses.dataclass
|
|
4171
|
+
class HCI_Read_Loopback_Mode_Command(
|
|
4172
|
+
HCI_SyncCommand[HCI_Read_Loopback_Mode_ReturnParameters]
|
|
4173
|
+
):
|
|
3892
4174
|
'''
|
|
3893
4175
|
See Bluetooth spec @ 7.6.1 Read Loopback Mode Command
|
|
3894
4176
|
'''
|
|
3895
4177
|
|
|
3896
|
-
return_parameters_fields = [
|
|
3897
|
-
('status', STATUS_SPEC),
|
|
3898
|
-
('loopback_mode', LoopbackMode.type_spec(1)),
|
|
3899
|
-
]
|
|
3900
|
-
|
|
3901
4178
|
|
|
3902
4179
|
# -----------------------------------------------------------------------------
|
|
3903
|
-
@
|
|
4180
|
+
@HCI_SyncCommand.sync_command(HCI_StatusReturnParameters)
|
|
3904
4181
|
@dataclasses.dataclass
|
|
3905
|
-
class HCI_Write_Loopback_Mode_Command(
|
|
4182
|
+
class HCI_Write_Loopback_Mode_Command(HCI_SyncCommand[HCI_StatusReturnParameters]):
|
|
3906
4183
|
'''
|
|
3907
4184
|
See Bluetooth spec @ 7.6.2 Write Loopback Mode Command
|
|
3908
4185
|
'''
|
|
3909
4186
|
|
|
3910
|
-
loopback_mode:
|
|
4187
|
+
loopback_mode: LoopbackMode = field(metadata=LoopbackMode.type_metadata(1))
|
|
3911
4188
|
|
|
3912
4189
|
|
|
3913
4190
|
# -----------------------------------------------------------------------------
|
|
3914
|
-
@
|
|
4191
|
+
@HCI_SyncCommand.sync_command(HCI_StatusReturnParameters)
|
|
3915
4192
|
@dataclasses.dataclass
|
|
3916
|
-
class HCI_LE_Set_Event_Mask_Command(
|
|
4193
|
+
class HCI_LE_Set_Event_Mask_Command(HCI_SyncCommand[HCI_StatusReturnParameters]):
|
|
3917
4194
|
'''
|
|
3918
4195
|
See Bluetooth spec @ 7.8.1 LE Set Event Mask Command
|
|
3919
4196
|
'''
|
|
@@ -3936,52 +4213,61 @@ class HCI_LE_Set_Event_Mask_Command(HCI_Command):
|
|
|
3936
4213
|
|
|
3937
4214
|
|
|
3938
4215
|
# -----------------------------------------------------------------------------
|
|
3939
|
-
@HCI_Command.command
|
|
3940
4216
|
@dataclasses.dataclass
|
|
3941
|
-
class
|
|
4217
|
+
class HCI_LE_Read_Buffer_Size_ReturnParameters(HCI_StatusReturnParameters):
|
|
4218
|
+
le_acl_data_packet_length: int = field(metadata=metadata(2))
|
|
4219
|
+
total_num_le_acl_data_packets: int = field(metadata=metadata(1))
|
|
4220
|
+
|
|
4221
|
+
|
|
4222
|
+
@HCI_SyncCommand.sync_command(HCI_LE_Read_Buffer_Size_ReturnParameters)
|
|
4223
|
+
@dataclasses.dataclass
|
|
4224
|
+
class HCI_LE_Read_Buffer_Size_Command(
|
|
4225
|
+
HCI_SyncCommand[HCI_LE_Read_Buffer_Size_ReturnParameters]
|
|
4226
|
+
):
|
|
3942
4227
|
'''
|
|
3943
4228
|
See Bluetooth spec @ 7.8.2 LE Read Buffer Size Command
|
|
3944
4229
|
'''
|
|
3945
4230
|
|
|
3946
|
-
return_parameters_fields = [
|
|
3947
|
-
('status', STATUS_SPEC),
|
|
3948
|
-
('le_acl_data_packet_length', 2),
|
|
3949
|
-
('total_num_le_acl_data_packets', 1),
|
|
3950
|
-
]
|
|
3951
|
-
|
|
3952
4231
|
|
|
3953
4232
|
# -----------------------------------------------------------------------------
|
|
3954
|
-
@HCI_Command.command
|
|
3955
4233
|
@dataclasses.dataclass
|
|
3956
|
-
class
|
|
4234
|
+
class HCI_LE_Read_Buffer_Size_V2_ReturnParameters(HCI_StatusReturnParameters):
|
|
4235
|
+
le_acl_data_packet_length: int = field(metadata=metadata(2))
|
|
4236
|
+
total_num_le_acl_data_packets: int = field(metadata=metadata(1))
|
|
4237
|
+
iso_data_packet_length: int = field(metadata=metadata(2))
|
|
4238
|
+
total_num_iso_data_packets: int = field(metadata=metadata(1))
|
|
4239
|
+
|
|
4240
|
+
|
|
4241
|
+
@HCI_SyncCommand.sync_command(HCI_LE_Read_Buffer_Size_V2_ReturnParameters)
|
|
4242
|
+
@dataclasses.dataclass
|
|
4243
|
+
class HCI_LE_Read_Buffer_Size_V2_Command(
|
|
4244
|
+
HCI_SyncCommand[HCI_LE_Read_Buffer_Size_V2_ReturnParameters]
|
|
4245
|
+
):
|
|
3957
4246
|
'''
|
|
3958
4247
|
See Bluetooth spec @ 7.8.2 LE Read Buffer Size V2 Command
|
|
3959
4248
|
'''
|
|
3960
4249
|
|
|
3961
|
-
return_parameters_fields = [
|
|
3962
|
-
('status', STATUS_SPEC),
|
|
3963
|
-
('le_acl_data_packet_length', 2),
|
|
3964
|
-
('total_num_le_acl_data_packets', 1),
|
|
3965
|
-
('iso_data_packet_length', 2),
|
|
3966
|
-
('total_num_iso_data_packets', 1),
|
|
3967
|
-
]
|
|
3968
|
-
|
|
3969
4250
|
|
|
3970
4251
|
# -----------------------------------------------------------------------------
|
|
3971
|
-
@HCI_Command.command
|
|
3972
4252
|
@dataclasses.dataclass
|
|
3973
|
-
class
|
|
4253
|
+
class HCI_LE_Read_Local_Supported_Features_ReturnParameters(HCI_StatusReturnParameters):
|
|
4254
|
+
le_features: bytes = field(metadata=metadata(8))
|
|
4255
|
+
|
|
4256
|
+
|
|
4257
|
+
@HCI_SyncCommand.sync_command(HCI_LE_Read_Local_Supported_Features_ReturnParameters)
|
|
4258
|
+
@dataclasses.dataclass
|
|
4259
|
+
class HCI_LE_Read_Local_Supported_Features_Command(
|
|
4260
|
+
HCI_SyncCommand[HCI_LE_Read_Local_Supported_Features_ReturnParameters]
|
|
4261
|
+
):
|
|
3974
4262
|
'''
|
|
3975
4263
|
See Bluetooth spec @ 7.8.3 LE Read Local Supported Features Command
|
|
3976
4264
|
'''
|
|
3977
4265
|
|
|
3978
|
-
return_parameters_fields = [('status', STATUS_SPEC), ('le_features', 8)]
|
|
3979
|
-
|
|
3980
4266
|
|
|
3981
4267
|
# -----------------------------------------------------------------------------
|
|
3982
|
-
@
|
|
4268
|
+
@HCI_SyncCommand.sync_command(HCI_StatusReturnParameters)
|
|
3983
4269
|
@dataclasses.dataclass
|
|
3984
|
-
class HCI_LE_Set_Random_Address_Command(
|
|
4270
|
+
class HCI_LE_Set_Random_Address_Command(HCI_SyncCommand[HCI_StatusReturnParameters]):
|
|
3985
4271
|
'''
|
|
3986
4272
|
See Bluetooth spec @ 7.8.4 LE Set Random Address Command
|
|
3987
4273
|
'''
|
|
@@ -3996,9 +4282,11 @@ class HCI_LE_Set_Random_Address_Command(HCI_Command):
|
|
|
3996
4282
|
|
|
3997
4283
|
|
|
3998
4284
|
# -----------------------------------------------------------------------------
|
|
3999
|
-
@
|
|
4285
|
+
@HCI_SyncCommand.sync_command(HCI_StatusReturnParameters)
|
|
4000
4286
|
@dataclasses.dataclass
|
|
4001
|
-
class HCI_LE_Set_Advertising_Parameters_Command(
|
|
4287
|
+
class HCI_LE_Set_Advertising_Parameters_Command(
|
|
4288
|
+
HCI_SyncCommand[HCI_StatusReturnParameters]
|
|
4289
|
+
):
|
|
4002
4290
|
'''
|
|
4003
4291
|
See Bluetooth spec @ 7.8.5 LE Set Advertising Parameters Command
|
|
4004
4292
|
'''
|
|
@@ -4023,23 +4311,29 @@ class HCI_LE_Set_Advertising_Parameters_Command(HCI_Command):
|
|
|
4023
4311
|
|
|
4024
4312
|
|
|
4025
4313
|
# -----------------------------------------------------------------------------
|
|
4026
|
-
@HCI_Command.command
|
|
4027
4314
|
@dataclasses.dataclass
|
|
4028
|
-
class
|
|
4315
|
+
class HCI_LE_Read_Advertising_Physical_Channel_Tx_Power_ReturnParameters(
|
|
4316
|
+
HCI_StatusReturnParameters
|
|
4317
|
+
):
|
|
4318
|
+
tx_power_level: int = field(metadata=metadata(-1))
|
|
4319
|
+
|
|
4320
|
+
|
|
4321
|
+
@HCI_SyncCommand.sync_command(
|
|
4322
|
+
HCI_LE_Read_Advertising_Physical_Channel_Tx_Power_ReturnParameters
|
|
4323
|
+
)
|
|
4324
|
+
@dataclasses.dataclass
|
|
4325
|
+
class HCI_LE_Read_Advertising_Physical_Channel_Tx_Power_Command(
|
|
4326
|
+
HCI_SyncCommand[HCI_LE_Read_Advertising_Physical_Channel_Tx_Power_ReturnParameters]
|
|
4327
|
+
):
|
|
4029
4328
|
'''
|
|
4030
4329
|
See Bluetooth spec @ 7.8.6 LE Read Advertising Physical Channel Tx Power Command
|
|
4031
4330
|
'''
|
|
4032
4331
|
|
|
4033
|
-
return_parameters_fields = [
|
|
4034
|
-
('status', STATUS_SPEC),
|
|
4035
|
-
('tx_power_level', 1),
|
|
4036
|
-
]
|
|
4037
|
-
|
|
4038
4332
|
|
|
4039
4333
|
# -----------------------------------------------------------------------------
|
|
4040
|
-
@
|
|
4334
|
+
@HCI_SyncCommand.sync_command(HCI_StatusReturnParameters)
|
|
4041
4335
|
@dataclasses.dataclass
|
|
4042
|
-
class HCI_LE_Set_Advertising_Data_Command(
|
|
4336
|
+
class HCI_LE_Set_Advertising_Data_Command(HCI_SyncCommand[HCI_StatusReturnParameters]):
|
|
4043
4337
|
'''
|
|
4044
4338
|
See Bluetooth spec @ 7.8.7 LE Set Advertising Data Command
|
|
4045
4339
|
'''
|
|
@@ -4057,9 +4351,11 @@ class HCI_LE_Set_Advertising_Data_Command(HCI_Command):
|
|
|
4057
4351
|
|
|
4058
4352
|
|
|
4059
4353
|
# -----------------------------------------------------------------------------
|
|
4060
|
-
@
|
|
4354
|
+
@HCI_SyncCommand.sync_command(HCI_StatusReturnParameters)
|
|
4061
4355
|
@dataclasses.dataclass
|
|
4062
|
-
class HCI_LE_Set_Scan_Response_Data_Command(
|
|
4356
|
+
class HCI_LE_Set_Scan_Response_Data_Command(
|
|
4357
|
+
HCI_SyncCommand[HCI_StatusReturnParameters]
|
|
4358
|
+
):
|
|
4063
4359
|
'''
|
|
4064
4360
|
See Bluetooth spec @ 7.8.8 LE Set Scan Response Data Command
|
|
4065
4361
|
'''
|
|
@@ -4077,9 +4373,11 @@ class HCI_LE_Set_Scan_Response_Data_Command(HCI_Command):
|
|
|
4077
4373
|
|
|
4078
4374
|
|
|
4079
4375
|
# -----------------------------------------------------------------------------
|
|
4080
|
-
@
|
|
4376
|
+
@HCI_SyncCommand.sync_command(HCI_StatusReturnParameters)
|
|
4081
4377
|
@dataclasses.dataclass
|
|
4082
|
-
class HCI_LE_Set_Advertising_Enable_Command(
|
|
4378
|
+
class HCI_LE_Set_Advertising_Enable_Command(
|
|
4379
|
+
HCI_SyncCommand[HCI_StatusReturnParameters]
|
|
4380
|
+
):
|
|
4083
4381
|
'''
|
|
4084
4382
|
See Bluetooth spec @ 7.8.9 LE Set Advertising Enable Command
|
|
4085
4383
|
'''
|
|
@@ -4088,9 +4386,9 @@ class HCI_LE_Set_Advertising_Enable_Command(HCI_Command):
|
|
|
4088
4386
|
|
|
4089
4387
|
|
|
4090
4388
|
# -----------------------------------------------------------------------------
|
|
4091
|
-
@
|
|
4389
|
+
@HCI_SyncCommand.sync_command(HCI_StatusReturnParameters)
|
|
4092
4390
|
@dataclasses.dataclass
|
|
4093
|
-
class HCI_LE_Set_Scan_Parameters_Command(
|
|
4391
|
+
class HCI_LE_Set_Scan_Parameters_Command(HCI_SyncCommand[HCI_StatusReturnParameters]):
|
|
4094
4392
|
'''
|
|
4095
4393
|
See Bluetooth spec @ 7.8.10 LE Set Scan Parameters Command
|
|
4096
4394
|
'''
|
|
@@ -4111,9 +4409,9 @@ class HCI_LE_Set_Scan_Parameters_Command(HCI_Command):
|
|
|
4111
4409
|
|
|
4112
4410
|
|
|
4113
4411
|
# -----------------------------------------------------------------------------
|
|
4114
|
-
@
|
|
4412
|
+
@HCI_SyncCommand.sync_command(HCI_StatusReturnParameters)
|
|
4115
4413
|
@dataclasses.dataclass
|
|
4116
|
-
class HCI_LE_Set_Scan_Enable_Command(
|
|
4414
|
+
class HCI_LE_Set_Scan_Enable_Command(HCI_SyncCommand[HCI_StatusReturnParameters]):
|
|
4117
4415
|
'''
|
|
4118
4416
|
See Bluetooth spec @ 7.8.11 LE Set Scan Enable Command
|
|
4119
4417
|
'''
|
|
@@ -4125,7 +4423,7 @@ class HCI_LE_Set_Scan_Enable_Command(HCI_Command):
|
|
|
4125
4423
|
# -----------------------------------------------------------------------------
|
|
4126
4424
|
@HCI_Command.command
|
|
4127
4425
|
@dataclasses.dataclass
|
|
4128
|
-
class HCI_LE_Create_Connection_Command(
|
|
4426
|
+
class HCI_LE_Create_Connection_Command(HCI_AsyncCommand):
|
|
4129
4427
|
'''
|
|
4130
4428
|
See Bluetooth spec @ 7.8.12 LE Create Connection Command
|
|
4131
4429
|
'''
|
|
@@ -4147,41 +4445,49 @@ class HCI_LE_Create_Connection_Command(HCI_Command):
|
|
|
4147
4445
|
|
|
4148
4446
|
|
|
4149
4447
|
# -----------------------------------------------------------------------------
|
|
4150
|
-
@
|
|
4448
|
+
@HCI_SyncCommand.sync_command(HCI_StatusReturnParameters)
|
|
4151
4449
|
@dataclasses.dataclass
|
|
4152
|
-
class HCI_LE_Create_Connection_Cancel_Command(
|
|
4450
|
+
class HCI_LE_Create_Connection_Cancel_Command(
|
|
4451
|
+
HCI_SyncCommand[HCI_StatusReturnParameters]
|
|
4452
|
+
):
|
|
4153
4453
|
'''
|
|
4154
4454
|
See Bluetooth spec @ 7.8.13 LE Create Connection Cancel Command
|
|
4155
4455
|
'''
|
|
4156
4456
|
|
|
4157
4457
|
|
|
4158
4458
|
# -----------------------------------------------------------------------------
|
|
4159
|
-
@HCI_Command.command
|
|
4160
4459
|
@dataclasses.dataclass
|
|
4161
|
-
class
|
|
4460
|
+
class HCI_LE_Read_Filter_Accept_List_Size_ReturnParameters(HCI_StatusReturnParameters):
|
|
4461
|
+
filter_accept_list_size: int = field(metadata=metadata(1))
|
|
4462
|
+
|
|
4463
|
+
|
|
4464
|
+
@HCI_SyncCommand.sync_command(HCI_LE_Read_Filter_Accept_List_Size_ReturnParameters)
|
|
4465
|
+
@dataclasses.dataclass
|
|
4466
|
+
class HCI_LE_Read_Filter_Accept_List_Size_Command(
|
|
4467
|
+
HCI_SyncCommand[HCI_LE_Read_Filter_Accept_List_Size_ReturnParameters]
|
|
4468
|
+
):
|
|
4162
4469
|
'''
|
|
4163
4470
|
See Bluetooth spec @ 7.8.14 LE Read Filter Accept List Size Command
|
|
4164
4471
|
'''
|
|
4165
4472
|
|
|
4166
|
-
return_parameters_fields = [
|
|
4167
|
-
('status', STATUS_SPEC),
|
|
4168
|
-
('filter_accept_list_size', 1),
|
|
4169
|
-
]
|
|
4170
|
-
|
|
4171
4473
|
|
|
4172
4474
|
# -----------------------------------------------------------------------------
|
|
4173
|
-
@
|
|
4475
|
+
@HCI_SyncCommand.sync_command(HCI_StatusReturnParameters)
|
|
4174
4476
|
@dataclasses.dataclass
|
|
4175
|
-
class HCI_LE_Clear_Filter_Accept_List_Command(
|
|
4477
|
+
class HCI_LE_Clear_Filter_Accept_List_Command(
|
|
4478
|
+
HCI_SyncCommand[HCI_StatusReturnParameters]
|
|
4479
|
+
):
|
|
4176
4480
|
'''
|
|
4177
4481
|
See Bluetooth spec @ 7.8.15 LE Clear Filter Accept List Command
|
|
4178
4482
|
'''
|
|
4179
4483
|
|
|
4180
4484
|
|
|
4181
4485
|
# -----------------------------------------------------------------------------
|
|
4182
|
-
@
|
|
4486
|
+
@HCI_SyncCommand.sync_command(HCI_StatusReturnParameters)
|
|
4183
4487
|
@dataclasses.dataclass
|
|
4184
|
-
class HCI_LE_Add_Device_To_Filter_Accept_List_Command(
|
|
4488
|
+
class HCI_LE_Add_Device_To_Filter_Accept_List_Command(
|
|
4489
|
+
HCI_SyncCommand[HCI_StatusReturnParameters]
|
|
4490
|
+
):
|
|
4185
4491
|
'''
|
|
4186
4492
|
See Bluetooth spec @ 7.8.16 LE Add Device To Filter Accept List Command
|
|
4187
4493
|
'''
|
|
@@ -4191,9 +4497,11 @@ class HCI_LE_Add_Device_To_Filter_Accept_List_Command(HCI_Command):
|
|
|
4191
4497
|
|
|
4192
4498
|
|
|
4193
4499
|
# -----------------------------------------------------------------------------
|
|
4194
|
-
@
|
|
4500
|
+
@HCI_SyncCommand.sync_command(HCI_StatusReturnParameters)
|
|
4195
4501
|
@dataclasses.dataclass
|
|
4196
|
-
class HCI_LE_Remove_Device_From_Filter_Accept_List_Command(
|
|
4502
|
+
class HCI_LE_Remove_Device_From_Filter_Accept_List_Command(
|
|
4503
|
+
HCI_SyncCommand[HCI_StatusReturnParameters]
|
|
4504
|
+
):
|
|
4197
4505
|
'''
|
|
4198
4506
|
See Bluetooth spec @ 7.8.17 LE Remove Device From Filter Accept List Command
|
|
4199
4507
|
'''
|
|
@@ -4205,7 +4513,7 @@ class HCI_LE_Remove_Device_From_Filter_Accept_List_Command(HCI_Command):
|
|
|
4205
4513
|
# -----------------------------------------------------------------------------
|
|
4206
4514
|
@HCI_Command.command
|
|
4207
4515
|
@dataclasses.dataclass
|
|
4208
|
-
class HCI_LE_Connection_Update_Command(
|
|
4516
|
+
class HCI_LE_Connection_Update_Command(HCI_AsyncCommand):
|
|
4209
4517
|
'''
|
|
4210
4518
|
See Bluetooth spec @ 7.8.18 LE Connection Update Command
|
|
4211
4519
|
'''
|
|
@@ -4222,7 +4530,7 @@ class HCI_LE_Connection_Update_Command(HCI_Command):
|
|
|
4222
4530
|
# -----------------------------------------------------------------------------
|
|
4223
4531
|
@HCI_Command.command
|
|
4224
4532
|
@dataclasses.dataclass
|
|
4225
|
-
class HCI_LE_Read_Remote_Features_Command(
|
|
4533
|
+
class HCI_LE_Read_Remote_Features_Command(HCI_AsyncCommand):
|
|
4226
4534
|
'''
|
|
4227
4535
|
See Bluetooth spec @ 7.8.21 LE Read Remote Features Command
|
|
4228
4536
|
'''
|
|
@@ -4231,20 +4539,23 @@ class HCI_LE_Read_Remote_Features_Command(HCI_Command):
|
|
|
4231
4539
|
|
|
4232
4540
|
|
|
4233
4541
|
# -----------------------------------------------------------------------------
|
|
4234
|
-
@HCI_Command.command
|
|
4235
4542
|
@dataclasses.dataclass
|
|
4236
|
-
class
|
|
4543
|
+
class HCI_LE_Rand_ReturnParameters(HCI_StatusReturnParameters):
|
|
4544
|
+
random_number: bytes = field(metadata=metadata(8))
|
|
4545
|
+
|
|
4546
|
+
|
|
4547
|
+
@HCI_SyncCommand.sync_command(HCI_LE_Rand_ReturnParameters)
|
|
4548
|
+
@dataclasses.dataclass
|
|
4549
|
+
class HCI_LE_Rand_Command(HCI_SyncCommand[HCI_LE_Rand_ReturnParameters]):
|
|
4237
4550
|
"""
|
|
4238
4551
|
See Bluetooth spec @ 7.8.23 LE Rand Command
|
|
4239
4552
|
"""
|
|
4240
4553
|
|
|
4241
|
-
return_parameters_fields = [("status", STATUS_SPEC), ("random_number", 8)]
|
|
4242
|
-
|
|
4243
4554
|
|
|
4244
4555
|
# -----------------------------------------------------------------------------
|
|
4245
4556
|
@HCI_Command.command
|
|
4246
4557
|
@dataclasses.dataclass
|
|
4247
|
-
class HCI_LE_Enable_Encryption_Command(
|
|
4558
|
+
class HCI_LE_Enable_Encryption_Command(HCI_AsyncCommand):
|
|
4248
4559
|
'''
|
|
4249
4560
|
See Bluetooth spec @ 7.8.24 LE Enable Encryption Command
|
|
4250
4561
|
(renamed from "LE Start Encryption Command" in version prior to 5.2 of the
|
|
@@ -4258,9 +4569,11 @@ class HCI_LE_Enable_Encryption_Command(HCI_Command):
|
|
|
4258
4569
|
|
|
4259
4570
|
|
|
4260
4571
|
# -----------------------------------------------------------------------------
|
|
4261
|
-
@
|
|
4572
|
+
@HCI_SyncCommand.sync_command(HCI_StatusAndConnectionHandleReturnParameters)
|
|
4262
4573
|
@dataclasses.dataclass
|
|
4263
|
-
class HCI_LE_Long_Term_Key_Request_Reply_Command(
|
|
4574
|
+
class HCI_LE_Long_Term_Key_Request_Reply_Command(
|
|
4575
|
+
HCI_SyncCommand[HCI_StatusAndConnectionHandleReturnParameters]
|
|
4576
|
+
):
|
|
4264
4577
|
'''
|
|
4265
4578
|
See Bluetooth spec @ 7.8.25 LE Long Term Key Request Reply Command
|
|
4266
4579
|
'''
|
|
@@ -4270,9 +4583,11 @@ class HCI_LE_Long_Term_Key_Request_Reply_Command(HCI_Command):
|
|
|
4270
4583
|
|
|
4271
4584
|
|
|
4272
4585
|
# -----------------------------------------------------------------------------
|
|
4273
|
-
@
|
|
4586
|
+
@HCI_SyncCommand.sync_command(HCI_StatusAndConnectionHandleReturnParameters)
|
|
4274
4587
|
@dataclasses.dataclass
|
|
4275
|
-
class HCI_LE_Long_Term_Key_Request_Negative_Reply_Command(
|
|
4588
|
+
class HCI_LE_Long_Term_Key_Request_Negative_Reply_Command(
|
|
4589
|
+
HCI_SyncCommand[HCI_StatusAndConnectionHandleReturnParameters]
|
|
4590
|
+
):
|
|
4276
4591
|
'''
|
|
4277
4592
|
See Bluetooth spec @ 7.8.26 LE Long Term Key Request Negative Reply Command
|
|
4278
4593
|
'''
|
|
@@ -4281,23 +4596,27 @@ class HCI_LE_Long_Term_Key_Request_Negative_Reply_Command(HCI_Command):
|
|
|
4281
4596
|
|
|
4282
4597
|
|
|
4283
4598
|
# -----------------------------------------------------------------------------
|
|
4284
|
-
@HCI_Command.command
|
|
4285
4599
|
@dataclasses.dataclass
|
|
4286
|
-
class
|
|
4600
|
+
class HCI_LE_Read_Supported_States_ReturnParameters(HCI_StatusReturnParameters):
|
|
4601
|
+
le_states: bytes = field(metadata=metadata(8))
|
|
4602
|
+
|
|
4603
|
+
|
|
4604
|
+
@HCI_SyncCommand.sync_command(HCI_LE_Read_Supported_States_ReturnParameters)
|
|
4605
|
+
@dataclasses.dataclass
|
|
4606
|
+
class HCI_LE_Read_Supported_States_Command(
|
|
4607
|
+
HCI_SyncCommand[HCI_LE_Read_Supported_States_ReturnParameters]
|
|
4608
|
+
):
|
|
4287
4609
|
'''
|
|
4288
4610
|
See Bluetooth spec @ 7.8.27 LE Read Supported States Command
|
|
4289
4611
|
'''
|
|
4290
4612
|
|
|
4291
|
-
return_parameters_fields = [
|
|
4292
|
-
('status', STATUS_SPEC),
|
|
4293
|
-
('le_states', 8),
|
|
4294
|
-
]
|
|
4295
|
-
|
|
4296
4613
|
|
|
4297
4614
|
# -----------------------------------------------------------------------------
|
|
4298
|
-
@
|
|
4615
|
+
@HCI_SyncCommand.sync_command(HCI_StatusAndConnectionHandleReturnParameters)
|
|
4299
4616
|
@dataclasses.dataclass
|
|
4300
|
-
class HCI_LE_Remote_Connection_Parameter_Request_Reply_Command(
|
|
4617
|
+
class HCI_LE_Remote_Connection_Parameter_Request_Reply_Command(
|
|
4618
|
+
HCI_SyncCommand[HCI_StatusAndConnectionHandleReturnParameters]
|
|
4619
|
+
):
|
|
4301
4620
|
'''
|
|
4302
4621
|
See Bluetooth spec @ 7.8.31 LE Remote Connection Parameter Request Reply Command
|
|
4303
4622
|
'''
|
|
@@ -4312,9 +4631,11 @@ class HCI_LE_Remote_Connection_Parameter_Request_Reply_Command(HCI_Command):
|
|
|
4312
4631
|
|
|
4313
4632
|
|
|
4314
4633
|
# -----------------------------------------------------------------------------
|
|
4315
|
-
@
|
|
4634
|
+
@HCI_SyncCommand.sync_command(HCI_StatusAndConnectionHandleReturnParameters)
|
|
4316
4635
|
@dataclasses.dataclass
|
|
4317
|
-
class HCI_LE_Remote_Connection_Parameter_Request_Negative_Reply_Command(
|
|
4636
|
+
class HCI_LE_Remote_Connection_Parameter_Request_Negative_Reply_Command(
|
|
4637
|
+
HCI_SyncCommand[HCI_StatusAndConnectionHandleReturnParameters]
|
|
4638
|
+
):
|
|
4318
4639
|
'''
|
|
4319
4640
|
See Bluetooth spec @ 7.8.32 LE Remote Connection Parameter Request Negative Reply
|
|
4320
4641
|
Command
|
|
@@ -4325,9 +4646,11 @@ class HCI_LE_Remote_Connection_Parameter_Request_Negative_Reply_Command(HCI_Comm
|
|
|
4325
4646
|
|
|
4326
4647
|
|
|
4327
4648
|
# -----------------------------------------------------------------------------
|
|
4328
|
-
@
|
|
4649
|
+
@HCI_SyncCommand.sync_command(HCI_StatusAndConnectionHandleReturnParameters)
|
|
4329
4650
|
@dataclasses.dataclass
|
|
4330
|
-
class HCI_LE_Set_Data_Length_Command(
|
|
4651
|
+
class HCI_LE_Set_Data_Length_Command(
|
|
4652
|
+
HCI_SyncCommand[HCI_StatusAndConnectionHandleReturnParameters]
|
|
4653
|
+
):
|
|
4331
4654
|
'''
|
|
4332
4655
|
See Bluetooth spec @ 7.8.33 LE Set Data Length Command
|
|
4333
4656
|
'''
|
|
@@ -4336,28 +4659,34 @@ class HCI_LE_Set_Data_Length_Command(HCI_Command):
|
|
|
4336
4659
|
tx_octets: int = field(metadata=metadata(2))
|
|
4337
4660
|
tx_time: int = field(metadata=metadata(2))
|
|
4338
4661
|
|
|
4339
|
-
return_parameters_fields = [('status', STATUS_SPEC), ('connection_handle', 2)]
|
|
4340
|
-
|
|
4341
4662
|
|
|
4342
4663
|
# -----------------------------------------------------------------------------
|
|
4343
|
-
@HCI_Command.command
|
|
4344
4664
|
@dataclasses.dataclass
|
|
4345
|
-
class
|
|
4665
|
+
class HCI_LE_Read_Suggested_Default_Data_Length_ReturnParameters(
|
|
4666
|
+
HCI_StatusReturnParameters
|
|
4667
|
+
):
|
|
4668
|
+
suggested_max_tx_octets: int = field(metadata=metadata(2))
|
|
4669
|
+
suggested_max_tx_time: int = field(metadata=metadata(2))
|
|
4670
|
+
|
|
4671
|
+
|
|
4672
|
+
@HCI_SyncCommand.sync_command(
|
|
4673
|
+
HCI_LE_Read_Suggested_Default_Data_Length_ReturnParameters
|
|
4674
|
+
)
|
|
4675
|
+
@dataclasses.dataclass
|
|
4676
|
+
class HCI_LE_Read_Suggested_Default_Data_Length_Command(
|
|
4677
|
+
HCI_SyncCommand[HCI_LE_Read_Suggested_Default_Data_Length_ReturnParameters]
|
|
4678
|
+
):
|
|
4346
4679
|
'''
|
|
4347
4680
|
See Bluetooth spec @ 7.8.34 LE Read Suggested Default Data Length Command
|
|
4348
4681
|
'''
|
|
4349
4682
|
|
|
4350
|
-
return_parameters_fields = [
|
|
4351
|
-
('status', STATUS_SPEC),
|
|
4352
|
-
('suggested_max_tx_octets', 2),
|
|
4353
|
-
('suggested_max_tx_time', 2),
|
|
4354
|
-
]
|
|
4355
|
-
|
|
4356
4683
|
|
|
4357
4684
|
# -----------------------------------------------------------------------------
|
|
4358
|
-
@
|
|
4685
|
+
@HCI_SyncCommand.sync_command(HCI_StatusReturnParameters)
|
|
4359
4686
|
@dataclasses.dataclass
|
|
4360
|
-
class HCI_LE_Write_Suggested_Default_Data_Length_Command(
|
|
4687
|
+
class HCI_LE_Write_Suggested_Default_Data_Length_Command(
|
|
4688
|
+
HCI_SyncCommand[HCI_StatusReturnParameters]
|
|
4689
|
+
):
|
|
4361
4690
|
'''
|
|
4362
4691
|
See Bluetooth spec @ 7.8.35 LE Write Suggested Default Data Length Command
|
|
4363
4692
|
'''
|
|
@@ -4369,16 +4698,18 @@ class HCI_LE_Write_Suggested_Default_Data_Length_Command(HCI_Command):
|
|
|
4369
4698
|
# -----------------------------------------------------------------------------
|
|
4370
4699
|
@HCI_Command.command
|
|
4371
4700
|
@dataclasses.dataclass
|
|
4372
|
-
class HCI_LE_Read_Local_P_256_Public_Key_Command(
|
|
4701
|
+
class HCI_LE_Read_Local_P_256_Public_Key_Command(HCI_AsyncCommand):
|
|
4373
4702
|
'''
|
|
4374
|
-
See Bluetooth spec @ 7.8.36 LE
|
|
4703
|
+
See Bluetooth spec @ 7.8.36 LE Read Local P-256 Public Key command
|
|
4375
4704
|
'''
|
|
4376
4705
|
|
|
4377
4706
|
|
|
4378
4707
|
# -----------------------------------------------------------------------------
|
|
4379
|
-
@
|
|
4708
|
+
@HCI_SyncCommand.sync_command(HCI_StatusReturnParameters)
|
|
4380
4709
|
@dataclasses.dataclass
|
|
4381
|
-
class HCI_LE_Add_Device_To_Resolving_List_Command(
|
|
4710
|
+
class HCI_LE_Add_Device_To_Resolving_List_Command(
|
|
4711
|
+
HCI_SyncCommand[HCI_StatusReturnParameters]
|
|
4712
|
+
):
|
|
4382
4713
|
'''
|
|
4383
4714
|
See Bluetooth spec @ 7.8.38 LE Add Device To Resolving List Command
|
|
4384
4715
|
'''
|
|
@@ -4394,27 +4725,36 @@ class HCI_LE_Add_Device_To_Resolving_List_Command(HCI_Command):
|
|
|
4394
4725
|
|
|
4395
4726
|
|
|
4396
4727
|
# -----------------------------------------------------------------------------
|
|
4397
|
-
@
|
|
4728
|
+
@HCI_SyncCommand.sync_command(HCI_StatusReturnParameters)
|
|
4398
4729
|
@dataclasses.dataclass
|
|
4399
|
-
class HCI_LE_Clear_Resolving_List_Command(
|
|
4730
|
+
class HCI_LE_Clear_Resolving_List_Command(HCI_SyncCommand[HCI_StatusReturnParameters]):
|
|
4400
4731
|
'''
|
|
4401
4732
|
See Bluetooth spec @ 7.8.40 LE Clear Resolving List Command
|
|
4402
4733
|
'''
|
|
4403
4734
|
|
|
4404
4735
|
|
|
4405
4736
|
# -----------------------------------------------------------------------------
|
|
4406
|
-
@HCI_Command.command
|
|
4407
4737
|
@dataclasses.dataclass
|
|
4408
|
-
class
|
|
4738
|
+
class HCI_LE_Read_Resolving_List_Size_ReturnParameters(HCI_StatusReturnParameters):
|
|
4739
|
+
resolving_list_size: bytes = field(metadata=metadata(1))
|
|
4740
|
+
|
|
4741
|
+
|
|
4742
|
+
@HCI_SyncCommand.sync_command(HCI_LE_Read_Resolving_List_Size_ReturnParameters)
|
|
4743
|
+
@dataclasses.dataclass
|
|
4744
|
+
class HCI_LE_Read_Resolving_List_Size_Command(
|
|
4745
|
+
HCI_SyncCommand[HCI_LE_Read_Resolving_List_Size_ReturnParameters]
|
|
4746
|
+
):
|
|
4409
4747
|
'''
|
|
4410
4748
|
See Bluetooth spec @ 7.8.41 LE Read Resolving List Size command
|
|
4411
4749
|
'''
|
|
4412
4750
|
|
|
4413
4751
|
|
|
4414
4752
|
# -----------------------------------------------------------------------------
|
|
4415
|
-
@
|
|
4753
|
+
@HCI_SyncCommand.sync_command(HCI_StatusReturnParameters)
|
|
4416
4754
|
@dataclasses.dataclass
|
|
4417
|
-
class HCI_LE_Set_Address_Resolution_Enable_Command(
|
|
4755
|
+
class HCI_LE_Set_Address_Resolution_Enable_Command(
|
|
4756
|
+
HCI_SyncCommand[HCI_StatusReturnParameters]
|
|
4757
|
+
):
|
|
4418
4758
|
'''
|
|
4419
4759
|
See Bluetooth spec @ 7.8.44 LE Set Address Resolution Enable Command
|
|
4420
4760
|
'''
|
|
@@ -4423,9 +4763,11 @@ class HCI_LE_Set_Address_Resolution_Enable_Command(HCI_Command):
|
|
|
4423
4763
|
|
|
4424
4764
|
|
|
4425
4765
|
# -----------------------------------------------------------------------------
|
|
4426
|
-
@
|
|
4766
|
+
@HCI_SyncCommand.sync_command(HCI_StatusReturnParameters)
|
|
4427
4767
|
@dataclasses.dataclass
|
|
4428
|
-
class HCI_LE_Set_Resolvable_Private_Address_Timeout_Command(
|
|
4768
|
+
class HCI_LE_Set_Resolvable_Private_Address_Timeout_Command(
|
|
4769
|
+
HCI_SyncCommand[HCI_StatusReturnParameters]
|
|
4770
|
+
):
|
|
4429
4771
|
'''
|
|
4430
4772
|
See Bluetooth spec @ 7.8.45 LE Set Resolvable Private Address Timeout Command
|
|
4431
4773
|
'''
|
|
@@ -4434,44 +4776,45 @@ class HCI_LE_Set_Resolvable_Private_Address_Timeout_Command(HCI_Command):
|
|
|
4434
4776
|
|
|
4435
4777
|
|
|
4436
4778
|
# -----------------------------------------------------------------------------
|
|
4437
|
-
@HCI_Command.command
|
|
4438
4779
|
@dataclasses.dataclass
|
|
4439
|
-
class
|
|
4780
|
+
class HCI_LE_Read_Maximum_Data_Length_ReturnParameters(HCI_StatusReturnParameters):
|
|
4781
|
+
supported_max_tx_octets: int = field(metadata=metadata(2))
|
|
4782
|
+
supported_max_tx_time: int = field(metadata=metadata(2))
|
|
4783
|
+
supported_max_rx_octets: int = field(metadata=metadata(2))
|
|
4784
|
+
supported_max_rx_time: int = field(metadata=metadata(2))
|
|
4785
|
+
|
|
4786
|
+
|
|
4787
|
+
@HCI_SyncCommand.sync_command(HCI_LE_Read_Maximum_Data_Length_ReturnParameters)
|
|
4788
|
+
@dataclasses.dataclass
|
|
4789
|
+
class HCI_LE_Read_Maximum_Data_Length_Command(
|
|
4790
|
+
HCI_SyncCommand[HCI_LE_Read_Maximum_Data_Length_ReturnParameters]
|
|
4791
|
+
):
|
|
4440
4792
|
'''
|
|
4441
4793
|
See Bluetooth spec @ 7.8.46 LE Read Maximum Data Length Command
|
|
4442
4794
|
'''
|
|
4443
4795
|
|
|
4444
|
-
return_parameters_fields = [
|
|
4445
|
-
('status', STATUS_SPEC),
|
|
4446
|
-
('supported_max_tx_octets', 2),
|
|
4447
|
-
('supported_max_tx_time', 2),
|
|
4448
|
-
('supported_max_rx_octets', 2),
|
|
4449
|
-
('supported_max_rx_time', 2),
|
|
4450
|
-
]
|
|
4451
|
-
|
|
4452
4796
|
|
|
4453
4797
|
# -----------------------------------------------------------------------------
|
|
4454
|
-
@HCI_Command.command
|
|
4455
4798
|
@dataclasses.dataclass
|
|
4456
|
-
class
|
|
4799
|
+
class HCI_LE_Read_PHY_ReturnParameters(HCI_StatusAndConnectionHandleReturnParameters):
|
|
4800
|
+
tx_phy: Phy = field(metadata=Phy.type_metadata(1))
|
|
4801
|
+
rx_phy: Phy = field(metadata=Phy.type_metadata(1))
|
|
4802
|
+
|
|
4803
|
+
|
|
4804
|
+
@HCI_SyncCommand.sync_command(HCI_LE_Read_PHY_ReturnParameters)
|
|
4805
|
+
@dataclasses.dataclass
|
|
4806
|
+
class HCI_LE_Read_PHY_Command(HCI_SyncCommand[HCI_LE_Read_PHY_ReturnParameters]):
|
|
4457
4807
|
'''
|
|
4458
4808
|
See Bluetooth spec @ 7.8.47 LE Read PHY Command
|
|
4459
4809
|
'''
|
|
4460
4810
|
|
|
4461
4811
|
connection_handle: int = field(metadata=metadata(2))
|
|
4462
4812
|
|
|
4463
|
-
return_parameters_fields = [
|
|
4464
|
-
('status', STATUS_SPEC),
|
|
4465
|
-
('connection_handle', 2),
|
|
4466
|
-
('tx_phy', Phy.type_spec(1)),
|
|
4467
|
-
('rx_phy', Phy.type_spec(1)),
|
|
4468
|
-
]
|
|
4469
|
-
|
|
4470
4813
|
|
|
4471
4814
|
# -----------------------------------------------------------------------------
|
|
4472
|
-
@
|
|
4815
|
+
@HCI_SyncCommand.sync_command(HCI_StatusReturnParameters)
|
|
4473
4816
|
@dataclasses.dataclass
|
|
4474
|
-
class HCI_LE_Set_Default_PHY_Command(
|
|
4817
|
+
class HCI_LE_Set_Default_PHY_Command(HCI_SyncCommand[HCI_StatusReturnParameters]):
|
|
4475
4818
|
'''
|
|
4476
4819
|
See Bluetooth spec @ 7.8.48 LE Set Default PHY Command
|
|
4477
4820
|
'''
|
|
@@ -4488,7 +4831,7 @@ class HCI_LE_Set_Default_PHY_Command(HCI_Command):
|
|
|
4488
4831
|
# -----------------------------------------------------------------------------
|
|
4489
4832
|
@HCI_Command.command
|
|
4490
4833
|
@dataclasses.dataclass
|
|
4491
|
-
class HCI_LE_Set_PHY_Command(
|
|
4834
|
+
class HCI_LE_Set_PHY_Command(HCI_AsyncCommand):
|
|
4492
4835
|
'''
|
|
4493
4836
|
See Bluetooth spec @ 7.8.49 LE Set PHY Command
|
|
4494
4837
|
'''
|
|
@@ -4503,9 +4846,11 @@ class HCI_LE_Set_PHY_Command(HCI_Command):
|
|
|
4503
4846
|
|
|
4504
4847
|
|
|
4505
4848
|
# -----------------------------------------------------------------------------
|
|
4506
|
-
@
|
|
4849
|
+
@HCI_SyncCommand.sync_command(HCI_StatusReturnParameters)
|
|
4507
4850
|
@dataclasses.dataclass
|
|
4508
|
-
class HCI_LE_Set_Advertising_Set_Random_Address_Command(
|
|
4851
|
+
class HCI_LE_Set_Advertising_Set_Random_Address_Command(
|
|
4852
|
+
HCI_SyncCommand[HCI_StatusReturnParameters]
|
|
4853
|
+
):
|
|
4509
4854
|
'''
|
|
4510
4855
|
See Bluetooth spec @ 7.8.52 LE Set Advertising Set Random Address Command
|
|
4511
4856
|
'''
|
|
@@ -4521,15 +4866,24 @@ class HCI_LE_Set_Advertising_Set_Random_Address_Command(HCI_Command):
|
|
|
4521
4866
|
|
|
4522
4867
|
|
|
4523
4868
|
# -----------------------------------------------------------------------------
|
|
4524
|
-
@HCI_Command.command
|
|
4525
4869
|
@dataclasses.dataclass
|
|
4526
|
-
class
|
|
4870
|
+
class HCI_LE_Set_Extended_Advertising_Parameters_ReturnParameters(
|
|
4871
|
+
HCI_StatusReturnParameters
|
|
4872
|
+
):
|
|
4873
|
+
selected_tx_power: int = field(metadata=metadata(-1))
|
|
4874
|
+
|
|
4875
|
+
|
|
4876
|
+
@HCI_SyncCommand.sync_command(
|
|
4877
|
+
HCI_LE_Set_Extended_Advertising_Parameters_ReturnParameters
|
|
4878
|
+
)
|
|
4879
|
+
@dataclasses.dataclass
|
|
4880
|
+
class HCI_LE_Set_Extended_Advertising_Parameters_Command(
|
|
4881
|
+
HCI_SyncCommand[HCI_LE_Set_Extended_Advertising_Parameters_ReturnParameters]
|
|
4882
|
+
):
|
|
4527
4883
|
'''
|
|
4528
4884
|
See Bluetooth spec @ 7.8.53 LE Set Extended Advertising Parameters Command
|
|
4529
4885
|
'''
|
|
4530
4886
|
|
|
4531
|
-
return_parameters_fields = [('status', STATUS_SPEC), ('selected_tx_power', 1)]
|
|
4532
|
-
|
|
4533
4887
|
TX_POWER_NO_PREFERENCE = 0x7F
|
|
4534
4888
|
SHOULD_NOT_FRAGMENT = 0x01
|
|
4535
4889
|
|
|
@@ -4583,9 +4937,11 @@ class HCI_LE_Set_Extended_Advertising_Parameters_Command(HCI_Command):
|
|
|
4583
4937
|
|
|
4584
4938
|
|
|
4585
4939
|
# -----------------------------------------------------------------------------
|
|
4586
|
-
@
|
|
4940
|
+
@HCI_SyncCommand.sync_command(HCI_StatusReturnParameters)
|
|
4587
4941
|
@dataclasses.dataclass
|
|
4588
|
-
class HCI_LE_Set_Extended_Advertising_Data_Command(
|
|
4942
|
+
class HCI_LE_Set_Extended_Advertising_Data_Command(
|
|
4943
|
+
HCI_SyncCommand[HCI_StatusReturnParameters]
|
|
4944
|
+
):
|
|
4589
4945
|
'''
|
|
4590
4946
|
See Bluetooth spec @ 7.8.54 LE Set Extended Advertising Data Command
|
|
4591
4947
|
'''
|
|
@@ -4604,9 +4960,11 @@ class HCI_LE_Set_Extended_Advertising_Data_Command(HCI_Command):
|
|
|
4604
4960
|
|
|
4605
4961
|
|
|
4606
4962
|
# -----------------------------------------------------------------------------
|
|
4607
|
-
@
|
|
4963
|
+
@HCI_SyncCommand.sync_command(HCI_StatusReturnParameters)
|
|
4608
4964
|
@dataclasses.dataclass
|
|
4609
|
-
class HCI_LE_Set_Extended_Scan_Response_Data_Command(
|
|
4965
|
+
class HCI_LE_Set_Extended_Scan_Response_Data_Command(
|
|
4966
|
+
HCI_SyncCommand[HCI_StatusReturnParameters]
|
|
4967
|
+
):
|
|
4610
4968
|
'''
|
|
4611
4969
|
See Bluetooth spec @ 7.8.55 LE Set Extended Scan Response Data Command
|
|
4612
4970
|
'''
|
|
@@ -4620,9 +4978,11 @@ class HCI_LE_Set_Extended_Scan_Response_Data_Command(HCI_Command):
|
|
|
4620
4978
|
|
|
4621
4979
|
|
|
4622
4980
|
# -----------------------------------------------------------------------------
|
|
4623
|
-
@
|
|
4981
|
+
@HCI_SyncCommand.sync_command(HCI_StatusReturnParameters)
|
|
4624
4982
|
@dataclasses.dataclass
|
|
4625
|
-
class HCI_LE_Set_Extended_Advertising_Enable_Command(
|
|
4983
|
+
class HCI_LE_Set_Extended_Advertising_Enable_Command(
|
|
4984
|
+
HCI_SyncCommand[HCI_StatusReturnParameters]
|
|
4985
|
+
):
|
|
4626
4986
|
'''
|
|
4627
4987
|
See Bluetooth spec @ 7.8.56 LE Set Extended Advertising Enable Command
|
|
4628
4988
|
'''
|
|
@@ -4636,37 +4996,51 @@ class HCI_LE_Set_Extended_Advertising_Enable_Command(HCI_Command):
|
|
|
4636
4996
|
|
|
4637
4997
|
|
|
4638
4998
|
# -----------------------------------------------------------------------------
|
|
4639
|
-
@HCI_Command.command
|
|
4640
4999
|
@dataclasses.dataclass
|
|
4641
|
-
class
|
|
5000
|
+
class HCI_LE_Read_Maximum_Advertising_Data_Length_ReturnParameters(
|
|
5001
|
+
HCI_StatusReturnParameters
|
|
5002
|
+
):
|
|
5003
|
+
max_advertising_data_length: int = field(metadata=metadata(2))
|
|
5004
|
+
|
|
5005
|
+
|
|
5006
|
+
@HCI_SyncCommand.sync_command(
|
|
5007
|
+
HCI_LE_Read_Maximum_Advertising_Data_Length_ReturnParameters
|
|
5008
|
+
)
|
|
5009
|
+
@dataclasses.dataclass
|
|
5010
|
+
class HCI_LE_Read_Maximum_Advertising_Data_Length_Command(
|
|
5011
|
+
HCI_SyncCommand[HCI_LE_Read_Maximum_Advertising_Data_Length_ReturnParameters]
|
|
5012
|
+
):
|
|
4642
5013
|
'''
|
|
4643
5014
|
See Bluetooth spec @ 7.8.57 LE Read Maximum Advertising Data Length Command
|
|
4644
5015
|
'''
|
|
4645
5016
|
|
|
4646
|
-
return_parameters_fields = [
|
|
4647
|
-
('status', STATUS_SPEC),
|
|
4648
|
-
('max_advertising_data_length', 2),
|
|
4649
|
-
]
|
|
4650
|
-
|
|
4651
5017
|
|
|
4652
5018
|
# -----------------------------------------------------------------------------
|
|
4653
|
-
@HCI_Command.command
|
|
4654
5019
|
@dataclasses.dataclass
|
|
4655
|
-
class
|
|
5020
|
+
class HCI_LE_Read_Number_Of_Supported_Advertising_Sets_ReturnParameters(
|
|
5021
|
+
HCI_StatusReturnParameters
|
|
5022
|
+
):
|
|
5023
|
+
num_supported_advertising_sets: int = field(metadata=metadata(1))
|
|
5024
|
+
|
|
5025
|
+
|
|
5026
|
+
@HCI_SyncCommand.sync_command(
|
|
5027
|
+
HCI_LE_Read_Number_Of_Supported_Advertising_Sets_ReturnParameters
|
|
5028
|
+
)
|
|
5029
|
+
@dataclasses.dataclass
|
|
5030
|
+
class HCI_LE_Read_Number_Of_Supported_Advertising_Sets_Command(
|
|
5031
|
+
HCI_SyncCommand[HCI_LE_Read_Number_Of_Supported_Advertising_Sets_ReturnParameters]
|
|
5032
|
+
):
|
|
4656
5033
|
'''
|
|
4657
5034
|
See Bluetooth spec @ 7.8.58 LE Read Number of Supported Advertising Sets Command
|
|
4658
5035
|
'''
|
|
4659
5036
|
|
|
4660
|
-
return_parameters_fields = [
|
|
4661
|
-
('status', STATUS_SPEC),
|
|
4662
|
-
('num_supported_advertising_sets', 1),
|
|
4663
|
-
]
|
|
4664
|
-
|
|
4665
5037
|
|
|
4666
5038
|
# -----------------------------------------------------------------------------
|
|
4667
|
-
@
|
|
5039
|
+
@HCI_SyncCommand.sync_command(HCI_StatusReturnParameters)
|
|
4668
5040
|
@dataclasses.dataclass
|
|
4669
|
-
class HCI_LE_Remove_Advertising_Set_Command(
|
|
5041
|
+
class HCI_LE_Remove_Advertising_Set_Command(
|
|
5042
|
+
HCI_SyncCommand[HCI_StatusReturnParameters]
|
|
5043
|
+
):
|
|
4670
5044
|
'''
|
|
4671
5045
|
See Bluetooth spec @ 7.8.59 LE Remove Advertising Set Command
|
|
4672
5046
|
'''
|
|
@@ -4675,18 +5049,22 @@ class HCI_LE_Remove_Advertising_Set_Command(HCI_Command):
|
|
|
4675
5049
|
|
|
4676
5050
|
|
|
4677
5051
|
# -----------------------------------------------------------------------------
|
|
4678
|
-
@
|
|
5052
|
+
@HCI_SyncCommand.sync_command(HCI_StatusReturnParameters)
|
|
4679
5053
|
@dataclasses.dataclass
|
|
4680
|
-
class HCI_LE_Clear_Advertising_Sets_Command(
|
|
5054
|
+
class HCI_LE_Clear_Advertising_Sets_Command(
|
|
5055
|
+
HCI_SyncCommand[HCI_StatusReturnParameters]
|
|
5056
|
+
):
|
|
4681
5057
|
'''
|
|
4682
5058
|
See Bluetooth spec @ 7.8.60 LE Clear Advertising Sets Command
|
|
4683
5059
|
'''
|
|
4684
5060
|
|
|
4685
5061
|
|
|
4686
5062
|
# -----------------------------------------------------------------------------
|
|
4687
|
-
@
|
|
5063
|
+
@HCI_SyncCommand.sync_command(HCI_StatusReturnParameters)
|
|
4688
5064
|
@dataclasses.dataclass
|
|
4689
|
-
class HCI_LE_Set_Periodic_Advertising_Parameters_Command(
|
|
5065
|
+
class HCI_LE_Set_Periodic_Advertising_Parameters_Command(
|
|
5066
|
+
HCI_SyncCommand[HCI_StatusReturnParameters]
|
|
5067
|
+
):
|
|
4690
5068
|
'''
|
|
4691
5069
|
See Bluetooth spec @ 7.8.61 LE Set Periodic Advertising Parameters command
|
|
4692
5070
|
'''
|
|
@@ -4701,9 +5079,11 @@ class HCI_LE_Set_Periodic_Advertising_Parameters_Command(HCI_Command):
|
|
|
4701
5079
|
|
|
4702
5080
|
|
|
4703
5081
|
# -----------------------------------------------------------------------------
|
|
4704
|
-
@
|
|
5082
|
+
@HCI_SyncCommand.sync_command(HCI_StatusReturnParameters)
|
|
4705
5083
|
@dataclasses.dataclass
|
|
4706
|
-
class HCI_LE_Set_Periodic_Advertising_Data_Command(
|
|
5084
|
+
class HCI_LE_Set_Periodic_Advertising_Data_Command(
|
|
5085
|
+
HCI_SyncCommand[HCI_StatusReturnParameters]
|
|
5086
|
+
):
|
|
4707
5087
|
'''
|
|
4708
5088
|
See Bluetooth spec @ 7.8.62 LE Set Periodic Advertising Data command
|
|
4709
5089
|
'''
|
|
@@ -4716,9 +5096,11 @@ class HCI_LE_Set_Periodic_Advertising_Data_Command(HCI_Command):
|
|
|
4716
5096
|
|
|
4717
5097
|
|
|
4718
5098
|
# -----------------------------------------------------------------------------
|
|
4719
|
-
@
|
|
5099
|
+
@HCI_SyncCommand.sync_command(HCI_StatusReturnParameters)
|
|
4720
5100
|
@dataclasses.dataclass
|
|
4721
|
-
class HCI_LE_Set_Periodic_Advertising_Enable_Command(
|
|
5101
|
+
class HCI_LE_Set_Periodic_Advertising_Enable_Command(
|
|
5102
|
+
HCI_SyncCommand[HCI_StatusReturnParameters]
|
|
5103
|
+
):
|
|
4722
5104
|
'''
|
|
4723
5105
|
See Bluetooth spec @ 7.8.63 LE Set Periodic Advertising Enable Command
|
|
4724
5106
|
'''
|
|
@@ -4728,8 +5110,10 @@ class HCI_LE_Set_Periodic_Advertising_Enable_Command(HCI_Command):
|
|
|
4728
5110
|
|
|
4729
5111
|
|
|
4730
5112
|
# -----------------------------------------------------------------------------
|
|
4731
|
-
@
|
|
4732
|
-
class HCI_LE_Set_Extended_Scan_Parameters_Command(
|
|
5113
|
+
@HCI_SyncCommand.sync_command(HCI_StatusReturnParameters)
|
|
5114
|
+
class HCI_LE_Set_Extended_Scan_Parameters_Command(
|
|
5115
|
+
HCI_SyncCommand[HCI_StatusReturnParameters]
|
|
5116
|
+
):
|
|
4733
5117
|
'''
|
|
4734
5118
|
See Bluetooth spec @ 7.8.64 LE Set Extended Scan Parameters Command
|
|
4735
5119
|
'''
|
|
@@ -4839,9 +5223,11 @@ class HCI_LE_Set_Extended_Scan_Parameters_Command(HCI_Command):
|
|
|
4839
5223
|
|
|
4840
5224
|
|
|
4841
5225
|
# -----------------------------------------------------------------------------
|
|
4842
|
-
@
|
|
5226
|
+
@HCI_SyncCommand.sync_command(HCI_StatusReturnParameters)
|
|
4843
5227
|
@dataclasses.dataclass
|
|
4844
|
-
class HCI_LE_Set_Extended_Scan_Enable_Command(
|
|
5228
|
+
class HCI_LE_Set_Extended_Scan_Enable_Command(
|
|
5229
|
+
HCI_SyncCommand[HCI_StatusReturnParameters]
|
|
5230
|
+
):
|
|
4845
5231
|
'''
|
|
4846
5232
|
See Bluetooth spec @ 7.8.65 LE Set Extended Scan Enable Command
|
|
4847
5233
|
'''
|
|
@@ -4854,7 +5240,7 @@ class HCI_LE_Set_Extended_Scan_Enable_Command(HCI_Command):
|
|
|
4854
5240
|
|
|
4855
5241
|
# -----------------------------------------------------------------------------
|
|
4856
5242
|
@HCI_Command.command
|
|
4857
|
-
class HCI_LE_Extended_Create_Connection_Command(
|
|
5243
|
+
class HCI_LE_Extended_Create_Connection_Command(HCI_AsyncCommand):
|
|
4858
5244
|
'''
|
|
4859
5245
|
See Bluetooth spec @ 7.8.66 LE Extended Create Connection Command
|
|
4860
5246
|
'''
|
|
@@ -5026,7 +5412,7 @@ class HCI_LE_Extended_Create_Connection_Command(HCI_Command):
|
|
|
5026
5412
|
# -----------------------------------------------------------------------------
|
|
5027
5413
|
@HCI_Command.command
|
|
5028
5414
|
@dataclasses.dataclass
|
|
5029
|
-
class HCI_LE_Periodic_Advertising_Create_Sync_Command(
|
|
5415
|
+
class HCI_LE_Periodic_Advertising_Create_Sync_Command(HCI_AsyncCommand):
|
|
5030
5416
|
'''
|
|
5031
5417
|
See Bluetooth spec @ 7.8.67 LE Periodic Advertising Create Sync command
|
|
5032
5418
|
'''
|
|
@@ -5055,18 +5441,22 @@ class HCI_LE_Periodic_Advertising_Create_Sync_Command(HCI_Command):
|
|
|
5055
5441
|
|
|
5056
5442
|
|
|
5057
5443
|
# -----------------------------------------------------------------------------
|
|
5058
|
-
@
|
|
5444
|
+
@HCI_SyncCommand.sync_command(HCI_StatusReturnParameters)
|
|
5059
5445
|
@dataclasses.dataclass
|
|
5060
|
-
class HCI_LE_Periodic_Advertising_Create_Sync_Cancel_Command(
|
|
5446
|
+
class HCI_LE_Periodic_Advertising_Create_Sync_Cancel_Command(
|
|
5447
|
+
HCI_SyncCommand[HCI_StatusReturnParameters]
|
|
5448
|
+
):
|
|
5061
5449
|
'''
|
|
5062
5450
|
See Bluetooth spec @ 7.8.68 LE Periodic Advertising Create Sync Cancel Command
|
|
5063
5451
|
'''
|
|
5064
5452
|
|
|
5065
5453
|
|
|
5066
5454
|
# -----------------------------------------------------------------------------
|
|
5067
|
-
@
|
|
5455
|
+
@HCI_SyncCommand.sync_command(HCI_StatusReturnParameters)
|
|
5068
5456
|
@dataclasses.dataclass
|
|
5069
|
-
class HCI_LE_Periodic_Advertising_Terminate_Sync_Command(
|
|
5457
|
+
class HCI_LE_Periodic_Advertising_Terminate_Sync_Command(
|
|
5458
|
+
HCI_SyncCommand[HCI_StatusReturnParameters]
|
|
5459
|
+
):
|
|
5070
5460
|
'''
|
|
5071
5461
|
See Bluetooth spec @ 7.8.69 LE Periodic Advertising Terminate Sync Command
|
|
5072
5462
|
'''
|
|
@@ -5075,18 +5465,26 @@ class HCI_LE_Periodic_Advertising_Terminate_Sync_Command(HCI_Command):
|
|
|
5075
5465
|
|
|
5076
5466
|
|
|
5077
5467
|
# -----------------------------------------------------------------------------
|
|
5078
|
-
@HCI_Command.command
|
|
5079
5468
|
@dataclasses.dataclass
|
|
5080
|
-
class
|
|
5469
|
+
class HCI_LE_Read_Transmit_Power_ReturnParameters(HCI_StatusReturnParameters):
|
|
5470
|
+
min_tx_power: int = field(metadata=metadata(1))
|
|
5471
|
+
max_tx_power: int = field(metadata=metadata(1))
|
|
5472
|
+
|
|
5473
|
+
|
|
5474
|
+
@HCI_SyncCommand.sync_command(HCI_LE_Read_Transmit_Power_ReturnParameters)
|
|
5475
|
+
@dataclasses.dataclass
|
|
5476
|
+
class HCI_LE_Read_Transmit_Power_Command(
|
|
5477
|
+
HCI_SyncCommand[HCI_LE_Read_Transmit_Power_ReturnParameters]
|
|
5478
|
+
):
|
|
5081
5479
|
'''
|
|
5082
5480
|
See Bluetooth spec @ 7.8.74 LE Read Transmit Power command
|
|
5083
5481
|
'''
|
|
5084
5482
|
|
|
5085
5483
|
|
|
5086
5484
|
# -----------------------------------------------------------------------------
|
|
5087
|
-
@
|
|
5485
|
+
@HCI_SyncCommand.sync_command(HCI_StatusReturnParameters)
|
|
5088
5486
|
@dataclasses.dataclass
|
|
5089
|
-
class HCI_LE_Set_Privacy_Mode_Command(
|
|
5487
|
+
class HCI_LE_Set_Privacy_Mode_Command(HCI_SyncCommand[HCI_StatusReturnParameters]):
|
|
5090
5488
|
'''
|
|
5091
5489
|
See Bluetooth spec @ 7.8.77 LE Set Privacy Mode Command
|
|
5092
5490
|
'''
|
|
@@ -5105,9 +5503,11 @@ class HCI_LE_Set_Privacy_Mode_Command(HCI_Command):
|
|
|
5105
5503
|
|
|
5106
5504
|
|
|
5107
5505
|
# -----------------------------------------------------------------------------
|
|
5108
|
-
@
|
|
5506
|
+
@HCI_SyncCommand.sync_command(HCI_StatusReturnParameters)
|
|
5109
5507
|
@dataclasses.dataclass
|
|
5110
|
-
class HCI_LE_Set_Periodic_Advertising_Receive_Enable_Command(
|
|
5508
|
+
class HCI_LE_Set_Periodic_Advertising_Receive_Enable_Command(
|
|
5509
|
+
HCI_SyncCommand[HCI_StatusReturnParameters]
|
|
5510
|
+
):
|
|
5111
5511
|
'''
|
|
5112
5512
|
See Bluetooth spec @ 7.8.88 LE Set Periodic Advertising Receive Enable Command
|
|
5113
5513
|
'''
|
|
@@ -5121,9 +5521,11 @@ class HCI_LE_Set_Periodic_Advertising_Receive_Enable_Command(HCI_Command):
|
|
|
5121
5521
|
|
|
5122
5522
|
|
|
5123
5523
|
# -----------------------------------------------------------------------------
|
|
5124
|
-
@
|
|
5524
|
+
@HCI_SyncCommand.sync_command(HCI_StatusAndConnectionHandleReturnParameters)
|
|
5125
5525
|
@dataclasses.dataclass
|
|
5126
|
-
class HCI_LE_Periodic_Advertising_Sync_Transfer_Command(
|
|
5526
|
+
class HCI_LE_Periodic_Advertising_Sync_Transfer_Command(
|
|
5527
|
+
HCI_SyncCommand[HCI_StatusAndConnectionHandleReturnParameters]
|
|
5528
|
+
):
|
|
5127
5529
|
'''
|
|
5128
5530
|
See Bluetooth spec @ 7.8.89 LE Periodic Advertising Sync Transfer Command
|
|
5129
5531
|
'''
|
|
@@ -5132,16 +5534,13 @@ class HCI_LE_Periodic_Advertising_Sync_Transfer_Command(HCI_Command):
|
|
|
5132
5534
|
service_data: int = field(metadata=metadata(2))
|
|
5133
5535
|
sync_handle: int = field(metadata=metadata(2))
|
|
5134
5536
|
|
|
5135
|
-
return_parameters_fields = [
|
|
5136
|
-
('status', STATUS_SPEC),
|
|
5137
|
-
('connection_handle', 2),
|
|
5138
|
-
]
|
|
5139
|
-
|
|
5140
5537
|
|
|
5141
5538
|
# -----------------------------------------------------------------------------
|
|
5142
|
-
@
|
|
5539
|
+
@HCI_SyncCommand.sync_command(HCI_StatusAndConnectionHandleReturnParameters)
|
|
5143
5540
|
@dataclasses.dataclass
|
|
5144
|
-
class HCI_LE_Periodic_Advertising_Set_Info_Transfer_Command(
|
|
5541
|
+
class HCI_LE_Periodic_Advertising_Set_Info_Transfer_Command(
|
|
5542
|
+
HCI_SyncCommand[HCI_StatusAndConnectionHandleReturnParameters]
|
|
5543
|
+
):
|
|
5145
5544
|
'''
|
|
5146
5545
|
See Bluetooth spec @ 7.8.90 LE Periodic Advertising Set Info Transfer Command
|
|
5147
5546
|
'''
|
|
@@ -5150,16 +5549,13 @@ class HCI_LE_Periodic_Advertising_Set_Info_Transfer_Command(HCI_Command):
|
|
|
5150
5549
|
service_data: int = field(metadata=metadata(2))
|
|
5151
5550
|
advertising_handle: int = field(metadata=metadata(1))
|
|
5152
5551
|
|
|
5153
|
-
return_parameters_fields = [
|
|
5154
|
-
('status', STATUS_SPEC),
|
|
5155
|
-
('connection_handle', 2),
|
|
5156
|
-
]
|
|
5157
|
-
|
|
5158
5552
|
|
|
5159
5553
|
# -----------------------------------------------------------------------------
|
|
5160
|
-
@
|
|
5554
|
+
@HCI_SyncCommand.sync_command(HCI_StatusAndConnectionHandleReturnParameters)
|
|
5161
5555
|
@dataclasses.dataclass
|
|
5162
|
-
class HCI_LE_Set_Periodic_Advertising_Sync_Transfer_Parameters_Command(
|
|
5556
|
+
class HCI_LE_Set_Periodic_Advertising_Sync_Transfer_Parameters_Command(
|
|
5557
|
+
HCI_SyncCommand[HCI_StatusAndConnectionHandleReturnParameters]
|
|
5558
|
+
):
|
|
5163
5559
|
'''
|
|
5164
5560
|
See Bluetooth spec @ 7.8.91 LE Set Periodic Advertising Sync Transfer Parameters command
|
|
5165
5561
|
'''
|
|
@@ -5170,17 +5566,12 @@ class HCI_LE_Set_Periodic_Advertising_Sync_Transfer_Parameters_Command(HCI_Comma
|
|
|
5170
5566
|
sync_timeout: int = field(metadata=metadata(2))
|
|
5171
5567
|
cte_type: int = field(metadata=CteType.type_metadata(1))
|
|
5172
5568
|
|
|
5173
|
-
return_parameters_fields = [
|
|
5174
|
-
('status', STATUS_SPEC),
|
|
5175
|
-
('connection_handle', 2),
|
|
5176
|
-
]
|
|
5177
|
-
|
|
5178
5569
|
|
|
5179
5570
|
# -----------------------------------------------------------------------------
|
|
5180
|
-
@
|
|
5571
|
+
@HCI_SyncCommand.sync_command(HCI_StatusReturnParameters)
|
|
5181
5572
|
@dataclasses.dataclass
|
|
5182
5573
|
class HCI_LE_Set_Default_Periodic_Advertising_Sync_Transfer_Parameters_Command(
|
|
5183
|
-
|
|
5574
|
+
HCI_SyncCommand[HCI_StatusReturnParameters]
|
|
5184
5575
|
):
|
|
5185
5576
|
'''
|
|
5186
5577
|
See Bluetooth spec @ 7.8.92 LE Set Default Periodic Advertising Sync Transfer Parameters command
|
|
@@ -5191,34 +5582,43 @@ class HCI_LE_Set_Default_Periodic_Advertising_Sync_Transfer_Parameters_Command(
|
|
|
5191
5582
|
sync_timeout: int = field(metadata=metadata(2))
|
|
5192
5583
|
cte_type: int = field(metadata=CteType.type_metadata(1))
|
|
5193
5584
|
|
|
5194
|
-
return_parameters_fields = [
|
|
5195
|
-
('status', STATUS_SPEC),
|
|
5196
|
-
]
|
|
5197
|
-
|
|
5198
5585
|
|
|
5199
5586
|
# -----------------------------------------------------------------------------
|
|
5200
|
-
@HCI_Command.command
|
|
5201
5587
|
@dataclasses.dataclass
|
|
5202
|
-
class
|
|
5588
|
+
class HCI_LE_Read_ISO_TX_Sync_ReturnParameters(
|
|
5589
|
+
HCI_StatusAndConnectionHandleReturnParameters
|
|
5590
|
+
):
|
|
5591
|
+
packet_sequence_number: int = field(metadata=metadata(2))
|
|
5592
|
+
tx_time_stamp: int = field(metadata=metadata(4))
|
|
5593
|
+
time_offset: int = field(metadata=metadata(4))
|
|
5594
|
+
|
|
5595
|
+
|
|
5596
|
+
@HCI_SyncCommand.sync_command(HCI_LE_Read_ISO_TX_Sync_ReturnParameters)
|
|
5597
|
+
@dataclasses.dataclass
|
|
5598
|
+
class HCI_LE_Read_ISO_TX_Sync_Command(
|
|
5599
|
+
HCI_SyncCommand[HCI_LE_Read_ISO_TX_Sync_ReturnParameters]
|
|
5600
|
+
):
|
|
5203
5601
|
'''
|
|
5204
5602
|
See Bluetooth spec @ 7.8.96 LE Read ISO TX Sync command
|
|
5205
5603
|
'''
|
|
5206
5604
|
|
|
5207
5605
|
connection_handle: int = field(metadata=metadata(2))
|
|
5208
5606
|
|
|
5209
|
-
return_parameters_fields = [
|
|
5210
|
-
('status', STATUS_SPEC),
|
|
5211
|
-
('connection_handle', 2),
|
|
5212
|
-
('packet_sequence_number', 2),
|
|
5213
|
-
('tx_time_stamp', 4),
|
|
5214
|
-
('time_offset', 3),
|
|
5215
|
-
]
|
|
5216
|
-
|
|
5217
5607
|
|
|
5218
5608
|
# -----------------------------------------------------------------------------
|
|
5219
|
-
@HCI_Command.command
|
|
5220
5609
|
@dataclasses.dataclass
|
|
5221
|
-
class
|
|
5610
|
+
class HCI_LE_Set_CIG_Parameters_ReturnParameters(HCI_StatusReturnParameters):
|
|
5611
|
+
cig_id: int = field(metadata=metadata(1))
|
|
5612
|
+
connection_handle: Sequence[int] = field(
|
|
5613
|
+
metadata=metadata(2, list_begin=True, list_end=True)
|
|
5614
|
+
)
|
|
5615
|
+
|
|
5616
|
+
|
|
5617
|
+
@HCI_SyncCommand.sync_command(HCI_LE_Set_CIG_Parameters_ReturnParameters)
|
|
5618
|
+
@dataclasses.dataclass
|
|
5619
|
+
class HCI_LE_Set_CIG_Parameters_Command(
|
|
5620
|
+
HCI_SyncCommand[HCI_LE_Set_CIG_Parameters_ReturnParameters]
|
|
5621
|
+
):
|
|
5222
5622
|
'''
|
|
5223
5623
|
See Bluetooth spec @ 7.8.97 LE Set CIG Parameters Command
|
|
5224
5624
|
'''
|
|
@@ -5239,17 +5639,11 @@ class HCI_LE_Set_CIG_Parameters_Command(HCI_Command):
|
|
|
5239
5639
|
rtn_c_to_p: Sequence[int] = field(metadata=metadata(1))
|
|
5240
5640
|
rtn_p_to_c: Sequence[int] = field(metadata=metadata(1, list_end=True))
|
|
5241
5641
|
|
|
5242
|
-
return_parameters_fields = [
|
|
5243
|
-
('status', STATUS_SPEC),
|
|
5244
|
-
('cig_id', 1),
|
|
5245
|
-
[('connection_handle', 2)],
|
|
5246
|
-
]
|
|
5247
|
-
|
|
5248
5642
|
|
|
5249
5643
|
# -----------------------------------------------------------------------------
|
|
5250
5644
|
@HCI_Command.command
|
|
5251
5645
|
@dataclasses.dataclass
|
|
5252
|
-
class HCI_LE_Create_CIS_Command(
|
|
5646
|
+
class HCI_LE_Create_CIS_Command(HCI_AsyncCommand):
|
|
5253
5647
|
'''
|
|
5254
5648
|
See Bluetooth spec @ 7.8.99 LE Create CIS command
|
|
5255
5649
|
'''
|
|
@@ -5259,22 +5653,25 @@ class HCI_LE_Create_CIS_Command(HCI_Command):
|
|
|
5259
5653
|
|
|
5260
5654
|
|
|
5261
5655
|
# -----------------------------------------------------------------------------
|
|
5262
|
-
@HCI_Command.command
|
|
5263
5656
|
@dataclasses.dataclass
|
|
5264
|
-
class
|
|
5657
|
+
class HCI_LE_Remove_CIG_ReturnParameters(HCI_StatusReturnParameters):
|
|
5658
|
+
cig_id: int = field(metadata=metadata(1))
|
|
5659
|
+
|
|
5660
|
+
|
|
5661
|
+
@HCI_SyncCommand.sync_command(HCI_LE_Remove_CIG_ReturnParameters)
|
|
5662
|
+
@dataclasses.dataclass
|
|
5663
|
+
class HCI_LE_Remove_CIG_Command(HCI_SyncCommand[HCI_LE_Remove_CIG_ReturnParameters]):
|
|
5265
5664
|
'''
|
|
5266
5665
|
See Bluetooth spec @ 7.8.100 LE Remove CIG command
|
|
5267
5666
|
'''
|
|
5268
5667
|
|
|
5269
5668
|
cig_id: int = field(metadata=metadata(1))
|
|
5270
5669
|
|
|
5271
|
-
return_parameters_fields = [('status', STATUS_SPEC), ('cig_id', 1)]
|
|
5272
|
-
|
|
5273
5670
|
|
|
5274
5671
|
# -----------------------------------------------------------------------------
|
|
5275
5672
|
@HCI_Command.command
|
|
5276
5673
|
@dataclasses.dataclass
|
|
5277
|
-
class HCI_LE_Accept_CIS_Request_Command(
|
|
5674
|
+
class HCI_LE_Accept_CIS_Request_Command(HCI_AsyncCommand):
|
|
5278
5675
|
'''
|
|
5279
5676
|
See Bluetooth spec @ 7.8.101 LE Accept CIS Request command
|
|
5280
5677
|
'''
|
|
@@ -5283,9 +5680,11 @@ class HCI_LE_Accept_CIS_Request_Command(HCI_Command):
|
|
|
5283
5680
|
|
|
5284
5681
|
|
|
5285
5682
|
# -----------------------------------------------------------------------------
|
|
5286
|
-
@
|
|
5683
|
+
@HCI_SyncCommand.sync_command(HCI_StatusAndConnectionHandleReturnParameters)
|
|
5287
5684
|
@dataclasses.dataclass
|
|
5288
|
-
class HCI_LE_Reject_CIS_Request_Command(
|
|
5685
|
+
class HCI_LE_Reject_CIS_Request_Command(
|
|
5686
|
+
HCI_SyncCommand[HCI_StatusAndConnectionHandleReturnParameters]
|
|
5687
|
+
):
|
|
5289
5688
|
'''
|
|
5290
5689
|
See Bluetooth spec @ 7.8.102 LE Reject CIS Request command
|
|
5291
5690
|
'''
|
|
@@ -5297,7 +5696,7 @@ class HCI_LE_Reject_CIS_Request_Command(HCI_Command):
|
|
|
5297
5696
|
# -----------------------------------------------------------------------------
|
|
5298
5697
|
@HCI_Command.command
|
|
5299
5698
|
@dataclasses.dataclass
|
|
5300
|
-
class HCI_LE_Create_BIG_Command(
|
|
5699
|
+
class HCI_LE_Create_BIG_Command(HCI_AsyncCommand):
|
|
5301
5700
|
'''
|
|
5302
5701
|
See Bluetooth spec @ 7.8.103 LE Create BIG command
|
|
5303
5702
|
'''
|
|
@@ -5319,7 +5718,7 @@ class HCI_LE_Create_BIG_Command(HCI_Command):
|
|
|
5319
5718
|
# -----------------------------------------------------------------------------
|
|
5320
5719
|
@HCI_Command.command
|
|
5321
5720
|
@dataclasses.dataclass
|
|
5322
|
-
class HCI_LE_Terminate_BIG_Command(
|
|
5721
|
+
class HCI_LE_Terminate_BIG_Command(HCI_AsyncCommand):
|
|
5323
5722
|
'''
|
|
5324
5723
|
See Bluetooth spec @ 7.8.105 LE Terminate BIG command
|
|
5325
5724
|
'''
|
|
@@ -5331,7 +5730,7 @@ class HCI_LE_Terminate_BIG_Command(HCI_Command):
|
|
|
5331
5730
|
# -----------------------------------------------------------------------------
|
|
5332
5731
|
@HCI_Command.command
|
|
5333
5732
|
@dataclasses.dataclass
|
|
5334
|
-
class HCI_LE_BIG_Create_Sync_Command(
|
|
5733
|
+
class HCI_LE_BIG_Create_Sync_Command(HCI_AsyncCommand):
|
|
5335
5734
|
'''
|
|
5336
5735
|
See Bluetooth spec @ 7.8.106 LE BIG Create Sync command
|
|
5337
5736
|
'''
|
|
@@ -5346,25 +5745,29 @@ class HCI_LE_BIG_Create_Sync_Command(HCI_Command):
|
|
|
5346
5745
|
|
|
5347
5746
|
|
|
5348
5747
|
# -----------------------------------------------------------------------------
|
|
5349
|
-
@HCI_Command.command
|
|
5350
5748
|
@dataclasses.dataclass
|
|
5351
|
-
class
|
|
5749
|
+
class HCI_LE_BIG_Terminate_Sync_ReturnParameters(HCI_StatusReturnParameters):
|
|
5750
|
+
big_handle: int = field(metadata=metadata(1))
|
|
5751
|
+
|
|
5752
|
+
|
|
5753
|
+
@HCI_SyncCommand.sync_command(HCI_LE_BIG_Terminate_Sync_ReturnParameters)
|
|
5754
|
+
@dataclasses.dataclass
|
|
5755
|
+
class HCI_LE_BIG_Terminate_Sync_Command(
|
|
5756
|
+
HCI_SyncCommand[HCI_LE_BIG_Terminate_Sync_ReturnParameters]
|
|
5757
|
+
):
|
|
5352
5758
|
'''
|
|
5353
5759
|
See Bluetooth spec @ 7.8.107. LE BIG Terminate Sync command
|
|
5354
5760
|
'''
|
|
5355
5761
|
|
|
5356
5762
|
big_handle: int = field(metadata=metadata(1))
|
|
5357
5763
|
|
|
5358
|
-
return_parameters_fields = [
|
|
5359
|
-
('status', STATUS_SPEC),
|
|
5360
|
-
('big_handle', 1),
|
|
5361
|
-
]
|
|
5362
|
-
|
|
5363
5764
|
|
|
5364
5765
|
# -----------------------------------------------------------------------------
|
|
5365
|
-
@
|
|
5766
|
+
@HCI_SyncCommand.sync_command(HCI_StatusAndConnectionHandleReturnParameters)
|
|
5366
5767
|
@dataclasses.dataclass
|
|
5367
|
-
class HCI_LE_Setup_ISO_Data_Path_Command(
|
|
5768
|
+
class HCI_LE_Setup_ISO_Data_Path_Command(
|
|
5769
|
+
HCI_SyncCommand[HCI_StatusAndConnectionHandleReturnParameters]
|
|
5770
|
+
):
|
|
5368
5771
|
'''
|
|
5369
5772
|
See Bluetooth spec @ 7.8.109 LE Setup ISO Data Path command
|
|
5370
5773
|
'''
|
|
@@ -5380,16 +5783,13 @@ class HCI_LE_Setup_ISO_Data_Path_Command(HCI_Command):
|
|
|
5380
5783
|
controller_delay: int = field(metadata=metadata(3))
|
|
5381
5784
|
codec_configuration: bytes = field(metadata=metadata("v"))
|
|
5382
5785
|
|
|
5383
|
-
return_parameters_fields = [
|
|
5384
|
-
('status', STATUS_SPEC),
|
|
5385
|
-
('connection_handle', 2),
|
|
5386
|
-
]
|
|
5387
|
-
|
|
5388
5786
|
|
|
5389
5787
|
# -----------------------------------------------------------------------------
|
|
5390
|
-
@
|
|
5788
|
+
@HCI_SyncCommand.sync_command(HCI_StatusAndConnectionHandleReturnParameters)
|
|
5391
5789
|
@dataclasses.dataclass
|
|
5392
|
-
class HCI_LE_Remove_ISO_Data_Path_Command(
|
|
5790
|
+
class HCI_LE_Remove_ISO_Data_Path_Command(
|
|
5791
|
+
HCI_SyncCommand[HCI_StatusAndConnectionHandleReturnParameters]
|
|
5792
|
+
):
|
|
5393
5793
|
'''
|
|
5394
5794
|
See Bluetooth spec @ 7.8.110 LE Remove ISO Data Path command
|
|
5395
5795
|
'''
|
|
@@ -5397,16 +5797,11 @@ class HCI_LE_Remove_ISO_Data_Path_Command(HCI_Command):
|
|
|
5397
5797
|
connection_handle: int = field(metadata=metadata(2))
|
|
5398
5798
|
data_path_direction: int = field(metadata=metadata(1))
|
|
5399
5799
|
|
|
5400
|
-
return_parameters_fields = [
|
|
5401
|
-
('status', STATUS_SPEC),
|
|
5402
|
-
('connection_handle', 2),
|
|
5403
|
-
]
|
|
5404
|
-
|
|
5405
5800
|
|
|
5406
5801
|
# -----------------------------------------------------------------------------
|
|
5407
|
-
@
|
|
5802
|
+
@HCI_SyncCommand.sync_command(HCI_StatusReturnParameters)
|
|
5408
5803
|
@dataclasses.dataclass
|
|
5409
|
-
class HCI_LE_Set_Host_Feature_Command(
|
|
5804
|
+
class HCI_LE_Set_Host_Feature_Command(HCI_SyncCommand[HCI_StatusReturnParameters]):
|
|
5410
5805
|
'''
|
|
5411
5806
|
See Bluetooth spec @ 7.8.115 LE Set Host Feature Command
|
|
5412
5807
|
'''
|
|
@@ -5416,9 +5811,9 @@ class HCI_LE_Set_Host_Feature_Command(HCI_Command):
|
|
|
5416
5811
|
|
|
5417
5812
|
|
|
5418
5813
|
# -----------------------------------------------------------------------------
|
|
5419
|
-
@
|
|
5814
|
+
@HCI_SyncCommand.sync_command(HCI_StatusReturnParameters)
|
|
5420
5815
|
@dataclasses.dataclass
|
|
5421
|
-
class HCI_LE_Set_Default_Subrate_Command(
|
|
5816
|
+
class HCI_LE_Set_Default_Subrate_Command(HCI_SyncCommand[HCI_StatusReturnParameters]):
|
|
5422
5817
|
'''
|
|
5423
5818
|
See Bluetooth spec @ 7.8.123 LE Set Default Subrate command
|
|
5424
5819
|
'''
|
|
@@ -5433,7 +5828,7 @@ class HCI_LE_Set_Default_Subrate_Command(HCI_Command):
|
|
|
5433
5828
|
# -----------------------------------------------------------------------------
|
|
5434
5829
|
@HCI_Command.command
|
|
5435
5830
|
@dataclasses.dataclass
|
|
5436
|
-
class HCI_LE_Subrate_Request_Command(
|
|
5831
|
+
class HCI_LE_Subrate_Request_Command(HCI_AsyncCommand):
|
|
5437
5832
|
'''
|
|
5438
5833
|
See Bluetooth spec @ 7.8.124 LE Subrate Request command
|
|
5439
5834
|
'''
|
|
@@ -5447,42 +5842,66 @@ class HCI_LE_Subrate_Request_Command(HCI_Command):
|
|
|
5447
5842
|
|
|
5448
5843
|
|
|
5449
5844
|
# -----------------------------------------------------------------------------
|
|
5450
|
-
@HCI_Command.command
|
|
5451
5845
|
@dataclasses.dataclass
|
|
5452
|
-
class
|
|
5846
|
+
class HCI_LE_Read_All_Local_Supported_Features_ReturnParameters(
|
|
5847
|
+
HCI_StatusReturnParameters
|
|
5848
|
+
):
|
|
5849
|
+
max_page: int = field(metadata=metadata(1))
|
|
5850
|
+
le_features: bytes = field(metadata=metadata(248))
|
|
5851
|
+
|
|
5852
|
+
|
|
5853
|
+
@HCI_SyncCommand.sync_command(HCI_LE_Read_All_Local_Supported_Features_ReturnParameters)
|
|
5854
|
+
class HCI_LE_Read_All_Local_Supported_Features_Command(
|
|
5855
|
+
HCI_SyncCommand[HCI_LE_Read_All_Local_Supported_Features_ReturnParameters]
|
|
5856
|
+
):
|
|
5453
5857
|
'''
|
|
5454
|
-
See Bluetooth spec @ 7.8.
|
|
5858
|
+
See Bluetooth spec @ 7.8.128 LE Read All Local Supported Features Command
|
|
5455
5859
|
'''
|
|
5456
5860
|
|
|
5457
|
-
|
|
5458
|
-
|
|
5459
|
-
|
|
5460
|
-
|
|
5461
|
-
|
|
5462
|
-
|
|
5463
|
-
|
|
5464
|
-
|
|
5465
|
-
|
|
5466
|
-
|
|
5467
|
-
|
|
5468
|
-
|
|
5469
|
-
|
|
5470
|
-
|
|
5471
|
-
|
|
5472
|
-
|
|
5473
|
-
|
|
5474
|
-
|
|
5475
|
-
|
|
5476
|
-
|
|
5477
|
-
|
|
5478
|
-
|
|
5479
|
-
|
|
5861
|
+
|
|
5862
|
+
# -----------------------------------------------------------------------------
|
|
5863
|
+
@dataclasses.dataclass
|
|
5864
|
+
class HCI_LE_CS_Read_Local_Supported_Capabilities_ReturnParameters(
|
|
5865
|
+
HCI_StatusReturnParameters
|
|
5866
|
+
):
|
|
5867
|
+
num_config_supported: int = field(metadata=metadata(1))
|
|
5868
|
+
max_consecutive_procedures_supported: int = field(metadata=metadata(2))
|
|
5869
|
+
num_antennas_supported: int = field(metadata=metadata(1))
|
|
5870
|
+
max_antenna_paths_supported: int = field(metadata=metadata(1))
|
|
5871
|
+
roles_supported: int = field(metadata=metadata(1))
|
|
5872
|
+
modes_supported: int = field(metadata=metadata(1))
|
|
5873
|
+
rtt_capability: int = field(metadata=metadata(1))
|
|
5874
|
+
rtt_aa_only_n: int = field(metadata=metadata(1))
|
|
5875
|
+
rtt_sounding_n: int = field(metadata=metadata(1))
|
|
5876
|
+
rtt_random_sequence_n: int = field(metadata=metadata(1))
|
|
5877
|
+
nadm_sounding_capability: int = field(metadata=metadata(2))
|
|
5878
|
+
nadm_random_capability: int = field(metadata=metadata(2))
|
|
5879
|
+
cs_sync_phys_supported: int = field(metadata=metadata(CS_SYNC_PHY_SUPPORTED_SPEC))
|
|
5880
|
+
subfeatures_supported: int = field(metadata=metadata(2))
|
|
5881
|
+
t_ip1_times_supported: int = field(metadata=metadata(2))
|
|
5882
|
+
t_ip2_times_supported: int = field(metadata=metadata(2))
|
|
5883
|
+
t_fcs_times_supported: int = field(metadata=metadata(2))
|
|
5884
|
+
t_pm_times_supported: int = field(metadata=metadata(2))
|
|
5885
|
+
t_sw_time_supported: int = field(metadata=metadata(1))
|
|
5886
|
+
tx_snr_capability: int = field(metadata=metadata(CS_SNR_SPEC))
|
|
5887
|
+
|
|
5888
|
+
|
|
5889
|
+
@HCI_SyncCommand.sync_command(
|
|
5890
|
+
HCI_LE_CS_Read_Local_Supported_Capabilities_ReturnParameters
|
|
5891
|
+
)
|
|
5892
|
+
@dataclasses.dataclass
|
|
5893
|
+
class HCI_LE_CS_Read_Local_Supported_Capabilities_Command(
|
|
5894
|
+
HCI_SyncCommand[HCI_LE_CS_Read_Local_Supported_Capabilities_ReturnParameters]
|
|
5895
|
+
):
|
|
5896
|
+
'''
|
|
5897
|
+
See Bluetooth spec @ 7.8.130 LE CS Read Local Supported Capabilities command
|
|
5898
|
+
'''
|
|
5480
5899
|
|
|
5481
5900
|
|
|
5482
5901
|
# -----------------------------------------------------------------------------
|
|
5483
5902
|
@HCI_Command.command
|
|
5484
5903
|
@dataclasses.dataclass
|
|
5485
|
-
class HCI_LE_CS_Read_Remote_Supported_Capabilities_Command(
|
|
5904
|
+
class HCI_LE_CS_Read_Remote_Supported_Capabilities_Command(HCI_AsyncCommand):
|
|
5486
5905
|
'''
|
|
5487
5906
|
See Bluetooth spec @ 7.8.131 LE CS Read Remote Supported Capabilities command
|
|
5488
5907
|
'''
|
|
@@ -5491,9 +5910,11 @@ class HCI_LE_CS_Read_Remote_Supported_Capabilities_Command(HCI_Command):
|
|
|
5491
5910
|
|
|
5492
5911
|
|
|
5493
5912
|
# -----------------------------------------------------------------------------
|
|
5494
|
-
@
|
|
5913
|
+
@HCI_SyncCommand.sync_command(HCI_StatusAndConnectionHandleReturnParameters)
|
|
5495
5914
|
@dataclasses.dataclass
|
|
5496
|
-
class HCI_LE_CS_Write_Cached_Remote_Supported_Capabilities_Command(
|
|
5915
|
+
class HCI_LE_CS_Write_Cached_Remote_Supported_Capabilities_Command(
|
|
5916
|
+
HCI_SyncCommand[HCI_StatusAndConnectionHandleReturnParameters]
|
|
5917
|
+
):
|
|
5497
5918
|
'''
|
|
5498
5919
|
See Bluetooth spec @ 7.8.132 LE CS Write Cached Remote Supported Capabilities command
|
|
5499
5920
|
'''
|
|
@@ -5508,7 +5929,7 @@ class HCI_LE_CS_Write_Cached_Remote_Supported_Capabilities_Command(HCI_Command):
|
|
|
5508
5929
|
rtt_capability: int = field(metadata=metadata(1))
|
|
5509
5930
|
rtt_aa_only_n: int = field(metadata=metadata(1))
|
|
5510
5931
|
rtt_sounding_n: int = field(metadata=metadata(1))
|
|
5511
|
-
|
|
5932
|
+
rtt_random_sequence_n: int = field(metadata=metadata(1))
|
|
5512
5933
|
nadm_sounding_capability: int = field(metadata=metadata(2))
|
|
5513
5934
|
nadm_random_capability: int = field(metadata=metadata(2))
|
|
5514
5935
|
cs_sync_phys_supported: int = field(metadata=metadata(CS_SYNC_PHY_SUPPORTED_SPEC))
|
|
@@ -5520,16 +5941,11 @@ class HCI_LE_CS_Write_Cached_Remote_Supported_Capabilities_Command(HCI_Command):
|
|
|
5520
5941
|
t_sw_time_supported: int = field(metadata=metadata(1))
|
|
5521
5942
|
tx_snr_capability: int = field(metadata=metadata(CS_SNR_SPEC))
|
|
5522
5943
|
|
|
5523
|
-
return_parameters_fields = [
|
|
5524
|
-
('status', STATUS_SPEC),
|
|
5525
|
-
('connection_handle', 2),
|
|
5526
|
-
]
|
|
5527
|
-
|
|
5528
5944
|
|
|
5529
5945
|
# -----------------------------------------------------------------------------
|
|
5530
5946
|
@HCI_Command.command
|
|
5531
5947
|
@dataclasses.dataclass
|
|
5532
|
-
class HCI_LE_CS_Security_Enable_Command(
|
|
5948
|
+
class HCI_LE_CS_Security_Enable_Command(HCI_AsyncCommand):
|
|
5533
5949
|
'''
|
|
5534
5950
|
See Bluetooth spec @ 7.8.133 LE CS Security Enable command
|
|
5535
5951
|
'''
|
|
@@ -5538,9 +5954,11 @@ class HCI_LE_CS_Security_Enable_Command(HCI_Command):
|
|
|
5538
5954
|
|
|
5539
5955
|
|
|
5540
5956
|
# -----------------------------------------------------------------------------
|
|
5541
|
-
@
|
|
5957
|
+
@HCI_SyncCommand.sync_command(HCI_StatusAndConnectionHandleReturnParameters)
|
|
5542
5958
|
@dataclasses.dataclass
|
|
5543
|
-
class HCI_LE_CS_Set_Default_Settings_Command(
|
|
5959
|
+
class HCI_LE_CS_Set_Default_Settings_Command(
|
|
5960
|
+
HCI_SyncCommand[HCI_StatusAndConnectionHandleReturnParameters]
|
|
5961
|
+
):
|
|
5544
5962
|
'''
|
|
5545
5963
|
See Bluetooth spec @ 7.8.134 LE CS Security Enable command
|
|
5546
5964
|
'''
|
|
@@ -5550,13 +5968,11 @@ class HCI_LE_CS_Set_Default_Settings_Command(HCI_Command):
|
|
|
5550
5968
|
cs_sync_antenna_selection: int = field(metadata=metadata(1))
|
|
5551
5969
|
max_tx_power: int = field(metadata=metadata(1))
|
|
5552
5970
|
|
|
5553
|
-
return_parameters_fields = [('status', STATUS_SPEC), ('connection_handle', 2)]
|
|
5554
|
-
|
|
5555
5971
|
|
|
5556
5972
|
# -----------------------------------------------------------------------------
|
|
5557
5973
|
@HCI_Command.command
|
|
5558
5974
|
@dataclasses.dataclass
|
|
5559
|
-
class HCI_LE_CS_Read_Remote_FAE_Table_Command(
|
|
5975
|
+
class HCI_LE_CS_Read_Remote_FAE_Table_Command(HCI_AsyncCommand):
|
|
5560
5976
|
'''
|
|
5561
5977
|
See Bluetooth spec @ 7.8.135 LE CS Read Remote FAE Table command
|
|
5562
5978
|
'''
|
|
@@ -5565,9 +5981,11 @@ class HCI_LE_CS_Read_Remote_FAE_Table_Command(HCI_Command):
|
|
|
5565
5981
|
|
|
5566
5982
|
|
|
5567
5983
|
# -----------------------------------------------------------------------------
|
|
5568
|
-
@
|
|
5984
|
+
@HCI_SyncCommand.sync_command(HCI_StatusAndConnectionHandleReturnParameters)
|
|
5569
5985
|
@dataclasses.dataclass
|
|
5570
|
-
class HCI_LE_CS_Write_Cached_Remote_FAE_Table_Command(
|
|
5986
|
+
class HCI_LE_CS_Write_Cached_Remote_FAE_Table_Command(
|
|
5987
|
+
HCI_SyncCommand[HCI_StatusAndConnectionHandleReturnParameters]
|
|
5988
|
+
):
|
|
5571
5989
|
'''
|
|
5572
5990
|
See Bluetooth spec @ 7.8.136 LE CS Write Cached Remote FAE Table command
|
|
5573
5991
|
'''
|
|
@@ -5575,13 +5993,11 @@ class HCI_LE_CS_Write_Cached_Remote_FAE_Table_Command(HCI_Command):
|
|
|
5575
5993
|
connection_handle: int = field(metadata=metadata(2))
|
|
5576
5994
|
remote_fae_table: bytes = field(metadata=metadata(72))
|
|
5577
5995
|
|
|
5578
|
-
return_parameters_fields = [('status', STATUS_SPEC), ('connection_handle', 2)]
|
|
5579
|
-
|
|
5580
5996
|
|
|
5581
5997
|
# -----------------------------------------------------------------------------
|
|
5582
5998
|
@HCI_Command.command
|
|
5583
5999
|
@dataclasses.dataclass
|
|
5584
|
-
class HCI_LE_CS_Create_Config_Command(
|
|
6000
|
+
class HCI_LE_CS_Create_Config_Command(HCI_AsyncCommand):
|
|
5585
6001
|
'''
|
|
5586
6002
|
See Bluetooth spec @ 7.8.137 LE CS Create Config command
|
|
5587
6003
|
'''
|
|
@@ -5617,7 +6033,7 @@ class HCI_LE_CS_Create_Config_Command(HCI_Command):
|
|
|
5617
6033
|
# -----------------------------------------------------------------------------
|
|
5618
6034
|
@HCI_Command.command
|
|
5619
6035
|
@dataclasses.dataclass
|
|
5620
|
-
class HCI_LE_CS_Remove_Config_Command(
|
|
6036
|
+
class HCI_LE_CS_Remove_Config_Command(HCI_AsyncCommand):
|
|
5621
6037
|
'''
|
|
5622
6038
|
See Bluetooth spec @ 7.8.138 LE CS Remove Config command
|
|
5623
6039
|
'''
|
|
@@ -5627,22 +6043,24 @@ class HCI_LE_CS_Remove_Config_Command(HCI_Command):
|
|
|
5627
6043
|
|
|
5628
6044
|
|
|
5629
6045
|
# -----------------------------------------------------------------------------
|
|
5630
|
-
@
|
|
6046
|
+
@HCI_SyncCommand.sync_command(HCI_StatusReturnParameters)
|
|
5631
6047
|
@dataclasses.dataclass
|
|
5632
|
-
class HCI_LE_CS_Set_Channel_Classification_Command(
|
|
6048
|
+
class HCI_LE_CS_Set_Channel_Classification_Command(
|
|
6049
|
+
HCI_SyncCommand[HCI_StatusReturnParameters]
|
|
6050
|
+
):
|
|
5633
6051
|
'''
|
|
5634
6052
|
See Bluetooth spec @ 7.8.139 LE CS Set Channel Classification command
|
|
5635
6053
|
'''
|
|
5636
6054
|
|
|
5637
6055
|
channel_classification: bytes = field(metadata=metadata(10))
|
|
5638
6056
|
|
|
5639
|
-
return_parameters_fields = [('status', STATUS_SPEC)]
|
|
5640
|
-
|
|
5641
6057
|
|
|
5642
6058
|
# -----------------------------------------------------------------------------
|
|
5643
|
-
@
|
|
6059
|
+
@HCI_SyncCommand.sync_command(HCI_StatusAndConnectionHandleReturnParameters)
|
|
5644
6060
|
@dataclasses.dataclass
|
|
5645
|
-
class HCI_LE_CS_Set_Procedure_Parameters_Command(
|
|
6061
|
+
class HCI_LE_CS_Set_Procedure_Parameters_Command(
|
|
6062
|
+
HCI_SyncCommand[HCI_StatusAndConnectionHandleReturnParameters]
|
|
6063
|
+
):
|
|
5646
6064
|
'''
|
|
5647
6065
|
See Bluetooth spec @ 7.8.140 LE CS Set Procedure Parameters command
|
|
5648
6066
|
'''
|
|
@@ -5662,13 +6080,11 @@ class HCI_LE_CS_Set_Procedure_Parameters_Command(HCI_Command):
|
|
|
5662
6080
|
snr_control_initiator: int = field(metadata=metadata(CS_SNR_SPEC))
|
|
5663
6081
|
snr_control_reflector: int = field(metadata=metadata(CS_SNR_SPEC))
|
|
5664
6082
|
|
|
5665
|
-
return_parameters_fields = [('status', STATUS_SPEC), ('connection_handle', 2)]
|
|
5666
|
-
|
|
5667
6083
|
|
|
5668
6084
|
# -----------------------------------------------------------------------------
|
|
5669
6085
|
@HCI_Command.command
|
|
5670
6086
|
@dataclasses.dataclass
|
|
5671
|
-
class HCI_LE_CS_Procedure_Enable_Command(
|
|
6087
|
+
class HCI_LE_CS_Procedure_Enable_Command(HCI_AsyncCommand):
|
|
5672
6088
|
'''
|
|
5673
6089
|
See Bluetooth spec @ 7.8.141 LE CS Procedure Enable command
|
|
5674
6090
|
'''
|
|
@@ -5679,9 +6095,9 @@ class HCI_LE_CS_Procedure_Enable_Command(HCI_Command):
|
|
|
5679
6095
|
|
|
5680
6096
|
|
|
5681
6097
|
# -----------------------------------------------------------------------------
|
|
5682
|
-
@
|
|
6098
|
+
@HCI_SyncCommand.sync_command(HCI_StatusReturnParameters)
|
|
5683
6099
|
@dataclasses.dataclass
|
|
5684
|
-
class HCI_LE_CS_Test_Command(
|
|
6100
|
+
class HCI_LE_CS_Test_Command(HCI_SyncCommand[HCI_StatusReturnParameters]):
|
|
5685
6101
|
'''
|
|
5686
6102
|
See Bluetooth spec @ 7.8.142 LE CS Test command
|
|
5687
6103
|
'''
|
|
@@ -5716,12 +6132,98 @@ class HCI_LE_CS_Test_Command(HCI_Command):
|
|
|
5716
6132
|
# -----------------------------------------------------------------------------
|
|
5717
6133
|
@HCI_Command.command
|
|
5718
6134
|
@dataclasses.dataclass
|
|
5719
|
-
class HCI_LE_CS_Test_End_Command(
|
|
6135
|
+
class HCI_LE_CS_Test_End_Command(HCI_AsyncCommand):
|
|
5720
6136
|
'''
|
|
5721
6137
|
See Bluetooth spec @ 7.8.143 LE CS Test End command
|
|
5722
6138
|
'''
|
|
5723
6139
|
|
|
5724
6140
|
|
|
6141
|
+
# -----------------------------------------------------------------------------
|
|
6142
|
+
@HCI_Command.command
|
|
6143
|
+
@dataclasses.dataclass
|
|
6144
|
+
class HCI_LE_Frame_Space_Update_Command(HCI_AsyncCommand):
|
|
6145
|
+
'''
|
|
6146
|
+
See Bluetooth spec @ 7.8.151 LE Frame Space Update command
|
|
6147
|
+
'''
|
|
6148
|
+
|
|
6149
|
+
class SpacingType(SpecableFlag):
|
|
6150
|
+
T_IFS_ACL_CP = 1 << 0
|
|
6151
|
+
T_IFS_ACL_PC = 1 << 1
|
|
6152
|
+
T_MCES = 1 << 2
|
|
6153
|
+
T_IFS_CIS = 1 << 3
|
|
6154
|
+
T_MSS_CIS = 1 << 4
|
|
6155
|
+
|
|
6156
|
+
connection_handle: int = field(metadata=metadata(2))
|
|
6157
|
+
frame_space_min: int = field(metadata=metadata(2))
|
|
6158
|
+
frame_space_max: int = field(metadata=metadata(2))
|
|
6159
|
+
phys: int = field(metadata=PhyBit.type_metadata(1))
|
|
6160
|
+
spacing_types: int = field(metadata=SpacingType.type_metadata(2))
|
|
6161
|
+
|
|
6162
|
+
|
|
6163
|
+
# -----------------------------------------------------------------------------
|
|
6164
|
+
@HCI_Command.command
|
|
6165
|
+
@dataclasses.dataclass
|
|
6166
|
+
class HCI_LE_Connection_Rate_Request_Command(HCI_AsyncCommand):
|
|
6167
|
+
'''
|
|
6168
|
+
See Bluetooth spec @ 7.8.154 LE Connection Rate Request command
|
|
6169
|
+
'''
|
|
6170
|
+
|
|
6171
|
+
connection_handle: int = field(metadata=metadata(2))
|
|
6172
|
+
connection_interval_min: int = field(metadata=metadata(2))
|
|
6173
|
+
connection_interval_max: int = field(metadata=metadata(2))
|
|
6174
|
+
subrate_min: int = field(metadata=metadata(2))
|
|
6175
|
+
subrate_max: int = field(metadata=metadata(2))
|
|
6176
|
+
max_latency: int = field(metadata=metadata(2))
|
|
6177
|
+
continuation_number: int = field(metadata=metadata(2))
|
|
6178
|
+
supervision_timeout: int = field(metadata=metadata(2))
|
|
6179
|
+
min_ce_length: int = field(metadata=metadata(2))
|
|
6180
|
+
max_ce_length: int = field(metadata=metadata(2))
|
|
6181
|
+
|
|
6182
|
+
|
|
6183
|
+
# -----------------------------------------------------------------------------
|
|
6184
|
+
@HCI_SyncCommand.sync_command(HCI_StatusReturnParameters)
|
|
6185
|
+
@dataclasses.dataclass
|
|
6186
|
+
class HCI_LE_Set_Default_Rate_Parameters_Command(
|
|
6187
|
+
HCI_SyncCommand[HCI_StatusReturnParameters]
|
|
6188
|
+
):
|
|
6189
|
+
'''
|
|
6190
|
+
See Bluetooth spec @ 7.8.155 LE Set Default Rate Parameters command
|
|
6191
|
+
'''
|
|
6192
|
+
|
|
6193
|
+
connection_interval_min: int = field(metadata=metadata(2))
|
|
6194
|
+
connection_interval_max: int = field(metadata=metadata(2))
|
|
6195
|
+
subrate_min: int = field(metadata=metadata(2))
|
|
6196
|
+
subrate_max: int = field(metadata=metadata(2))
|
|
6197
|
+
max_latency: int = field(metadata=metadata(2))
|
|
6198
|
+
continuation_number: int = field(metadata=metadata(2))
|
|
6199
|
+
supervision_timeout: int = field(metadata=metadata(2))
|
|
6200
|
+
min_ce_length: int = field(metadata=metadata(2))
|
|
6201
|
+
max_ce_length: int = field(metadata=metadata(2))
|
|
6202
|
+
|
|
6203
|
+
|
|
6204
|
+
# -----------------------------------------------------------------------------
|
|
6205
|
+
@dataclasses.dataclass
|
|
6206
|
+
class HCI_LE_Read_Minimum_Supported_Connection_Interval_ReturnParameters(
|
|
6207
|
+
HCI_StatusReturnParameters
|
|
6208
|
+
):
|
|
6209
|
+
minimum_supported_connection_interval: int = field(metadata=metadata(1))
|
|
6210
|
+
group_min: Sequence[int] = field(metadata=metadata(2, list_begin=True))
|
|
6211
|
+
group_max: Sequence[int] = field(metadata=metadata(2))
|
|
6212
|
+
group_stride: Sequence[int] = field(metadata=metadata(2, list_end=True))
|
|
6213
|
+
|
|
6214
|
+
|
|
6215
|
+
@HCI_SyncCommand.sync_command(
|
|
6216
|
+
HCI_LE_Read_Minimum_Supported_Connection_Interval_ReturnParameters
|
|
6217
|
+
)
|
|
6218
|
+
@dataclasses.dataclass
|
|
6219
|
+
class HCI_LE_Read_Minimum_Supported_Connection_Interval_Command(
|
|
6220
|
+
HCI_SyncCommand[HCI_LE_Read_Minimum_Supported_Connection_Interval_ReturnParameters]
|
|
6221
|
+
):
|
|
6222
|
+
'''
|
|
6223
|
+
See Bluetooth spec @ 7.8.156 LE Read Minimum Supported Connection Interval command
|
|
6224
|
+
'''
|
|
6225
|
+
|
|
6226
|
+
|
|
5725
6227
|
# -----------------------------------------------------------------------------
|
|
5726
6228
|
# HCI Events
|
|
5727
6229
|
# -----------------------------------------------------------------------------
|
|
@@ -5807,10 +6309,19 @@ class HCI_Event(HCI_Packet):
|
|
|
5807
6309
|
@classmethod
|
|
5808
6310
|
def from_bytes(cls, packet: bytes) -> HCI_Event:
|
|
5809
6311
|
event_code = packet[1]
|
|
5810
|
-
|
|
5811
|
-
|
|
5812
|
-
|
|
5813
|
-
|
|
6312
|
+
parameters_length = packet[2]
|
|
6313
|
+
if len(packet) < 3 + parameters_length:
|
|
6314
|
+
raise InvalidPacketError(
|
|
6315
|
+
f'invalid parameters length (packet={packet.hex()}): '
|
|
6316
|
+
f'expected {parameters_length}, got {len(packet) - 3})'
|
|
6317
|
+
)
|
|
6318
|
+
if len(packet) > 3 + parameters_length:
|
|
6319
|
+
logger.warning(
|
|
6320
|
+
f'truncating parameters (packet={packet.hex()}): '
|
|
6321
|
+
f'from {len(packet) - 3} to {parameters_length}'
|
|
6322
|
+
)
|
|
6323
|
+
|
|
6324
|
+
parameters = packet[3 : 3 + parameters_length]
|
|
5814
6325
|
|
|
5815
6326
|
subclass: type[HCI_Event] | None
|
|
5816
6327
|
if event_code == HCI_LE_META_EVENT:
|
|
@@ -6626,7 +7137,7 @@ class HCI_LE_CS_Read_Remote_Supported_Capabilities_Complete_Event(HCI_LE_Meta_Ev
|
|
|
6626
7137
|
rtt_capability: int = field(metadata=metadata(1))
|
|
6627
7138
|
rtt_aa_only_n: int = field(metadata=metadata(1))
|
|
6628
7139
|
rtt_sounding_n: int = field(metadata=metadata(1))
|
|
6629
|
-
|
|
7140
|
+
rtt_random_sequence_n: int = field(metadata=metadata(1))
|
|
6630
7141
|
nadm_sounding_capability: int = field(metadata=metadata(2))
|
|
6631
7142
|
nadm_random_capability: int = field(metadata=metadata(2))
|
|
6632
7143
|
cs_sync_phys_supported: int = field(metadata=metadata(CS_SYNC_PHY_SUPPORTED_SPEC))
|
|
@@ -6782,6 +7293,23 @@ class HCI_LE_CS_Test_End_Complete_Event(HCI_LE_Meta_Event):
|
|
|
6782
7293
|
status: int = field(metadata=metadata(STATUS_SPEC))
|
|
6783
7294
|
|
|
6784
7295
|
|
|
7296
|
+
# -----------------------------------------------------------------------------
|
|
7297
|
+
@HCI_LE_Meta_Event.event
|
|
7298
|
+
@dataclasses.dataclass
|
|
7299
|
+
class HCI_LE_Connection_Rate_Change_Event(HCI_LE_Meta_Event):
|
|
7300
|
+
'''
|
|
7301
|
+
See Bluetooth spec @ 7.7.65.50 LE Connection Rate Change event
|
|
7302
|
+
'''
|
|
7303
|
+
|
|
7304
|
+
status: int = field(metadata=metadata(STATUS_SPEC))
|
|
7305
|
+
connection_handle: int = field(metadata=metadata(2))
|
|
7306
|
+
connection_interval: int = field(metadata=metadata(2))
|
|
7307
|
+
subrate_factor: int = field(metadata=metadata(2))
|
|
7308
|
+
peripheral_latency: int = field(metadata=metadata(2))
|
|
7309
|
+
continuation_number: int = field(metadata=metadata(2))
|
|
7310
|
+
supervision_timeout: int = field(metadata=metadata(2))
|
|
7311
|
+
|
|
7312
|
+
|
|
6785
7313
|
# -----------------------------------------------------------------------------
|
|
6786
7314
|
@HCI_Event.event
|
|
6787
7315
|
@dataclasses.dataclass
|
|
@@ -6970,7 +7498,7 @@ class HCI_QOS_Setup_Complete_Event(HCI_Event):
|
|
|
6970
7498
|
# -----------------------------------------------------------------------------
|
|
6971
7499
|
@HCI_Event.event
|
|
6972
7500
|
@dataclasses.dataclass
|
|
6973
|
-
class HCI_Command_Complete_Event(HCI_Event):
|
|
7501
|
+
class HCI_Command_Complete_Event(HCI_Event, Generic[_RP]):
|
|
6974
7502
|
'''
|
|
6975
7503
|
See Bluetooth spec @ 7.7.14 Command Complete Event
|
|
6976
7504
|
'''
|
|
@@ -6979,42 +7507,36 @@ class HCI_Command_Complete_Event(HCI_Event):
|
|
|
6979
7507
|
command_opcode: int = field(
|
|
6980
7508
|
metadata=metadata({'size': 2, 'mapper': HCI_Command.command_name})
|
|
6981
7509
|
)
|
|
6982
|
-
return_parameters:
|
|
6983
|
-
|
|
6984
|
-
def map_return_parameters(self, return_parameters):
|
|
6985
|
-
'''Map simple 'status' return parameters to their named constant form'''
|
|
6986
|
-
|
|
6987
|
-
if isinstance(return_parameters, bytes) and len(return_parameters) == 1:
|
|
6988
|
-
# Byte-array form
|
|
6989
|
-
return HCI_Constant.status_name(return_parameters[0])
|
|
6990
|
-
|
|
6991
|
-
if isinstance(return_parameters, int):
|
|
6992
|
-
# Already converted to an integer status code
|
|
6993
|
-
return HCI_Constant.status_name(return_parameters)
|
|
6994
|
-
|
|
6995
|
-
return return_parameters
|
|
7510
|
+
return_parameters: _RP = field(metadata=metadata("*"))
|
|
6996
7511
|
|
|
6997
7512
|
@classmethod
|
|
6998
7513
|
def from_parameters(cls, parameters: bytes) -> Self:
|
|
6999
7514
|
event = cls(**HCI_Object.dict_from_bytes(parameters, 0, cls.fields))
|
|
7000
7515
|
event.parameters = parameters
|
|
7001
|
-
|
|
7002
|
-
|
|
7003
|
-
|
|
7004
|
-
|
|
7005
|
-
|
|
7006
|
-
|
|
7007
|
-
|
|
7008
|
-
|
|
7009
|
-
|
|
7010
|
-
|
|
7011
|
-
|
|
7012
|
-
|
|
7013
|
-
|
|
7014
|
-
|
|
7516
|
+
return_parameters_bytes = parameters[3:]
|
|
7517
|
+
|
|
7518
|
+
# Find the class for the matching command.
|
|
7519
|
+
subclass = HCI_Command.command_classes.get(event.command_opcode)
|
|
7520
|
+
|
|
7521
|
+
# Deal with unknown commands.
|
|
7522
|
+
if subclass is None or not issubclass(subclass, HCI_SyncCommand):
|
|
7523
|
+
if subclass is not None:
|
|
7524
|
+
# Check that the subclass is one that has return parameters.
|
|
7525
|
+
logger.warning(
|
|
7526
|
+
'HCI Command Complete event with opcode for a class that is not'
|
|
7527
|
+
' an HCI_SyncCommand subclass: '
|
|
7528
|
+
f'opcode={event.command_opcode:#04x}, '
|
|
7529
|
+
f'type={subclass.__name__}'
|
|
7015
7530
|
)
|
|
7016
|
-
|
|
7017
|
-
|
|
7531
|
+
event.return_parameters = HCI_GenericReturnParameters(
|
|
7532
|
+
data=return_parameters_bytes
|
|
7533
|
+
) # type: ignore[assignment]
|
|
7534
|
+
return event
|
|
7535
|
+
|
|
7536
|
+
# Parse the return parameters bytes into an object.
|
|
7537
|
+
event.return_parameters = subclass.parse_return_parameters(
|
|
7538
|
+
return_parameters_bytes
|
|
7539
|
+
) # type: ignore[assignment]
|
|
7018
7540
|
|
|
7019
7541
|
return event
|
|
7020
7542
|
|
|
@@ -7023,7 +7545,7 @@ class HCI_Command_Complete_Event(HCI_Event):
|
|
|
7023
7545
|
self.__dict__,
|
|
7024
7546
|
self.fields,
|
|
7025
7547
|
' ',
|
|
7026
|
-
{'return_parameters':
|
|
7548
|
+
{'return_parameters': lambda x: "\n" + x.to_string(indentation=' ')},
|
|
7027
7549
|
)
|
|
7028
7550
|
|
|
7029
7551
|
|
|
@@ -7452,6 +7974,7 @@ class HCI_Vendor_Event(HCI_Event):
|
|
|
7452
7974
|
|
|
7453
7975
|
|
|
7454
7976
|
# -----------------------------------------------------------------------------
|
|
7977
|
+
@dataclasses.dataclass
|
|
7455
7978
|
class HCI_AclDataPacket(HCI_Packet):
|
|
7456
7979
|
'''
|
|
7457
7980
|
See Bluetooth spec @ 5.4.2 HCI ACL Data Packets
|
|
@@ -7459,8 +7982,14 @@ class HCI_AclDataPacket(HCI_Packet):
|
|
|
7459
7982
|
|
|
7460
7983
|
hci_packet_type = HCI_ACL_DATA_PACKET
|
|
7461
7984
|
|
|
7462
|
-
|
|
7463
|
-
|
|
7985
|
+
connection_handle: int
|
|
7986
|
+
pb_flag: int
|
|
7987
|
+
bc_flag: int
|
|
7988
|
+
data_total_length: int
|
|
7989
|
+
data: bytes
|
|
7990
|
+
|
|
7991
|
+
@classmethod
|
|
7992
|
+
def from_bytes(cls, packet: bytes) -> HCI_AclDataPacket:
|
|
7464
7993
|
# Read the header
|
|
7465
7994
|
h, data_total_length = struct.unpack_from('<HH', packet, 1)
|
|
7466
7995
|
connection_handle = h & 0xFFF
|
|
@@ -7469,25 +7998,22 @@ class HCI_AclDataPacket(HCI_Packet):
|
|
|
7469
7998
|
data = packet[5:]
|
|
7470
7999
|
if len(data) != data_total_length:
|
|
7471
8000
|
raise InvalidPacketError('invalid packet length')
|
|
7472
|
-
return
|
|
7473
|
-
connection_handle,
|
|
8001
|
+
return cls(
|
|
8002
|
+
connection_handle=connection_handle,
|
|
8003
|
+
pb_flag=pb_flag,
|
|
8004
|
+
bc_flag=bc_flag,
|
|
8005
|
+
data_total_length=data_total_length,
|
|
8006
|
+
data=data,
|
|
7474
8007
|
)
|
|
7475
8008
|
|
|
7476
|
-
def __bytes__(self):
|
|
8009
|
+
def __bytes__(self) -> bytes:
|
|
7477
8010
|
h = (self.pb_flag << 12) | (self.bc_flag << 14) | self.connection_handle
|
|
7478
8011
|
return (
|
|
7479
8012
|
struct.pack('<BHH', HCI_ACL_DATA_PACKET, h, self.data_total_length)
|
|
7480
8013
|
+ self.data
|
|
7481
8014
|
)
|
|
7482
8015
|
|
|
7483
|
-
def
|
|
7484
|
-
self.connection_handle = connection_handle
|
|
7485
|
-
self.pb_flag = pb_flag
|
|
7486
|
-
self.bc_flag = bc_flag
|
|
7487
|
-
self.data_total_length = data_total_length
|
|
7488
|
-
self.data = data
|
|
7489
|
-
|
|
7490
|
-
def __str__(self):
|
|
8016
|
+
def __str__(self) -> str:
|
|
7491
8017
|
return (
|
|
7492
8018
|
f'{color("ACL", "blue")}: '
|
|
7493
8019
|
f'handle=0x{self.connection_handle:04x}, '
|
|
@@ -7498,6 +8024,7 @@ class HCI_AclDataPacket(HCI_Packet):
|
|
|
7498
8024
|
|
|
7499
8025
|
|
|
7500
8026
|
# -----------------------------------------------------------------------------
|
|
8027
|
+
@dataclasses.dataclass
|
|
7501
8028
|
class HCI_SynchronousDataPacket(HCI_Packet):
|
|
7502
8029
|
'''
|
|
7503
8030
|
See Bluetooth spec @ 5.4.3 HCI SCO Data Packets
|
|
@@ -7505,8 +8032,13 @@ class HCI_SynchronousDataPacket(HCI_Packet):
|
|
|
7505
8032
|
|
|
7506
8033
|
hci_packet_type = HCI_SYNCHRONOUS_DATA_PACKET
|
|
7507
8034
|
|
|
7508
|
-
|
|
7509
|
-
|
|
8035
|
+
connection_handle: int
|
|
8036
|
+
packet_status: int
|
|
8037
|
+
data_total_length: int
|
|
8038
|
+
data: bytes
|
|
8039
|
+
|
|
8040
|
+
@classmethod
|
|
8041
|
+
def from_bytes(cls, packet: bytes) -> HCI_SynchronousDataPacket:
|
|
7510
8042
|
# Read the header
|
|
7511
8043
|
h, data_total_length = struct.unpack_from('<HB', packet, 1)
|
|
7512
8044
|
connection_handle = h & 0xFFF
|
|
@@ -7516,8 +8048,11 @@ class HCI_SynchronousDataPacket(HCI_Packet):
|
|
|
7516
8048
|
raise InvalidPacketError(
|
|
7517
8049
|
f'invalid packet length {len(data)} != {data_total_length}'
|
|
7518
8050
|
)
|
|
7519
|
-
return
|
|
7520
|
-
connection_handle,
|
|
8051
|
+
return cls(
|
|
8052
|
+
connection_handle=connection_handle,
|
|
8053
|
+
packet_status=packet_status,
|
|
8054
|
+
data_total_length=data_total_length,
|
|
8055
|
+
data=data,
|
|
7521
8056
|
)
|
|
7522
8057
|
|
|
7523
8058
|
def __bytes__(self) -> bytes:
|
|
@@ -7527,18 +8062,6 @@ class HCI_SynchronousDataPacket(HCI_Packet):
|
|
|
7527
8062
|
+ self.data
|
|
7528
8063
|
)
|
|
7529
8064
|
|
|
7530
|
-
def __init__(
|
|
7531
|
-
self,
|
|
7532
|
-
connection_handle: int,
|
|
7533
|
-
packet_status: int,
|
|
7534
|
-
data_total_length: int,
|
|
7535
|
-
data: bytes,
|
|
7536
|
-
) -> None:
|
|
7537
|
-
self.connection_handle = connection_handle
|
|
7538
|
-
self.packet_status = packet_status
|
|
7539
|
-
self.data_total_length = data_total_length
|
|
7540
|
-
self.data = data
|
|
7541
|
-
|
|
7542
8065
|
def __str__(self) -> str:
|
|
7543
8066
|
return (
|
|
7544
8067
|
f'{color("SCO", "blue")}: '
|
|
@@ -7556,7 +8079,7 @@ class HCI_IsoDataPacket(HCI_Packet):
|
|
|
7556
8079
|
See Bluetooth spec @ 5.4.5 HCI ISO Data Packets
|
|
7557
8080
|
'''
|
|
7558
8081
|
|
|
7559
|
-
hci_packet_type
|
|
8082
|
+
hci_packet_type = HCI_ISO_DATA_PACKET
|
|
7560
8083
|
|
|
7561
8084
|
connection_handle: int
|
|
7562
8085
|
data_total_length: int
|