Files
xteink-apps/apps/BLETest/README.md
T
2026-07-30 15:23:16 -04:00

1.1 KiB

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