Skip to content

1. Connection, Telemetry & Hardware Self-Test ​

Connect via BLE NUS, calibrate the device RTC (SYNC_TIME), inspect firmware versions (BASE_INFO), battery (BATTERY), SD storage (STORAGE), and run the 11-module diagnostic (TEST_CHECK).

ReAI Recording Card SDK Documentation › Connection & Device Telemetry
SDK v0.0.9 (MIT)BLE 5 NUSMain >= 0.3.0 (BASE_INFO wifiVersion cached/built-in >= 0.3.18)

Handshake & Command Reference ​

CommandPayloadResponse HighlightsNotes
SYNC_TIME{"timestamp": 1794000000}code, timestampCall immediately on connect so recordings get synced_ timestamps
BASE_INFONoneversion, versionCode, deviceId, deviceName, wifiVersion, wifiVersionCodeMain >= 0.3.18 includes paired Wi-Fi FW constants even before opening Wi-Fi
STATE_INFONoneauthState, recordRealtimeEnabled, wifiOpen, bootType, lowPowerModewifiOpen governs SD card ownership
BATTERYNonelevel, levelText, isCharging, voltage, adc_rawvoltage in mV
STORAGENonetotal, usedMB; requires wifiOpen == false
TEST_CHECKNone11 frames {"key":"...","result":true}No index:-1 sentinel; wait for 11 frames

Code Examples ​

javascript
const NUS_SERVICE = "6e400001-b5a3-f393-e0a9-e50e24dcca9e";
const device = await navigator.bluetooth.requestDevice({
  filters: [{ services: [NUS_SERVICE] }, { namePrefix: "DYJ" }],
  optionalServices: [NUS_SERVICE],
});
const server = await device.gatt.connect();
const service = await server.getPrimaryService(NUS_SERVICE);
const writeChar = await service.getCharacteristic("6e400002-b5a3-f393-e0a9-e50e24dcca9e");
const notifyChar = await service.getCharacteristic("6e400003-b5a3-f393-e0a9-e50e24dcca9e");
await notifyChar.startNotifications();
await writeChar.writeValueWithResponse(new TextEncoder().encode("BASE_INFO\r\n"));
rust
use std::time::Duration;
use reai_card_sdk::DeviceManager;

let manager = DeviceManager::new().await?;
let devices = manager.scan(Duration::from_secs(5)).await?;
let device = manager.connect(devices.first().expect("no card")).await?;

println!("{:?}", device.device_info().await?);
println!("{:?}", device.battery().await?);
println!("{:?}", device.test_modules().await?);

Live Web Demo ​

Disconnected
Web Bluetooth is unavailable in this browser/context (requires Chrome/Edge on HTTPS or localhost). You can still test every API using the Virtual Card Simulator.
DEVICE_ID / NAME
-
MAIN / WIFI FIRMWARE
-
BATTERY
-
STORAGE (MB)
-
Wire Protocol Log (BLE NUS / HTTP)
Connect a real card or Virtual Card Simulator to inspect live protocol frames.

Downloadable Example ​

HTML + Web BluetoothExample 01 · Web Bluetooth Connect, Time Sync & Self-Test

Zero-dependency single HTML file connecting via Web Bluetooth, syncing RTC time, displaying telemetry, and running TEST_CHECK.

01-ble-connect-info.html

ReAI Recording Card Developer Documentation · MIT Open Hardware SDK · Partner Assets