Spanda

Bluetooth and BLE

Spanda models Bluetooth classic and BLE at the language level for sensor pairing and trusted-device policies.

Robot configuration

robot Rover {
  bluetooth {
    scan for devices where name matches /^sensor-/;
    pair trusted_only;
  }
}

BLE services

Declare GATT services for typed BLE interaction:

ble_service HeartRateSensor {
  uuid: "180D";
}

Triggers

on bluetooth.device_connected { authenticate_device(); }

Types

Security

Capability Purpose
bluetooth.scan Device discovery
bluetooth.pair Pairing and trust establishment

Untrusted devices are rejected when pair trusted_only is configured.

Simulation

simulate_compatibility {
  fault BluetoothDisconnect;
}

See also: Connectivity.