canonical / checkbox

Checkbox
https://checkbox.readthedocs.io
GNU General Public License v3.0
30 stars 47 forks source link

`scanner.py` couldn't support Bluetooth 5.4 #834

Closed hanhsuan closed 9 months ago

hanhsuan commented 10 months ago

Bug Description

Bluetooth 5.4 is out and DUTs is starting under test. Therefore, checkbox should add this to class HCIVersion.

class HCIVersion(IntEnum):
    """HCI version enumeration

    https://www.bluetooth.com/specifications/assigned-numbers/host-controller-interface/
    """
    BT_CORE_SPEC_1_0 = 0
    BT_CODE_SPEC_1_1 = 1
    BT_CODE_SPEC_1_2 = 2
    BT_CORE_SPEC_2_0 = 3
    BT_CORE_SPEC_2_1 = 4
    BT_CORE_SPEC_3_0 = 5
    BT_CORE_SPEC_4_0 = 6
    BT_CORE_SPEC_4_1 = 7
    BT_CORE_SPEC_4_2 = 8
    BT_CORE_SPEC_5_0 = 9
    BT_CORE_SPEC_5_1 = 10
    BT_CORE_SPEC_5_2 = 11
    BT_CORE_SPEC_5_3 = 12
    BT_CORE_SPEC_5_4 = 13

To Reproduce

Run checkbox job bluetooth4/beacon_eddystone_url_.*

Environment

Relevant log output

Exception in thread Thread-1:
Traceback (most recent call last):
  File "/usr/lib/python3.10/threading.py", line 1016, in _bootstrap_inner
    self.run()
  File "/usr/lib/python3/dist-packages/checkbox_support/vendor/beacontools/scanner.py", line 147, in run
    self.hci_version = self.get_hci_version()
  File "/usr/lib/python3/dist-packages/checkbox_support/vendor/beacontools/scanner.py", line 174, in get_hci_version
    return HCIVersion(GreedyRange(local_version).parse(resp)[0]["hci_version"])
  File "/usr/lib/python3.10/enum.py", line 385, in __call__
    return cls.__new__(cls, value)
  File "/usr/lib/python3.10/enum.py", line 710, in __new__
    raise ve_exc
ValueError: 13 is not a valid HCIVersion
No EddyStone URL advertisement detected!
Trying again with older beacontools version...
No EddyStone URL advertisement detected!

Additional context

No response

syncronize-issues-to-jira[bot] commented 10 months ago

Thank you for reporting us your feedback!

The internal ticket has been created: https://warthogs.atlassian.net/browse/CHECKBOX-1048.

This message was autogenerated