cagnulein / QZCompanionNordictrackTreadmill

Companion App of QZ for Nordictrack Treadmills and Bikes
https://www.qzfitness.com/
GNU Affero General Public License v3.0
49 stars 12 forks source link

Cannot connect via ADB on my nordictrack s15i #98

Closed parzidev28 closed 6 months ago

parzidev28 commented 6 months ago

Hello, I have a problem connecting via ADB to install QZ, I put the log attached with the message. I use QDomyos zwift on IOS 17.3.1

Thanks in advance QZ-Companion-log.txt

parzidev28 commented 6 months ago

I had to reset the bike and do the command quickly so that it disconnects, now I tried the command to see if a virtual button appears when I change the inclination but it means "device offline" again

cagnulein commented 6 months ago

when you say reset you say factory reset or reboot?

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

Il giorno mar 9 apr 2024 alle 13:26 parzidev28 @.***> ha scritto:

I had to reset the bike and do the command quickly so that it disconnects, now I tried the command to see if a virtual button appears when I change the inclination but it means "device offline" again

— Reply to this email directly, view it on GitHub https://github.com/cagnulein/QZCompanionNordictrackTreadmill/issues/98#issuecomment-2044823110, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAALYWHVCS6CO7MO75KUOHDY4PGAFAVCNFSM6AAAAABF5KR26KVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANBUHAZDGMJRGA . You are receiving this because you commented.Message ID: @.*** com>

parzidev28 commented 6 months ago

factory reset

parzidev28 commented 6 months ago

now I still can't take a screenshot because it means this message:

Last login: Tue Apr 9 13:27:35 on ttys000 private28@MacBook-Pro-de-private28 InstallPackage % chmod a+x adb-screenshot-mac.sh private28@MacBook-Pro-de-private28 InstallPackage % ./adb-screenshot-mac.sh Enter treadmill IP address: 192.168.1.41 PING 192.168.1.41 (192.168.1.41): 56 data bytes 64 bytes from 192.168.1.41: icmp_seq=0 ttl=64 time=8.965 ms 64 bytes from 192.168.1.41: icmp_seq=1 ttl=64 time=6.843 ms 64 bytes from 192.168.1.41: icmp_seq=2 ttl=64 time=4.982 ms 64 bytes from 192.168.1.41: icmp_seq=3 ttl=64 time=4.505 ms

--- 192.168.1.41 ping statistics --- 4 packets transmitted, 4 packets received, 0.0% packet loss round-trip min/avg/max/stddev = 4.505/6.324/8.965/1.757 ms disconnected everything

adb: device offline adb: error: failed to get feature set: device offline adb: device offline private28@MacBook-Pro-de-private28 InstallPackage %

cagnulein commented 6 months ago

did you try to inhibit ifit updates?

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

Il giorno mar 9 apr 2024 alle 13:28 parzidev28 @.***> ha scritto:

factory reset

— Reply to this email directly, view it on GitHub https://github.com/cagnulein/QZCompanionNordictrackTreadmill/issues/98#issuecomment-2044832395, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAALYWHZJUYOJPZAALS3SETY4PGHTAVCNFSM6AAAAABF5KR26KVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANBUHAZTEMZZGU . You are receiving this because you commented.Message ID: @.*** com>

parzidev28 commented 6 months ago

yes but then the updates start again and I can't stop them

parzidev28 commented 6 months ago

I can only send a photo taken with my iPhone, if I need a screenshot I have to reset the bike and start all over again

cagnulein commented 6 months ago

yes but then the updates start again and I can't stop them

you have to inhibit internet access to the bike's tablet from your router. are you able to do so?

I can only send a photo taken with my iPhone, if I need a screenshot I have to reset the bike and start all over again

nope i need a photo of the ifit manual screen from the script directly because i need precise coordinates. anyway first of all adb must be determistic otherwise the solution to change the inclination from qz would not work (it's based on adb)

let me know

parzidev28 commented 6 months ago

yes I activated parental control to turn off the internet connection but if I do that the bike does not want to connect to my wifi network at all because it tells me that as there is no internet I cannot connect to this network

parzidev28 commented 6 months ago

I noticed that the bike was no longer connected with ADB when I restarted after this command "adb shell pm grant org.cagnulein.qzcompanionnordictracktreadmill android.permission.READ_LOGS"

parzidev28 commented 6 months ago

I think I'm going to end up buying a home trainer ^^

cagnulein commented 6 months ago

I noticed that the bike was no longer connected with ADB when I restarted after this command "adb shell pm grant org.cagnulein.qzcompanionnordictracktreadmill android.permission.READ_LOGS"

this command simply grant a permission to the companion so it shouldn't create any issue at all.

anyway we can avoid to run this command if we use a PC to run QZ directly (instead of using a mobile). In this way the PC will use adb to get the metrics and to control the inclination.

before doing this 2 questions:

parzidev28 commented 6 months ago

I'm not sure that adb works all the time even without doing the grant command, yes I have a pc I have a macbook pro is it possible with it?

cagnulein commented 6 months ago

yes I have a pc I have a macbook pro is it possible with it?

a pc or a mac?

I developed this particula feature on PC only for now

parzidev28 commented 6 months ago

its ok ? 2024-04-09@15-11-25

parzidev28 commented 6 months ago

I have a Mac and another PC running Linux

cagnulein commented 6 months ago

the screenshot is fine but you need to enable the slider bar in order to leave the control to qz. for the PC i did this on Windows

parzidev28 commented 6 months ago

what slider bar ? I don't understand sorry

parzidev28 commented 6 months ago

I don't have windows..

cagnulein commented 6 months ago

what slider bar ? I don't understand sorry

these ones for example

image

I don't have windows..

so we have to understand if we really need adb to control the inclination.

i suggest to enable the https://www.youtube.com/watch?v=aO5lwGhyUuo and then click on the plus inclination tile in order to check if you can see a touch event

let me know

parzidev28 commented 6 months ago

2024-04-09@15-31-04

cagnulein commented 6 months ago

nope i need the one with the left and right slider as I shown in my previous screenshot. you see the sliders of inclination and kph (treadmill case). You have to enable this in the ifit settings

parzidev28 commented 6 months ago

2024-04-09@15-40-22

cagnulein commented 6 months ago

ok that's perfect. now follow this

i suggest to enable the https://www.youtube.com/watch?v=aO5lwGhyUuo and then click on the plus inclination tile in order to check if you can see a touch event

parzidev28 commented 6 months ago

ok it's done, but nothing happens when I press the "+" of the inclination

parzidev28 commented 6 months ago

I restarted the bike so that the grant command took effect and now I no longer have an adb connection, however QZ on my iPhone still receives live data when I do a workout

cagnulein commented 6 months ago

instead when you press the touch normally can you see the event? if so the only way to work around this is to use adb but you have to find a way to "stabilize it". Unfortunately, I can't help you on this because every tablet is different.

I restarted the bike so that the grant command took effect and now I no longer have an adb connection, however QZ on my iPhone still receives live data when I do a workout

yes it's correct because qz is not using adb for the metrics.

parzidev28 commented 6 months ago

I don't see any event except the number increasing on the bike, I don't know at all how I can stabilize this adb problem..

cagnulein commented 6 months ago

I don't see any event except the number increasing on the bike,

wait! so you're seeing the number increasing? so qz is controlling it?

parzidev28 commented 6 months ago

when I press the bike button yes but not the phone button

parzidev28 commented 6 months ago

I managed to put the adb back on, I found how to do it but I still can't control it with the phone even though adb is ok now

parzidev28 commented 6 months ago

logcat.txt

parzidev28 commented 6 months ago

I just tried with the application launched on my mac and it's the same, I can't control the inclination of the bike although ADB works correctly

cagnulein commented 6 months ago

I managed to put the adb back on, I found how to do it but I still can't control it with the phone even though adb is ok now

perfect! now under the proform bike section setting, enable the adb remote setting. with this on, restart qz and when you press the incline plus button you have to see an event somewhere on the tablet

let me know!

parzidev28 commented 6 months ago

adb still ok but nothing happens

cagnulein commented 6 months ago

what do you mean adb still ok? did you enable the adb remote setting as I asked?

parzidev28 commented 6 months ago

I mean that adb is functional because I can run a log from my mac and it connects well, yes I have activated adb remote but there is still nothing when I press the "+" button

parzidev28 commented 6 months ago
Capture d’écran 2024-04-09 à 16 37 46
cagnulein commented 6 months ago

ok so now are ayou able to run the adb shell input swipe from the mac?

parzidev28 commented 6 months ago

can you send me the command please because I can no longer find it in conversation

cagnulein commented 6 months ago

adb shell input swipe 100 200 300 400 200

parzidev28 commented 6 months ago

when I put the swipe command, the command is sent on the bike and i go from the training screen to the screen to be able to stop training

cagnulein commented 6 months ago

ok that's perfect! can you collect a qz debug log with a adb remote enabled while you are pushing the plus inclination button?

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

Il giorno mar 9 apr 2024 alle 18:06 parzidev28 @.***> ha scritto:

when I put the swipe command I go from the training screen to the screen to be able to stop training

— Reply to this email directly, view it on GitHub https://github.com/cagnulein/QZCompanionNordictrackTreadmill/issues/98#issuecomment-2045566579, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAALYWHR6DUW4YUDIRRT7F3Y4QGZBAVCNFSM6AAAAABF5KR26KVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANBVGU3DMNJXHE . You are receiving this because you commented.Message ID: @.*** com>

parzidev28 commented 6 months ago

debug-maravr9_19_12_55_2024.log

cagnulein commented 6 months ago

i would like to send you the new ios beta. could you please send me your email to roberto.viola83 at gmail.com

thanks

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

Il giorno mar 9 apr 2024 alle 19:13 parzidev28 @.***> ha scritto:

debug-maravr9_19_12_55_2024.log https://github.com/cagnulein/QZCompanionNordictrackTreadmill/files/14921865/debug-mar__avr__9_19_12_55_2024.log

— Reply to this email directly, view it on GitHub https://github.com/cagnulein/QZCompanionNordictrackTreadmill/issues/98#issuecomment-2045717493, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAALYWAI6TKLIMIYEZDKXUTY4QOVBAVCNFSM6AAAAABF5KR26KVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANBVG4YTONBZGM . You are receiving this because you commented.Message ID: @.*** com>

parzidev28 commented 6 months ago

ok it works!! but it only works for incline but not for resistance

cagnulein commented 6 months ago

amazing! yes it supposed to do so! inclination affects also the resistance!

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

Il giorno mar 9 apr 2024 alle 19:52 parzidev28 @.***> ha scritto:

ok it works!! but it only works for incline but not for resistance

— Reply to this email directly, view it on GitHub https://github.com/cagnulein/QZCompanionNordictrackTreadmill/issues/98#issuecomment-2045783528, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAALYWECUJANJZSMVYEFUFLY4QTHLAVCNFSM6AAAAABF5KR26KVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANBVG44DGNJSHA . You are receiving this because you commented.Message ID: @.*** com>

parzidev28 commented 6 months ago

Okay so I have to adjust the resistance myself? we can't manage it automatically with zwift?

cagnulein commented 6 months ago

qz is changing automatically the inclination following zwift. on your bike, when you change the inclination, also the resistance is affected (harder when the inclination is higher) so we don't need to handle resistance. got it ?

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

Il giorno mar 9 apr 2024 alle 19:55 parzidev28 @.***> ha scritto:

Okay so I have to adjust the resistance myself? we can't manage it automatically with zwift?

— Reply to this email directly, view it on GitHub https://github.com/cagnulein/QZCompanionNordictrackTreadmill/issues/98#issuecomment-2045788273, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAALYWG7W2ZA3W6GZAQ5C73Y4QTPRAVCNFSM6AAAAABF5KR26KVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANBVG44DQMRXGM . You are receiving this because you commented.Message ID: @.*** com>

parzidev28 commented 6 months ago

ok I see, thank you very much!