Skip to content

TDMA - #41

Merged
Eirenliel merged 48 commits into
mainfrom
tdma
Nov 4, 2026
Merged

TDMA#41
Eirenliel merged 48 commits into
mainfrom
tdma

Conversation

@Eirenliel

Copy link
Copy Markdown
Member

This pull request implements TDMA on top of ESB for avoiding connection collision, mainly described in #135 as well as:

  • New pairing sequence #145
  • Finding dongle on any channel, dongle connect and reconnect sequence
  • Some minor changes during development

I may continue adding onto this PR during this week

sctanf and others added 24 commits May 17, 2026 21:27
commit 2f78834
Author: kounocom <71262281+kounocom@users.noreply.github.com>
Date:   Fri Apr 10 14:08:08 2026 +0200

    Add receiver P5

commit fde7ea8
Author: sctanf <36978460+sctanf@users.noreply.github.com>
Date:   Sat Apr 4 13:56:21 2026 -0500

    Remove unused syncing timer

commit 723ba7d
Author: sctanf <36978460+sctanf@users.noreply.github.com>
Date:   Sat Apr 4 13:55:58 2026 -0500

    Add radio power and ESB channel to kconfig

commit aa719d8
Author: ShineBrightMeow <142170650+ShineBrightMeow@users.noreply.github.com>
Date:   Wed Apr 1 10:06:40 2026 -0700

    ci: Update

    * Builds for Pull Requests

    * Optimized Caching

    * Fixed P3 Receiver Build

commit 0d502b1
Author: ShineBrightMeow <142170650+ShineBrightMeow@users.noreply.github.com>
Date:   Tue Mar 17 13:25:16 2026 -0700

    ci: Fixed P3 (Placeholder) Filename

commit 6ae4aab
Author: ShineBrightMeow <142170650+ShineBrightMeow@users.noreply.github.com>
Date:   Tue Mar 17 13:20:07 2026 -0700

    ci: Updated

commit f10eb15
Author: Eiren Rain <Eirenliel@users.noreply.github.com>
Date:   Wed Feb 25 18:16:16 2026 +0100

    Fix typo

commit d4d96a0
Author: Eiren Rain <Eirenliel@users.noreply.github.com>
Date:   Tue Feb 24 19:58:42 2026 +0100

    Add packets retransmit and do small TDMA refactoring

commit 38018a1
Author: Eiren Rain <Eirenliel@users.noreply.github.com>
Date:   Thu Jan 8 19:16:22 2026 +0100

    Keep the channel the same in tracker and dongle

    A bit of cleanup

commit 118bd08
Author: ShineBrightMeow <142170650+ShineBrightMeow@users.noreply.github.com>
Date:   Thu Jan 8 09:58:00 2026 -0800

    ci: Use slimevr-esb SDK

commit b911ffd
Author: Eiren Rain <Eirenliel@users.noreply.github.com>
Date:   Tue Dec 16 18:54:09 2025 +0100

    Show channel on ESB init

commit e5a3acf
Author: tort32 <tort.biz@gmail.com>
Date:   Tue Dec 16 17:54:57 2025 +0100

    Add channel frequency to info output

commit f947b8b
Author: Eiren Rain <Eirenliel@users.noreply.github.com>
Date:   Tue Dec 16 14:49:19 2025 +0100

    ESB cleanup

commit d200f53
Author: Eiren Rain <Eirenliel@users.noreply.github.com>
Date:   Tue Dec 16 14:19:18 2025 +0100

    Send packet loss information to the server

commit bfd544e
Author: Eiren Rain <Eirenliel@users.noreply.github.com>
Date:   Wed Dec 10 08:59:24 2025 +0100

    Comment out debug

commit 4b8d9f7
Author: Eiren Rain <Eirenliel@users.noreply.github.com>
Date:   Tue Dec 9 17:33:35 2025 +0100

    TDMA work

commit c670ecd
Author: Eiren Rain <Eirenliel@users.noreply.github.com>
Date:   Wed Dec 3 04:31:41 2025 +0100

    Add packet statistics tracking

commit 6cf334c
Author: Eiren Rain <Eirenliel@users.noreply.github.com>
Date:   Wed Dec 3 00:29:52 2025 +0100

    Cealnup esb and tdma

commit 70edefe
Author: Eiren Rain <Eirenliel@users.noreply.github.com>
Date:   Fri Nov 21 18:40:33 2025 +0100

    Fix build

commit e211a5f
Author: Eiren Rain <Eirenliel@users.noreply.github.com>
Date:   Fri Nov 21 18:16:23 2025 +0100

    First TDMA proof-of-concept implementation

commit 249ec5f
Author: Eiren Rain <Eirenliel@users.noreply.github.com>
Date:   Wed Nov 19 16:13:50 2025 +0100

    Cleanup pairing and new ack handler, add some helpful comments

commit bf4b74d
Author: Eiren Rain <Eirenliel@users.noreply.github.com>
Date:   Wed Nov 19 15:56:25 2025 +0100

    Simplify pairing

Move pm_static
Needs latest dongle and tracker fw to work together
Pairing now uses new packets
Added nettests for future connection / antenna testing toolkit
Faster channels scanning
@Eirenliel
Eirenliel merged commit 82bc048 into main Nov 4, 2026
13 checks passed
biscuitvixen added a commit to biscuitvixen/smol-biscuits that referenced this pull request Dec 1, 2026
This builds the tracker and receiver firmware here, from the pinned
submodules, instead of in the forks. The forks ran upstream's workflow
unchanged: sixteen boards when only `xiao_ble/nrf52840` matters for
these trackers, a `write-all` token, and a push trigger on `master`
while the tracker firmware lives on `xiao-smol-slimes` ([workflow at
a23b666][fork-ci]). Trimming that file in the fork would conflict on
every upstream sync, so the build moves here instead; the submodule
commit already records which firmware belongs to which release, and
the forks keep upstream's workflow with Actions switched off.

Every run builds `firmware_tracker.uf2` for the XIAO nRF52840 and
`firmware_receiver.hex` for the Holyiot dongle in one west workspace,
and uploads them as a `firmware` artifact. A release tag also creates a
draft release with both attached, ready for the bootloader, STLs and
PCB archive before publishing. The release half only runs on a tag, so
it is first run on the release after this merges.

### Changes

- Pointed the receiver submodule at upstream
  SlimeVR/SlimeVR-Tracker-nRF-Receiver instead of the fork, which
  carried no changes of its own.
- Bumped the tracker to `xiao-smol-slimes` at 07fc0ef, upstream `main`
  plus the board overlay, and the receiver to upstream `main` at
  SlimeVR/SlimeVR-Tracker-nRF-Receiver@0b94c8a. Both now carry the TDMA
  radio protocol (SlimeVR/SlimeVR-Tracker-nRF#172,
  SlimeVR/SlimeVR-Tracker-nRF-Receiver#41), so they are bumped together
  rather than either following `main`.
- Added the firmware workflow. Both manifests must pin the same
  nRF Connect SDK revision for the shared workspace, so a mismatch
  fails the build before the SDK is fetched. The Zephyr SDK and ARM
  toolchain are checked against the release's published SHA-256 sums.
  `west-manifest.yml` is attached to each release as the record of the
  exact SDK commits, since the manifest follows `v3.1-slimevr` rather
  than a tag. Nothing is cached, which keeps the release job clear of
  cache poisoning at the cost of a slower run.
- Built the tracker for the plain XIAO nRF52840 target. Production
  boards use the non-Sense module with an external IMU and
  magnetometer, and the SPI IMU and QMC6309 pin mapping lives in
  `xiao_ble.overlay`; the Sense target picks up upstream's Sense
  overlay instead and never sees it.
- Locked the actions with a [workflow dependency lockfile][lockfile],
  scoped the token to `contents: read` with `contents: write` on the
  release job alone, and turned off persisted checkout credentials.
- Added Dependabot for the actions, monthly with a seven-day cooldown.
  Submodules are deliberately left out so the two firmwares are never
  bumped apart.
- Added a zizmor audit of the workflows, on zizmor 1.33.0 for its
  lockfile support.
- Switched the remaining submodule URLs from a local SSH host alias to
  HTTPS, so CI and `git clone --recursive` both work without it.

### Testing

[Run 46550022900][run] on f199b66 builds both images. The tracker log
shows `boards/xiao_ble.overlay` and `boards/xiao_ble.conf` applied, the
image uses 246 KB of the 796 KB flash region, and the UF2 loads at
`0x27000` with the nRF52840 family ID, the same layout as the 1.0
release. The receiver hex starts at `0x1000`, as in 1.0.

After merging, "Require lockfile" needs enabling under Settings ->
Actions -> Policies.

[fork-ci]: https://github.com/biscuitvixen/SlimeVR-Tracker-nRF/blob/a23b66655d28716e9d453f98b4b32e1c1eb15649/.github/workflows/workflow.yml
[lockfile]: https://docs.github.com/en/actions/concepts/security/workflow-dependency-lockfiles
[run]: https://github.com/biscuitvixen/smol-biscuits/actions/runs/46550022900
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants