Add vendor/proprietary BLE parser extension examples, tests, and docs#188
Draft
Add vendor/proprietary BLE parser extension examples, tests, and docs#188
Conversation
Agent-Logs-Url: https://github.com/RonanB96/bluetooth-sig-python/sessions/4d8b35b1-c0dc-4061-bd4b-f96e0f9c3f3e Co-authored-by: RonanB96 <22995167+RonanB96@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add documentation and examples for vendor parser extensions
Add vendor/proprietary BLE parser extension examples, tests, and docs
Apr 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes the gap for consumers who need to register parsers for non-SIG (proprietary) UUIDs — previously undocumented and with no examples.
Changes
examples/vendor_parsers/register_parsers.pyTwo real-world proprietary characteristic implementations:
NordicLEDCharacteristic,NordicButtonCharacteristic) — single-byte LED/button state using real Nordic Semiconductor proprietary UUIDs from the nRF5 SDK LBS exampleGoveeThermometerCharacteristic) — 4-bytesint16 LE temp ÷ 100 °C+uint16 LE humidity ÷ 100 %, result typed as amsgspec.Structregister_all()uses explicitregister_custom_characteristic_class(..., override=True)rather than auto-registration, making it safe to call idempotently across any lifecycle phase (including test fixtures that clear registries between runs).tests/gatt/characteristics/test_vendor_parsers.py20 tests covering parse, encode, round-trip, error cases (empty/short payload →
CharacteristicParseError), and translator UUID dispatch for all three vendor characteristics. Anautousefixture callsregister_all()before each test.docs/source/how-to/usage.mdNew "Vendor / Proprietary Parser Extensions" section with a 3-step walkthrough: define class → register → parse, with inline examples and links to the example script and tests.
Supporting changes
pyproject.toml: addedARG002toexamples/**per-file-ignores —ctx/validateare required by theBaseCharacteristicinterface even when unused in simple implementationstest_characteristic_test_coverage.py: addedtest_vendor_parsers.pyto_EXCLUDED_TEST_FILES(cross-cutting test, not characteristic-specific, same pattern astest_custom_characteristics.py)Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
img.shields.io/opt/hostedtoolcache/Python/3.11.15/x64/bin/python python -m pytest tests/ -x -q --tb=short(dns block)If you need me to access, download, or install something from one of these locations, you can either: