ysoldak / HeadTracker

Zero configuration, auto-calibrating wireless DIY Head Tracker, for Nano 33 BLE and XIAO BLE Sense boards
The Unlicense
58 stars 8 forks source link

Initial pairing is pain #3

Closed ysoldak closed 2 years ago

ysoldak commented 3 years ago

Once connected, it's perfect, can power cycle the board -- it re-connects all good. And stays connected. But to make the board connect to the radio the first time can be pain. I expect there are some bugs in ArduinoBLE library that shall be fixed or code in the main loop re-arranged to please FrSky radios. Shall debug and see.

ysoldak commented 3 years ago

After some experiments, it seems like Arduino's bluetooth stack is actually OK.

Instead, the radio's bluetooth that may end up in some limbo state if you try to "[Clear]" connection and then connect again in hope to speed up connection after powering off radio and turning it on before a flight.

Just wait, let radio to boot up its bluetooth stack, discover head tracker board and connect to it. So far, once paired, waiting was the best approach and definitely better than jamming radio with constant requests to clear connection and connect again.

ysoldak commented 3 years ago

After flashing a new version, board sometimes changes address and this breaks bluetooth plairing. No reason to wait for eventual connection (as advised), that will never happen.

Shall be no-issue for day-to-day use (no flashing a new version), but good to keep in mind.

ysoldak commented 2 years ago

Not actual anymore after switching to Go