Closed jampy closed 3 years ago
Hi Jampy, welcome aboard 👍
Ok, follow these steps:
Let me know if something is unclear
Hi @jampy did you try?
Hi @cagnulein , sorry for the delay (was busy).
I did what you requested. The tricky part was how to get the file off the phone. This solution did help.
Here is the dump: btsnoop_hci.log
I used FitConsole for testing, which is one of the officially supported apps.
What I did: (timestamps match the indicator of the app):
time | speed | incline |
---|---|---|
00:00 | 0.8 km/h | - |
00:30 | 4 km/h | - |
01:00 | 4 km/h | 1% |
01:10 | 4 km/h | 2% |
01:20 | 4 km/h | 3% |
01:30 | 4 km/h | 4% |
01:40 | 4 km/h | 5% |
02:00 | 4 km/h | 10% |
02:30 | 4 km/h | 15% |
03:00 | 4 km/h | 0% |
04:00 | 4.1 km/h | 0% |
04:05 | 4.2 km/h | 0% |
04:10 | 4.3 km/h | 0% |
04:15 | 4.4 km/h | 0% |
04:20 | 4.5 km/h | 0% |
04:25 | 4.6 km/h | 0% |
04:30 | 4.7 km/h | 0% |
04:35 | 4.8 km/h | 0% |
04:40 | 4.9 km/h | 0% |
04:45 | 5.0 km/h | 0% |
05:30 | 8 km/h | 0% |
06:00 | 12 km/h | 0% |
06:30 | 16 km/h | 0% |
07:00 | gradually up to 20 km/h* | 0% |
? | 4 km/h | 5% |
? + 30sec | 4 km/h | 0% |
08:30 | HRS 72 bpm** | |
09:00 | pause, then stop |
* there is no preset for 20 km/h ** HRS = heart rate sensor ("0 bpm" most of the time until I touched the sensor. These 72 bpm are totally wrong since the sensor does not work well, but it's what has been displayed by the app).
Hi @jampy Thanks for the detailed debug session :) Tomorrow I will check it
Ok log seems fine, here i will write everything i will discover from your log as reference for the development.
Name of the device: "TRX ROUTE KEY"
Sample packet received from the key: "551e0101550d0a00000000000000000000" 17 bytes byte[0-1] = 0x55EE as header byte[7-8] = elapsed time byte[9-10] = distance bytes[11-12] = calories bytes[13-14] = speed (0x043C = 4,60) byte[15] = inclination byte[16] = HRS
ok @jampy i think it should be easy to add the support for the TRX ROUTE KEY (check my previous comment). So i think we can do in this way:
i will create a branch for you and i'll start the development. We need some tries because i have to try some stuff on the bluetooth, so i need a hand from you in order to debug it.
Let me know if it is ok for you and i will proceed.
Ok, I'll try to help you :-)
Note I currently do not have any Zwift account - is that a problem?
no, no problem at all, Zwift is not mandatory 👍
here you can follow me on the development https://github.com/cagnulein/qdomyos-zwift/tree/toorx
I'll tell you when i'm ready to test. Will you be able to compile from source or do you need the binary?
Some quick notes: A while back I simply tried to connect to the TRX ROUTE KEY using simply a terminal. IIRC that thing had multiple virtual interfaces and none of them sent any data by itself. So I guess it needs some kind of initialization.
Also the treadmill (Toorx TRX 65 S EVO in my case) can be controlled via software. At least the inclination can be adjusted - don't know about speed or start/stop.
Will you be able to compile from source or do you need the binary?
Hmm, will try to compile your sources later - I'm current busy with other stuff. I'm using a special mostly-writeprotected Debian on my Raspberries, but I guess I can set up Raspbian somewhere. Is the Raspberry 3B good for testing?
ok thanks for the info, i saw some commands from your phone to the TRX, so i guess there are init commands.
Ok for the writing attributes, but let's start reading first, after that we will introduce the writing.
Will you be able to compile from source or do you need the binary?
Hmm, will try to compile your sources later - I'm current busy with other stuff. I'm using a special mostly-writeprotected Debian on my Raspberries, but I guess I can set up Raspbian somewhere. Is the Raspberry 3B good for testing?
raspberry 3b is fine. Mmmh..ok maybe i will compile it and i will attach the binary here. I guess it's quicker :)
little curiosity: seems that TRX is not a BTLE (Bluetooth Low Enery Device) but a standard Bluetooth device. I don't know why Toorx has developed such a device in the 2020, maybe for simplicity
@jampy did the app ask the very first time for a bluetooth PIN to connect to the TRX?
i finished the implementation BTW, i need just this detail in order to let you try
@jampy did the app ask the very first time for a bluetooth PIN to connect to the TRX?
no, no PIN asked
@jampy here you can download the binary https://github.com/cagnulein/qdomyos-zwift/blob/toorx/src/qdomyos-zwift?raw=true
once downloaded do the following steps:
If everything works (that is nearly impossible!) you should get the values on the UI. The purpose of this test is understand if the connection chain to the treadmill is ok.
Thanks
P.S. you need to install the QT libraries as described in the README
@cagnulein I discovered your project to interconnect domyos with zwift. It's really interesting ... congratulationsù I would ask two questions: 1) Is the "bridge" usable with a Domyos connected cyclette ? (E-Fold has bluetooth and can connect natively with Domyos app and Kinomap too) 2) is there a Mac version of your code? Thank you in advance for your answers
@alpat59
Hi @cagnulein
I downloaded a fresh copy of Raspberry Pi OS (32-bit) Lite
, ran sudo apt upgrade && sudo apt update
, waited for a huuuuuge wolfram-engine update, installed git libqt5bluetooth5 libqt5widgets5 libqt5positioning5 libqt5xml5
and qt5-qmake
IIRC, then downloaded your binary.
First I started it as unprivileged user:
pi@raspberrypi:~ $ ./qdomyos-zwift.bin -no-gui
qt.bluetooth.bluez: Bluez 5 detected.
qt.bluetooth.bluez: Missing CAP_NET_ADMIN permission. Cannot determine whether a found address is of random or public type.
qt.bluetooth.bluez: Creating QtBluezDiscoveryManager
qt.bluetooth.bluez: Discovered: "38:50:22:0C:9D:A6" "38-50-22-0C-9D-A6" Num UUIDs 0 total device 0 cached RSSI -47 Class 0
"Thu Oct 15 08:17:27 2020Found new device: 38-50-22-0C-9D-A6 (38:50:22:0C:9D:A6)\n"
qt.bluetooth.bluez: Discovered: "69:26:FE:B6:C7:85" "69-26-FE-B6-C7-85" Num UUIDs 1 total device 1 cached RSSI -83 Class 0
"Thu Oct 15 08:17:27 2020Found new device: 69-26-FE-B6-C7-85 (69:26:FE:B6:C7:85)\n"
qt.bluetooth.bluez: Discovered: "74:16:B2:B9:3F:2A" "74-16-B2-B9-3F-2A" Num UUIDs 1 total device 2 cached RSSI -77 Class 0
"Thu Oct 15 08:17:27 2020Found new device: 74-16-B2-B9-3F-2A (74:16:B2:B9:3F:2A)\n"
qt.bluetooth.bluez: Discovered: "68:F4:2E:C1:F2:E7" "68-F4-2E-C1-F2-E7" Num UUIDs 1 total device 3 cached RSSI -84 Class 0
"Thu Oct 15 08:17:27 2020Found new device: 68-F4-2E-C1-F2-E7 (68:F4:2E:C1:F2:E7)\n"
qt.bluetooth.bluez: Discovered: "44:6A:94:5B:BD:CD" "44-6A-94-5B-BD-CD" Num UUIDs 1 total device 4 cached RSSI -84 Class 0
"Thu Oct 15 08:17:27 2020Found new device: 44-6A-94-5B-BD-CD (44:6A:94:5B:BD:CD)\n"
qt.bluetooth.bluez: Discovered: "66:F1:02:6F:DF:19" "66-F1-02-6F-DF-19" Num UUIDs 1 total device 5 cached RSSI -84 Class 0
"Thu Oct 15 08:17:27 2020Found new device: 66-F1-02-6F-DF-19 (66:F1:02:6F:DF:19)\n"
qt.bluetooth.bluez: Discovered: "79:AD:71:06:21:28" "79-AD-71-06-21-28" Num UUIDs 1 total device 6 cached RSSI -76 Class 0
"Thu Oct 15 08:17:27 2020Found new device: 79-AD-71-06-21-28 (79:AD:71:06:21:28)\n"
qt.bluetooth.bluez: Discovered: "52:1C:DF:46:A2:44" "52-1C-DF-46-A2-44" Num UUIDs 0 total device 7 cached RSSI -64 Class 0
"Thu Oct 15 08:17:27 2020Found new device: 52-1C-DF-46-A2-44 (52:1C:DF:46:A2:44)\n"
qt.bluetooth.bluez: Discovered: "44:B0:C6:87:42:D9" "44-B0-C6-87-42-D9" Num UUIDs 1 total device 8 cached RSSI -84 Class 0
"Thu Oct 15 08:17:27 2020Found new device: 44-B0-C6-87-42-D9 (44:B0:C6:87:42:D9)\n"
qt.bluetooth.bluez: Discovered: "75:C4:55:36:AD:89" "75-C4-55-36-AD-89" Num UUIDs 1 total device 9 cached RSSI -77 Class 0
"Thu Oct 15 08:17:27 2020Found new device: 75-C4-55-36-AD-89 (75:C4:55:36:AD:89)\n"
qt.bluetooth.bluez: Discovered: "34:81:F4:30:0D:FD" "TRX ROUTE KEY" Num UUIDs 2 total device 10 cached RSSI -57 Class 2360324
"Thu Oct 15 08:17:33 2020Found new device: TRX ROUTE KEY (34:81:F4:30:0D:FD)\n"
qt.bluetooth.bluez: void QBluetoothDeviceDiscoveryAgentPrivate::stop()
"Thu Oct 15 08:17:33 2020Found new device: TRX ROUTE KEY (34:81:F4:30:0D:FD)\n"
qt.bluetooth.bluez: Discovered: "34:81:F4:30:0D:FD" "TRX ROUTE KEY" Num UUIDs 2 total device 0 cached RSSI 0 Class 2360324
qt.bluetooth.bluez: Discovered: "52:1C:DF:46:A2:44" "52-1C-DF-46-A2-44" Num UUIDs 0 total device 1 cached RSSI 0 Class 0
qt.bluetooth.bluez: Updating RSSI for "34:81:F4:30:0D:FD" QVariant(short, -59)
qt.bluetooth.bluez: Updating RSSI for "34:81:F4:30:0D:FD" QVariant(short, -43)
qt.bluetooth.bluez: Discovery on: "52:1C:DF:46:A2:44" Mode: QBluetoothServiceDiscoveryAgent::DiscoveryMode(FullDiscovery)
SDP for 52:1C:DF:46:A2:44 B8:27:EB:9C:37:E2
Cannot establish sdp session
qt.bluetooth.bluez: SDP scan failure QProcess::ExitStatus(NormalExit) 3
qt.bluetooth.bluez: Discovery on: "34:81:F4:30:0D:FD" Mode: QBluetoothServiceDiscoveryAgent::DiscoveryMode(FullDiscovery)
SDP for 34:81:F4:30:0D:FD B8:27:EB:9C:37:E2
Using PUBLIC_BROWSE_GROUP for SDP search
qt.bluetooth.bluez: Discovered services "34:81:F4:30:0D:FD" "" "{00000000-0000-0000-0000-000000000000}" >>> ("{00001200-0000-1000-8000-00805f9b34fb}")
"Thu Oct 15 08:18:04 2020Found new service:({00000000-0000-0000-0000-000000000000})\n"
qt.bluetooth.bluez: Discovered services "34:81:F4:30:0D:FD" "SerialPort" "{00000000-0000-0000-0000-000000000000}" >>> ("{00001101-0000-1000-8000-00805f9b34fb}")
"Thu Oct 15 08:18:04 2020Found new service:SerialPort({00000000-0000-0000-0000-000000000000})\n"
qt.bluetooth.bluez: Discovered services "34:81:F4:30:0D:FD" "Wireless iAP" "{00000000-0000-0000-0000-000000000000}" >>> ("{00000000-deca-fade-deca-deafdecacaff}")
"Thu Oct 15 08:18:04 2020Found new service:Wireless iAP({00000000-0000-0000-0000-000000000000})\n"
^C
Then tried as root:
pi@raspberrypi:~ $ sudo ./qdomyos-zwift.bin -no-gui
qt.bluetooth.bluez: Bluez 5 detected.
qt.bluetooth.bluez: Creating QtBluezDiscoveryManager
qt.bluetooth.bluez: BluetoothManagement: Ignored event: 13
qt.bluetooth.bluez: BluetoothManagement: found random device "52:1C:DF:46:A2:44"
qt.bluetooth.bluez: Discovered: "52:1C:DF:46:A2:44" "52-1C-DF-46-A2-44" Num UUIDs 0 total device 0 cached RSSI -64 Class 0
"Thu Oct 15 08:18:48 2020Found new device: 52-1C-DF-46-A2-44 (52:1C:DF:46:A2:44)\n"
qt.bluetooth.bluez: BluetoothManagement: found random device "38:50:22:0C:9D:A6"
qt.bluetooth.bluez: Discovered: "38:50:22:0C:9D:A6" "38-50-22-0C-9D-A6" Num UUIDs 0 total device 1 cached RSSI -52 Class 0
"Thu Oct 15 08:18:48 2020Found new device: 38-50-22-0C-9D-A6 (38:50:22:0C:9D:A6)\n"
qt.bluetooth.bluez: BluetoothManagement: found random device "69:26:FE:B6:C7:85"
qt.bluetooth.bluez: Discovered: "69:26:FE:B6:C7:85" "69-26-FE-B6-C7-85" Num UUIDs 1 total device 2 cached RSSI -85 Class 0
"Thu Oct 15 08:18:48 2020Found new device: 69-26-FE-B6-C7-85 (69:26:FE:B6:C7:85)\n"
qt.bluetooth.bluez: Discovered: "74:16:B2:B9:3F:2A" "74-16-B2-B9-3F-2A" Num UUIDs 1 total device 3 cached RSSI -77 Class 0
"Thu Oct 15 08:18:48 2020Found new device: 74-16-B2-B9-3F-2A (74:16:B2:B9:3F:2A)\n"
qt.bluetooth.bluez: BluetoothManagement: found random device "74:16:B2:B9:3F:2A"
qt.bluetooth.bluez: BluetoothManagement: found random device "68:F4:2E:C1:F2:E7"
qt.bluetooth.bluez: Discovered: "68:F4:2E:C1:F2:E7" "68-F4-2E-C1-F2-E7" Num UUIDs 1 total device 4 cached RSSI -79 Class 0
"Thu Oct 15 08:18:48 2020Found new device: 68-F4-2E-C1-F2-E7 (68:F4:2E:C1:F2:E7)\n"
qt.bluetooth.bluez: Discovered: "62:C5:9F:BF:4A:5D" "62-C5-9F-BF-4A-5D" Num UUIDs 1 total device 5 cached RSSI -79 Class 0
"Thu Oct 15 08:18:48 2020Found new device: 62-C5-9F-BF-4A-5D (62:C5:9F:BF:4A:5D)\n"
qt.bluetooth.bluez: Discovered: "44:B0:C6:87:42:D9" "44-B0-C6-87-42-D9" Num UUIDs 1 total device 6 cached RSSI -78 Class 0
"Thu Oct 15 08:18:48 2020Found new device: 44-B0-C6-87-42-D9 (44:B0:C6:87:42:D9)\n"
qt.bluetooth.bluez: BluetoothManagement: found random device "62:C5:9F:BF:4A:5D"
qt.bluetooth.bluez: Discovered: "56:B5:64:72:15:67" "56-B5-64-72-15-67" Num UUIDs 1 total device 7 cached RSSI -76 Class 0
"Thu Oct 15 08:18:48 2020Found new device: 56-B5-64-72-15-67 (56:B5:64:72:15:67)\n"
qt.bluetooth.bluez: Discovered: "75:C4:55:36:AD:89" "75-C4-55-36-AD-89" Num UUIDs 1 total device 8 cached RSSI -78 Class 0
"Thu Oct 15 08:18:48 2020Found new device: 75-C4-55-36-AD-89 (75:C4:55:36:AD:89)\n"
qt.bluetooth.bluez: BluetoothManagement: found random device "44:B0:C6:87:42:D9"
qt.bluetooth.bluez: BluetoothManagement: found random device "56:B5:64:72:15:67"
qt.bluetooth.bluez: BluetoothManagement: found random device "75:C4:55:36:AD:89"
qt.bluetooth.bluez: BluetoothManagement: found random device "66:F1:02:6F:DF:19"
qt.bluetooth.bluez: Discovered: "66:F1:02:6F:DF:19" "66-F1-02-6F-DF-19" Num UUIDs 1 total device 9 cached RSSI -86 Class 0
"Thu Oct 15 08:18:49 2020Found new device: 66-F1-02-6F-DF-19 (66:F1:02:6F:DF:19)\n"
qt.bluetooth.bluez: Discovered: "5F:B0:75:C6:96:DC" "Inspire HR" Num UUIDs 1 total device 10 cached RSSI -93 Class 0
"Thu Oct 15 08:18:52 2020Found new device: Inspire HR (5F:B0:75:C6:96:DC)\n"
qt.bluetooth.bluez: Discovered: "34:81:F4:30:0D:FD" "TRX ROUTE KEY" Num UUIDs 2 total device 11 cached RSSI -47 Class 2360324
"Thu Oct 15 08:18:54 2020Found new device: TRX ROUTE KEY (34:81:F4:30:0D:FD)\n"
qt.bluetooth.bluez: void QBluetoothDeviceDiscoveryAgentPrivate::stop()
"Thu Oct 15 08:18:54 2020Found new device: TRX ROUTE KEY (34:81:F4:30:0D:FD)\n"
qt.bluetooth.bluez: Discovered: "34:81:F4:30:0D:FD" "TRX ROUTE KEY" Num UUIDs 2 total device 0 cached RSSI 0 Class 2360324
qt.bluetooth.bluez: Discovered: "52:1C:DF:46:A2:44" "52-1C-DF-46-A2-44" Num UUIDs 0 total device 1 cached RSSI 0 Class 0
qt.bluetooth.bluez: Discovered: "5F:B0:75:C6:96:DC" "Inspire HR" Num UUIDs 1 total device 2 cached RSSI 0 Class 0
qt.bluetooth.bluez: BluetoothManagement: Ignored event: 13
qt.bluetooth.bluez: BluetoothManagement: Ignored event: 13
qt.bluetooth.bluez: Updating RSSI for "34:81:F4:30:0D:FD" QVariant(short, -43)
qt.bluetooth.bluez: BluetoothManagement: Ignored event: 13
qt.bluetooth.bluez: BluetoothManagement: Ignored event: 13
qt.bluetooth.bluez: Updating RSSI for "34:81:F4:30:0D:FD" QVariant(short, -43)
qt.bluetooth.bluez: Discovery on: "5F:B0:75:C6:96:DC" Mode: QBluetoothServiceDiscoveryAgent::DiscoveryMode(FullDiscovery)
qt.bluetooth.bluez: BluetoothManagement: Ignored event: 13
SDP for 5F:B0:75:C6:96:DC B8:27:EB:9C:37:E2
qt.bluetooth.bluez: BluetoothManagement: Ignored event: d
qt.bluetooth.bluez: BluetoothManagement: Ignored event: d
Cannot establish sdp session
qt.bluetooth.bluez: SDP scan failure QProcess::ExitStatus(NormalExit) 3
qt.bluetooth.bluez: Discovery on: "52:1C:DF:46:A2:44" Mode: QBluetoothServiceDiscoveryAgent::DiscoveryMode(FullDiscovery)
SDP for 52:1C:DF:46:A2:44 B8:27:EB:9C:37:E2
qt.bluetooth.bluez: BluetoothManagement: Ignored event: d
Cannot establish sdp session
qt.bluetooth.bluez: BluetoothManagement: Ignored event: d
qt.bluetooth.bluez: SDP scan failure QProcess::ExitStatus(NormalExit) 3
qt.bluetooth.bluez: Discovery on: "34:81:F4:30:0D:FD" Mode: QBluetoothServiceDiscoveryAgent::DiscoveryMode(FullDiscovery)
SDP for 34:81:F4:30:0D:FD B8:27:EB:9C:37:E2
qt.bluetooth.bluez: BluetoothManagement: Ignored event: b
Using PUBLIC_BROWSE_GROUP for SDP search
qt.bluetooth.bluez: Discovered services "34:81:F4:30:0D:FD" "" "{00000000-0000-0000-0000-000000000000}" >>> ("{00001200-0000-1000-8000-00805f9b34fb}")
"Thu Oct 15 08:19:36 2020Found new service:({00000000-0000-0000-0000-000000000000})\n"
qt.bluetooth.bluez: Discovered services "34:81:F4:30:0D:FD" "SerialPort" "{00000000-0000-0000-0000-000000000000}" >>> ("{00001101-0000-1000-8000-00805f9b34fb}")
"Thu Oct 15 08:19:36 2020Found new service:SerialPort({00000000-0000-0000-0000-000000000000})\n"
qt.bluetooth.bluez: Discovered services "34:81:F4:30:0D:FD" "Wireless iAP" "{00000000-0000-0000-0000-000000000000}" >>> ("{00000000-deca-fade-deca-deafdecacaff}")
"Thu Oct 15 08:19:36 2020Found new service:Wireless iAP({00000000-0000-0000-0000-000000000000})\n"
qt.bluetooth.bluez: BluetoothManagement: Ignored event: c
^C
The threadmill never indicated a bluetooth connection (as this would blank the display leaving just a Bluetooth symbol).
Hope this helps. If you need more tests, I'll be on that threadmill until 12:00 CEST ;-)
PS: I'm operating the Pi headless (no display, no keyboard), so no GUI...
@jampy could you please try this binary https://github.com/cagnulein/qdomyos-zwift/raw/toorx/src/qdomyos-zwift always with sudo? thanks
Here you are (uh oh - segfault!):
pi@raspberrypi:~ $ wget -q -O qdomyos-zwift.bin "https://github.com/cagnulein/qdomyos-zwift/raw/toorx/src/qdomyos-zwift?raw=true"
pi@raspberrypi:~ $ md5sum qdomyos-zwift.bin
40ec94f9f1d10059b11aeffff01b27f7 qdomyos-zwift.bin
pi@raspberrypi:~ $ sudo ./qdomyos-zwift.bin -no-gui
qt.bluetooth.bluez: Bluez 5 detected.
qt.bluetooth.bluez: Creating QtBluezDiscoveryManager
qt.bluetooth.bluez: BluetoothManagement: Ignored event: 13
qt.bluetooth.bluez: BluetoothManagement: found random device "6F:B7:0A:88:E6:89"
qt.bluetooth.bluez: Discovered: "6F:B7:0A:88:E6:89" "6F-B7-0A-88-E6-89" Num UUIDs 0 total device 0 cached RSSI -64 Class 0
"Thu Oct 15 09:36:14 2020Found new device: 6F-B7-0A-88-E6-89 (6F:B7:0A:88:E6:89)\n"
qt.bluetooth.bluez: Discovered: "04:AF:4A:C1:E3:57" "04-AF-4A-C1-E3-57" Num UUIDs 0 total device 1 cached RSSI -54 Class 0
"Thu Oct 15 09:36:14 2020Found new device: 04-AF-4A-C1-E3-57 (04:AF:4A:C1:E3:57)\n"
qt.bluetooth.bluez: BluetoothManagement: found random device "04:AF:4A:C1:E3:57"
qt.bluetooth.bluez: BluetoothManagement: found random device "7B:84:A8:68:86:9F"
qt.bluetooth.bluez: Discovered: "7B:84:A8:68:86:9F" "7B-84-A8-68-86-9F" Num UUIDs 1 total device 2 cached RSSI -78 Class 0
"Thu Oct 15 09:36:14 2020Found new device: 7B-84-A8-68-86-9F (7B:84:A8:68:86:9F)\n"
qt.bluetooth.bluez: BluetoothManagement: found random device "74:1C:63:95:C3:C2"
qt.bluetooth.bluez: Discovered: "74:1C:63:95:C3:C2" "74-1C-63-95-C3-C2" Num UUIDs 1 total device 3 cached RSSI -82 Class 0
"Thu Oct 15 09:36:14 2020Found new device: 74-1C-63-95-C3-C2 (74:1C:63:95:C3:C2)\n"
qt.bluetooth.bluez: BluetoothManagement: found random device "6D:A0:AF:ED:10:A1"
qt.bluetooth.bluez: Discovered: "6D:A0:AF:ED:10:A1" "6D-A0-AF-ED-10-A1" Num UUIDs 1 total device 4 cached RSSI -78 Class 0
"Thu Oct 15 09:36:14 2020Found new device: 6D-A0-AF-ED-10-A1 (6D:A0:AF:ED:10:A1)\n"
qt.bluetooth.bluez: Discovered: "60:BC:1E:A4:F4:C2" "60-BC-1E-A4-F4-C2" Num UUIDs 1 total device 5 cached RSSI -82 Class 0
"Thu Oct 15 09:36:14 2020Found new device: 60-BC-1E-A4-F4-C2 (60:BC:1E:A4:F4:C2)\n"
qt.bluetooth.bluez: BluetoothManagement: found random device "60:BC:1E:A4:F4:C2"
qt.bluetooth.bluez: BluetoothManagement: found random device "75:13:16:9D:64:38"
qt.bluetooth.bluez: Discovered: "75:13:16:9D:64:38" "75-13-16-9D-64-38" Num UUIDs 1 total device 6 cached RSSI -78 Class 0
"Thu Oct 15 09:36:14 2020Found new device: 75-13-16-9D-64-38 (75:13:16:9D:64:38)\n"
qt.bluetooth.bluez: BluetoothManagement: found random device "57:F3:5A:E3:5B:E3"
qt.bluetooth.bluez: Discovered: "57:F3:5A:E3:5B:E3" "57-F3-5A-E3-5B-E3" Num UUIDs 1 total device 7 cached RSSI -82 Class 0
"Thu Oct 15 09:36:14 2020Found new device: 57-F3-5A-E3-5B-E3 (57:F3:5A:E3:5B:E3)\n"
qt.bluetooth.bluez: Discovered: "55:32:90:99:60:D8" "55-32-90-99-60-D8" Num UUIDs 1 total device 8 cached RSSI -80 Class 0
"Thu Oct 15 09:36:14 2020Found new device: 55-32-90-99-60-D8 (55:32:90:99:60:D8)\n"
qt.bluetooth.bluez: BluetoothManagement: found random device "55:32:90:99:60:D8"
qt.bluetooth.bluez: BluetoothManagement: found random device "67:87:FA:DA:1A:50"
qt.bluetooth.bluez: Discovered: "67:87:FA:DA:1A:50" "67-87-FA-DA-1A-50" Num UUIDs 1 total device 9 cached RSSI -80 Class 0
"Thu Oct 15 09:36:14 2020Found new device: 67-87-FA-DA-1A-50 (67:87:FA:DA:1A:50)\n"
qt.bluetooth.bluez: Discovered: "5F:B0:75:C6:96:DC" "Inspire HR" Num UUIDs 1 total device 10 cached RSSI -95 Class 0
"Thu Oct 15 09:36:20 2020Found new device: Inspire HR (5F:B0:75:C6:96:DC)\n"
qt.bluetooth.bluez: Discovered: "34:81:F4:30:0D:FD" "TRX ROUTE KEY" Num UUIDs 2 total device 11 cached RSSI -43 Class 2360324
"Thu Oct 15 09:36:20 2020Found new device: TRX ROUTE KEY (34:81:F4:30:0D:FD)\n"
qt.bluetooth.bluez: void QBluetoothDeviceDiscoveryAgentPrivate::stop()
"Thu Oct 15 09:36:20 2020Found new device: TRX ROUTE KEY (34:81:F4:30:0D:FD)\n"
qt.bluetooth.bluez: Discovered: "34:81:F4:30:0D:FD" "TRX ROUTE KEY" Num UUIDs 2 total device 0 cached RSSI 0 Class 2360324
qt.bluetooth.bluez: Discovered: "5F:B0:75:C6:96:DC" "Inspire HR" Num UUIDs 1 total device 1 cached RSSI 0 Class 0
qt.bluetooth.bluez: Discovered: "6F:B7:0A:88:E6:89" "6F-B7-0A-88-E6-89" Num UUIDs 0 total device 2 cached RSSI 0 Class 0
qt.bluetooth.bluez: BluetoothManagement: Ignored event: 13
qt.bluetooth.bluez: BluetoothManagement: Ignored event: 13
qt.bluetooth.bluez: Updating RSSI for "34:81:F4:30:0D:FD" QVariant(short, -49)
qt.bluetooth.bluez: Updating RSSI for "34:81:F4:30:0D:FD" QVariant(short, -42)
qt.bluetooth.bluez: BluetoothManagement: Ignored event: 13
qt.bluetooth.bluez: BluetoothManagement: Ignored event: 13
qt.bluetooth.bluez: Updating RSSI for "34:81:F4:30:0D:FD" QVariant(short, -43)
qt.bluetooth.bluez: Discovery on: "6F:B7:0A:88:E6:89" Mode: QBluetoothServiceDiscoveryAgent::DiscoveryMode(FullDiscovery)
qt.bluetooth.bluez: BluetoothManagement: Ignored event: 13
SDP for 6F:B7:0A:88:E6:89 B8:27:EB:9C:37:E2
qt.bluetooth.bluez: BluetoothManagement: Ignored event: d
qt.bluetooth.bluez: BluetoothManagement: Ignored event: d
Cannot establish sdp session
qt.bluetooth.bluez: SDP scan failure QProcess::ExitStatus(NormalExit) 3
qt.bluetooth.bluez: Discovery on: "5F:B0:75:C6:96:DC" Mode: QBluetoothServiceDiscoveryAgent::DiscoveryMode(FullDiscovery)
SDP for 5F:B0:75:C6:96:DC B8:27:EB:9C:37:E2
qt.bluetooth.bluez: BluetoothManagement: Ignored event: d
Cannot establish sdp session
qt.bluetooth.bluez: BluetoothManagement: Ignored event: d
qt.bluetooth.bluez: SDP scan failure QProcess::ExitStatus(NormalExit) 3
qt.bluetooth.bluez: Discovery on: "34:81:F4:30:0D:FD" Mode: QBluetoothServiceDiscoveryAgent::DiscoveryMode(FullDiscovery)
SDP for 34:81:F4:30:0D:FD B8:27:EB:9C:37:E2
qt.bluetooth.bluez: BluetoothManagement: Ignored event: b
Using PUBLIC_BROWSE_GROUP for SDP search
qt.bluetooth.bluez: Discovered services "34:81:F4:30:0D:FD" "" "{00000000-0000-0000-0000-000000000000}" >>> ("{00001200-0000-1000-8000-00805f9b34fb}")
"Thu Oct 15 09:37:01 2020Found new service: ({00000000-0000-0000-0000-000000000000})\n"
qt.bluetooth.bluez: Discovered services "34:81:F4:30:0D:FD" "SerialPort" "{00000000-0000-0000-0000-000000000000}" >>> ("{00001101-0000-1000-8000-00805f9b34fb}")
"Thu Oct 15 09:37:01 2020Found new service: SerialPort({00000000-0000-0000-0000-000000000000})\n"
"Thu Oct 15 09:37:01 2020Serial port service found\n"
qt.bluetooth.bluez: void QBluetoothServiceDiscoveryAgentPrivate::stop() Stop called
"Thu Oct 15 09:37:01 2020Create socket\n"
"Thu Oct 15 09:37:01 2020ConnectToService done\n"
Segmentation fault
Due to the segfault I ran it again with strace, in hope this might help you:
pi@raspberrypi:~ $ sudo strace ./qdomyos-zwift.bin -no-gui 2>&1 | tee output-2020-10-15-1039.txt
@jampy could you please run with gdb? so
sudo gdb ./qdomyos-zwift.bin --args -no-gui
pi@raspberrypi:~ $ sudo gdb --args ./qdomyos-zwift.bin -no-gui
GNU gdb (Raspbian 8.2.1-2) 8.2.1
Copyright (C) 2018 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "arm-linux-gnueabihf".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from ./qdomyos-zwift.bin...(no debugging symbols found)...done.
(gdb) r
Starting program: /home/pi/qdomyos-zwift.bin -no-gui
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/arm-linux-gnueabihf/libthread_db.so.1".
[New Thread 0x732853c0 (LWP 4094)]
qt.bluetooth.bluez: Bluez 5 detected.
qt.bluetooth.bluez: Creating QtBluezDiscoveryManager
qt.bluetooth.bluez: BluetoothManagement: Ignored event: 13
qt.bluetooth.bluez: BluetoothManagement: found random device "0A:97:D5:81:FF:B5"
qt.bluetooth.bluez: Discovered: "0A:97:D5:81:FF:B5" "0A-97-D5-81-FF-B5" Num UUIDs 0 total device 0 cached RSSI -51 Class 0
"Thu Oct 15 09:46:29 2020Found new device: 0A-97-D5-81-FF-B5 (0A:97:D5:81:FF:B5)\n"
qt.bluetooth.bluez: Discovered: "60:BC:1E:A4:F4:C2" "60-BC-1E-A4-F4-C2" Num UUIDs 1 total device 1 cached RSSI -82 Class 0
"Thu Oct 15 09:46:29 2020Found new device: 60-BC-1E-A4-F4-C2 (60:BC:1E:A4:F4:C2)\n"
qt.bluetooth.bluez: BluetoothManagement: found random device "60:BC:1E:A4:F4:C2"
qt.bluetooth.bluez: BluetoothManagement: found random device "58:A4:C8:C0:17:15"
qt.bluetooth.bluez: Discovered: "58:A4:C8:C0:17:15" "58-A4-C8-C0-17-15" Num UUIDs 0 total device 2 cached RSSI -65 Class 0
"Thu Oct 15 09:46:29 2020Found new device: 58-A4-C8-C0-17-15 (58:A4:C8:C0:17:15)\n"
qt.bluetooth.bluez: BluetoothManagement: found random device "59:E0:92:63:BA:0C"
qt.bluetooth.bluez: Discovered: "59:E0:92:63:BA:0C" "59-E0-92-63-BA-0C" Num UUIDs 1 total device 3 cached RSSI -81 Class 0
"Thu Oct 15 09:46:29 2020Found new device: 59-E0-92-63-BA-0C (59:E0:92:63:BA:0C)\n"
qt.bluetooth.bluez: BluetoothManagement: found random device "6F:9E:94:72:F8:D9"
qt.bluetooth.bluez: Discovered: "6F:9E:94:72:F8:D9" "6F-9E-94-72-F8-D9" Num UUIDs 1 total device 4 cached RSSI -79 Class 0
"Thu Oct 15 09:46:29 2020Found new device: 6F-9E-94-72-F8-D9 (6F:9E:94:72:F8:D9)\n"
qt.bluetooth.bluez: BluetoothManagement: found random device "41:1E:DF:4D:F9:81"
qt.bluetooth.bluez: Discovered: "41:1E:DF:4D:F9:81" "41-1E-DF-4D-F9-81" Num UUIDs 1 total device 5 cached RSSI -80 Class 0
"Thu Oct 15 09:46:29 2020Found new device: 41-1E-DF-4D-F9-81 (41:1E:DF:4D:F9:81)\n"
qt.bluetooth.bluez: BluetoothManagement: found random device "6D:A0:AF:ED:10:A1"
qt.bluetooth.bluez: Discovered: "6D:A0:AF:ED:10:A1" "6D-A0-AF-ED-10-A1" Num UUIDs 1 total device 6 cached RSSI -82 Class 0
"Thu Oct 15 09:46:30 2020Found new device: 6D-A0-AF-ED-10-A1 (6D:A0:AF:ED:10:A1)\n"
qt.bluetooth.bluez: BluetoothManagement: found random device "74:1C:63:95:C3:C2"
qt.bluetooth.bluez: Discovered: "74:1C:63:95:C3:C2" "74-1C-63-95-C3-C2" Num UUIDs 1 total device 7 cached RSSI -80 Class 0
"Thu Oct 15 09:46:30 2020Found new device: 74-1C-63-95-C3-C2 (74:1C:63:95:C3:C2)\n"
qt.bluetooth.bluez: BluetoothManagement: found random device "75:13:16:9D:64:38"
qt.bluetooth.bluez: Discovered: "75:13:16:9D:64:38" "75-13-16-9D-64-38" Num UUIDs 1 total device 8 cached RSSI -78 Class 0
"Thu Oct 15 09:46:30 2020Found new device: 75-13-16-9D-64-38 (75:13:16:9D:64:38)\n"
qt.bluetooth.bluez: BluetoothManagement: found random device "4C:97:85:63:31:F2"
qt.bluetooth.bluez: Discovered: "4C:97:85:63:31:F2" "4C-97-85-63-31-F2" Num UUIDs 1 total device 9 cached RSSI -80 Class 0
"Thu Oct 15 09:46:30 2020Found new device: 4C-97-85-63-31-F2 (4C:97:85:63:31:F2)\n"
qt.bluetooth.bluez: Discovered: "5F:B0:75:C6:96:DC" "Inspire HR" Num UUIDs 1 total device 10 cached RSSI -71 Class 0
"Thu Oct 15 09:46:30 2020Found new device: Inspire HR (5F:B0:75:C6:96:DC)\n"
qt.bluetooth.bluez: Discovered: "34:81:F4:30:0D:FD" "TRX ROUTE KEY" Num UUIDs 2 total device 11 cached RSSI -58 Class 2360324
"Thu Oct 15 09:46:35 2020Found new device: TRX ROUTE KEY (34:81:F4:30:0D:FD)\n"
qt.bluetooth.bluez: void QBluetoothDeviceDiscoveryAgentPrivate::stop()
"Thu Oct 15 09:46:35 2020Found new device: TRX ROUTE KEY (34:81:F4:30:0D:FD)\n"
qt.bluetooth.bluez: Discovered: "34:81:F4:30:0D:FD" "TRX ROUTE KEY" Num UUIDs 2 total device 0 cached RSSI 0 Class 2360324
qt.bluetooth.bluez: Discovered: "58:A4:C8:C0:17:15" "58-A4-C8-C0-17-15" Num UUIDs 0 total device 1 cached RSSI 0 Class 0
qt.bluetooth.bluez: Discovered: "5F:B0:75:C6:96:DC" "Inspire HR" Num UUIDs 1 total device 2 cached RSSI 0 Class 0
qt.bluetooth.bluez: BluetoothManagement: Ignored event: 13
qt.bluetooth.bluez: BluetoothManagement: Ignored event: 13
qt.bluetooth.bluez: Updating RSSI for "34:81:F4:30:0D:FD" QVariant(short, -50)
qt.bluetooth.bluez: BluetoothManagement: Ignored event: 13
qt.bluetooth.bluez: BluetoothManagement: Ignored event: 13
qt.bluetooth.bluez: Updating RSSI for "34:81:F4:30:0D:FD" QVariant(short, -56)
qt.bluetooth.bluez: Discovery on: "5F:B0:75:C6:96:DC" Mode: QBluetoothServiceDiscoveryAgent::DiscoveryMode(FullDiscovery)
[Detaching after fork from child process 4537]
qt.bluetooth.bluez: BluetoothManagement: Ignored event: 13
SDP for 5F:B0:75:C6:96:DC B8:27:EB:9C:37:E2
qt.bluetooth.bluez: BluetoothManagement: Ignored event: d
Cannot establish sdp session
qt.bluetooth.bluez: BluetoothManagement: Ignored event: d
qt.bluetooth.bluez: SDP scan failure QProcess::ExitStatus(NormalExit) 3
qt.bluetooth.bluez: Discovery on: "58:A4:C8:C0:17:15" Mode: QBluetoothServiceDiscoveryAgent::DiscoveryMode(FullDiscovery)
[Detaching after fork from child process 4559]
SDP for 58:A4:C8:C0:17:15 B8:27:EB:9C:37:E2
qt.bluetooth.bluez: BluetoothManagement: Ignored event: d
qt.bluetooth.bluez: BluetoothManagement: Ignored event: d
Cannot establish sdp session
qt.bluetooth.bluez: SDP scan failure QProcess::ExitStatus(NormalExit) 3
qt.bluetooth.bluez: Discovery on: "34:81:F4:30:0D:FD" Mode: QBluetoothServiceDiscoveryAgent::DiscoveryMode(FullDiscovery)
[Detaching after fork from child process 4581]
SDP for 34:81:F4:30:0D:FD B8:27:EB:9C:37:E2
qt.bluetooth.bluez: BluetoothManagement: Ignored event: b
Using PUBLIC_BROWSE_GROUP for SDP search
qt.bluetooth.bluez: Discovered services "34:81:F4:30:0D:FD" "" "{00000000-0000-0000-0000-000000000000}" >>> ("{00001200-0000-1000-8000-00805f9b34fb}")
"Thu Oct 15 09:47:17 2020Found new service: ({00000000-0000-0000-0000-000000000000})\n"
qt.bluetooth.bluez: Discovered services "34:81:F4:30:0D:FD" "SerialPort" "{00000000-0000-0000-0000-000000000000}" >>> ("{00001101-0000-1000-8000-00805f9b34fb}")
"Thu Oct 15 09:47:17 2020Found new service: SerialPort({00000000-0000-0000-0000-000000000000})\n"
"Thu Oct 15 09:47:17 2020Serial port service found\n"
qt.bluetooth.bluez: void QBluetoothServiceDiscoveryAgentPrivate::stop() Stop called
"Thu Oct 15 09:47:17 2020Create socket\n"
"Thu Oct 15 09:47:17 2020ConnectToService done\n"
Thread 1 "qdomyos-zwift.b" received signal SIGSEGV, Segmentation fault.
0x7650367c in QBluetoothDeviceInfo::operator=(QBluetoothDeviceInfo const&) () from /usr/lib/arm-linux-gnueabihf/libQt5Bluetooth.so.5
(gdb) bt
#0 0x7650367c in QBluetoothDeviceInfo::operator=(QBluetoothDeviceInfo const&) () from /usr/lib/arm-linux-gnueabihf/libQt5Bluetooth.so.5
#1 0x765513b4 in ?? () from /usr/lib/arm-linux-gnueabihf/libQt5Bluetooth.so.5
Backtrace stopped: previous frame identical to this frame (corrupt stack?)
(gdb)
Funny: Still while in the qdb command line (a few seconds after the bt
) my threadmill started to show a Bluetooth connection.
I'm currently still in the gdb session, the threadmill still shows the connection.
Waiting for your instructions.. ;-)
@jampy i have to think about it...it's a good sign that you saw the bluetooth icon on the treadmill, but this SEGV seems not related to my code, but to the qt libs instead. i will build a new version with the debug symbols
@jampy could you please try this binary https://github.com/cagnulein/qdomyos-zwift/raw/toorx/src/qdomyos-zwift with gdb? thanks
pi@raspberrypi:~ $ wget -q -O qdomyos-zwift.bin "https://github.com/cagnulein/qdomyos-zwift/raw/toorx/src/qdomyos-zwift?raw=true"
pi@raspberrypi:~ $ md5sum qdomyos-zwift.bin
40003cf34793e9a98481e60903b371e1 qdomyos-zwift.bin
pi@raspberrypi:~ $ sudo gdb --args ./qdomyos-zwift.bin -no-gui
GNU gdb (Raspbian 8.2.1-2) 8.2.1
Copyright (C) 2018 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "arm-linux-gnueabihf".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from ./qdomyos-zwift.bin...done.
(gdb) r
Starting program: /home/pi/qdomyos-zwift.bin -no-gui
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/arm-linux-gnueabihf/libthread_db.so.1".
[New Thread 0x732853c0 (LWP 4698)]
qt.bluetooth.bluez: Bluez 5 detected.
qt.bluetooth.bluez: Creating QtBluezDiscoveryManager
qt.bluetooth.bluez: BluetoothManagement: Ignored event: 13
qt.bluetooth.bluez: BluetoothManagement: found random device "5C:77:15:FD:5A:5D"
qt.bluetooth.bluez: Discovered: "5C:77:15:FD:5A:5D" "5C-77-15-FD-5A-5D" Num UUIDs 1 total device 0 cached RSSI -83 Class 0
"Thu Oct 15 10:10:22 2020Found new device: 5C-77-15-FD-5A-5D (5C:77:15:FD:5A:5D)\n"
qt.bluetooth.bluez: BluetoothManagement: found random device "20:C5:0F:C3:19:81"
qt.bluetooth.bluez: Discovered: "20:C5:0F:C3:19:81" "20-C5-0F-C3-19-81" Num UUIDs 0 total device 1 cached RSSI -54 Class 0
"Thu Oct 15 10:10:22 2020Found new device: 20-C5-0F-C3-19-81 (20:C5:0F:C3:19:81)\n"
qt.bluetooth.bluez: BluetoothManagement: found random device "48:A2:22:6A:33:43"
qt.bluetooth.bluez: Discovered: "48:A2:22:6A:33:43" "48-A2-22-6A-33-43" Num UUIDs 1 total device 2 cached RSSI -82 Class 0
"Thu Oct 15 10:10:22 2020Found new device: 48-A2-22-6A-33-43 (48:A2:22:6A:33:43)\n"
qt.bluetooth.bluez: BluetoothManagement: found random device "48:C6:EC:78:7C:BD"
qt.bluetooth.bluez: Discovered: "48:C6:EC:78:7C:BD" "48-C6-EC-78-7C-BD" Num UUIDs 1 total device 3 cached RSSI -83 Class 0
"Thu Oct 15 10:10:22 2020Found new device: 48-C6-EC-78-7C-BD (48:C6:EC:78:7C:BD)\n"
qt.bluetooth.bluez: BluetoothManagement: found random device "74:A7:57:32:E5:AD"
qt.bluetooth.bluez: Discovered: "74:A7:57:32:E5:AD" "74-A7-57-32-E5-AD" Num UUIDs 0 total device 4 cached RSSI -64 Class 0
"Thu Oct 15 10:10:22 2020Found new device: 74-A7-57-32-E5-AD (74:A7:57:32:E5:AD)\n"
qt.bluetooth.bluez: BluetoothManagement: found random device "41:2D:76:CA:95:61"
qt.bluetooth.bluez: Discovered: "41:2D:76:CA:95:61" "41-2D-76-CA-95-61" Num UUIDs 1 total device 5 cached RSSI -84 Class 0
"Thu Oct 15 10:10:22 2020Found new device: 41-2D-76-CA-95-61 (41:2D:76:CA:95:61)\n"
qt.bluetooth.bluez: BluetoothManagement: found random device "54:7F:8E:9A:33:DB"
qt.bluetooth.bluez: Discovered: "54:7F:8E:9A:33:DB" "54-7F-8E-9A-33-DB" Num UUIDs 1 total device 6 cached RSSI -81 Class 0
"Thu Oct 15 10:10:23 2020Found new device: 54-7F-8E-9A-33-DB (54:7F:8E:9A:33:DB)\n"
qt.bluetooth.bluez: BluetoothManagement: found random device "6A:7F:CD:7F:FF:50"
qt.bluetooth.bluez: Discovered: "6A:7F:CD:7F:FF:50" "6A-7F-CD-7F-FF-50" Num UUIDs 1 total device 7 cached RSSI -83 Class 0
"Thu Oct 15 10:10:23 2020Found new device: 6A-7F-CD-7F-FF-50 (6A:7F:CD:7F:FF:50)\n"
qt.bluetooth.bluez: BluetoothManagement: found random device "44:B6:B9:7A:87:80"
qt.bluetooth.bluez: Discovered: "44:B6:B9:7A:87:80" "44-B6-B9-7A-87-80" Num UUIDs 1 total device 8 cached RSSI -79 Class 0
"Thu Oct 15 10:10:23 2020Found new device: 44-B6-B9-7A-87-80 (44:B6:B9:7A:87:80)\n"
qt.bluetooth.bluez: BluetoothManagement: found random device "7F:73:12:52:8C:B1"
qt.bluetooth.bluez: Discovered: "7F:73:12:52:8C:B1" "7F-73-12-52-8C-B1" Num UUIDs 1 total device 9 cached RSSI -79 Class 0
"Thu Oct 15 10:10:23 2020Found new device: 7F-73-12-52-8C-B1 (7F:73:12:52:8C:B1)\n"
qt.bluetooth.bluez: Discovered: "5F:B0:75:C6:96:DC" "Inspire HR" Num UUIDs 1 total device 10 cached RSSI -94 Class 0
"Thu Oct 15 10:10:24 2020Found new device: Inspire HR (5F:B0:75:C6:96:DC)\n"
qt.bluetooth.bluez: Discovered: "34:81:F4:30:0D:FD" "TRX ROUTE KEY" Num UUIDs 0 total device 11 cached RSSI -43 Class 2360324
"Thu Oct 15 10:10:28 2020Found new device: TRX ROUTE KEY (34:81:F4:30:0D:FD)\n"
qt.bluetooth.bluez: void QBluetoothDeviceDiscoveryAgentPrivate::stop()
"Thu Oct 15 10:10:28 2020Found new device: TRX ROUTE KEY (34:81:F4:30:0D:FD)\n"
qt.bluetooth.bluez: Discovered: "34:81:F4:30:0D:FD" "TRX ROUTE KEY" Num UUIDs 0 total device 0 cached RSSI 0 Class 2360324
qt.bluetooth.bluez: Discovered: "5F:B0:75:C6:96:DC" "Inspire HR" Num UUIDs 1 total device 1 cached RSSI 0 Class 0
qt.bluetooth.bluez: Discovered: "74:A7:57:32:E5:AD" "74-A7-57-32-E5-AD" Num UUIDs 0 total device 2 cached RSSI 0 Class 0
qt.bluetooth.bluez: BluetoothManagement: Ignored event: 13
qt.bluetooth.bluez: BluetoothManagement: Ignored event: 13
qt.bluetooth.bluez: Updating RSSI for "34:81:F4:30:0D:FD" QVariant(short, -52)
qt.bluetooth.bluez: BluetoothManagement: Ignored event: 13
qt.bluetooth.bluez: BluetoothManagement: Ignored event: 13
qt.bluetooth.bluez: Updating RSSI for "34:81:F4:30:0D:FD" QVariant(short, -48)
qt.bluetooth.bluez: Discovery on: "74:A7:57:32:E5:AD" Mode: QBluetoothServiceDiscoveryAgent::DiscoveryMode(FullDiscovery)
[Detaching after fork from child process 5141]
qt.bluetooth.bluez: BluetoothManagement: Ignored event: 13
SDP for 74:A7:57:32:E5:AD B8:27:EB:9C:37:E2
qt.bluetooth.bluez: BluetoothManagement: Ignored event: d
Cannot establish sdp session
qt.bluetooth.bluez: BluetoothManagement: Ignored event: d
qt.bluetooth.bluez: SDP scan failure QProcess::ExitStatus(NormalExit) 3
qt.bluetooth.bluez: Discovery on: "5F:B0:75:C6:96:DC" Mode: QBluetoothServiceDiscoveryAgent::DiscoveryMode(FullDiscovery)
[Detaching after fork from child process 5163]
SDP for 5F:B0:75:C6:96:DC B8:27:EB:9C:37:E2
qt.bluetooth.bluez: BluetoothManagement: Ignored event: d
Cannot establish sdp session
qt.bluetooth.bluez: BluetoothManagement: Ignored event: d
qt.bluetooth.bluez: SDP scan failure QProcess::ExitStatus(NormalExit) 3
qt.bluetooth.bluez: Discovery on: "34:81:F4:30:0D:FD" Mode: QBluetoothServiceDiscoveryAgent::DiscoveryMode(FullDiscovery)
[Detaching after fork from child process 5185]
SDP for 34:81:F4:30:0D:FD B8:27:EB:9C:37:E2
qt.bluetooth.bluez: BluetoothManagement: Ignored event: b
Using PUBLIC_BROWSE_GROUP for SDP search
qt.bluetooth.bluez: Discovered services "34:81:F4:30:0D:FD" "" "{00000000-0000-0000-0000-000000000000}" >>> ("{00001200-0000-1000-8000-00805f9b34fb}")
"Thu Oct 15 10:11:09 2020Found new service: ({00000000-0000-0000-0000-000000000000})\n"
qt.bluetooth.bluez: Discovered services "34:81:F4:30:0D:FD" "SerialPort" "{00000000-0000-0000-0000-000000000000}" >>> ("{00001101-0000-1000-8000-00805f9b34fb}")
"Thu Oct 15 10:11:10 2020Found new service: SerialPort({00000000-0000-0000-0000-000000000000})\n"
"Thu Oct 15 10:11:10 2020Serial port service found\n"
qt.bluetooth.bluez: void QBluetoothServiceDiscoveryAgentPrivate::stop() Stop called
"Thu Oct 15 10:11:10 2020Create socket\n"
"Thu Oct 15 10:11:10 2020ConnectToService done\n"
Thread 1 "qdomyos-zwift.b" received signal SIGSEGV, Segmentation fault.
0x7650367c in QBluetoothDeviceInfo::operator=(QBluetoothDeviceInfo const&) () from /usr/lib/arm-linux-gnueabihf/libQt5Bluetooth.so.5
(gdb) bt
#0 0x7650367c in QBluetoothDeviceInfo::operator=(QBluetoothDeviceInfo const&) () from /usr/lib/arm-linux-gnueabihf/libQt5Bluetooth.so.5
#1 0x765513b4 in ?? () from /usr/lib/arm-linux-gnueabihf/libQt5Bluetooth.so.5
Backtrace stopped: previous frame identical to this frame (corrupt stack?)
(gdb)
...and then again a BT connection signaled by the threadmill
@jampy i guess we encountered a QT issue. I will post in the QT forums/bugs. Thanks for your patience
@jampy could you please check if there are other threads bt?
Maybe I should try building from source? However, I even fail to build master
:
pi@raspberrypi:~/qdomyos-zwift/src $ qmake
Project ERROR: Unknown module(s) in QT: bluetooth positioning
@jampy could you please check if there are other threads bt?
what do you mean?
pi@raspberrypi:~/qdomyos-zwift/src $ qmake Project ERROR: Unknown module(s) in QT: bluetooth positioning
you have to git checkout toorx
@jampy could you please check if there are other threads bt?
what do you mean?
thread apply all bt https://stackoverflow.com/questions/18391808/how-do-i-get-the-backtrace-for-all-the-threads-in-gdb
yeah, I deliberately tried to build master
because it probably should build just fine...
anyway:
pi@raspberrypi:~/qdomyos-zwift/src $ git checkout toorx
Branch 'toorx' set up to track remote branch 'toorx' from 'origin'.
Switched to a new branch 'toorx'
pi@raspberrypi:~/qdomyos-zwift/src $ git pull origin
remote: Enumerating objects: 57, done.
remote: Counting objects: 100% (57/57), done.
remote: Compressing objects: 100% (33/33), done.
remote: Total 57 (delta 26), reused 55 (delta 24), pack-reused 0
Unpacking objects: 100% (57/57), done.
From https://github.com/cagnulein/qdomyos-zwift
33fdd4c..15fdaec toorx -> origin/toorx
eb8d354..0ddd953 master -> origin/master
Updating 33fdd4c..15fdaec
Fast-forward
src/qdomyos-zwift | Bin 275392 -> 3938476 bytes
src/toorxtreadmill.cpp | 11 ++++++-----
2 files changed, 6 insertions(+), 5 deletions(-)
pi@raspberrypi:~/qdomyos-zwift/src $ qmake
Project ERROR: Unknown module(s) in QT: bluetooth
pi@raspberrypi:~/qdomyos-zwift/src $ qmake Project ERROR: Unknown module(s) in QT: bluetooth
did you install libqt5bluetooth5 ?
thread apply all bt
new run:
.....
qt.bluetooth.bluez: BluetoothManagement: Ignored event: d
qt.bluetooth.bluez: SDP scan failure QProcess::ExitStatus(NormalExit) 3
qt.bluetooth.bluez: Discovery on: "34:81:F4:30:0D:FD" Mode: QBluetoothServiceDiscoveryAgent::DiscoveryMode(FullDiscovery)
[Detaching after fork from child process 5769]
SDP for 34:81:F4:30:0D:FD B8:27:EB:9C:37:E2
qt.bluetooth.bluez: BluetoothManagement: Ignored event: b
Using PUBLIC_BROWSE_GROUP for SDP search
qt.bluetooth.bluez: Discovered services "34:81:F4:30:0D:FD" "" "{00000000-0000-0000-0000-000000000000}" >>> ("{00001200-0000-1000-8000-00805f9b34fb}")
"Thu Oct 15 10:18:22 2020Found new service: ({00000000-0000-0000-0000-000000000000})\n"
qt.bluetooth.bluez: Discovered services "34:81:F4:30:0D:FD" "SerialPort" "{00000000-0000-0000-0000-000000000000}" >>> ("{00001101-0000-1000-8000-00805f9b34fb}")
"Thu Oct 15 10:18:22 2020Found new service: SerialPort({00000000-0000-0000-0000-000000000000})\n"
"Thu Oct 15 10:18:22 2020Serial port service found\n"
qt.bluetooth.bluez: void QBluetoothServiceDiscoveryAgentPrivate::stop() Stop called
"Thu Oct 15 10:18:22 2020Create socket\n"
"Thu Oct 15 10:18:22 2020ConnectToService done\n"
Thread 1 "qdomyos-zwift.b" received signal SIGSEGV, Segmentation fault.
0x7650367c in QBluetoothDeviceInfo::operator=(QBluetoothDeviceInfo const&) () from /usr/lib/arm-linux-gnueabihf/libQt5Bluetooth.so.5
(gdb) thread apply all bt
Thread 2 (Thread 0x732853c0 (LWP 5281)):
#0 __GI___poll (timeout=-1, nfds=2, fds=0x7290ca48) at ../sysdeps/unix/sysv/linux/poll.c:29
#1 __GI___poll (fds=0x7290ca48, nfds=2, timeout=-1) at ../sysdeps/unix/sysv/linux/poll.c:26
#2 0x7557aeb4 in ?? () from /usr/lib/arm-linux-gnueabihf/libglib-2.0.so.0
Backtrace stopped: previous frame identical to this frame (corrupt stack?)
Thread 1 (Thread 0x76ff2290 (LWP 5278)):
#0 0x7650367c in QBluetoothDeviceInfo::operator=(QBluetoothDeviceInfo const&) () from /usr/lib/arm-linux-gnueabihf/libQt5Bluetooth.so.5
#1 0x765513b4 in ?? () from /usr/lib/arm-linux-gnueabihf/libQt5Bluetooth.so.5
Backtrace stopped: previous frame identical to this frame (corrupt stack?)
(gdb)
did you install libqt5bluetooth5 ?
pi@raspberrypi:~ $ dpkg -s libqt5bluetooth5
Package: libqt5bluetooth5
Status: install ok installed
Priority: optional
Section: libs
Installed-Size: 964
Maintainer: Debian Qt/KDE Maintainers <debian-qt-kde@lists.debian.org>
Architecture: armhf
Multi-Arch: same
Source: qtconnectivity-opensource-src
Version: 5.11.3-2
Depends: libqt5bluetooth5-bin, libc6 (>= 2.28), libgcc1 (>= 1:3.5), libqt5core5a (>= 5.11.3+dfsg~), libqt5dbus5 (>= 5.11.3+dfsg~), libstdc++6 (>= 5)
Description: Qt Connectivity Bluetooth module
Qt is a cross-platform C++ application framework. Qt's primary feature
is its rich set of widgets that provide standard GUI functionality.
.
This package contains the Bluetooth part of the Qt Connectivity module.
Homepage: http://qt-project.org/
@jampy maybe you need qtconnectivity5-dev too
@jampy maybe you need qtconnectivity5-dev too
Ideed! :-)
(perhaps update README
) ;-)
No segfault now, but now it just exits gracefully..?
pi@raspberrypi:~/qdomyos-zwift/src $ git rev-parse HEAD
15fdaec3c6466c78f8b9195d0b1cbccf69d5d60d
pi@raspberrypi:~/qdomyos-zwift/src $ sudo ./qdomyos-zwift -no-gui 2>&1 | tee output-2020-10-15-1124.txt
qt.bluetooth.bluez: Bluez 5 detected.
qt.bluetooth.bluez: Creating QtBluezDiscoveryManager
qt.bluetooth.bluez: Discovered: "34:81:F4:30:0D:FD" "TRX ROUTE KEY" Num UUIDs 2 total device 0 cached RSSI 0 Class 2360324
"Thu Oct 15 10:25:43 2020Found new device: TRX ROUTE KEY (34:81:F4:30:0D:FD)\n"
qt.bluetooth.bluez: void QBluetoothDeviceDiscoveryAgentPrivate::stop()
"Thu Oct 15 10:25:43 2020Found new device: TRX ROUTE KEY (34:81:F4:30:0D:FD)\n"
qt.bluetooth.bluez: Discovered: "34:81:F4:30:0D:FD" "TRX ROUTE KEY" Num UUIDs 2 total device 0 cached RSSI 0 Class 2360324
qt.bluetooth.bluez: Discovered: "5F:B0:75:C6:96:DC" "Inspire HR" Num UUIDs 1 total device 1 cached RSSI 0 Class 0
qt.bluetooth.bluez: Discovered: "74:A7:57:32:E5:AD" "74-A7-57-32-E5-AD" Num UUIDs 0 total device 2 cached RSSI 0 Class 0
qt.bluetooth.bluez: BluetoothManagement: Ignored event: 13
qt.bluetooth.bluez: Updating RSSI for "34:81:F4:30:0D:FD" QVariant(short, -50)
qt.bluetooth.bluez: BluetoothManagement: Ignored event: 13
qt.bluetooth.bluez: BluetoothManagement: Ignored event: 13
qt.bluetooth.bluez: Updating RSSI for "34:81:F4:30:0D:FD" QVariant(short, -56)
qt.bluetooth.bluez: Discovery on: "74:A7:57:32:E5:AD" Mode: QBluetoothServiceDiscoveryAgent::DiscoveryMode(FullDiscovery)
qt.bluetooth.bluez: BluetoothManagement: Ignored event: 13
SDP for 74:A7:57:32:E5:AD B8:27:EB:9C:37:E2
qt.bluetooth.bluez: BluetoothManagement: Ignored event: d
Cannot establish sdp session
qt.bluetooth.bluez: BluetoothManagement: Ignored event: d
qt.bluetooth.bluez: SDP scan failure QProcess::ExitStatus(NormalExit) 3
qt.bluetooth.bluez: Discovery on: "5F:B0:75:C6:96:DC" Mode: QBluetoothServiceDiscoveryAgent::DiscoveryMode(FullDiscovery)
SDP for 5F:B0:75:C6:96:DC B8:27:EB:9C:37:E2
qt.bluetooth.bluez: BluetoothManagement: Ignored event: d
Cannot establish sdp session
qt.bluetooth.bluez: BluetoothManagement: Ignored event: d
qt.bluetooth.bluez: SDP scan failure QProcess::ExitStatus(NormalExit) 3
qt.bluetooth.bluez: Discovery on: "34:81:F4:30:0D:FD" Mode: QBluetoothServiceDiscoveryAgent::DiscoveryMode(FullDiscovery)
SDP for 34:81:F4:30:0D:FD B8:27:EB:9C:37:E2
qt.bluetooth.bluez: BluetoothManagement: Ignored event: b
Using PUBLIC_BROWSE_GROUP for SDP search
qt.bluetooth.bluez: Discovered services "34:81:F4:30:0D:FD" "" "{00000000-0000-0000-0000-000000000000}" >>> ("{00001200-0000-1000-8000-00805f9b34fb}")
"Thu Oct 15 10:26:25 2020Found new service: ({00000000-0000-0000-0000-000000000000})\n"
qt.bluetooth.bluez: Discovered services "34:81:F4:30:0D:FD" "SerialPort" "{00000000-0000-0000-0000-000000000000}" >>> ("{00001101-0000-1000-8000-00805f9b34fb}")
"Thu Oct 15 10:26:25 2020Found new service: SerialPort({00000000-0000-0000-0000-000000000000})\n"
"Thu Oct 15 10:26:25 2020Serial port service found\n"
qt.bluetooth.bluez: void QBluetoothServiceDiscoveryAgentPrivate::stop() Stop called
"Thu Oct 15 10:26:25 2020Create socket\n"
"Thu Oct 15 10:26:25 2020ConnectToService done\n"
pi@raspberrypi:~/qdomyos-zwift/src $ echo $?
0
Note: The threadmill shows no connection.
@jampy run it with gdb, it seems very strange
@jampy maybe you need qtconnectivity5-dev too
Ideed! :-)
(perhaps update
README
) ;-)
i did it :)
...
qt.bluetooth.bluez: BluetoothManagement: Ignored event: 13
qt.bluetooth.bluez: BluetoothManagement: Ignored event: 13
qt.bluetooth.bluez: Updating RSSI for "34:81:F4:30:0D:FD" QVariant(short, -51)
qt.bluetooth.bluez: Discovery on: "7A:B3:2D:CF:77:8E" Mode: QBluetoothServiceDiscoveryAgent::DiscoveryMode(FullDiscovery)
[Detaching after fork from child process 7025]
qt.bluetooth.bluez: BluetoothManagement: Ignored event: 13
SDP for 7A:B3:2D:CF:77:8E B8:27:EB:9C:37:E2
qt.bluetooth.bluez: BluetoothManagement: Ignored event: d
Cannot establish sdp session
qt.bluetooth.bluez: BluetoothManagement: Ignored event: d
qt.bluetooth.bluez: SDP scan failure QProcess::ExitStatus(NormalExit) 3
qt.bluetooth.bluez: Discovery on: "34:81:F4:30:0D:FD" Mode: QBluetoothServiceDiscoveryAgent::DiscoveryMode(FullDiscovery)
[Detaching after fork from child process 7047]
SDP for 34:81:F4:30:0D:FD B8:27:EB:9C:37:E2
qt.bluetooth.bluez: BluetoothManagement: Ignored event: b
Using PUBLIC_BROWSE_GROUP for SDP search
qt.bluetooth.bluez: Discovered services "34:81:F4:30:0D:FD" "" "{00000000-0000-0000-0000-000000000000}" >>> ("{00001200-0000-1000-8000-00805f9b34fb}")
"Thu Oct 15 10:32:06 2020Found new service: ({00000000-0000-0000-0000-000000000000})\n"
qt.bluetooth.bluez: Discovered services "34:81:F4:30:0D:FD" "SerialPort" "{00000000-0000-0000-0000-000000000000}" >>> ("{00001101-0000-1000-8000-00805f9b34fb}")
"Thu Oct 15 10:32:06 2020Found new service: SerialPort({00000000-0000-0000-0000-000000000000})\n"
"Thu Oct 15 10:32:06 2020Serial port service found\n"
qt.bluetooth.bluez: void QBluetoothServiceDiscoveryAgentPrivate::stop() Stop called
"Thu Oct 15 10:32:06 2020Create socket\n"
"Thu Oct 15 10:32:06 2020ConnectToService done\n"
Thread 1 "qdomyos-zwift" received signal SIGSEGV, Segmentation fault.
0x7650367c in QBluetoothDeviceInfo::operator=(QBluetoothDeviceInfo const&) () from /usr/lib/arm-linux-gnueabihf/libQt5Bluetooth.so.5
(gdb)
(gdb)
(gdb)
(gdb)
(gdb) thread apply all bt
Thread 2 (Thread 0x732853c0 (LWP 6602)):
#0 __GI___poll (timeout=-1, nfds=2, fds=0x7290ca48) at ../sysdeps/unix/sysv/linux/poll.c:29
#1 __GI___poll (fds=0x7290ca48, nfds=2, timeout=-1) at ../sysdeps/unix/sysv/linux/poll.c:26
#2 0x7557aeb4 in ?? () from /usr/lib/arm-linux-gnueabihf/libglib-2.0.so.0
Backtrace stopped: previous frame identical to this frame (corrupt stack?)
Thread 1 (Thread 0x76ff2290 (LWP 6599)):
#0 0x7650367c in QBluetoothDeviceInfo::operator=(QBluetoothDeviceInfo const&) () from /usr/lib/arm-linux-gnueabihf/libQt5Bluetooth.so.5
#1 0x765513b4 in ?? () from /usr/lib/arm-linux-gnueabihf/libQt5Bluetooth.so.5
Backtrace stopped: previous frame identical to this frame (corrupt stack?)
(gdb)
(with the binary built from source 15fdaec3)
@jampy ok so is the same as with my binary. I will post on QTbugs and i will let you know
@jampy it's very strange: i used my android phone as a virtual treadmill and everything works...i guess something from the treadmill makes QT crazy...
Perhaps your code does not handle unexpected situations well? Like, your Android phone accepts the connection, while the TRX ROUTE KEY for some reason does not? Just guessing...
Maybe you're connecting to the wrong "port" of the BT device?
Let me know if I can do some more tests...
@jampy i guess QT developer needs the bt with QT debug symbol https://bugreports.qt.io/browse/QTBUG-87620?focusedCommentId=531315&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-531315
I think we (you :( ) need to recompile QT with debug symbol and retry again. I found this repo https://github.com/tranter/raspberry-pi-qt-builds that could be useful. Anyway we could wait some day to check if the QT guys will have some other ideas.
@jampy the guy from QT says that he need the debug symbols, so i will compile the QT from scratch for you and i will create a repo with the binaries.
It's Building :D
here you can find the binary built agains qt 5.15.1 https://github.com/cagnulein/qdomyos-zwift/raw/toorx/src/qdomyos-zwift you need also the libs, i will upload it tonight, they are 1GB
first of all, run it without gdb, just to be sure that the bugs has already solved. next, if the bug stills, run with gdb and post the results. thanks
my pi4 is on fire after 12 hours of building :D
I saw your comment on https://www.runningforum.it/viewtopic.php?p=2406295&sid=a47271253baef7f6a8259d9d0ade916f#p2406295 and I'd be happy if you could help me reverse-engineer the Bluetooth protocol of the TRX Route Key. I tried to contact Toorx/Garlando, but they did not respond.
I'm not sure if I want to use Zwift but in the first place I'd like to collect distance/incline data from the threadmill using a Raspberry Pi.
I have an Samsung S7 phone (Android 8) and a Huawei Mediapad M5 lite but I have no idea how to sniff the bluetooth traffic. Can you give me some hints?
Thanks.