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

No connection to x22i #65

Closed
samkenw opened this issue Nov 3, 2023 · 241 comments
Closed

No connection to x22i #65

samkenw opened this issue Nov 3, 2023 · 241 comments
Labels
wontfix This will not be worked on

Comments

@samkenw
Copy link

samkenw commented Nov 3, 2023

Hi there,

Trying to get this to run with my Nordictrack x22i.

What I did:
Installed companion via browser (no windows pc available).
In the companion app I selected "other".
In the QZ app (iOS) added the IP address of the treadmill.

Issue:
In the iOS app I am seeing the data fields - but nothing is changing.

Logs:
In the log dump in the companion app on the treadmill I get:

2023-11-03 17:59:18.755 Service started
2023-11-03 17:59:18.765 Service onCreate
2023-11-03 17:59:18.765 Service postDelayed
2023-11-03 17:59:18.766 Service started
2023-11-03 17:59:19.267 Service run
2023-11-03 17:59:19.276 /sdcard/.wolflogs/
2023-11-03 17:59:19.276 lastModifiedFile /scard/wolflogs/2023-11-03 _logs.txt
2023-11-03 17:59:19.277 string: /sdeard/wolflogs/2023-11-03_logs.txt
2023-11-03 17:59:19.277 Parsing /sdcard/.wolflogs/2023-11-03_logs.txt
2023-11-03 17:59:19.278 Device: null
2023-11-03 17:59:19.654
2023-11-03 17:59:19.894
2023-11-03 17:59:19.936 Got UDP broadcast from , message: -1;-100
2023-11-03 17:59:19.937 -1:-100

@cagnulein
Copy link
Owner

Hi @samkenw try to set the c1750 device on the treadmill companion and reboot it

Let me know

@samkenw
Copy link
Author

samkenw commented Nov 3, 2023

Great, data is now being shown in the app! Thanks.
However, controlling the treadmill does not seem to work. Am I missing a setting?

@cagnulein
Copy link
Owner

Great! In order to add control to it I need a screenshot of your manual view on the tablet that you can with adb via this script https://github.com/cagnulein/QZCompanionNordictrackTreadmill/blob/master/InstallPackage/adb-screenshot.bat

Don't u have a pc or a Mac?

@samkenw
Copy link
Author

samkenw commented Nov 3, 2023

I have a Mac, suppose I can't just execute the bat. Will try adapting and let you know. Thanks

@cagnulein
Copy link
Owner

cagnulein commented Nov 3, 2023 via email

@samkenw
Copy link
Author

samkenw commented Nov 3, 2023

yea, doing that but getting "connection refused"

@cagnulein
Copy link
Owner

cagnulein commented Nov 3, 2023 via email

@samkenw
Copy link
Author

samkenw commented Nov 3, 2023

adb is enabled.. is factory reset necessary even though I can turn on debugging in developer options?
I have not done the factory reset however. I will do that and get back to you.

@samkenw
Copy link
Author

samkenw commented Nov 3, 2023

I am seeing that there is no wireless debugging option.. must I use adb via USB?

@cagnulein
Copy link
Owner

cagnulein commented Nov 3, 2023 via email

@samkenw
Copy link
Author

samkenw commented Nov 3, 2023

Okay, so to clarify: do I need to reset to be able to adb connect even though I have already turned usb debugging on?

@samkenw
Copy link
Author

samkenw commented Nov 3, 2023

Is there another way I can get the screenshot? Perhaps I can upload a photo?

@cagnulein
Copy link
Owner

Okay, so to clarify: do I need to reset to be able to adb connect even though I have already turned usb debugging on?

Yes exactly, ifit closed the door on the latest releases.

You can use an apk that take a screenshot on the tablet and then upload the picture. It must be precise to the pixel

@samkenw
Copy link
Author

samkenw commented Nov 3, 2023

Okay, I understand, thanks for clarifying! Do you need a screenshot of a specific screen?

@samkenw
Copy link
Author

samkenw commented Nov 3, 2023

Sadly after reset still getting:

adb connect 123.456.123.456

  • daemon not running; starting now at tcp:5037
  • daemon started successfully
    > failed to connect to '123.456.123.456:5555': Connection refused

@cagnulein
Copy link
Owner

Okay, I understand, thanks for clarifying! Do you need a screenshot of a specific screen?

Yes of the manual workout screen

@cagnulein
Copy link
Owner

Sadly after reset still getting:

adb connect 123.456.123.456

  • daemon not running; starting now at tcp:5037
  • daemon started successfully

> failed to connect to '123.456.123.456:5555': Connection refused

Ok if you want let's try a thing: clicking on the plus and minus button on the inclination tile on qz, staying on the manual workout screen on the treadmill, check you see some touch event on the tablet.
If so we have hopes!

Let me know

@samkenw
Copy link
Author

samkenw commented Nov 3, 2023

(after reset) reading is still working but sadly no touch events visible. (I set touch to be visible in developer options)

@cagnulein
Copy link
Owner

Mmm another test
From a terminal app on the tablet try to run
input swipe 100 200 300 400 200

Check if you see a touch event

Now I'm going to bed, we will catch up tomorrow
Thanks

@samkenw
Copy link
Author

samkenw commented Nov 4, 2023

Will try that! Can you recommend an app and mirror?

@cagnulein
Copy link
Owner

nope but there are dozens of terminal app :)

@samkenw
Copy link
Author

samkenw commented Nov 4, 2023

Alright thanks. Btw. if you are basically simulating pressing buttons on the screen, I can give you the location of all UI elements by activating the "show pointer location" in the developer options. Additionally I can send you a photo of the screen so you know where which action is. Would this be sufficient?

@cagnulein
Copy link
Owner

yes it should be enough 4 points

max speed, min speed, max inclination, min inclinatio

then i derive the linear formula ;)

@samkenw
Copy link
Author

samkenw commented Nov 4, 2023

sorry, what do you mean with "max speed" etc. The buttons that increase the speed on the screen for example?

@cagnulein
Copy link
Owner

the slider that you have in the manual workout window on the ifit tablet.
do you have 2 slider, right?

@samkenw
Copy link
Author

samkenw commented Nov 4, 2023

no, I have included a picture of the screen.
The settings are changed with manual buttons, I guess the same as on the x32i models.
tempImagelcJFmi

@samkenw
Copy link
Author

samkenw commented Nov 4, 2023

so sorry, I can enable the sliders. Give me a few minutes, I will pass the values

@samkenw
Copy link
Author

samkenw commented Nov 4, 2023

Alright:
max incline (40%) x: 75, y: 275
min incline: (-6%) x: 75, y: 845
max speed (22kph) x: 1845, y: 275
min speed (1kph): x: 1845, y: 845

@cagnulein
Copy link
Owner

cagnulein commented Nov 4, 2023 via email

@samkenw
Copy link
Author

samkenw commented Nov 4, 2023

Quick update: I have updated to the newest app version. Now the y-values have slightly changed (same for incline and speed) x-values are the same:

y-low: 785
y-high: 265

@samkenw
Copy link
Author

samkenw commented Nov 24, 2023

No, it is showing nothing. No change when I press logcat.

@cagnulein
Copy link
Owner

cagnulein commented Nov 24, 2023 via email

@samkenw
Copy link
Author

samkenw commented Nov 24, 2023

I set it to the text field in the app. I can try that again.

@cagnulein
Copy link
Owner

cagnulein commented Nov 24, 2023 via email

@samkenw
Copy link
Author

samkenw commented Nov 24, 2023

yes

@cagnulein
Copy link
Owner

ok pull it again, i restored it. if it works in this way i can start the patch in qz, thanks

@samkenw
Copy link
Author

samkenw commented Nov 24, 2023

Yea, this shows the output in the text field. However it is not following. I have to press logcat to refresh and then it seems to get a bunch of data (again) + the new lines.

@cagnulein
Copy link
Owner

cagnulein commented Nov 24, 2023 via email

@samkenw
Copy link
Author

samkenw commented Nov 24, 2023

Is this also the case if getting the logcat is in a separate thread?

@cagnulein
Copy link
Owner

cagnulein commented Nov 24, 2023 via email

@cagnulein
Copy link
Owner

patch created with adb in a thread. I will try to build a version for you today cagnulein/qdomyos-zwift#1829

@cagnulein
Copy link
Owner

@samkenw i'm sending you the new beta. Don't worry if it will be slow, i just leaved the debug for all the adb logcat in order to double check everything. if it works, even if slowly, i will remove this.

@samkenw
Copy link
Author

samkenw commented Nov 27, 2023

Tested. Not getting any data from the treadmill. Logs sent.

@cagnulein
Copy link
Owner

cagnulein commented Nov 27, 2023 via email

@cagnulein
Copy link
Owner

cagnulein commented Nov 27, 2023 via email

@cagnulein
Copy link
Owner

@samkenw thanks for the log (there is any particular reason why you're not adding them here instead of sending them by email?).
I checked and the issue it seems that it stucked after the connect.
That's strange because it's working on my simulator.
I will send you another one later today with some more debug log to understand this
Thanks!

@cagnulein
Copy link
Owner

hi @samkenw any news?

@samkenw
Copy link
Author

samkenw commented Dec 1, 2023

sorry for the delay, have been busy. Will have to get back to you after the weekend.

@samkenw thanks for the log (there is any particular reason why you're not adding them here instead of sending them by email?).

just for privacy reasons :)

@cagnulein
Copy link
Owner

cagnulein commented Dec 1, 2023 via email

Copy link

stale bot commented Dec 17, 2023

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.

@stale stale bot added the wontfix This will not be worked on label Dec 17, 2023
@stale stale bot closed this as completed Dec 24, 2023
@cagnulein cagnulein reopened this Dec 24, 2023
@stale stale bot removed the wontfix This will not be worked on label Dec 24, 2023
Copy link

stale bot commented Jan 8, 2024

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.

@stale stale bot added the wontfix This will not be worked on label Jan 8, 2024
@stale stale bot closed this as completed Jan 15, 2024
@cagnulein
Copy link
Owner

@samkenw are you still interested in?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

6 participants