cagnulein / qdomyos-zwift

Zwift bridge for smart treadmills and bike/cyclette
https://www.qzfitness.com/
GNU General Public License v3.0
369 stars 109 forks source link

Wahoo Direct Connect #476

Closed cagnulein closed 1 year ago

cagnulein commented 2 years ago

I'm wondering if anyone has thought of implementing the BLE FTMS over TCI/IP that the Wahoo Direct Connect serves up?

It seems like this is probably a direction that trainers in the future may support.

https://www.wahoofitness.com/instructions/kickr-direct-connect

GPLama actually has a great video on analysis of the communication protocol with Wireshark and might provide enough information to reverse engineer it.

https://youtu.be/XtIM5675dLo

The other trick is that while it's supported by most apps currently, Zwift does not.

by @doudar

doudar commented 2 years ago

Copy from /ptx2/gymnasticon/ - Future discussion will be here:

Yah, it looks pretty darn cool and opens up the possibility of less expensive hardware.

Thanks a bunch for your interest @cagnulein !

If you need better wireshark logs, you might be able to get in touch with @GPLama (Shane Miller). He's been responsive to emails in the past.

cagnulein commented 2 years ago

I will check deeply the video and then I will try to contact him for sure! Thanks and have a nice weekend!

Il giorno ven 29 ott 2021 alle 16:52 Anthony Doud @.***> ha scritto:

Copy from /ptx2/gymnasticon/ - Future discussion will be here:

Yah, it looks pretty darn cool and opens up the possibility of less expensive hardware.

Thanks a bunch for your interest @cagnulein https://github.com/cagnulein !

If you need better wireshark logs, you might be able to get in touch with @GPLama https://github.com/GPLama (Shane Miller). He's been responsive to emails in the past.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/cagnulein/qdomyos-zwift/issues/476#issuecomment-954807495, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAALYWEUFX5MX2F4GBRMFITUJKYJDANCNFSM5G6XRMNQ .

-- Roberto Viola Software engineer and open source enthusiast http://robertoviola.cloud

cagnulein commented 2 years ago

From my point of view qz could act as a wahoo direct connect device so we can delete the bridge over Bluetooth leaving only the bridge over Wi-Fi. What do you think?

Il giorno ven 29 ott 2021 alle 17:24 cagnulein @.***> ha scritto:

I will check deeply the video and then I will try to contact him for sure! Thanks and have a nice weekend!

Il giorno ven 29 ott 2021 alle 16:52 Anthony Doud < @.***> ha scritto:

Copy from /ptx2/gymnasticon/ - Future discussion will be here:

Yah, it looks pretty darn cool and opens up the possibility of less expensive hardware.

Thanks a bunch for your interest @cagnulein https://github.com/cagnulein !

If you need better wireshark logs, you might be able to get in touch with @GPLama https://github.com/GPLama (Shane Miller). He's been responsive to emails in the past.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/cagnulein/qdomyos-zwift/issues/476#issuecomment-954807495, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAALYWEUFX5MX2F4GBRMFITUJKYJDANCNFSM5G6XRMNQ .

-- Roberto Viola Software engineer and open source enthusiast http://robertoviola.cloud

-- Roberto Viola Software engineer and open source enthusiast http://robertoviola.cloud

doudar commented 2 years ago

From my point of view qz could act as a wahoo direct connect device so we can delete the bridge over Bluetooth leaving only the bridge over Wi-Fi. What do you think? Il giorno ven 29 ott 2021 alle 17:24 cagnulein @.> ha scritto: I will check deeply the video and then I will try to contact him for sure! Thanks and have a nice weekend! Il giorno ven 29 ott 2021 alle 16:52 Anthony Doud < @.> ha scritto: > Copy from /ptx2/gymnasticon/ - Future discussion will be here: > > Yah, it looks pretty darn cool and opens up the possibility of less > expensive hardware. > > Thanks a bunch for your interest @cagnulein > https://github.com/cagnulein ! > > If you need better wireshark logs, you might be able to get in touch with > @GPLama https://github.com/GPLama (Shane Miller). He's been responsive > to emails in the past. > > — > You are receiving this because you were mentioned. > Reply to this email directly, view it on GitHub > <#476 (comment)>, > or unsubscribe > https://github.com/notifications/unsubscribe-auth/AAALYWEUFX5MX2F4GBRMFITUJKYJDANCNFSM5G6XRMNQ > . > -- Roberto Viola Software engineer and open source enthusiast http://robertoviola.cloud -- Roberto Viola Software engineer and open source enthusiast http://robertoviola.cloud

Yes, that's exactly what I'm thinking.

The only issue is Zwift hasn't implemented it yet, but it should work with Trainer Road and other apps. Zwift says they will implement it, but they haven't yet. https://forums.zwift.com/t/wahoo-kickr-direct-connect/540493/60 https://forums.zwift.com/t/wahoo-direct-connect-adapter/548799

doudar commented 2 years ago

@cagnulein - Any progress on this? Any areas where I may be able to help?

cagnulein commented 2 years ago

Yes, write me on messenger

Il giorno ven 5 nov 2021 alle 22:28 Anthony Doud @.***> ha scritto:

@cagnulein https://github.com/cagnulein - Any progress on this? Any areas where I may be able to help?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/cagnulein/qdomyos-zwift/issues/476#issuecomment-962231999, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAALYWBL37CIDXPEORHWRADUKRK7VANCNFSM5G6XRMNQ .

-- Roberto Viola Software engineer and open source enthusiast http://robertoviola.cloud

p3g4asus commented 2 years ago

I implemented the code to support Wahoo Direct connect. It can be foud here. I tested it only under android. From my tests it seems that Only SYSTM under windows and RGT under windows and iOS are supporting direct connect devices. It will be nice and useful if anyone can make a test with its setup. The test I need is:

Thank you. I hope this weekend I can make some test under iOS and make the pull request.

cagnulein commented 2 years ago

@p3g4asus great! i will test this weekend @doudar could you collect some info for @p3g4asus too on your end? thanks!

doudar commented 2 years ago

Wow!!! This sounds amazing! Thanks for your work- I can’t wait to take a closer look.

On Thu, Nov 25, 2021 at 8:02 AM p3g4asus @.***> wrote:

I implemented the code to support Wahoo Direct connect. It can be foud here https://github.com/p3g4asus/qdomyos-zwift/tree/Dircon. I tested it only under android. From my tests it seems that Only SYSTM under windows and RGT under windows and iOS are supporting direct connect devices. It will be nice and useful if anyone can make a test with its setup. The test I need is:

  • Install SYSTM under android or iOS
  • Create an account
  • Start an activity in SYSTM with Bluetooth active. It should start searching devices automatically
  • From a PC connected to the same network start a Wireshark packet capture with this filter set: mdns and dns.ptr.domain_name contains "wahoo"
  • See if it detects any packet
  • Repeat the same test with RGT under android or with any app you think can support wahoo direct connect

Thank you. I hope this weekend I can make some test under iOS and make the pull request.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/cagnulein/qdomyos-zwift/issues/476#issuecomment-979240427, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEEO2KDPG4DMTU2OMWWP4GDUNY6ZBANCNFSM5G6XRMNQ .

--

---------------------- Anthony Doud

doudar commented 2 years ago

@p3g4asus great! i will test this weekend @doudar could you collect some info for @p3g4asus too on your end? thanks!

Yes, I'll see what I can do.

cagnulein commented 2 years ago

508

stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

shoulih commented 2 years ago

Built the QZ from the latest source on GitHub on P3 running Bullseye; ran QZ with "Wahoo Direct Connect" enabled by default and connected to my bike's BT.

Under the sensors of Wahoo RGT app running on my Windows 10 w/o BT on the same LAN, I can see both "Wahoo Direct Connect 0" and "Wahoo Direct Connect 1" got detected and able to connect to either of them at a time; but there are no Power and Cadence data from them. Did I miss any thing?

Thanks!

cagnulein commented 2 years ago

try zwift first to exclude an rgt incompatibility let me know Il 21 giu 2022, 22:07 +0200, shoulih @.***>, ha scritto:

Built the QZ from the latest source on GitHub on P3 running Bullseye; ran QZ with "Wahoo Direct Connect" enabled by default and connected to my bike's BT. Under the sensors of Wahoo RGT app running on my Windows 10 w/o BT on the same LAN, I can see both "Wahoo Direct Connect 0" and "Wahoo Direct Connect 1" got detected and able to connect to either of them at a time; but there are no Power and Cadence data from them. Did I miss any thing? Thanks! — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.***>

shoulih commented 2 years ago

try zwift first to exclude an rgt incompatibility let me know Il 21 giu 2022, 22:07 +0200, shoulih @.>, ha scritto: Built the QZ from the latest source on GitHub on P3 running Bullseye; ran QZ with "Wahoo Direct Connect" enabled by default and connected to my bike's BT. Under the sensors of Wahoo RGT app running on my Windows 10 w/o BT on the same LAN, I can see both "Wahoo Direct Connect 0" and "Wahoo Direct Connect 1" got detected and able to connect to either of them at a time; but there are no Power and Cadence data from them. Did I miss any thing? Thanks! — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.>

I don't seem to have a zwift account and do you have a testing account that I can use?

Thanks!

cagnulein commented 2 years ago

@shoulih nope, just my personal account. Create a new one, it's free and it doesn't require a credit card ;)

shoulih commented 2 years ago

just created a new account, but it forced me to enter my credit card info.

doudar commented 2 years ago

https://github.com/zoffline/zwift-offline

cagnulein commented 2 years ago

just created a new account, but it forced me to enter my credit card info.

must be a new thing, i don't remember, i created mine 3 years ago.

@doudar good suggestion! never tried! It could also be useful for test!

shoulih commented 2 years ago

@cagnulein created a trial zwift account with my credit card and tested it with QZ on Pi 3 and Zwift on Windows 10 running on the same LAN. The QZ's "Wahoo Direct Connect" works just fine with the correct data. What a great feature!

image

shoulih commented 2 years ago

On the latest version Wahoo RGT for Windows (10), I can see both "Wahoo Direct Connect 0" and "Wahoo Direct Connect 1" got detected and able to connect to either of them at a time; but there are no Power and Cadence data from them:

image

cagnulein commented 2 years ago

@shoulih also the wahoo direct connect 0 doesn't show metrics on RGT?

shoulih commented 2 years ago

No, Wahoo direct connect 0 doesn't show metrics on RGT either.

cagnulein commented 2 years ago

If zwift works it's a bug on RGT for sure. Did you try to contact their support?

shoulih commented 2 years ago

Yes, Wahoo said RGT is compatible with KICKR Direct Connect (KICKR v5+); do we have plan to make QZ's Wahoo Direct Connect compatible with RGT?

Thanks,

cagnulein commented 2 years ago

@shoulih i can say the same thing of QZ since it's working with zwift :) So i guess it's RGT the problem. Probably they didn't handle TWO Direct connect devices at the same time. I have to check myself if I can do something but I can't promise a timing because I'm very busy in these months. Maybe can you add me to the Wahoo ticket?

shoulih commented 2 years ago

@cagnulein Please don't worry about it as Wahoo Direct Connect is still new and its implementation seems to vary from app to app. BTW, i don't think Wahoo will support QZ's Wahoo Direct Connect for RGT :-)

Thanks,

cagnulein commented 2 years ago

@shoulih there is nothing strange in the QZ implementation of Dircon :) I guess that RGT simply blocks it because it doesn't come from a genuine KICKR device maybe. Anyway I will keep it in the todo list ;)

shoulih commented 2 years ago

@shoulih there is nothing strange in the QZ implementation of Dircon :) I guess that RGT simply blocks it because it doesn't come from a genuine KICKR device maybe. Anyway I will keep it in the todo list ;)

very likely and appreciated it to keep this on your list!

cagnulein commented 1 year ago

yes you have i guess 10 km or something like that

Roberto Viola Software engineer and open source enthusiast http://robertoviola.cloud

Il giorno mar 21 giu 2022 alle ore 22:28 shoulih @.***> ha scritto:

will do, is zwift free to try?

— Reply to this email directly, view it on GitHub https://github.com/cagnulein/qdomyos-zwift/issues/476#issuecomment-1162306680, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAALYWBKR5QUGQLDPJEAGNDVQIQXDANCNFSM5G6XRMNQ . You are receiving this because you were mentioned.Message ID: @.***>

shoulih commented 1 year ago

BTW, Wahoo just added Direct Connect support on the Wahoo RGT Android app, which can connect to QZ and recognize it as Wahoo KICKR devices, but there are no data. Any bandwidth to look into it?

doudar commented 1 year ago

I'll be trying it on SmartSpin2k as my service advertising works with RGT and not Zwift. I believe that we're copying the bugs in the Zwift implementation too well.

shoulih commented 1 year ago

I have the setup and can help test the fix on Wahoo rgt if needed.

cagnulein commented 1 year ago

@doudar do you think is this one the issue you're facing on the SS2K https://github.com/cagnulein/qmdnsengine/commit/a529188038c5b235cf3d58ca2635f227c86f5e49 ?

cagnulein commented 1 year ago

I have the setup and can help test the fix on Wahoo rgt if needed.

thanks, I will try to check this tomorrow!

doudar commented 1 year ago

@doudar do you think is this one the issue you're facing on the SS2K https://github.com/cagnulein/qmdnsengine/commit/a529188038c5b235cf3d58ca2635f227c86f5e49 ?

Yes. I'm sending the A record in "Additional records" instead of "Answers".

I've tried modifying the mdns but it's difficult on the esp32 because we're using the arduino framework which is based on the IDF framework which is where the mdns code is located. I haven't figured out how to package the esp-idf into arduino-esp32 correctly.

I'm fairly certain the "Type A" record isn't actually supposed to be in "Answers" (if they followed the standard) and this is just a bug that Zwift copied. It's probably one reason why they're getting sued by Wahoo - I see they copied the same bug for the Zwift hub direct connect protocol as well. If you examine a QU mdns packet from the newest Zwift update, you'll see it. Zwift Hub copied the Kicker Core so close that they even copied the bugs in the firmware 😝.

I'll submit another bug report that will never be fixed into the Zwift black hole.

cagnulein commented 1 year ago

Hahaha this is insane! I hope Wahoo will destroy zwift one time forever! Zwift is taking the leadership of the market with a shit piece of software :)

cagnulein commented 1 year ago

@shoulih i did a very quick test and I'm able to see the same issue, and it's a good point :) so tomorrow I hope I will be able to fix it (I have already something in mind). Anyway qz is sending the right data, but probably even RGT has some costraint that must be respected

shoulih commented 1 year ago

@cagnulein Ok, hope Whaoo didn't put any restrictions on their apps although QZ got correctly recognized as Whaoo devices in RGT.

cagnulein commented 1 year ago

image

Fixed @shoulih ! I need to create a setting for rgt because it needs a different way to send data. (Or better, zwift it's buggy)

cagnulein commented 1 year ago

@shoulih send me an email to roberto.viola83 at gmail.com indicating this ticket and if you are on android or iOS. Thanks

shoulih commented 1 year ago

@shoulih send me an email to roberto.viola83 at gmail.com indicating this ticket and if you are on android or iOS. Thanks

Wow, this is awesome! BTW, I am running QZ on a Pi3+, RGT on an azure Windows 10 VM and Wahoo RGT Remote on Android Phone.

cagnulein commented 1 year ago

@shoulih ok so just build it and enable the new rgt settings in the experimental settings Let me know!

shoulih commented 1 year ago

@shoulih ok so just build it and enable the new rgt settings in the experimental settings Let me know!

Thanks again and will give you an update.

shoulih commented 1 year ago

@cagnulein QZ's Wahoo Direct Connect works like a charm on Wahoo RGT running on Android! I assume the other recognized device "WAHOO HRM" is for sensor like Heart Rate Monitor connected to QZ. Any recommendation for a Heart Rate Monitor to test the "WAHOO HRM" via Wahoo Direct Connect? Thanks!

cagnulein commented 1 year ago

great! i'm using a polar oh1 @shoulih

shoulih commented 1 year ago

I also tested the following setup with QZ's Wahoo Direct Connect and it works way more reliable than the Bluetooth connection! Bilk -> (Bluetooth) -> QZ (Pi3 +) - > (local tcp/ip) -> Wahoo RGT Remote (Android) -> (Internet) -> Wahoo RGT (Azure Windows 10 VM) Moonlight (Pi3 +) -> (Moonlight Streaming over Internet) -> Wahoo RGT (Azure Windows 10 VM with Geforce Experience)

cagnulein commented 1 year ago

wow! what a massive usage of technology!

shoulih commented 1 year ago

wow! what a massive usage of technology!

😂

shoulih commented 1 year ago

great! i'm using a polar oh1 @shoulih @cagnulein Tested with a heart rate sensor, which displayed HR data in QZ's UI correctly, but not able to pass it to RGT app via the virtual Direct Connect for RGT. Do we know if HR data is even supported by Wahoo Direct Connect at all?

Thanks,