Switch Stryd 5 to Indoor power mode on connect - #4861
Merged
Conversation
Stryd 5 pods broadcast a power value that already compensates for the treadmill incline on their own, even when no incline is entered in the Stryd app. This conflicts with QZ's own inclination gain formula and makes the reported power unreliable when running on an incline. BLE sniffing (thanks @AndreaPro) found that writing 15 00 to the proprietary characteristic 7e78aa18-72cd-d3b8-a81f-5b7e589bea0f puts the pod into Indoor mode, where it stops adjusting power for incline on its own, leaving QZ's own formula as the only source of the correction. The pod resets to Outdoor mode automatically on disconnect, so no cleanup is needed on our side. Refs #4480
Andrea found (via BLE sniffing) that the Stryd5 pod acknowledges the 15 00/15 01 mode write on characteristic 7e78aa19, echoing the confirmed mode back in byte 2. Track that ack and resend the Indoor mode request (up to 3 times, 1s apart) if it's not received, in case the initial write is missed or the pod boots into Outdoor mode. Refs #4480
The mode-switch write was targeting 7e78aa18, which is the service UUID, not a characteristic UUID - the service only exposes two characteristics, 7e78aa20 (write, handle 33) and 7e78aa19 (notify, handle 35), confirmed from Andrea's GATT discovery log. The write never matched any characteristic, so the mode switch silently never fired. Target 7e78aa20 instead. Refs #4480
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Stryd 5 pods broadcast a power value that already compensates for the treadmill incline on their own, even when no incline is entered in the Stryd app — see the investigation in #4480. This conflicts with QZ's own inclination gain formula and makes the reported power unreliable.
@AndreaProsniffed the Stryd's BLE traffic and found the proprietary Indoor/Outdoor mode switch (characteristic7e78aa18-72cd-d3b8-a81f-5b7e589bea0f,15 00= Indoor,15 01= Outdoor). In Indoor mode the pod stops adjusting power for incline on its own, leaving QZ's own formula as the only source of the correction. The pod resets to Outdoor mode automatically on disconnect, so no extra handling is needed there.This PR writes
15 00to that characteristic on connect, gated to devices whose Bluetooth name starts withStryd5.Refs #4480
Test plan