Skip to content

winrtble: also receive on the Coded PHY where supported#463

Open
userepo wants to merge 1 commit into
deviceplug:devfrom
userepo:coded-phy
Open

winrtble: also receive on the Coded PHY where supported#463
userepo wants to merge 1 commit into
deviceplug:devfrom
userepo:coded-phy

Conversation

@userepo

@userepo userepo commented Jul 2, 2026

Copy link
Copy Markdown

What

One line in BLEWatcher::start: enable UseCodedPhy(true) on the
BluetoothLEAdvertisementWatcher, next to the existing unconditional
SetAllowExtendedAdvertisements(true) and with the same error-ignored
pattern.

Why

Without it, the Windows backend never receives BLE 5 coded-primary
(long range) advertisements
, even on adapters that support them.
Extended advertisements are announced on the primary channels using
either the 1M or the Coded PHY (2M is secondary-channel-only, and the
controller follows AUX pointers to any secondary PHY automatically);
AllowExtendedAdvertisements alone leaves the scanner listening on 1M
primaries only. UseCodedPhy is documented to take effect only
alongside AllowExtendedAdvertisements, which this watcher already
sets, so this completes the pair.

The call fails harmlessly on systems without Coded PHY support (older
Windows builds / non-coded adapters); the error is ignored exactly like
the extended flag above it, so behavior there is unchanged. On supported
systems, 1M reception is unaffected — coded scanning is additive.

Extended advertisements are already enabled unconditionally via
SetAllowExtendedAdvertisements with the error ignored; enable
UseCodedPhy the same way, so coded-primary (long range) BLE 5
advertisements are received on adapters that support them. On systems
without Coded PHY support the call fails and is ignored, leaving
behavior unchanged.
@qwandor qwandor changed the base branch from master to dev July 2, 2026 09:15
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.

1 participant