Files
fips/packaging/macos/Info.plist
ArjenandJohnathan Corgan 58eae46c16 feat(ble): add a CoreBluetooth backend for macOS
macOS now peers over BLE with Linux, Android and other Macs when the
daemon runs in a login session with Bluetooth permission.

CoreBluetooth is delegate-driven and moves channel bytes through
Foundation streams, the same command-out, callback-in shape as the
Android embedder's radio, so the backend plays the embedder's part in
process rather than implementing BleIo: MacRadio drives CoreBluetooth
from a private serial dispatch queue (no main run loop), installs a fresh
bridge into its slot each time Bluetooth comes up, and pumps each
CBL2CAPChannel with blocking stream I/O on two threads. io_radio gains
what that needs: a blocking delivery for a reader on its own thread,
since a dropped chunk of a byte stream breaks its framing, and a RadioIo
that keeps its radio alive across Bluetooth toggles.

macOS assigns the listener PSM and cannot advertise it, so a Mac serves
it over GATT (Apple's L2CAP PSM characteristic, specified in psm.rs) and
reads a peer's there when its advert carried none. Linux and Android
cannot dial a Mac; the Mac's own dial forms the link, which the link
arbitration admits. CoreBluetooth hides link addresses, so a peer's
identifier is hashed into a stable locally administered BleAddr, and a
configured hci0/AA:... peer cannot be dialled from a Mac.

The fips binary embeds an Info.plist with a Bluetooth usage description,
without which CoreBluetooth kills the process. The Mac has one radio, so
more than one ble instance is a config error there.

Platform-neutral parts (dial PSM decision, address mapping, advert
throttle, stream pumps) are tested on every host; two ignored tests
exercise real hardware.
2026-10-13 20:56:07 +00:00

15 lines
506 B
Plaintext

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleIdentifier</key>
<string>com.fips.daemon</string>
<key>CFBundleName</key>
<string>fips</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>NSBluetoothAlwaysUsageDescription</key>
<string>FIPS uses Bluetooth Low Energy to discover and connect to nearby mesh peers.</string>
</dict>
</plist>