Files
xteink-apps/apps/BLETest
evan 39afd7fac7 build: add a shared editor config and reformat apps to match
The apps were on four-space indent only because nothing pinned a style;
.editorconfig is what lua-language-server reads on save, so the tree now
matches the sibling repos. Manifests and the catalog regenerate from the
reformatted sources.
2026-08-04 13:20:40 -04:00
..
2026-07-30 15:23:16 -04:00

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

  1. Launch app - BLE stack auto-inits
  2. Select "Scan devices" to find nearby BLE peripherals
  3. Navigate results with side buttons, press OK to connect
  4. 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