feat: add Bluetooth LE mode, radio power budget and NINA firmware update path
This commit is contained in:
parent
2da15b4356
commit
d821b77d3b
122 changed files with 17008 additions and 1371 deletions
20
README.md
20
README.md
|
|
@ -5,7 +5,7 @@ A portable wireless True Random Number Generator built on an Arduino MKR Vidor 4
|
|||
|
||||
## Design
|
||||
|
||||
Entropy comes from FPGA ring oscillators whose sampled timing jitter is XOR-combined into output bits, with no pseudo-random post-processing. A SAMD21 serves the results over USB, and over HTTP on its own WiFi access point when running without a computer (stationary mode on a charger).
|
||||
Entropy comes from FPGA ring oscillators whose sampled timing jitter is XOR-combined into output bits, with no pseudo-random post-processing. A SAMD21 serves the results over USB, over HTTP on its own WiFi access point (stationary mode, on a charger), or over Bluetooth LE (mobile mode, on battery).
|
||||
|
||||
- 4 independent generators × 90 ring oscillators. Each generator XORs its rings every 120 MHz clock (spatial) and then several consecutive bits (temporal, default 5): about 24 Mbps per generator.
|
||||
- Separate stream per generator, plus a combined stream of all healthy generators
|
||||
|
|
@ -15,19 +15,20 @@ Entropy comes from FPGA ring oscillators whose sampled timing jitter is XOR-comb
|
|||
- Von Neumann extractor that can be toggled on the stream, statistics and amplifier paths
|
||||
- Raw ring captures and frequency measurement for characterization
|
||||
|
||||
The USB and HTTP API is documented in [arduino/strix/API.md](arduino/strix/API.md).
|
||||
The USB, HTTP and BLE API is documented in [arduino/strix/API.md](arduino/strix/API.md).
|
||||
|
||||
## Layout
|
||||
|
||||
- `fpga/rtl/`: Verilog sources; `fpga/sim/`: testbenches; `fpga/src/`: Quartus project
|
||||
- `arduino/strix/`: device firmware
|
||||
- `arduino/strix_capture/`: characterization tool firmware, used by `tools/jitter.py`
|
||||
- `arduino/libraries/`: `StrixFPGA` (FPGA boot, SPI access, embedded FPGA image), `VidorBoot` (vendored subset of Arduino's VidorPeripherals) and `WiFiNINA` (Arduino's library, patched to drive the WiFi module through the FPGA's pin pass-through)
|
||||
- `arduino/strix_nina_passthrough/`: connects USB to the WiFi module's UART for flashing its firmware
|
||||
- `arduino/libraries/`: `StrixFPGA` (FPGA boot, SPI access, embedded FPGA image), `VidorBoot` (vendored subset of Arduino's VidorPeripherals), and Arduino's `WiFiNINA`, `Arduino_SpiNINA` and `ArduinoBLE`, patched to drive the WiFi module through the FPGA's pin pass-through (see `arduino/libraries/STRIX-NINA-LIBRARIES.md`)
|
||||
- `tools/`: FPGA image converter, jitter and statistics experiments, API check
|
||||
|
||||
## Development (Linux)
|
||||
|
||||
The toolchain is managed by [devbox](https://www.jetify.com/devbox): `arduino-cli`, Intel Quartus Prime Lite (Cyclone 10 LP only, through a Nix flake in `nix/`), Icarus Verilog, Python and Rust.
|
||||
The toolchain is managed by [devbox](https://www.jetify.com/devbox): `arduino-cli`, Intel Quartus Prime Lite (Cyclone 10 LP only, through a Nix flake in `nix/`), Icarus Verilog, Rust, and [uv](https://docs.astral.sh/uv/) for the Python tools (`pyproject.toml`, `uv.lock`).
|
||||
|
||||
1. `devbox run setup`: install the Arduino SAMD core (libraries are vendored in `arduino/libraries/`)
|
||||
2. `devbox run sim`: run the FPGA testbenches
|
||||
|
|
@ -38,9 +39,18 @@ The toolchain is managed by [devbox](https://www.jetify.com/devbox): `arduino-cl
|
|||
|
||||
Serial access requires membership in the `dialout` group. If a firmware leaves the board unable to stay on USB, enter the bootloader: hold reset while plugging in, release, then tap reset once quickly. For characterization, flash the capture tool with `devbox run upload-capture` and use `devbox run jitter <freq|rings|sweep|output|health|stats|amp|pairs>`. `devbox run onod-build` builds the onod3000 test suite used by `jitter output` and `api-check`.
|
||||
|
||||
### WiFi module firmware
|
||||
|
||||
BLE needs NINA firmware 3.0.0 or newer (the board shipped with 1.0.0). To flash Arduino's [nina-fw](https://github.com/arduino/nina-fw/releases) `NINA.bin`:
|
||||
|
||||
1. Flash the passthrough: `devbox run -- arduino-cli compile -u -p /dev/ttyACM0 --fqbn arduino:samd:mkrvidor4000 --libraries arduino/libraries arduino/strix_nina_passthrough`
|
||||
2. `devbox run -- uv run esptool --chip esp32 --port /dev/ttyACM0 --baud 115200 write-flash 0 NINA.bin`
|
||||
3. Flash the STRIX firmware again (`devbox run upload`); `wifi probe` reports the module firmware version.
|
||||
|
||||
The passthrough forwards reliably at 115200 baud, not at 460800.
|
||||
|
||||
## TODO
|
||||
|
||||
- Bluetooth LE for mobile mode (needs a newer WiFi module firmware than the installed 1.0.0)
|
||||
- WiFi credentials stored on the device instead of compile-time defaults
|
||||
- Battery pack
|
||||
- 3D case
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue