Closed firetrappe closed 3 years ago
I guess something is trying to connect with the bridge, is why it disappears. I will add some debug print to understand it. Does it happens the same even with your bluetooth iPad off?
I guess something is trying to connect with the bridge, is why it disappears. I will add some debug print to understand it. Does it happens the same even with your bluetooth iPad off?
Thank you so much for investigating.
I just tested again with the iPad in airplane mode with bluetooth off. The bridge still disappears.
@firetrappe in the meanwhile could you please try to add the parameter -only-virtualbike ?
@firetrappe in the meanwhile could you please try to add the parameter -only-virtualbike ?
@cagnulein I just tested that. The bridge shows up in nRF continuously until I reboot the Pi
So Is a issue when the bluetooth adaptor acts as central - and peripheral at the same time. Do you have a rasp 3b isn't it? The same model of @rickoneeleven But you said also that the old commit works so it can't be an hardware issue.
So, we're back to the old question: bisect! :D
So Is a issue when the bluetooth adaptor acts as central - and peripheral at the same time. Do you have a rasp 3b isn't it? The same model of @rickoneeleven But you said also that the old commit works so it can't be an hardware issue.
So, we're back to the old question: bisect! :D
Yeah, 3b.
The old commit worked twice, even though I must have tested it 50 times. It seems like if the timing of the connections isn't perfect then it doesn't work.
It seems that i have same bike/console as firetrappe. If needed i can do some test.
So Is a issue when the bluetooth adaptor acts as central - and peripheral at the same time. Do you have a rasp 3b isn't it? The same model of @rickoneeleven But you said also that the old commit works so it can't be an hardware issue.
So, we're back to the old question: bisect! :D
Yeah, 3b.
The old commit worked twice, even though I must have tested it 50 times. It seems like if the timing of the connections isn't perfect then it doesn't work.
There is a 100,100 on the code of the virtual bike. They're the milliseconds of advertising. Try to change them, for example, 1000,1000 and check if something change.
It seems that i have same bike/console as firetrappe. If needed i can do some test.
Welcome aboard! Yeah absolutely! If you can do a quick test...
@firetrappe as i promised i added a new debug log system with this commit https://github.com/cagnulein/qdomyos-zwift/commit/79f8942b06eb0a531f763fb2d283a24ea06cb4da I hope that doesn't brake anything.
i should get more info about zwift issue. Tomorrow will be an hard day, but the day after tomorrow i could check the logs that you will post :)
There is a 100,100 on the code of the virtual bike. They're the milliseconds of advertising. Try to change them, for example, 1000,1000 and check if something change.
@cagnulein Thanks for that suggestion. I tested with 1000,1000 and even 10000,10000. nRF detected the bridge for both attempts, although the 10000,10000 was very slow to detect, obviously.
It seems that i have same bike/console as firetrappe. If needed i can do some test.
@bvalat Brilliant! Thank you for joining. I am glad I am not the only one in the world with a different console 😄
@firetrappe as i promised i added a new debug log system with this commit 79f8942 I hope that doesn't brake anything.
i should get more info about zwift issue. Tomorrow will be an hard day, but the day after tomorrow i could check the logs that you will post :)
Great, thank you for all your efforts. We will crack this thing! I will checkout the new commit and hopefully the logs will show you something. 🤞
@cagnulein Thanks for that suggestion. I tested with 1000,1000 and even 10000,10000. nRF detected the bridge for both attempts, although the 10000,10000 was very slow to detect, obviously.
You mean that parameter improve the bridge connection? So maybe this is the root cause of the problem? Do I should re-put this value to default (1000, 1000)?
@cagnulein Thanks for that suggestion. I tested with 1000,1000 and even 10000,10000. nRF detected the bridge for both attempts, although the 10000,10000 was very slow to detect, obviously.
You mean that parameter improve the bridge connection? So maybe this is the root cause of the problem? Do I should re-put this value to default (1000, 1000)?
Sorry, I only tested with -only-virtualbike I will change to 1000,1000 and test with the bike.
Sorry, I only tested with -only-virtualbike I will change to 1000,1000 and test with the bike.
Ok, I'm really curious
Here's a log file from your latest commit: debug-Sun Nov 8 19_19_38 2020.log
Now I will change the .cpp file to 1000,1000 and test.
I get the same result with 1000,1000 unfortunately. Bridge disappears.
Here's the log file for that session, just in case it's helpful: debug-Sun Nov 8 19_24_43 2020.log
Ok, if you haven't time to do a git bisect, do it manually, checking out commit by commit. It might be easier for you
I hope @bvalat has a different behavior so we can compare them
Ok, I have a busy day tomorrow too, but I will see what I can do. Do you recommend I start from the original commit I used, or start further back with an even older one?
I'm really looking forward to hearing how @bvalat gets on too.
Start from the original commit that you used in the past and that worked
If i understood firetrap correctly, and I may have not. Even the one that "worked" only did so two in fifty times, so there may have never been a "stable"
If i understood firetrap correctly, and I may have not. Even the one that "worked" only did so two in fifty times, so there may have never been a "stable"
Yes I understood it too, but 2 times it's better than nothing. I guess this is a typical scenario where you have more than one issue and it's a really nightmare to debug them. So I would like to understand one thing at a time.
Of course it's not so simple because I can't test it directly :(
It's all good. I think I have figured out how bisect works. It shouldn't take too long to test. They may all fail, but we won't know until we try.
It's all good. I think I have figured out how bisect works. It shouldn't take too long to test. They may all fail, but we won't know until we try.
Of course, remberber at every bisect to run a make ;)
Ok, I finally got around to using bisect.
The latest commit and the original commit didn't work - the bridge connected, resistance displayed but not speed. However, one of the attempts did work:
Photo was taken at 01:15 (yes, it was a late night! lol)
None of the following attempts were successful. This was the final result:
Here are the logs:
debug-Tue Nov 10 01-04-24 2020.log debug-Tue Nov 10 01-11-12 2020.log debug-Tue Nov 10 01-18-45 2020.log debug-Tue Nov 10 01-22-02 2020.log debug-Tue Nov 10 01-24-35 2020.log debug-Tue Nov 10 01-27-05 2020.log
thanks @firetrappe for your work, i feel guilty about it :( few questions:
thanks @firetrappe for your work, i feel guilty about it :(
No need to feel guilty lol. This is what beta testing is all about. I'm very stubborn, I don't give up easily 😄
few questions:
- when you said "The latest commit and the original commit didn't work - the bridge connected, resistance displayed but not speed." displayed where? on bike or zwift?
My test method was to start the bridge using each commit. Then just use the GUI on the bridge to see if any speed was detected. When speed was detected then I loaded Zwift on the iPad to test. On every commit the bridge displays resistance changes when I change them manually on the bike.
- which is the log that it works? this one debug-Tue Nov 10 01-11-12 2020.log ? IT IS VERY IMPORTANT BECAUSE I can diff the log and check
Yes, that is the one. I wasn't sure which is why I checked the timestamp of the photo. That is also the biggest log, the bridge ran for longer because I tested with zwift once I saw speed updating in the bridge GUI
- when you said "None of the following attempts were successful. This was the final result:" so you didn't find any commits that really works. I mean, there is always a unstable condition, isn't it? So the very first time you tried you were lucky, i guess, do you agree?
None of the other commits (offered by bisect) that I tested detected speed changes in the bridge GUI.
@firetrappe i guess i have good news! i guess i solved your issue. Please pull it and test it and send me the log. I've done something really invasive: so if i missed something, i need to check the log.
The idea comes from your last night logs, so they were super useful!
@firetrappe i guess i have good news! i guess i solved your issue. Please pull it and test it and send me the log. I've done something really invasive: so if i missed something, i need to check the log.
The idea comes from your last night logs, so they were super useful!
@cagnulein This sounds promising! Unfortunately I am at work for another 6 hours so I can't test until I get home :cry:
I'm glad the bisect logs were useful. I'm curious as to what the difference was. I'm so glad you spotted something different anyway.
I'm crossing everything for both of us! :crossed_fingers:
I'm curious as to what the difference was
the difference is about timings. But look it deeper i found that i should wait for a bike bluetooth event on init phase. So i tried to synchronize with that event. The same event is avaiable on my treadmill, so i tested and it works (but my TM works even without this event).
That's really interesting. We thought it was probably to do with timings, that makes sense.
Hopefully this may fix some issues with other peoples equipment too.
I noticed last night that the console on my bike has a switch on the back to choose between Rowing Machine, Elliptical or Bike. Maybe Domyos use the same console on other types of product?
By the way, knowing your skills and where you live, if you don't work for Ferrari then you should! :wink:
That's really interesting. We thought it was probably to do with timings, that makes sense.
i had always this feeling too, but i didn't have the evidences until this morning! (thanks again :) )
Hopefully this may fix some issues with other peoples equipment too.
i hope so!
I noticed last night that the console on my bike has a switch on the back to choose between Rowing Machine, Elliptical or Bike. Maybe Domyos use the same console on other types of product?
absolutely! Infact, the treadmill and bike from domyos has more or less the same protocol, and it has sense.
By the way, knowing your skills and where you live, if you don't work for Ferrari then you should! 😉
hahaha in this very moment i would like to stay away from Ferrari 😆
I really hope that this commit will make the difference for you ;)
@cagnulein I just got home and tested... Android and Linux versions both appear to work with the bike! 🎉 🚀
I need to test further after I have eaten dinner, but I think you have cracked it 🎆
@firetrappe we will have a beer together one of these days! Great!
@firetrappe we will have a beer together one of these days! Great!
Sounds like a plan my friend. I'll have to pop over, we can have a little 5k race around Fiarano :smile:
everything ok @firetrappe ? could we close this issue?
@firetrappe is everything allright? i'm starting to worry about you
@firetrappe i'm closing this one. if you have any issue, feel free to reopen it!
I connected my Bike 500 to the eConnected app to capture a very short Snoop log before I had to leave for work.
I tried to maintain a steady cadence and change the resistance levels on the bike's console to get some sort of usable log.
btsnoop_hci.log
One thing I did notice was that when eConnected opened and detected the bike, 'bluetooth' scrolled across the middle of the bike's console. I don't recall ever seeing that before :/