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

[FR] Wahoo Dircon output. #340

Open
doudar opened this issue Apr 14, 2022 · 6 comments
Open

[FR] Wahoo Dircon output. #340

doudar opened this issue Apr 14, 2022 · 6 comments
Assignees
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@doudar
Copy link
Owner

doudar commented Apr 14, 2022

Wahoo developed a unit that connects to their trainers and provides BLE FTMS over IP.

Most apps are now supporting it and Zwift has finally followed suit.

The service is broadcast on MDNS like:
MDNS 413 Standard query response 0x0000 PTR Wahoo KICKR 50A4._wahoo-fitness-tnp._tcp.local A, cache flush 192.168.86.80 SRV, cache flush 0 0 36866 Wahoo-KICKR-50A4.local TXT
image
image

Then each supported BLE service is replicated on TCP port 36866:

image
image

The new Dircon branch has most of the advertising prototyped. Zwift is still not recognizing it but Zwift keeps requesting the MDNS repeatedly so it should be very close.

@MarkusSchneider , this is really up your alley (generating the TCP ports) if you'd like to give it a try. Attached is a Wireshark log from one of the QZ users with filtered packets between the kicker/direct connect and Zwift.

Wireshark_dircon_zwift_windows2.pcapng.zip

Also you can see the QZ implementation at: cagnulein/qdomyos-zwift#756
and
https://github.com/cagnulein/qdomyos-zwift/blob/master/src/dirconprocessor.cpp

@doudar
Copy link
Owner Author

doudar commented Apr 17, 2022

I've been trying to get advertising working correctly all day I can't get it to show as a Dircon device in Zwift or any other apps . @cagnulein Would you be able to look at the Wireshark capture and see if you can spot any problems? At the end of the file there's a ping test, then a wrong port telnet, then the correct port telnet connection.

ss2k_dircon_advertising.zip

image

@MarkusSchneider
Copy link
Collaborator

Hi Anthony,
I'll try to get some time next week to create the TCP Stack.

Regards
Markus

@cagnulein
Copy link

@doudar i checked your log but the answer from the SS2K is completely wrong, you have to copy this answer cagnulein/qdomyos-zwift#756 (comment) in particular SRV, A, TXT records

@doudar
Copy link
Owner Author

doudar commented Apr 17, 2022

@doudar i checked your log but the answer from the SS2K is completely wrong, you have to copy this answer cagnulein/qdomyos-zwift#756 (comment) in particular SRV, A, TXT records

I've been working off that 😊

My suspicion is the SRV A as well but I'm having an issue getting the esp32 mdns library to put it in the "answers". It sends it, but you'll see it's in the "additional records".

I'm guessing I may have to modify the esp32 mdns library as well 😐

I had hoped to get away without this as I thought you had it working before you added that.

@cagnulein
Copy link

I'm guessing I may have to modify the esp32 mdns library as well

yes as I did for the QT one ;)

@doudar doudar self-assigned this May 1, 2022
@doudar
Copy link
Owner Author

doudar commented Oct 9, 2022

I just tried working on again and I’m pretty sure the reason Zwift doesn’t attempt to connect to the socket is that the esp32 mdns library adds the “Type A” record to “additional records” instead of the main “Answers” field in response to a MDNS QU from Zwift.

The code that needs to be changed is here:

https://github.com/espressif/esp-protocols/blob/master/components/mdns/mdns.c

I'm not sure yet what part of the mdns code needs to be changed and exactly what changes need to be made to PlatformIO.ini to incorporate those changes. @MarkusSchneider , I'll get better wireshark screenshots on what needs to be changed, but do you have any ideas on how to make the changes to the IDF?

@doudar doudar added enhancement New feature or request help wanted Extra attention is needed labels Jan 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants