Skip to content

Conversation

@martin-flaska
Copy link

@martin-flaska martin-flaska commented Jun 19, 2025

ValueError: 0 is not a valid ADType

This is to fix an unhandled exception when receiving unsupported / invalid ADType value (0 - in my case).

Discussed also in this reported issue: #13

I am not sure about the error message complexity, but in a case it happens rarely, it could be helpful.

An error log example:

2025-06-19 19:28:05,465 [  ERROR] btsocket.btmgmt_protocol: Packet.decode: failed to decode eir_data as EIRData. Offset: 14, width: 65535, pkt: c1 ce 55 1c 5e 68 01 9c 00 00 00 00 1f 00 02 01 06 1b 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 02 f0 ff. Error: EIRData.decode: Invalid ADType: 0x00, data len: 31, data: 1b 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 02 f0 ff

ValueError: 0 is not a valid ADType

Signed-off-by: Martin Flaska <extern-mfl@mission-embedded.com>
@martin-flaska martin-flaska force-pushed the mfl-EIRData-parsing-error-fix branch from 522c9ba to 0452b14 Compare June 19, 2025 13:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant