4. File Management & BLE / .apm Transfer
Recordings are stored as 4:1 IMA ADPCM .apm files paired with .txt timestamp sidecars. Use BLE (FILE_UPLOAD / FILE_UPLOAD_OLDEST) for short files (3–8 KB/s) or SoftAP HTTP for MB-scale recordings.
ReAI Recording Card SDK Documentation › Files & BLE Transfer
SDK v0.0.9 (MIT)BLE 5 NUS (wifiOpen == false)Core >= 0.3.0 · Session fields >= 0.3.8 · FILE_UPLOAD_OLDEST >= 0.3.13
Key Rules
- Take semantics:
FILE_UPLOADandFILE_UPLOAD_OLDESTdelete the source.APMand.TXTupon emittingend(passkeep: trueon >= 0.3.9 to keep). - Session markers (>= 0.3.8):
FILE_LISTreturns.APMentries withsession,seq,start_at, andsynced. - Field names:
FILE_DELETEexpects{"filename":"..."}whereasFILE_UPLOADexpects{"name":"..."}.
Code Examples
javascript
const files = await client.listFiles();
const taken = await client.takeOldestFile();
const { wav, durationSecs } = decodeApmToWav(taken.data);rust
let files = device.list_files(None).await?;
let saved = device.take_oldest_file_to_dir("./downloads").await?;
let wav = saved.to_wav().await?;Live Web Demo
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.
Wire Protocol Log (BLE NUS / HTTP)
Connect a real card or Virtual Card Simulator to inspect live protocol frames.