cagnulein / qdomyos-zwift

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

Logs from T900C #13

Closed Martoni74 closed 4 years ago

Martoni74 commented 4 years ago

Hello,

thanks for the great work. I tested, by curiosity, with my Domyos T900C + RPi3 type B. It fail during the BLE discovery. (I switch on T900C, launch the latest release) Probably incompatible as it's older generation.

Here are the logs if it can helps : (didn't find anything else in /var/logs) I'm no more really familiar with C++ but happy to test if required.

sudo ./qdomyos-zwift Found new device: "Domyos-TC-1441" ( "00:00:0C:1B:15:01" ) qt.bluetooth: Using BlueZ LE DBus API Controller connected. Search services... serviceDiscovered "{00001801-0000-1000-8000-00805f9b34fb}" serviceDiscovered "{0000180a-0000-1000-8000-00805f9b34fb}" serviceDiscovered "{49535343-fe7d-4ae5-8fa9-9fafd205e455}" serviceScanDone stateChanged QLowEnergyService::ServiceState(DiscoveringServices) stateChanged QLowEnergyService::ServiceState(ServiceDiscovered) creating virtual treadmill interface... qt.bluetooth: Using BlueZ kernel ATT interface stateChanged QLowEnergyService::ServiceState(InvalidService)

rickoneeleven commented 4 years ago

maybe here, not in a format I can view:

btsnoop_hci.log btsnoop_hci.last.log

again, focus on from 08:53, and it runs for an hour and 25 minutes - is the data there?

cagnulein commented 4 years ago

@rickoneeleven yes there are a lot of data, i will play with them this afternoon. buon pranzo :)

cagnulein commented 4 years ago

ok @rickoneeleven , i didn't find something really different from what i did, anyway there are some bytes that differs from my implementation and i tried to change it as your snoop logs show.

I also add a "-no-console" option that disable the console refresh on the treadmill.

So, first of all, try without "-no-console". I would like to see if those bytes make some difference. If it hangs again, post the log and try with -no-console Of course, with this parameter, you will see anything on the console of the treadmill

Cross everything you can cross 🤣

rickoneeleven commented 4 years ago

will do, I'm in the position where I may be able to return this treadmill for one reason or another, and quite honestly I think I'm hanging the decision on if we can get this working. so fingers crossed, if we get stuck do you recommend the intense run treadmill instead?

cagnulein commented 4 years ago

the intense run works flawlessy. the last week i did a 1h40m session without any issue. how old is it? 1 year?

rickoneeleven commented 4 years ago

just under 1 year

first test crash: debug-Fri Nov 6 13_04_58 2020.log

trying now with -no-console

rickoneeleven commented 4 years ago

-no-console - the display is still updating?

cagnulein commented 4 years ago

-no-console - the display is still updating?

the display on the treadmill no, it shouldn't.

rickoneeleven commented 4 years ago

yeah but it is updating :D

cagnulein commented 4 years ago

did you pulled and make it correctly? i mean you haven't to see changing distance and elapsed

rickoneeleven commented 4 years ago

git pull qmake make -j4 cd src ./qdomyos-zwift -no-console

rickoneeleven commented 4 years ago

i'll do a clean clone soon

rickoneeleven commented 4 years ago

in the mean time, can you see if you can get 2+ hours on your treadmil, even if it's just rolling slowly for the test in the background? would love to know before i consider if i'm going to try and box mine back up 😆

rickoneeleven commented 4 years ago

sorry for all the updates - i was actually on the treadmill last time it crashed, and the display stopped updating WHEN the program starting spitting out connection errors, so you get about 60 seconds of the treadmill still at speed, while it's trying to reconnect - that could actually work out perfect for the program restarting, and reconnecting with previous settings, as it means the treadmill won't slow in-between, as you'd be working in the 60 second or so grace period

cagnulein commented 4 years ago

in the mean time, can you see if you can get 2+ hours on your treadmil, even if it's just rolling slowly for the test in the background? would love to know before i consider if i'm going to try and box mine back up 😆

ok i will do this weekend, i'm in the office now. Another idea: do you have a mac? you could try to run the app on the mac instead of the raspberry..maybe your rasp has some issue...

rickoneeleven commented 4 years ago

i do not, i do have windows - think i saw a post about running it via a VM, hmmm ill have a think

cagnulein commented 4 years ago

that could actually work out perfect for the program restarting, and reconnecting with previous settings, as it means the treadmill won't slow in-between, as you'd be working in the 60 second or so grace period

yes i could do. But i understood that we would like to give a last shot with this commit...

cagnulein commented 4 years ago

i do not, i do have windows - think i saw a post about running it via a VM, hmmm ill have a think

ok windows is okay too, maybe even better with the VM. If it works we know that the rasp has some issue

cagnulein commented 4 years ago

how many days do you have before the end of the decathlon-year @rickoneeleven ?

rickoneeleven commented 4 years ago

few weeks 👍

rickoneeleven commented 4 years ago

just tried a fresh clone with -no-console

still updates 😄

cagnulein commented 4 years ago

@rickoneeleven now the console is dead as it should be?

rickoneeleven commented 4 years ago

No still updating

cagnulein commented 4 years ago

No still updating

no wait, there is something wrong. are you sure about

./qdomyos-zwift -no-console

?

rickoneeleven commented 4 years ago

oooops wrong video, here you go https://photos.app.goo.gl/y57wrxU1GvHxises8

cagnulein commented 4 years ago

maybe your treadmill has a different behaviour. the intense run, if i don't send the display packet it will never update the display :O

rickoneeleven commented 4 years ago

:sob:

rickoneeleven commented 4 years ago

when we did the delay yesterday, that did slow it down, maybe we should delay it for 3 hours :laughing:

cagnulein commented 4 years ago

Is it still running?

rickoneeleven commented 4 years ago

no it crashed pretty much straight away, before even 10 minutes. i wasn't sure you'd still want the logs 😆

but like I said, the console was still updating, so it hadn't taken that setting

anyway - i've just setup your VM version running on windows virtualbox, that's connected and i've just started it off only a minute or so ago

rickoneeleven commented 4 years ago

okay so............. we've been running on the virtualbox version for an hour and so far.... so good.....

cagnulein commented 4 years ago

@rickoneeleven huge news, which power supply use for the raspberry?

I'm starting for a 2h session with me on the treadmill. If you want you could follow me on zwift

rickoneeleven commented 4 years ago

It's a raspberry pi specific one, let's see what happens. If my treddy hits two hours with the virtual box, I'll be ecstatic :smile:

rickoneeleven commented 4 years ago

okay so.............. still running!!! got some weird things on treadmill display, like it saying the time is 99:99 and the inclination on the screen and treadmill doesn't match up but... i don't really care! that fact it's still connected is fantastic https://photos.app.goo.gl/FVjoVpD9kXicf5GQA <--- video

and this is what was powering my pi, but i've turned that off now, ill just use a VM!

PXL_20201106_172909856

rickoneeleven commented 4 years ago

awww man this shit's getting too funny now - so i decided i trusted it enough to come out for a run on the virtual box version.... and it won't show up in zwift 😆

so i tried to clone the latest version inside the vm but get permission denied, this shit's too funny

edit: ohh i just saw on the virtualbox post the bridge hasn't been developed yet, so that explains that 😆

cagnulein commented 4 years ago

awww man this shit's getting too funny now - so i decided i trusted it enough to come out for a run on the virtual box version.... and it won't show up in zwift 😆

so i tried to clone the latest version inside the vm but get permission denied, this shit's too funny

edit: ohh i just saw on the virtualbox post the bridge hasn't been developed yet, so that explains that 😆

I didn't tried the bridge inside the VM but it should work. - Did you try to restart it? Permission denied because you need to run

sudo git pull And sudo git make

:)

rickoneeleven commented 4 years ago

Yeah I tried to restart it but still didn't connect.

I've started installing debian on a laptop now to see if I can get it working on that, I should be able to I think?

If it fails, I'll try sudo on the virtualbox

cagnulein commented 4 years ago

Yes it should definitely works

rickoneeleven commented 4 years ago

i'm even more confused now, on both the virtualbox from earlier, and my brand new debian 10 build, they both connect to treadmill and the connection so far looks good (one at a time obviously, the virtualbox is turned off now), but niether see my iPad, the iPad that was working fine on the bridge on the rasberry pi 😖

ill see if i can get logs later or tomorrow, i feel worn out

cagnulein commented 4 years ago

Tomorrow I will test my window 10 notebook and I'll give you a feedback. Maybe something with the dongle bluetooth. Not every bluetooth dongle act as central and peripheral at the same time.

rickoneeleven commented 4 years ago

here are most recent logs anyway

debian connecting to treadmill, seems okay no zwift connection

debug-Fri Nov 6 20:58:34 2020.log

cagnulein commented 4 years ago

Sadly on the zwift side there aren't any logs relevant. Did you try nrf connect on your phone?

rickoneeleven commented 4 years ago

i turned the pi back on, fired up your program and straight away the bridge was showing on ipad.

matched the exact commit on both debian laptop and pi, ran make but still on the laptop, no zwift bridge

just looking at nrf connect now, downloading it

cagnulein commented 4 years ago

I'm almost sure that is a limit of your Bluetooth adapter on your notebook. Do a lspci or lsusb and give me the details of your Bluetooth adapter on your notebook.

In the meanwhile, try to find a new raspberry, maybe a 0w and a new power supply :P

rickoneeleven commented 4 years ago

May look into a new pi, in regards to the laptops I tried two different ones.

Dell E5550 with virtual box, great treadmill connection, no bridge

IBM X230 for debian, same issue, good treadmill, no bridge.

cagnulein commented 4 years ago

@rickoneeleven i added an option called -only-virtualtreadmill that brings up only the interface to zwift. on my VM works, i would like to know if it does to you too.

when my GF will wake up, i will start a full test on VM (this morning i woke up at 4:30 AM for no reason :D )

@Martoni74 do you still alive? This is your issue! 😆

rickoneeleven commented 4 years ago

a new day, new hope my friend

or as my wife would say "ryan, stop fucking about with that treadmill!"

right, so i've got a few things to play with today, as it happens i already own another pi, think it's the same model, but at least it's different hardware in case my other one has fault, and different power supply. first i'll try -only-virtualtreadmill with debian laptop and see where we are.

rickoneeleven commented 4 years ago

so with new parameter (running from my debian laptop) Screenshot from 2020-11-07 06-57-34

and no connection to zwift (or treadmill as we'd expect)

rickoneeleven commented 4 years ago

i've just checked to see what my second pi is and they're both the same "Raspberry Pi 3 Model B Rev 1.2", so i'm not sure i'm going to test on the second one as I don't really believe there is anything wrong with the first. and the second one is doing a very important and specific job for me, so don't want to have to play with it if I don't need to.

maybe i'll wait until you've tried your windows virtualbox version and see if the bridge to zwift works for you :+1:

cagnulein commented 4 years ago

so with new parameter (running from my debian laptop) Screenshot from 2020-11-07 06-57-34

and no connection to zwift (or treadmill as we'd expect)

So it's definitely a dongle issue