RNS Logo

rns.recipes

◈ 9ce92808be498e9e05590ff27cbfdfe4
Upcoming RNS 1.6.0 https://rns.recipes/forum/general/upcoming-rns-160-help-testing

RNode over BLE on macOS: is a macOS branch missing in device_bonded()?

Started by InDaMac 2674f54105b646f3... ·

InDaMac 37877d5893a746c6...
#1

Hi, a question about RNodeInterface over BLE on macOS (RNS 1.5.7). Reading RNodeInterface.py, find_target_device() only accepts a device if device_bonded() returns True. device_bonded() has two paths: - Windows: checks the address against the paired devices list from winrt - Linux: reads device.details["props"]["Bonded"] from BlueZ On macOS, bleak uses its CoreBluetooth backend, where device.details holds the CoreBluetooth objects instead of a BlueZ props dict. There is no "props" and no "Bonded", so the function always ends up returning False. If I read it right, an RNode that is paired with the Mac would never pass the filter. With ble:// alone nothing would happen, and with the exact name the log would show "device is not bonded". Two related points: - CoreBluetooth doesn't expose the bonding state to apps at all, so there's nothing to check: macOS handles pairing and encryption by itself on first connection. - CoreBluetooth also hides the real Bluetooth address and gives a per-machine UUID instead, so ble://AA:BB:CC:DD:EE:FF can't match on a Mac, only ble://<name> could. Is RNode over BLE meant to work on macOS? If so, would it make sense to skip the bond check on Darwin, treat the device as bonded and let macOS ask for the PIN on connect? I haven't been able to test this on a real Mac, so I may be missing something, and I'm happy to be corrected.

Post a Reply

Supports Markdown: **bold**, *italic*, `code`, ```code blocks```, [links](url)

Log in to upload images

Quote
Copied to clipboard