-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Description
The following command fails on response parsing...
from btsocket import btmgmt_sync
from btsocket.btmgmt_protocol import AddressType
response = btmgmt_sync.send('AddDevice', 0, '00:11:22:33:44:55', [AddressType.BREDR], 1)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/.../venv/lib/python3.12/site-packages/btsocket/btmgmt_sync.py", line 28, in send
data = btmgmt_protocol.reader(raw_data)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/.../venv/lib/python3.12/site-packages/btsocket/btmgmt_protocol.py", line 1083, in reader
evt_params = header.decode(pckt)
^^^^^^^^^^^^^^^^^^^
File "/.../venv/lib/python3.12/site-packages/btsocket/btmgmt_protocol.py", line 238, in decode
data_type.decode(pkt[pointer:pointer + param.width])
File "/.../venv/lib/python3.12/site-packages/btsocket/btmgmt_protocol.py", line 110, in decode
self.value = Events(int.from_bytes(data, byteorder='little'))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.12/enum.py", line 757, in __call__
return cls.__new__(cls, value)
^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.12/enum.py", line 1171, in __new__
raise ve_exc
ValueError: 42 is not a valid EventsMetadata
Metadata
Assignees
Labels
No labels