Dual-Chip Architecture & Device Model
Understanding the ReAI Recording Card's dual-MCU hardware boundary eliminates 90% of timeout and state-conflict issues.
ReAI Recording Card SDK Documentation › Architecture & State Model
SDK v0.0.9 (MIT)nRF52840 (BLE) + ESP32-C3 (Wi-Fi)Main v0.3.x · Wi-Fi v0.1.x
Dual-Chip Responsibilities
| Chip | Role | Power Policy | Interface |
|---|---|---|---|
| Nordic nRF52840 | 16 kHz PDM capture, 4:1 IMA ADPCM encoding, SD card owner (idle), button/switch/LED/OLED, BLE 5 | Always powered (deep-sleep capable) | BLE NUS (6e400001-...) + Secure DFU (0xFE59) |
| Espressif ESP32-C3 | 2.4 GHz Wi-Fi AP/STA, HTTP fast transfer, STA upload, Wi-Fi OTA | On-demand (powered only after WIFI_OPEN) | nRF UART passthrough + SoftAP HTTP (192.168.4.1:80) |
Three Core Protocol Rules
- Strict Command Serialization: The wire protocol carries no request ID; only one command may be in flight per BLE connection at a time.
- Wi-Fi Power Determines SD Card Ownership (
STATE_INFO.wifiOpen):wifiOpen == false: nRF owns the SD card (STORAGE,FILE_*,RECORD_START,RECORD_MARKwork; ESP32 passthrough commands fail fast withWifiModulePoweredDown).wifiOpen == true: ESP32 owns the SD card (AP HTTP/api/files,WIFI_*,UPLOAD_*,OTA_WIFI_*work; nRF SD commands fail fast withSdOwnedByWifiModule).
- Shared Binary Channel (
0x00Prefix): Both realtime audio andFILE_UPLOADbinary frames share the0x00prefix; the SDK prevents mixing them by rejecting BLE file transfers while a realtime session is active (RealtimeRecordingActive).