Skip to content

Tracker Pairing Flow Proposal #145

Description

@Eirenliel

Right now we have two ways to pair trackers to dongle. Both are bad. In this issue I'm outlining my proposal of the new pairing flow and is requesting comments from everyone with a stake in it.

Prerequisites to the new system

  • Basted on TDMA
  • Users that have new trackers and dongles that are not paired to anything, should have as little to do as possible to get them paired
  • The system should be able to accommodate multiple people using trackers in the same room without creating confusion
  • The dongles should be able to operate at different channels, and trackers should be able to discover them anyway

Proposed solution

  • Dongle starts in a state where it doesn't accept pairing requests automatically
    • Option: dongle with 0 paired trackers automatically starts accepting requests, which may help with the first setup
  • As proposed in TDMA, Dongle sends Packet 3 Dongle State every second on advertisement channel
  • Unpaired trackers go into pairing state automatically on turn on, otherwise they can be sent into pairing by holding the button same as now
  • Trackers in pairing mode listen to Packet 3 from dongles for 2 seconds and make a list of dongles nearby sorted by RSSI (there can be a limit to, let's say, 5 dongles in this list)
  • Tracker sends to the dongle with the highest signal strength and free slots a Packet 1 Pairing Request
    • If the dongle is not in pairing mode, it sends a request to the SlimeVR Sever that a tracker wants to pair and the server shows pairing request popup the same way as it does now for connected ESP Slimes
    • If the user clicks accept on the popup or opens Connect Tracker page on the server, server sends the dongle a command to go into pairing mode
      • Option: send the command to all dongles connected to the same server
  • If the dongle has empty slots and is in pairing mode, it sends Accept packet to the tracker, and the tracker replies back with Pairing Success
    • The tracker is paired now. The dongle stays in pairing mode for as long as it has empty slots, the user is on Connect Trackers page, or otherwise by timeout, all controlled from the server
    • If it's not tied to the Connect Trackers page, server should indicate somehow that it's accepting pairing requests
    • Note: packet structure will be clarified in TDMA over ESB #135
  • If the user rejected pairing request for some reason, or if it times out, the tracker will try to connect to the next dongle on the list
    • If all dongles rejected pairing requests or all requests timed out, the tracker turns off

Option: Force Pair

The user can put the dongle into Force Pair mode via command from the server (a button). This will make the dongle to send Force Pair flag in Packet 3 if it has slots. When a tracker receives this packet even if it's already paired to another dongle, but doesn't communicate with it at the moment, it will try to re-pair to the new dongle.

Metadata

Metadata

Assignees

Labels

Before releaseThis tasks need to be completed before we ship official Butterflies.
No fields configured for Feature.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions