micropython / micropython/micropython-lib

AIOBLE - ScanResult only returns first service when multiple are present in advertisement

Open
#475 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
2.9k
Forks
1.1k
Avg merge
7d 6h
Merged PRs (30d)
3

Description

When a device advertises multiple service UUIDs, it seems only the first one gets decoded.

I'm doing something like:

async with aioble.scan(5000, interval_us=30000, window_us=30000, active=True) as scanner:
    async for result in scanner:
        for service in result.services():
            print(service)

With an advertising packet like this:
020106050318182618
I think result.services() should yield both 0x1818 and 0x1826, but it only seems to decode the first one.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the aioble.scan() entry point and the result.services() method, reproducing the issue with the advertised packet 020106050318182618. Verify that a scan result containing multiple service UUIDs yields both 0x1818 and 0x1826, rather than only the first service.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.