Skip to content

Fix manufacturer data advertising on Linux - #187

Merged
kevincar merged 2 commits into
kevincar:masterfrom
EasyRiderr:fix_manuf_data
Apr 8, 2026
Merged

kevincar merged 2 commits into
kevincar:masterfrom
EasyRiderr:fix_manuf_data

Conversation

@EasyRiderr

Copy link
Copy Markdown
Contributor

Fix #186

Tests are passing:

TEST_HARDWARE=True python -m pytest -s

======================================================================== test session starts ========================================================================
platform linux -- Python 3.12.3, pytest-9.0.2, pluggy-1.6.0
rootdir: /home/user/Documents/bless
configfile: pytest.ini
plugins: asyncio-1.3.0
asyncio: mode=Mode.AUTO, debug=False, asyncio_default_fixture_loop_scope=function, asyncio_default_test_loop_scope=function
collected 16 items / 2 skipped                                                                                                                                      

test/backends/bluezdbus/test_application.py 
Please connect nowand subscribe to the characteristic be2e8d94-98c7-4af4-bebb-c2fa595e2caf...
Press enter when ready...2026-04-07 18:31:11 pc bless.backends.bluezdbus.dbus.characteristic[248483] DEBUG AcquireNotify on be2e8d94-98c7-4af4-bebb-c2fa595e2caf from 72:2F:0A:1C:7C:A1 on FD 13
2026-04-07 18:31:11 pc bless.backends.bluezdbus.dbus.characteristic[248483] DEBUG Closing RX

Trigger a read and enter the hex value you see below
Value: DEADBABE    
Set the characteristic to the following: BEDDAD
Press enter when ready...
A new value will be sent
Press enter to receive the new value...
2026-04-07 18:31:51 pc bless.backends.bluezdbus.dbus.characteristic[248483] DEBUG Sending update to 72:2F:0A:1C:7C:A1
Enter the New value: BEDBABE
Unsubscribe from the characteristic
Press enter when ready...2026-04-07 18:32:02 pc bless.backends.bluezdbus.dbus.characteristic[248483] DEBUG ReleaseNotify on be2e8d94-98c7-4af4-bebb-c2fa595e2caf from 72:2F:0A:1C:7C:A1

.
test/backends/bluezdbus/test_utils.py .
test/backends/test_server.py ss
test/backends/test_server_multiclient.py s
test/test_bleak_v1_compatibility.py ..2026-04-07 18:32:03 pc bless.backends.characteristic[248483] DEBUG With on_read: None
.2026-04-07 18:32:03 pc bless.backends.characteristic[248483] DEBUG With on_read: None
..2026-04-07 18:32:03 pc bless.backends.characteristic[248483] DEBUG With on_read: None
.2026-04-07 18:32:03 pc bless.backends.characteristic[248483] DEBUG With on_read: None
.2026-04-07 18:32:03 pc bless.backends.characteristic[248483] DEBUG With on_read: None
..2026-04-07 18:32:03 pc bless.backends.characteristic[248483] DEBUG With on_read: None
2026-04-07 18:32:03 pc bless.backends.characteristic[248483] DEBUG With on_read: None
.
test/test_init.py .

========================================================================= warnings summary ==========================================================================
../../Downloads/env/bless/lib/python3.12/site-packages/_pytest/config/__init__.py:1428
  /home/user/Downloads/env/bless/lib/python3.12/site-packages/_pytest/config/__init__.py:1428: PytestConfigWarning: Unknown config option: timeout
  
    self._warn_or_fail_if_strict(f"Unknown config option: {key}\n")

bless/backends/bluezdbus/dbus/session.py:28
  /home/user/Documents/bless/bless/backends/bluezdbus/dbus/session.py:28: DeprecationWarning: There is no current event loop
    loop: asyncio.AbstractEventLoop = asyncio.get_event_loop(),

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
======================================================= 13 passed, 5 skipped, 2 warnings in 61.12s (0:01:01) ========================================================

And manufacturer data are advertised:
fixed

Signed-off-by: Yoan Dumas <yo_dumas@hotmail.fr>
Signed-off-by: Yoan Dumas <yo_dumas@hotmail.fr>
@kevincar
kevincar merged commit af799d9 into kevincar:master Apr 8, 2026
9 checks passed
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.

Advertising manufacturer data is broken on Linux

2 participants