Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wellfit treadmill support #2659

Closed
SockAnimals opened this issue Oct 15, 2024 · 43 comments · Fixed by #2686
Closed

Wellfit treadmill support #2659

SockAnimals opened this issue Oct 15, 2024 · 43 comments · Fixed by #2686
Assignees
Labels
bug Something isn't working
Milestone

Comments

@SockAnimals
Copy link

Describe the bug
The app shows the "WELLFIT TM Linker" bluetooth device in the search list, but did not connect. I attempted to filter to just this device, but it was unable to connect as a generic treadmill.

This treadmill works fine in Peloton and Zwift directly as a FTMS treadmill to gather the metrics.

Expected behavior
Be able to connect to the treadmill and collect speed, distance, and energy metrics. Speed control would be a bonus, but not required.

Screenshots
Screenshots of nRF Connect device details
IMG_7133
IMG_7134
IMG_7135
IMG_7136
IMG_7137
IMG_7138

Smartphone (please complete the following information):

  • Device: iPhone 16 Pro Max
  • OS: iOS 18.0.1
  • Version 18.0.1

Append a debug log

debug-Tue_Oct_15_11_16_46_2024.log

Additional context
Thank you for any support you can provide.

@SockAnimals SockAnimals added the bug Something isn't working label Oct 15, 2024
@cagnulein
Copy link
Owner

hi @SockAnimals simply set the treadmill under qz settings, treadmill, ftms treadmill and press ok and restart qz
Let me know!

cagnulein added a commit that referenced this issue Oct 15, 2024
@cagnulein cagnulein added this to the 2.18 milestone Oct 15, 2024
@SockAnimals
Copy link
Author

Is that under "Treadmill Options"?

@cagnulein
Copy link
Owner

yes @SockAnimals if you don't see it, please be sure you are running the version 2.17 of the QZ app
Let me know!

@SockAnimals
Copy link
Author

Let me try that. The update just showed

@SockAnimals
Copy link
Author

Thank you for adding this in the update. It connects now. Let me check the metrics.

@SockAnimals
Copy link
Author

The metrics work. I really appreciate your support of this app.

Is there any information I can provide to control the speed via QZ? There is a standalone app for this treadmill that can do it.

@cagnulein
Copy link
Owner

speed + and - in qz doesn't work already out of the box?

@SockAnimals
Copy link
Author

No, unfortunately it didn't. It may be a non-standard interface as it didn't work in the other FTMS apps I've used

@cagnulein
Copy link
Owner

cagnulein commented Oct 15, 2024 via email

@SockAnimals
Copy link
Author

I have a Mac. Do I need to grab the developer tools?

@cagnulein
Copy link
Owner

cagnulein commented Oct 15, 2024 via email

@SockAnimals
Copy link
Author

I installed Wireshark. Oddly, I'm not seeing bluetooth as a device in the capture list. Going to google that now

@cagnulein
Copy link
Owner

cagnulein commented Oct 15, 2024 via email

@SockAnimals
Copy link
Author

I have the macOS PacketLogger from the dev tools. Let me try that

@SockAnimals
Copy link
Author

I collected one log by running the iOS app from my Mac, which turned on and off the treadmill. I imported this into Wireshark successfully. It won't let me upload the zip file though.

I'm going to see if I can get the iOS remote capture working to gather this.

@cagnulein
Copy link
Owner

cagnulein commented Oct 15, 2024 via email

@SockAnimals
Copy link
Author

iOS on, speed up, speed down, off.zip

Here is the iOS bluetooth packet capture as a zip. This is a pklg, but I can provide a btsnoop if that's better.

As a FYI, it seems to require the iOS bluetooth profile installed on the target device, then connected via USB to the Mac, and running a version of PacketLogger from the extra Xcode Tools. A new capture can be started with an iOS device.

The device connects, does a count down before it starts the treadmill to 0.6. I then increased the speed a few times, decreased it back to 0.6, and then issued the stop command.

@cagnulein
Copy link
Owner

cagnulein commented Oct 15, 2024 via email

@cagnulein
Copy link
Owner

@SockAnimals i was checking the log and I saw that there are many custom characteristics from the treadfmill. in the nrfconnect screenshot, did you show me everyone? or did you miss someone? The problem of the log took from iOS is that I can't see the UUID from the characteristic. This is crucial to implement this

Let me know!

@SockAnimals
Copy link
Author

Unfortunately, that's all I see in the attribute table in nRF Connect.

I'm attaching a trace from the nRF Connect app starting just before hitting connect and then clicking the read button for each property. I saw some packets using the Attribute Protocol that contained UUID early on in the trace after filtering by (bluetooth.src == c6:80:93:ff:c1:24) || (bluetooth.dst == c6:80:93:ff:c1:24). Maybe that will show something?
nRF Connect.zip

I also recaptured the app trace, starting before app launch in case something useful shows up. Speed goes from 0 -> 0.6 -> 1.4 -> 0.6 -> 0.
App Trace.zip

If this doesn't have the details you are looking for, then feel free to close this. Thank you for investigating this.

@cagnulein
Copy link
Owner

cagnulein commented Oct 16, 2024 via email

@cagnulein
Copy link
Owner

Unfortunately not :( can't you borrow an android device just for this test? you just need 10 minutes with it

@SockAnimals
Copy link
Author

I don't have an android device, but I'll try to repurpose a raspberry pi to install an android image and see how that goes. Otherwise, I'll try the official emulator and run nRF Connect there.

@cagnulein
Copy link
Owner

cagnulein commented Oct 17, 2024 via email

@SockAnimals
Copy link
Author

Loading Android 14 on a pi 4 seemed to work. Here are the nRF Connect screenshots via Android. Is there a way to snoop the traffic from the treadmill app while it's running in Android to capture the speed changes and start/stop commands?

Screenshot_20241017-222957_nRF Connect
Screenshot_20241017-223003_nRF Connect
Screenshot_20241017-223008_nRF Connect
Screenshot_20241017-223013_nRF Connect
Screenshot_20241017-223017_nRF Connect
Screenshot_20241017-223022_nRF Connect

@cagnulein
Copy link
Owner

@SockAnimals
Copy link
Author

Here is the zip file.
bugreport-lineage_rpi4-AP2A.240805.005-2024-10-18-09-32-43.zip

I opened the app, started the treadmill, increased the speed four times, decreased the speed four times, set the speed to 3 mph, and then stopped the treadmill via the app. Thank you for your help investigating this.

@cagnulein
Copy link
Owner

cagnulein commented Oct 18, 2024 via email

@cagnulein
Copy link
Owner

@SockAnimals were you using their app in this log? because I saw that they are using the classic FTMS commands but with specific speed values.

maybe the issue is that qz was trying to change 0.5 km/h speed increments? does the app allows only to change 1.0 mph as minimum step?

maybe the issue is that qz was trying to set a too slow speed as beginning? which is their minimum speed?

@SockAnimals
Copy link
Author

SockAnimals commented Oct 20, 2024 via email

@SockAnimals
Copy link
Author

SockAnimals commented Oct 20, 2024 via email

@SockAnimals
Copy link
Author

image

@cagnulein
Copy link
Owner

So strange! Can you show me a debug log from qz trying to change the speed? I would like to compare it

@SockAnimals
Copy link
Author

Here’s the debug log. I changed the speed via a remote, as hitting the + and - circles on the speed tile didn’t change it.

debug-Sun_Oct_20_14_05_27_2024.log

@cagnulein
Copy link
Owner

i guess i understood the issue. what if you change the speed manually to 1km/h or above from the treadmill and then you try to increase and decrease the speed. Everything works normally, right? If so i have only to set the min speed to 0.96 in this case
Let me know

@SockAnimals
Copy link
Author

I turned on the treadmill and set the speed to 1.0 mph via the remote (according to the display and QZ app). I then hit the + and - buttons on the speed tile without any effect.

For reference, the remote, when it starts sets the speed to 0.6 mph or the 0.96 km/h value.

I saw that "Speed Step" in the Treadmill settings was set to 0.2, which appears to match the 0.32 km/h granularity. I changed this to 1.0 and retried the steps above, but nothing happened.

cagnulein added a commit that referenced this issue Oct 22, 2024
@cagnulein cagnulein linked a pull request Oct 22, 2024 that will close this issue
@cagnulein
Copy link
Owner

@SockAnimals i tried to made a patch to align QZ to the hci snoof collected from the raspberry

can you install the apk here https://github.com/cagnulein/qdomyos-zwift/actions/runs/11456617615 to the raspberry with android

you can use the android build in the link (check at the bottom of the page in about 1 hour).

@SockAnimals
Copy link
Author

bugreport-lineage_rpi4-AP2A.240805.005-2024-10-22-09-51-55.zip

Here's the HCI snoop from the new apk. I kept all the settings at the default and simply pressed the +/- buttons on the speed tile a few times without any changes. Then I switched to the remote to start it at 1.0 kph and tried again.

If I've missed anything, please let me know

@cagnulein
Copy link
Owner

Thanks, i don't see any requests from qz, could you please create a debug log from this version https://github.com/cagnulein/qdomyos-zwift/wiki/How-do-i-get-the-debug-log-in-case-something-doesn't-work%3F
thanks!

@SockAnimals
Copy link
Author

@cagnulein
Copy link
Owner

ok i guess I got the issue
please check this one https://github.com/cagnulein/qdomyos-zwift/actions/runs/11462793492

thanks!

@SockAnimals
Copy link
Author

That seemed to make things work. I changed it to miles from km and set the speed increment step to 0.2.

Pressing the start button in the app, it did the count down and went to 0.6 mph. Pressing +/- worked perfectly. Pausing set the speed back to zero until resumed. Stopping turned it off.

Looks like it's working perfectly. Thank you.

@cagnulein
Copy link
Owner

amazing! i will send you the ios version asap,
send me an email to roberto.viola83 at gmail.com indicating this ticket. Thanks

cagnulein added a commit that referenced this issue Oct 22, 2024
* n Wellfit treadmill support #2659

* Update horizontreadmill.cpp
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants