Skip to content

DeviceInfoService fails on Adafruit CLUE #3892

@silverman

Description

@silverman

Running this BLE HID demo on an Adafruit CLUE doesn't work because of a problem with DeviceInfoService. The offending line is:

device_info = DeviceInfoService(software_revision=adafruit_ble.__version__,
                                manufacturer="Adafruit Industries")

and the stack trace (from running that line in the REPL):

Traceback (most recent call last):
  File "<stdin>", line 2, in <module>
  File "adafruit_ble/services/standard/device_info.py", line 77, in __init__
  File "adafruit_ble/services/__init__.py", line 85, in __init__
  File "adafruit_ble/characteristics/__init__.py", line 163, in __set__
  File "adafruit_ble/characteristics/__init__.py", line 127, in _ensure_bound
  File "adafruit_ble/characteristics/__init__.py", line 150, in __bind_locally
ValueError: max_length must be > 0

Perhaps the fix is to set a default value for max_length that isn't None? But I'm struggling to find where that should be done. In the meantime, commenting out that line allows the demo to run without issue. But I assume it's not a good practice to leave the BLE device info unspecified.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions