Skip to content

Fix eddystone scanner for controllers without extended advertising support (Bugfix)#2293

Closed
Copilot wants to merge 1 commit intorevise_eddystone_scannerfrom
copilot/sub-pr-2260
Closed

Fix eddystone scanner for controllers without extended advertising support (Bugfix)#2293
Copilot wants to merge 1 commit intorevise_eddystone_scannerfrom
copilot/sub-pr-2260

Conversation

Copy link

Copilot AI commented Jan 16, 2026

Description

The eddystone scanner failed on Bluetooth 5.0 controllers lacking extended advertising support. The scanner assumed all BT 5.0+ controllers support extended advertising, causing failures when attempting to use extended scan commands.

Changes made:

  • Dynamic feature detection: Added HCI commands to query controller capabilities (LE extended advertising support, max advertising data length) before scan initialization
  • Graceful fallback: Scanner now falls back to standard LE advertising reports (EVT_LE_ADVERTISING_REPORT) when extended advertising is unsupported
  • Enhanced error handling: Added HCI command status monitoring to log failures with error codes and payloads for debugging
  • Buffer sizing: Dynamic recv buffer size based on controller's max advertising data length (defaults to 255 when query fails)
  • Test coverage: Updated unit tests to validate behavior with both standard and extended advertising report types

The scanner now successfully detects Eddystone beacons on controllers with Extended advertising support: False, as verified on RPi4 with Cypress BT 5.0 controller (HCI v5.0).

Resolved issues

Documentation

  • No documentation changes required - internal implementation fix
  • Tests updated to cover both standard and extended advertising report handling
  • Test output demonstrates successful beacon detection on non-extended-advertising controllers

Tests

Verified on RPi4 with Bluetooth 5.0 controller (Cypress Semiconductor, HCI v5.0):

# Extended advertising support: False
# Max advertising data length: 255
Warning: HCI Command failed. Error code: 0xc
  Found an eddystone report
Eddystone beacon detected: [Adv Report Type: LE_ADVERTISING_REPORT(2)] URL: https://www.ubuntu.com.com/

Scanner successfully:

  • Detects missing extended advertising capability
  • Falls back to standard LE advertising reports
  • Logs HCI command failures for debugging
  • Detects Eddystone beacons despite controller limitations

✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI changed the title [WIP] Fix bugged behaviour of eddystone scanner Fix eddystone scanner for controllers without extended advertising support (Bugfix) Jan 16, 2026
Copilot AI requested a review from pieqq January 16, 2026 06:38
@pieqq
Copy link
Collaborator

pieqq commented Jan 23, 2026

Thanks no thanks.

@pieqq pieqq closed this Jan 23, 2026
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.

2 participants