Skip to content

verify macOS BLE peripheral mode and discovery end-to-end on actual hardware #73

@Dancode-188

Description

@Dancode-188

Background

The macOS BLE implementation uses objc2-core-bluetooth (a Rust binding for Apple's CoreBluetooth framework) for peripheral mode. Central mode (scanning) uses btleplug as on all other platforms. The implementation was written from the API documentation without any runtime testing. We have no macOS hardware to test with.

This is distinct from the Linux situation, where specific bugs were identified and fixed based on source analysis. For macOS, we do not know if the implementation works at all.

Known macOS behavior the implementation accounts for

CoreBluetooth silently strips service data from advertisements. A macOS peripheral will advertise only its service UUID, not the service data payload that carries the short_id. This is handled in discover() via the ServicesAdvertisement arm, which emits an announcement with short_id: None. Identity is established during the Noise_XX handshake instead.

Acceptance criteria

  • BLE peripheral advertising started appears in /tmp/pathweave.log on the macOS machine
  • BLE scan started appears in /tmp/pathweave.log on the macOS machine
  • The scanning peer (Windows or Linux) logs CentralEvent::ServicesAdvertisement for the macOS machine
  • The macOS device is visible in nRF Connect advertising UUID 82dfc0ba-e2b5-4e65-ad11-c7238ca545c9
  • The pw-chat TUI on both machines shows the peer connected with BLE as the active transport
  • A message sent from one side is received on the other over BLE

How to test

Two machines: one running macOS and one running Windows or Linux. Both running pw-chat.

On the macOS machine:

RUST_LOG=pathweave_transport_ble=debug ./target/release/pw-chat

Logs write to /tmp/pathweave.log when RUST_LOG is set.

What to check if it fails

  • Peripheral fails to start: check that the binary has Bluetooth permission in System Settings under Privacy and Security.
  • Peer not discovered: verify the macOS device is visible in nRF Connect with UUID 82dfc0ba-e2b5-4e65-ad11-c7238ca545c9.
  • Discovery works but connection fails: share the full log from both sides here.

Out of scope

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions