adafruit / adafruit/Adafruit_CircuitPython_BLE

When including UARTService instance as an argument for ProvideServicesAdvertisement - .services doesn't return True

Open
#222 4 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
138
Forks
58
PR merge metrics
No merged PRs in 30d

Description

When attempting to check for the service in central.py, if uart is listed in the advertisement of peripheral.py, the condition never seems to become true.

**Peripheral.py**
ad = ProvideServicesAdvertisement(hid, uart)

**Central.py**
if ad.complete_name == 'rhf_periph' and HIDService in ad.services:

Result: False

**Peripheral.py**
ad = ProvideServicesAdvertisement(uart)

**Central.py**
if ad.complete_name == 'rhf_periph' and UARTService in ad.services:

Result: False

**Peripheral.py**
ad = ProvideServicesAdvertisement(hid)

**Central.py**
if ad.complete_name == 'rhf_periph' and HIDService in ad.services:

Result: True

[central.py](https://github.com/user-attachments/files/27812962/central.py)

[peripheral.py](https://github.com/user-attachments/files/27812967/peripheral.py)

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the provided central.py and peripheral.py examples, then inspect ProvideServicesAdvertisement and how ad.services is populated and compared. Reproduce the HID-only, UART-only, and combined advertisements, and verify that the advertised service checks return the expected results for both services.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
embedded-iot, networking
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.