cagnulein / qdomyos-zwift

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

iFit Virtual Device Implementation #441

Open jonathancolledge opened 2 years ago

jonathancolledge commented 2 years ago

iFit can't connect to QZ. it sees a machine called I_EB, but can't connect to it. EDIT: i_EB may not be QZ my rower saw that when QZ was off - it looks like ifit can't see any device. I have Virtual iFit turned on

Of note I'm using a Concept2 Rowing Erg with PM5 (my elliptical is in storage as we have moved to a smaller house). QZ connects to the PM5' but says connecting all the time...

debug-Tue_Sep_14_03_56_12_2021.log

jonathancolledge commented 2 years ago

I also tried with my Wahoo Kickr. QZ shows some data, but still says connecting, rather than device connected. I hope this is the right log...

I have put deviceConnected(); after line 284 in homeform.cpp for my elliptical, does that affect this?

debug-Tue_Sep_14_04_17_17_2021.log

Is the fact that iFit can't see anything due to the QZ connection with my equipment?

Screenshot_20210914_051912_com.ifit.wolf.jpg

cagnulein commented 2 years ago

I added ifit only for bikes now :)

Il giorno mar 14 set 2021 alle 06:21 jonathancolledge < @.***> ha scritto:

debug-Tue_Sep_14_04_17_17_2021.log https://github.com/cagnulein/qdomyos-zwift/files/7158841/debug-Tue_Sep_14_04_17_17_2021.log

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

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

jonathancolledge commented 2 years ago

Ah, OK, then see second post (sorry edited it as you replied) - I tried my Kickr (bike trainer) and couldn't get it to work.

As an aside, the Kickr has worked to a degree on the Android app, but incline is not correct. Wahoo uses a proprietary version of FTMS that isn't quite the same. I'll open another issue for that with a log.

cagnulein commented 2 years ago

Hah ok, I will check it. Thanks

Il giorno mar 14 set 2021 alle 06:30 jonathancolledge < @.***> ha scritto:

Ah, OK, then see second post (sorry edited it as you replied) - I tried my Kickr (bike trainer) and couldn't get it to work.

As an aside, the Kickr has worked to a degree on the Android app, but incline is not correct. Wahoo uses a proprietary version of FTMS that isn't quite the same. I'll open another issue for that with a log.

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

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

cagnulein commented 2 years ago

@jonathancolledge in your log i saw a connection from iFit with your KICKR. When you press connect on iFit what happens precisely?

cagnulein commented 2 years ago

@jonathancolledge try to pull and build again. i managed another frame. thanks, it will take a while handling all the frames from iFit

jonathancolledge commented 2 years ago

Great, I've left it building ready for after school run!

jonathancolledge commented 2 years ago

debug-Tue_Sep_14_09_19_16_2021.log debug-Tue_Sep_14_09_17_37_2021.log

Here are the two logs that correspond to video I'm just about to post.

jonathancolledge commented 2 years ago

Here's the video to go with the logs in the post above. It got further than last time. https://youtu.be/aLUlTUSbvOs

cagnulein commented 2 years ago

@jonathancolledge great! we're making progress! i added other 3 frame's types so pull it and build it again when you have the time :) thanks!

jonathancolledge commented 2 years ago

debug-Tue_Sep_14_10_36_27_2021.log debug-Tue_Sep_14_10_34_30_2021.log

Same problem. Do these help?

cagnulein commented 2 years ago

Thanks, I will check them after lunch

Il giorno mar 14 set 2021 alle 12:41 jonathancolledge < @.***> ha scritto:

debug-Tue_Sep_14_10_36_27_2021.log https://github.com/cagnulein/qdomyos-zwift/files/7161146/debug-Tue_Sep_14_10_36_27_2021.log debug-Tue_Sep_14_10_34_30_2021.log https://github.com/cagnulein/qdomyos-zwift/files/7161147/debug-Tue_Sep_14_10_34_30_2021.log

Same problem. Do these help?

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

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

cagnulein commented 2 years ago

@jonathancolledge fixed also this. we're going on! i guess we're almost there. pull it and build it :D

jonathancolledge commented 2 years ago

Same problem, I've posted on #442 Maybe that has something to do with it

cagnulein commented 2 years ago

Ok, we made some steps, now the connection is alive but for some reason iFit doesn't like it. iFit shows always the same error that you show me in the video? @jonathancolledge

jonathancolledge commented 2 years ago

I didn't get the 65003 error or whatever it was, just thisScreenshot_20210915_044813_com.ifit.wolf.jpg

Then I kept pressing close this popped up Screenshot_20210915_044838_com.ifit.wolf.jpg

cagnulein commented 2 years ago

mmm interesting! i will investigate about the threshold thing! Thanks

cagnulein commented 2 years ago

i will come back on this after my honey moon, thanks for the feedbacks!

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

Il giorno mer 15 set 2021 alle ore 08:37 jonathancolledge < @.***> ha scritto:

I didn't get the 65003 error or whatever it was, just this[image: Screenshot_20210915_044813_com.ifit.wolf.jpg] https://user-images.githubusercontent.com/4342400/133382884-9035d825-76c6-4e2a-bbb6-2ed512db781a.jpg

Then I kept pressing close this popped up [image: Screenshot_20210915_044838_com.ifit.wolf.jpg] https://user-images.githubusercontent.com/4342400/133382933-b11cc2e8-beb1-4773-af28-04eb32d42cb1.jpg

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/cagnulein/qdomyos-zwift/issues/441#issuecomment-919741425, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAALYWETLQPVZNWFAQPODFDUCA5JLANCNFSM5D7HCGGA .

jonathancolledge commented 2 years ago

Enjoy your honeymoon!

cagnulein commented 2 years ago

a lot of steps forward today using this snoof log btsnoop_hci (8).log

have to manage this for tomorrow "ff0d0204020907" i also create a branch for this in order to simulate it quickly

cagnulein commented 2 years ago

hi @jonathancolledge how are you? I don't know if you are still interested on this. Anyway i will not test it again probably until tonight. If you want to make a test with the commit https://github.com/cagnulein/qdomyos-zwift/commit/07825071a0edc8ead9f0e2584c23c4e264b3255c (be sure to use the ifit-virtualdevice branch, not the master)

also if you see in the log the text "YOU HAVE TO MANAGE ME!" means that i forgot something, so please send me the log and i will handle it.

cagnulein commented 2 years ago

ifit.log no errors, but the workout doesn't load

jonathancolledge commented 2 years ago

Hi, sorry for the late reply. I can help test today if you need?

cagnulein commented 2 years ago

@jonathancolledge thanks but i guess i can do all by myself. i fixed the error that you see some months ago, i but when i press on the "start workout button", the iFit app thinks for a while and then goes back without saying anythin :( i have to try to understand it

hoveeman commented 2 years ago

@cagnulein Let me know if there is anything I can do to help test/share debug files. I have an Ex-5 Bike and the NordicTrack T6.5S treadmill. I have iOS and Android devices available and an active iFit subscription.

cagnulein commented 2 years ago

I just need time, actually I'm overwhelmed by requests :(

Il giorno mar 25 gen 2022 alle 21:55 hoveeman @.***> ha scritto:

@cagnulein https://github.com/cagnulein Let me know if there is anything I can do to help test/share debug files. I have an Ex-5 Bike and the NordicTrack T6.5S treadmill. I have iOS and Android devices available and an active iFit subscription.

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

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

hoveeman commented 2 years ago

No problem at all! No rush on this. Just wanted to throw out any help if needed. Thanks for everything!

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.

cagnulein commented 2 years ago

@jonathancolledge i did some steps forward to this. I now see a connection but it doesn't keep it for more then 5 seconds. I guess they need to see something moving. It's really hard. I will check this again in the next days. If you wanna try it to double confirm what I'm seeing you're welcome!

jonathancolledge commented 2 years ago

I tried, but it wouldn't connect at all. Was using the beta on the phone. Should I have built on the Pi and try that?

cagnulein commented 2 years ago

@jonathancolledge yes i build it only for android. You have to use the PI if you want to give it a try. Anyway as i said i'm still working on it, but maybe you can give me a confirmation about the status :) Thanks

hoveeman commented 2 years ago

I'm still excited to try this out! I have an iFIT subscription and would love to get the latest beta and try this out. Let me know if I can help!

cagnulein commented 2 years ago

@hoveeman Sure I will build the iOS one today!stay tuned!

cagnulein commented 2 years ago

@hoveeman sent!

hoveeman commented 2 years ago

@cagnulein any recommendations on configuration of QZ? I'm unable to get iFit to find QZ. I am running QZ on my iPhone and iFit on my iPad, and I have virtual iFit enabled. I also toggled iOS Peloton workaround. No luck. Anything else I should try?

Edit: this is with my echelon bike connected.

cagnulein commented 2 years ago

@hoveeman due to different Bluetooth services you will probably need to reset the network settings of your iPad

hoveeman commented 2 years ago

@cagnulein on the device running iFIT or QZ? I'll start with the iPad running iFIT.

cagnulein commented 2 years ago

@hoveeman On the device running I fit

hoveeman commented 2 years ago

@cagnulein I reset the network settings on both the iPhone (QZ) and the iPad (iFIT). I also reinstalled iFIT on the iPad. I unfortunately was never able to get iFIT to find QZ.

cagnulein commented 2 years ago

so strange, i will double check it again. yesterday i tried my iphone to an android device and it worked ok, maybe i'm missing something on ios to ios, or maybe the ios version of ifit is slightly different.

don't you see the i_eb device at all in the lookup window on ifit?

hoveeman commented 2 years ago

@cagnulein No, I never saw that device pop up... iFIT just continued to search until it showed an error that it couldn't find anything. I have a Samsung tablet i could load iFIT on and see if it iPhone to Android works.

cagnulein commented 2 years ago

yes thanks try ifit on android, there it will work for sure. i'm trying ios to ios now

hoveeman commented 2 years ago

@cagnulein You were right, I tried iFIT on my android tablet and it saw QZ right away from my iPhone and was able to connect and control the bike.

cagnulein commented 2 years ago

@hoveeman Great! And you were right too, iOS to iOS doesn't work. I have to understand this.

cagnulein commented 2 years ago

@hoveeman I don't remember, do you have an ifit device also? If so could you please send me some screenshot about it from nrfconnect app on the iPad?

hoveeman commented 2 years ago

@cagnulein Yep! It is a Nordictrack T6.5S Treadmill. Let me know if I missed something in the screenshots.

image

image

image

image

image

cagnulein commented 2 years ago

thanks @hoveeman the big thing that changes are the manufacture data in the advertisement frame I will try to implement those tomorrow, thanks for your help!

cagnulein commented 2 years ago

For my reference, this is what I see from my ipad about qz on my iPhone image

cagnulein commented 2 years ago

Mmm seems that iOS doesn't allow to set manufacturers data

https://stackoverflow.com/questions/15780267/the-advertisement-key-manufacturer-data-is-not-allowed-in-corebluetooth

I have to try from android to iOS.

cagnulein commented 2 years ago

@hoveeman good news: i fixed android to ios so i hope the same fix will also fix the ios to ios thing. But i can't try until the weekend I guess :( i will keep you updated