Skip to content

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_UPLOAD and FILE_UPLOAD_OLDEST delete the source .APM and .TXT upon emitting end (pass keep: true on >= 0.3.9 to keep).
  • Session markers (>= 0.3.8): FILE_LIST returns .APM entries with session, seq, start_at, and synced.
  • Field names: FILE_DELETE expects {"filename":"..."} whereas FILE_UPLOAD expects {"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 ​

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.
Wire Protocol Log (BLE NUS / HTTP)
Connect a real card or Virtual Card Simulator to inspect live protocol frames.

Downloadable Example ​

HTML + Web BluetoothExample 04 · BLE File Manager & Offline .apm Decoder

Browse SD files over BLE, take specific or oldest recordings as WAV, or drop local .apm files for instant offline WAV playback.

04-ble-files-and-apm-decoder.html

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