Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

EdgeSentinel-RK3568

EdgeSentinel-RK3568 is a privacy-preserving multimodal edge AI event recorder for RK3568 boards.

The first runnable version does not require the camera to be present. It focuses on the core black-box loop:

RK3568 board signals / CAN FD external vibration / future audio-video signals
    -> ring buffer
    -> low-cost event trigger
    -> JSONL event index
    -> later SQLite/Web review

Current C MVP

  • Simulate vibration/acceleration, light, ADC, and audio-energy signals. The GEC RK3568B2 board is not treated as having an onboard six-axis IMU; real vibration is expected from an external MCU over CAN FD.
  • Detect events from vibration spikes, acceleration spikes, temperature limits, light jumps, ADC jumps, and audio-energy spikes.
  • Persist raw samples and event metadata as JSONL files.
  • Build with GCC as edgeblackboxd.
  • Keep the RA8D1 CAN protocol as a later expansion, not as the first-stage dependency.

Quick Start On Windows

.\scripts\build_windows.ps1
.\build\edgeblackboxd.exe run-demo --seconds 25 --out data

The generated files are data/samples.jsonl and data/events.jsonl.

Target Run On RK3568 Linux

Install only the basics first:

sudo apt update
sudo apt install -y build-essential alsa-utils v4l-utils

Build and run the camera-free first stage:

make
./edgeblackboxd run-demo --seconds 60 --out data

Check RK3568 devices before replacing simulators with real sources:

./edgeblackboxd probe-rk3568 --output docs/bringup_notes.md

The generated bring-up notes will show audio devices, camera devices, IIO sensor paths, storage, and system time status.

Off-Board Engineering Closure

Most of the project can be completed before the RK3568 is on the desk:

  • NPU admission scheduling is implemented and host-testable.
  • Evidence bundles, sealing, retention, Web review, and the TinyMLP classifier run with simulated video/CAN sources.
  • Application-level OTA packaging, signature verification, health checks, and rollback are documented in docs/OTA_AND_METRICS.md.
  • Board metrics collection is ready; on RK3568 Debian it records CPU, memory and thermal CSV samples around a real run-blackbox command.
  • Adaptive EWMA audio thresholding and offline FFT audio experiments are documented in docs/ANOMALY_DETECTION.md.
  • YOLO/RKNN conversion readiness can be prepared and checked with python tools/prepare_vision_assets.py --fetch-yolo and python tools/rknn_readiness.py --cfg models/vision.cfg.
  • Board-side vision validation is scripted as bash scripts/board_vision_validate.sh USER@BOARD_IP once vision.rknn and the camera are present.

Generated YOLO/RKNN artifacts are intentionally not committed. Recreate them with tools/fetch_yolo_assets.py, tools/prepare_vision_assets.py, and ml/export_rknn.py.

Repository Layout

include/
  edgeblackbox.h         C runtime public structures and functions
src/
  main.c                C command-line entry point
  detector.c            C ring buffer and event trigger logic
  rk3568_sim.c          Camera-free RK3568 signal simulator
  storage.c             JSONL sample/event persistence
  probe.c               RK3568 Linux device probe
scripts/
  build_windows.ps1     Local Windows GCC build helper
prototype/
  README.md             Notes for the older Python prototype
edgeblackbox/
  Python prototype and debug web viewer
  sources/
    Optional Python prototype input sources
docs/
  hardware_plan.md       Board resources and wiring plan
  rk3568_stage1.md       RK3568-only first-stage plan
  ra8d1_can_protocol.md  Future CAN frame contract
tests/
  test_protocol.py
  test_detector.py

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages