Closed samkenw closed 8 months ago
@cagnulein yea, onscreen controls are active. @amasolov which version of the ifit software are you on? And how did you install the companion? APK or with adb?
@samkenw I'm on iFit 2.6.88. I installed the companion with ADB by cloning the git repository and running QZ-Companion.bat on a Windows 11 PC
@amasolov thanks for the info! Can you also tell me which android your machine is running? @amasolov did you use adb via Wifi without ever connecting via USB? @cagnulein I will try and organize a windows machine and try from there - perhaps that will solve my adb issues.
@cagnulein finally got adb working - perhaps we can test via this again small breakthrough: swipe via adb is working in the ifit app. just not able to control it through the app. Where is the QZ companion log file located? /sdcard/logcat.log doesn't exist
finally got adb working - perhaps we can test via this again
what did you do to get it working?
small breakthrough: swipe via adb is working in the ifit app. just not able to control it through the app.
ok because you need to enable the adb remote that it's working only from android or pc (and eventually Mac if I will develop it)
Where is the QZ companion log file located? /sdcard/logcat.log doesn't exist
you have first to press the dump log button in the companion
Let me know
In the terminal app on the treadmill I ran:
setprop service.adb.tcp.port 5555
stop adbd
start adbd
This enabled adb.
I need to be able to control it from iOS, is this not possible with the previous version? Edit: I understand, this is the new way to go with adb. Are you intending on adding this to iOS?
yes this https://github.com/cagnulein/qdomyos-zwift/pull/1732
I need to finish it. If you would like to help me you're welcome :)
I have no experience with iOS development - but if there is any info on what to do I can try and help :)
ok i will try a quick test later this week. if we will lucky maybe it's already everything developed
Il giorno lun 6 nov 2023 alle 16:48 Sam K @.***> ha scritto:
I have no experience with iOS development - but if there is any info on what to do I can try and help :)
— Reply to this email directly, view it on GitHub https://github.com/cagnulein/QZCompanionNordictrackTreadmill/issues/65#issuecomment-1795187193, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAALYWHUGFBHVWNPZUGIJKTYDEBD5AVCNFSM6AAAAAA64XWWIGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTOOJVGE4DOMJZGM . You are receiving this because you were mentioned.Message ID: @.*** com>
awesome! :)
ok @samkenw I could be ready for a test but I can't test it myself, so It will be good if you could be able to run a simple xcode project from your pc to the treadmill.
If I push the project here on github, can you run xcode and test it?
@cagnulein yea definitely, just tell me how and I will test it later today! :)
@samkenw perfect! let's start from this: close this repository https://github.com/cagnulein/adb-ios and try to open and build with xcode. Let me know if you can without issues
Build was successful with some warnings. Btw. Have you checked this: https://stackoverflow.com/questions/28337921/execute-adb-shell-input-swipe-command-from-apk
it's what I'm already do but you don't have root permissions on your bike I will give you the further instructions in a couple of hours thanks
Roberto Viola Software engineer and open source enthusiast http://robertoviola.cloud
Il giorno mer 8 nov 2023 alle ore 13:33 Sam K @.***> ha scritto:
Build was successful with some warnings. Btw. Have you checked this: https://stackoverflow.com/questions/28337921/execute-adb-shell-input-swipe-command-from-apk http://url
— Reply to this email directly, view it on GitHub https://github.com/cagnulein/QZCompanionNordictrackTreadmill/issues/65#issuecomment-1801800189, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAALYWD6IIHB7PVK2RO7W6TYDN3X3AVCNFSM6AAAAAA64XWWIGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMBRHAYDAMJYHE . You are receiving this because you were mentioned.Message ID: @.*** com>
ok now @samkenw in the viewcontroller.m change the IP
#define IP "192.168.0.46:43832"
with the IP of your tablet
#define IP "192.168.0.xx"
and start it on your mac and try to connect to it
Okay I will try tomorrow. But for some reason Xcode is not giving me the option to actually run the app... only build. Do you know what I need to change?
Btw. I am seeing in the Logs that the treadmill is also outputting "Actual Speed" which is slightly different than the speed that is set - would this be worth considering using instead of what the user inputs? I believe that the "actual speed" could be the speed reading from the speed sensor. (no idea why this is not the speed displayed in the console)
@cagnulein I have tried it on mine as well. The build went fine. This is what I see in the console:
/Users/amasolov/projects/adb-ios/adb/adb/adb_client.c::adb_query():adb_query: host:connect:192.168.2.233
/Users/amasolov/projects/adb-ios/adb/adb/adb_client.c::_adb_connect():_adb_connect: host:version
/Users/amasolov/projects/adb-ios/adb/adb/adb_client.c::adb_connect():adb_connect: service host:connect:192.168.2.233
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
/Users/amasolov/projects/adb-ios/adb/adb/transport_local.c::local_init():transport: local client init
/Users/amasolov/projects/adb-ios/adb/adb/adb_auth_host.c::adb_auth_init():adb_auth_init
/Users/amasolov/projects/adb-ios/adb/adb/adb_auth_host.c::get_user_keyfilepath():home '/private/var/folders/8t/c5y7cdfj7_n31dsnfpjt43_h0000gn/X/8B97A60B-1271-57AD-902F-2E21B9500709/d/Wrapper/adb-ios.app'
/Users/amasolov/projects/adb-ios/adb/adb/transport_local.c::client_socket_thread():transport: client_socket_thread() starting
/Users/amasolov/projects/adb-ios/adb/adb/adb_auth_host.c::get_user_key():user key '/private/var/folders/8t/c5y7cdfj7_n31dsnfpjt43_h0000gn/X/8B97A60B-1271-57AD-902F-2E21B9500709/d/Wrapper/adb-ios.app/android/adbkey'
/Users/amasolov/projects/adb-ios/adb/adb/adb_auth_host.c::read_key():read_key '/private/var/folders/8t/c5y7cdfj7_n31dsnfpjt43_h0000gn/X/8B97A60B-1271-57AD-902F-2E21B9500709/d/Wrapper/adb-ios.app/android/adbkey'
LSPrefs: could not find untranslocated node for <FSNode 0x600003fe83a0> { isDir = ?, path = '/private/var/folders/8t/c5y7cdfj7_n31dsnfpjt43_h0000gn/X/8B97A60B-1271-57AD-902F-2E21B9500709/d/Wrapper/adb-ios.app' }, proceeding on the assumption it is not translocated: Error Domain=NSPOSIXErrorDomain Code=1 "Operation not permitted
@samkenw It could be that you don't have a simulator installed to run the build.
Okay I will try tomorrow. But for some reason Xcode is not giving me the option to actually run the app... only build. Do you know what I need to change?
check the @amasolov answer about this
Btw. I am seeing in the Logs that the treadmill is also outputting "Actual Speed" which is slightly different than the speed that is set - would this be worth considering using instead of what the user inputs? I believe that the "actual speed" could be the speed reading from the speed sensor. (no idea why this is not the speed displayed in the console)
yes sure but I guess we need to create a setting for this because most of the people don't want to see a value that it's different from the one that set
@cagnulein I have tried it on mine as well. The build went fine. This is what I see in the console:
/Users/amasolov/projects/adb-ios/adb/adb/adb_client.c::adb_query():adb_query: host:connect:192.168.2.233 /Users/amasolov/projects/adb-ios/adb/adb/adb_client.c::_adb_connect():_adb_connect: host:version /Users/amasolov/projects/adb-ios/adb/adb/adb_client.c::adb_connect():adb_connect: service host:connect:192.168.2.233 * daemon not running. starting it now on port 5037 * * daemon started successfully * /Users/amasolov/projects/adb-ios/adb/adb/transport_local.c::local_init():transport: local client init /Users/amasolov/projects/adb-ios/adb/adb/adb_auth_host.c::adb_auth_init():adb_auth_init /Users/amasolov/projects/adb-ios/adb/adb/adb_auth_host.c::get_user_keyfilepath():home '/private/var/folders/8t/c5y7cdfj7_n31dsnfpjt43_h0000gn/X/8B97A60B-1271-57AD-902F-2E21B9500709/d/Wrapper/adb-ios.app' /Users/amasolov/projects/adb-ios/adb/adb/transport_local.c::client_socket_thread():transport: client_socket_thread() starting /Users/amasolov/projects/adb-ios/adb/adb/adb_auth_host.c::get_user_key():user key '/private/var/folders/8t/c5y7cdfj7_n31dsnfpjt43_h0000gn/X/8B97A60B-1271-57AD-902F-2E21B9500709/d/Wrapper/adb-ios.app/android/adbkey' /Users/amasolov/projects/adb-ios/adb/adb/adb_auth_host.c::read_key():read_key '/private/var/folders/8t/c5y7cdfj7_n31dsnfpjt43_h0000gn/X/8B97A60B-1271-57AD-902F-2E21B9500709/d/Wrapper/adb-ios.app/android/adbkey' LSPrefs: could not find untranslocated node for <FSNode 0x600003fe83a0> { isDir = ?, path = '/private/var/folders/8t/c5y7cdfj7_n31dsnfpjt43_h0000gn/X/8B97A60B-1271-57AD-902F-2E21B9500709/d/Wrapper/adb-ios.app' }, proceeding on the assumption it is not translocated: Error Domain=NSPOSIXErrorDomain Code=1 "Operation not permitted
ok it's the same thing that I saw on my android 14 devices. now try to press the list packages button, i did a change from the original code and that button actually simple invoke a "ls" on adb
let me know @amasolov
@cagnulein Nothing happens when I choose the list of packages - nothing in the debug console and nothing in the app
put a break in the ls line it will show you the output
on android 14 it says device offline
Il giorno gio 9 nov 2023 alle 06:46 Alexey Masolov @.***> ha scritto:
@cagnulein https://github.com/cagnulein Nothing happens when I choose the list of packages - nothing in the debug console and nothing in the app
— Reply to this email directly, view it on GitHub https://github.com/cagnulein/QZCompanionNordictrackTreadmill/issues/65#issuecomment-1803201506, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAALYWFE3XJNA6JN5XFCOW3YDRU3TAVCNFSM6AAAAAA64XWWIGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMBTGIYDCNJQGY . You are receiving this because you were mentioned.Message ID: @.*** com>
here in the line 91
update: ah sorry, misread
result __NSCFString * @"acct data init.mt8163.usb.rc lost+found sdcard \nbin default.prop init.rc mnt storage \nbugreports dev init.recovery.mt8163.rc odm sys \ncache etc init.usb.configfs.rc oem system \ncharger fstab.enableswap init.usb.rc proc ueventd.rc \nconfig init init.zygote32.rc product vendor \n"
@cagnulein Yes, we are getting the list of files on the tablet
amazing so it's working!
great! i will implement in qz today!!
ok guys implemented! send me an email to roberto.viola83 at gmail.com indicating this ticket and I will send you the new beta today!
I did not add the right coordinates for your bike, but I would like just to see if you see a reaction when you change the speed and incline on QZ on iOS to the touchscreen of the treadmill.
So in order to enable the patch, enable the adb remote setting under the norditrack treadmill and restart QZ. It's of course highly in alpha version, so enable the debug log and send me it in any case so I can check it
Thanks!
@victorypoint FYI I also added the adb bridge to iOS!
@victorypoint FYI I also added the adb bridge to iOS!
This is great news! Nice work guys.
@cagnulein The QZ beta shows zero values in the tiles, unfortunately :( It's with or without ADB remote enabled. The android version still works
@amasolov that's not about the today's beta @samkenw can read the metrics even with the previous build.
let's upload and compare the log from android to the ios one
any news guys?
Sent you an email but have not received an iOS app to test - could you check?
Okay I will check thanks. Could you please remove my email address from your post - this is private.
done, sorry
No worries, thanks :) received the invite, will test later!
Sorry, busy day today at work. Will test more on the weekend!
thanks, no rush i was only curious to fix it :)
Il giorno ven 10 nov 2023 alle 10:42 Alexey Masolov < @.***> ha scritto:
Sorry, busy day today at work. Will test more on the weekend!
— Reply to this email directly, view it on GitHub https://github.com/cagnulein/QZCompanionNordictrackTreadmill/issues/65#issuecomment-1805395694, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAALYWBAPEXW4GQJ7QYUTFTYDXZHHAVCNFSM6AAAAAA64XWWIGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMBVGM4TKNRZGQ . You are receiving this because you were mentioned.Message ID: @.*** com>
Alright, tested the app. With adb remote on and off same result: touches are visible when the companion app is in the foreground. However, no touches visible in ifit or anywhere else.
@samkenw please attach a debug log with adb remote enabled
also be sure you are still able to use adb from your mac to send events to the ifit app.
I am not seeing any logs from the companion at: /sdcard/logcat.log - is there an alternate location?
i mean the debug log from the qz main app
Il giorno ven 10 nov 2023 alle 17:09 Sam K @.***> ha scritto:
I am not seeing any logs from the companion at: /sdcard/logcat.log - is there an alternate location?
— Reply to this email directly, view it on GitHub https://github.com/cagnulein/QZCompanionNordictrackTreadmill/issues/65#issuecomment-1806016257, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAALYWDFKYBTJAW7A65NMSTYDZGU5AVCNFSM6AAAAAA64XWWIGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMBWGAYTMMRVG4 . You are receiving this because you were mentioned.Message ID: @.*** com>
where can I find these? Edit: found it
here as usual https://github.com/cagnulein/qdomyos-zwift/wiki/How-do-i-get-the-debug-log-in-case-something-doesn't-work%3F
Il giorno ven 10 nov 2023 alle 17:12 Sam K @.***> ha scritto:
where can I find these?
— Reply to this email directly, view it on GitHub https://github.com/cagnulein/QZCompanionNordictrackTreadmill/issues/65#issuecomment-1806020415, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAALYWCDR4LBLOQIBZPL2KLYDZG6ZAVCNFSM6AAAAAA64XWWIGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMBWGAZDANBRGU . You are receiving this because you were mentioned.Message ID: @.*** com>
Sent per email.
answered, also what about the adb on mac test?
Il giorno ven 10 nov 2023 alle 17:50 Sam K @.***> ha scritto:
Sent per email.
— Reply to this email directly, view it on GitHub https://github.com/cagnulein/QZCompanionNordictrackTreadmill/issues/65#issuecomment-1806074824, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAALYWAMETGXEFE5ZTXAUZDYDZLNNAVCNFSM6AAAAAA64XWWIGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMBWGA3TIOBSGQ . You are receiving this because you were mentioned.Message ID: @.*** com>
adb on Mac works as expected (on ifit app)
@samkenw i'm an idiot I did the modification on the nordictrack bike! i'm doing the same on the treadmill and i will send you it again
There is still hope!
@amasolov @samkenw new version sent! let me know!
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