BLE Test
Basic BLE scanner and client for testing the CrossPoint BLE API.
Features
- Scan for nearby BLE devices (3 second scan)
- Connect to a device by address
- Disconnect from current device
- Init/deinit BLE stack
Controls
- Up/Down: Navigate menu or device list
- OK: Select / Connect
- Back: Go back / Exit app
Usage
- Launch app - BLE stack auto-inits
- Select "Scan devices" to find nearby BLE peripherals
- Navigate results with side buttons, press OK to connect
- Press BACK to disconnect or return to menu
API Reference
See ble.* functions in the CrossPoint Lua API:
ble.init(name?) -- init stack
ble.scan(duration?) -- scan, returns table of devices
ble.connect(address) -- connect to device
ble.disconnect() -- disconnect
ble.isConnected() -- check connection
ble.read(svc, char) -- read characteristic
ble.write(svc, char, val) -- write characteristic
ble.startAdvertising(name) -- advertise as peripheral
ble.stopAdvertising() -- stop advertising
ble.deinit() -- tear down