Skip to content

Latest commit

 

History

21 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SlimeNRF Serial Control

A cross-platform desktop app to configure, monitor, and flash SlimeNRF trackers and receivers — over USB, with no extra tools.

Platform Built with egui License

Talks to the SlimeVR-Tracker-nRF tracker firmware and the SlimeVR-Tracker-nRF-Receiver receiver firmware.


What it does

Every console command of both firmwares is surfaced as a button or input field, alongside a live colour console and a raw-command box — so routine setup needs no memorised commands, and anything not on screen can still be typed. On top of the console, it flashes firmware in place: UF2 trackers by drive-copy, and the receiver dongle over Nordic secure DFU (the job that normally needs nRF Connect).

Three views — Tracker, Receiver, and Both — with two independent sessions: the tracker and the receiver can be connected at the same time, each with its own port, console, and colour-coded controls (teal = tracker, periwinkle = receiver). Devices are auto-detected from their USB IDs and each session picks up its own device as it's plugged in.

Tracker Receiver
Auto-detected by USB ID
Full console command set
Calibration (ZRO / 6-side / temperature) — (relayed)
Pairing, RF channel, TDMA
Packet stats / RSSI scan
Remote command relay to trackers
In-app firmware update ✓ (UF2 drive) ✓ (Nordic DFU, .hex/.zip)

Features

Configure & monitor

  • Live device detection. Ports refresh automatically about once a second — plug a device in and it appears, gets selected, and switches the app to the right mode.
  • Auto-detected role. SlimeNRF devices use VID 0x1209 (PID 0x7692 = tracker, 0x7690 = receiver). A board sitting in a bootloader is recognised too (Adafruit UF2 0x239A, Nordic DFU 0x1915). Recognised devices sort to the top and select the right mode, with a manual override and a device line showing product name, USB ID, and serial number.
  • Common Tasks cards put the everyday actions — calibrate, pair, update — one click away.
  • Colour-grouped command sections. Every console command is organised into collapsible, colour-coded sections; destructive actions (shutdown, clear, reset all, DFU) are always red.
  • Live console with ANSI / xterm-256 colour, autoscroll, TX / warning / error filters, a text filter, copy-to-clipboard, save-to-file, and a raw command box with history (Enter to send, / to recall).
  • Remembers your setup. Firmware paths, mode, baud, and console preferences persist across launches (a small settings.json in your user config directory).
  • Receiver → tracker relay. Push any tracker command over the air with send <id|all> ….

Flash firmware — no nRF Connect needed

  • Trackers (UF2). Reboots every USB-connected tracker into its UF2 bootloader and copies the selected firmware onto each.
  • Receiver (Nordic secure DFU). Flashes the dongle directly over serial from a .hex or a Nordic DFU .zip. For a .hex, the DFU init packet is generated in-app (SHA-256, no signing) — so you don't need nrfutil or nRF Connect at all. Live progress bar and log.
  • Auto-flash mode. Arm the tracker updater and every tracker you plug in gets flashed automatically — plug in, wait for done, unplug, next. Each device is flashed once per session.
  • Drag & drop. Drop a .uf2, .hex, or DFU .zip anywhere on the window to load it into the right updater.

Putting the receiver in DFU: the dfu command is unreliable on some hardware, so the dependable way is the magnet — hold a magnet to the dongle while plugging it in (or hold it there ~10 s until the LED changes). The app then detects it automatically.


Build & run

1. Install Rust

Get the toolchain from https://rustup.rs. (egui 0.34 needs Rust 1.81 or newer.)

2. Platform prerequisites

Linux — port enumeration uses libudev:

Distro Command
Debian / Ubuntu sudo apt install pkg-config libudev-dev
Fedora sudo dnf install pkgconf-pkg-config systemd-devel
Arch / CachyOS sudo pacman -S pkgconf systemd-libs

The file picker uses the XDG desktop portal (no GTK build dependency), and eframe needs the usual X11 / Wayland + OpenGL runtime present on any normal desktop.

Windows — no extra dependencies; use the default MSVC toolchain (rustup default stable-x86_64-pc-windows-msvc). The release build hides the console window and embeds an application icon.

macOS — no extra dependencies.

3. Build

cargo run --release

The standalone binary lands in target/release/.


Usage

The top bar switches between three views: Tracker, Receiver, and Both (side by side). The tracker and receiver are independent sessions — each has its own port picker, Connect button, and console, and both can be connected at the same time. Tracker controls are teal; receiver controls are periwinkle.

  1. Plug in your device(s). Ports refresh automatically about once a second, and each session picks up its own kind of device — the tracker strip selects trackers (or a board in the UF2 bootloader), the receiver strip selects the dongle (or a board in Nordic DFU). Recognised devices are listed first with their product name and USB ID.
  2. Click Connect in that session's strip, then drive the device with the buttons or type a raw command in its console (try help or info first; ↑/↓ recalls history).
  3. For pairing or relay work, use the Both view: connect the receiver on one side and a USB-attached tracker on the other, and watch both consoles live.

Updating a tracker

Open Update all trackers in the tracker panel, choose the .uf2 (or drop it anywhere on the window), and click Update. Tick Auto-flash new trackers to do a whole batch: every tracker you plug in is flashed automatically, once per session. Trackers paired only wirelessly aren't included — connect them by USB.

Updating the receiver

Put the dongle in DFU with a magnet (see the note above). In the receiver panel, open Update receiver firmware, pick a .hex or DFU .zip (or drop it on the window), and click Flash receiver.

Linux serial permissions

If a port appears but won't open, your user likely lacks tty access:

sudo usermod -aG dialout "$USER"   # Debian/Ubuntu  (use 'uucp' on Arch)
# then log out and back in

Commands are sent terminated with \n (toggle CRLF for \r\n). Baud rate is selectable but irrelevant for USB-CDC devices — it's a virtual COM port.


Command reference

The exact console commands the GUI emits (all also runnable from the raw box).

Tracker (direct)
info  uptime  battery  nvs  help  ping  meow
scan  calibrate  6-side  range  range reset  debug [1-60]
mag | mag on | mag off | mag clear | mag cal
sens <x>,<y>,<z> | sens reset
tcal status|on|off|dump|check|clear|auto on|auto off|boot on|boot off|test [temp]|remove <i>
set <16-hex>  pair  clear  tdma on|off  channel <1-100>  clearchannel
reboot  shutdown  dfu  dfu ota
reset zro|acc|sens|tcal|mag|bat|fusion|all
test on|off
Receiver (local)
info  uptime  list  help  meow
add <12-hex>  remove  pair [count]  exit  clear
stats | stats <sec>  resetstats
channel <1-100>  clearchannel  rssi_scan
reboot  dfu  dfu ota
collect <id> | collect off | collect      ota | ota info <id> | ota abort | ota status
Receiver → tracker (relayed: send <id|all> …)
shutdown  reboot  calibrate  6-side  scan  meow  ping  clear  fusion
mag on|off|clear|cal
reset zro|acc|bat|mag|tcal|fusion
sens <x>,<y>,<z> | sens reset
tcal on|off|auto on|auto off|boot on|boot off|clear
tdma on|off    test on|off    dfu | dfu ota
channel <1-100>   clearchannel       (all target only)

How it works

Built with egui / eframe (immediate-mode GUI, single static binary, no system webview) and serialport (cross-platform serial + USB VID/PID enumeration). A background worker thread owns the open port and exchanges messages with the UI, so the interface never blocks on serial I/O.

Firmware flashing is implemented from the protocol up: UF2 trackers via bootloader drive detection and file copy; the receiver via the Nordic secure DFU protocol over serial (SLIP framing, the select/create/write/CRC/execute object flow), including Intel-HEX parsing and in-app DFU init-packet generation.

src/
  main.rs      eframe bootstrap — window, dark theme, app icon
  app.rs       state & logic: dual tracker/receiver sessions, serial workers,
               updaters, auto-flash watch, settings persistence
  theme.rs     colour palette, session identity hues, section styling, widgets
  console.rs   console text model + ANSI / xterm-256 parsing
  serial.rs    port enumeration, USB-ID role & bootloader detection, worker thread
  dfu.rs       tracker firmware update (UF2 drive-copy)
  nrfdfu.rs    receiver firmware update (Nordic secure DFU over serial; .hex/.zip)
  ui/
    connection_bar.rs  top bar, per-session connection strips, Both-view columns
    console.rs         per-session console (filters, history, copy / save)
    tracker.rs         tracker command panel
    receiver.rs        receiver command panel
    updater.rs         firmware updater cards

License

Dual-licensed under MIT or Apache-2.0, matching the firmware projects.

About

A (vibecoded) UI for running serial commands on nrf/smol slimes. Forks and pull requests welcome!

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages