[BUG] Buggy behaviour on Raspberry pi 4 and Zwift #2810
mazafra1 posted onGitHub
Describe the bug The Wahoo v5 is detected but nothing happens.
To Reproduce Steps to reproduce the behavior:
- Launch program with
sudo ./qdomyos-zwift -no-gui -no-heart-service
- Try pairing on Zwift for iPad
- Dircom device is not showing sometimes, other times shows, other times a residual
Wahoo KICKR 0000
appears. And only showing in Power source and Cadence, never in Resistance. - Bluetooth virtual device never shows up.
Expected behavior It should show a Bluetooth Device to be paired in Zwift, to allow Zwift Click to be paired and then move Power source and Cadence to the virtual Dircon.
Screenshots
Desktop (please complete the following information):
- OS:
Linux raspberrypi 6.6.51+rpt-rpi-v8 #1 SMP PREEMPT Debian 1:6.6.51-1+rpt3 (2024-10-08) aarch64 GNU/Linux
- Version: source code from Nov 21st 2024.
Smartphone (please complete the following information): N/A
Append a debug log debug-Fri_Nov_22_09_12_49_2024.log.zip
Additional context Add any other context about the problem here.
the main issue is this one
Fri Nov 22 09:13:21 2024 1732263201122 Debug: command 10 failed with status 12
Fri Nov 22 09:13:21 2024 1732263201122 Debug: Advertising disable failed, ignoring
Fri Nov 22 09:13:21 2024 1732263201122 Debug: sending command; ogf: 8 ocf: 6
Fri Nov 22 09:13:21 2024 1732263201122 Debug: command sent successfully
Fri Nov 22 09:13:21 2024 1732263201124 Debug: HCI event triggered, type: e
Fri Nov 22 09:13:21 2024 1732263201125 Debug: command 6 executed successfully
Fri Nov 22 09:13:21 2024 1732263201125 Debug: sending command; ogf: 8 ocf: 8
Fri Nov 22 09:13:21 2024 1732263201125 Debug: command sent successfully
Fri Nov 22 09:13:21 2024 1732263201133 Debug: HCI event triggered, type: 13
Fri Nov 22 09:13:21 2024 1732263201136 Debug: HCI event triggered, type: e
Fri Nov 22 09:13:21 2024 1732263201136 Debug: command 8 executed successfully
Fri Nov 22 09:13:21 2024 1732263201137 Debug: sending command; ogf: 8 ocf: 9
Fri Nov 22 09:13:21 2024 1732263201137 Debug: command sent successfully
Fri Nov 22 09:13:21 2024 1732263201143 Debug: HCI event triggered, type: e
Fri Nov 22 09:13:21 2024 1732263201144 Debug: command 9 executed successfully
Fri Nov 22 09:13:21 2024 1732263201144 Debug: sending command; ogf: 8 ocf: 10
Fri Nov 22 09:13:21 2024 1732263201144 Debug: command sent successfully
Fri Nov 22 09:13:21 2024 1732263201147 Debug: HCI event triggered, type: e
Fri Nov 22 09:13:21 2024 1732263201148 Debug: command 10 failed with status 12
Fri Nov 22 09:13:21 2024 1732263201148 Warning: received advertising error
Fri Nov 22 09:13:21 2024 1732263201148 Debug: virtualdevices/virtualbike.cpp void virtualbike::error(QLowEnergyController::Error) "virtualbike::controller:ERROR AdvertisingError"
Fri Nov 22 09:13:21 2024 1732263201148 Debug: virtualdevices/virtualbike.cpp void virtualbike::reconnect() "virtualbike::reconnect"
try to investigate which could be the cause. you can try to check if enabling the fake bike setting setting the manual device to wifi, at least show the virtual device on zwift let me know
I launched it now with sudo ./qdomyos-zwift -no-gui -no-heart-service -only-virtualbike
and I got:
Fri Nov 22 12:01:28 2024 1732273288841 Warning: received advertising error
qt.bluetooth.bluez: received advertising error
Fri Nov 22 12:01:28 2024 1732273288841 Debug: virtualdevices/virtualbike.cpp void virtualbike::error(QLowEnergyController::Error) "virtualbike::controller:ERROR AdvertisingError"
"virtualbike::controller:ERROR AdvertisingError"
Fri Nov 22 12:01:28 2024 1732273288842 Debug: virtualdevices/virtualbike.cpp void virtualbike::reconnect() "virtualbike::reconnect"
"virtualbike::reconnect"
Fri Nov 22 12:01:28 2024 1732273288843 Warning: Overriding existing local service with uuid "{00001826-0000-1000-8000-00805f9b34fb}"
Overriding existing local service with uuid "{00001826-0000-1000-8000-00805f9b34fb}"
That's what you meant?
it seems there is a general error so. does it the same with the fake treadmill? if so it seems something on the raspberry itself let me know
I reinstalled bluetooth kernel module and now it's working!!!! Weird.
Now I have both the virtual Dircon and the virtual bluetooth QZPI and they're transmitting power. Is it possible to also get the zwift click in the same way the mobile app does?
weird! add the -zwift_click switch to qz as well
Roberto Viola Software engineer and open source enthusiast http://robertoviola.cloud
Il giorno ven 22 nov 2024 alle ore 13:20 Mazafra @.***> ha scritto:
I reinstalled bluetooth kernel module and now it's working!!!! Weird.
Now I have both the virtual Dircon and the virtual bluetooth QZPI and they're transmitting power. Is it possible to also get the zwift click in the same way the mobile app does?
— Reply to this email directly, view it on GitHub https://github.com/cagnulein/qdomyos-zwift/issues/2810#issuecomment-2493630681, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAALYWEPXOEWSC3QPT4BLTT2B4OPFAVCNFSM6AAAAABSI37RMOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIOJTGYZTANRYGE . You are receiving this because you were assigned.Message ID: @.***>
No effect whatsoever.
the flag is working but there are bluetooth issues
Fri Nov 22 14:07:51 2024 1732280871882 Debug: zwift_play/zwiftclickremote.cpp void zwiftclickremote::controllerStateChanged(QLowEnergyController::ControllerState) "controllerStateChanged" QLowEnergyController::ConnectingState Fri Nov 22 14:08:16 2024 1732280896787 Debug: devices/bluetooth.cpp void bluetooth::debug(const QString&) "zwiftclickremote::errorUnknownErrorUnknown Error" Fri Nov 22 14:08:16 2024 1732280896789 Debug: zwift_play/zwiftclickremote.cpp void zwiftclickremote::controllerStateChanged(QLowEnergyController::ControllerState) "controllerStateChanged" QLowEnergyController::UnconnectedState Fri Nov 22 14:08:16 2024 1732280896789 Debug: zwift_play/zwiftclickremote.cpp void zwiftclickremote::controllerStateChanged(QLowEnergyController::ControllerState) "trying to connect back again..." Fri Nov 22 14:08:16 2024 1732280896840 Debug: zwift_play/zwiftclickremote.cpp void zwiftclickremote::controllerStateChanged(QLowEnergyController::ControllerState) "controllerStateChanged" QLowEnergyController::ConnectingState Fri Nov 22 14:08:16 2024 1732280896848 Debug: devices/bluetooth.cpp void bluetooth::debug(const QString&) "zwiftclickremote::errorUnknownErrorUnknown Error"
maybe there are pending issues on bluetooth on your raspberry?
Roberto Viola Software engineer and open source enthusiast http://robertoviola.cloud
Il giorno ven 22 nov 2024 alle ore 14:12 Mazafra @.***> ha scritto:
No effect whatsoever.
debug-Fri_Nov_22_14_07_34_2024.log.zip https://github.com/user-attachments/files/17870581/debug-Fri_Nov_22_14_07_34_2024.log.zip
— Reply to this email directly, view it on GitHub https://github.com/cagnulein/qdomyos-zwift/issues/2810#issuecomment-2493736739, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAALYWCTQY3K2Z2YBG7T7JT2B4UT5AVCNFSM6AAAAABSI37RMOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIOJTG4ZTMNZTHE . You are receiving this because you were assigned.Message ID: @.***>
Thanks Roberto. I've reviewed and I see nothing off except the error above.
Is there any test I could do to troubleshoot the Zwift Click only?
@mazafra1 can you try to use bluetoothctl to check if you can connect to from QZ externally?
you can use this guide from chatgpt, let me know if you have any questions
https://chatgpt.com/share/67443941-1590-8005-82a3-0631ef2e9be5
Yes, it can connect and successfully retrieved these characteristics:
Primary Service (Handle 0x0000)
/org/bluez/hci0/dev_DC_30_32_2E_9B_0F/service0026
0000180f-0000-1000-8000-00805f9b34fb
Battery Service
Characteristic (Handle 0x0000)
/org/bluez/hci0/dev_DC_30_32_2E_9B_0F/service0026/char0027
00002a19-0000-1000-8000-00805f9b34fb
Battery Level
Descriptor (Handle 0x0000)
/org/bluez/hci0/dev_DC_30_32_2E_9B_0F/service0026/char0027/desc0029
00002902-0000-1000-8000-00805f9b34fb
Client Characteristic Configuration
Primary Service (Handle 0x0000)
/org/bluez/hci0/dev_DC_30_32_2E_9B_0F/service0017
00000001-19ca-4651-86e5-fa29dcdd09d1
Vendor specific
Characteristic (Handle 0x0000)
/org/bluez/hci0/dev_DC_30_32_2E_9B_0F/service0017/char0023
00000006-19ca-4651-86e5-fa29dcdd09d1
Vendor specific
Descriptor (Handle 0x0000)
/org/bluez/hci0/dev_DC_30_32_2E_9B_0F/service0017/char0023/desc0025
00002902-0000-1000-8000-00805f9b34fb
Client Characteristic Configuration
Characteristic (Handle 0x0000)
/org/bluez/hci0/dev_DC_30_32_2E_9B_0F/service0017/char0020
00000005-19ca-4651-86e5-fa29dcdd09d1
Vendor specific
Descriptor (Handle 0x0000)
/org/bluez/hci0/dev_DC_30_32_2E_9B_0F/service0017/char0020/desc0022
00002902-0000-1000-8000-00805f9b34fb
Client Characteristic Configuration
Characteristic (Handle 0x0000)
/org/bluez/hci0/dev_DC_30_32_2E_9B_0F/service0017/char001d
00000004-19ca-4651-86e5-fa29dcdd09d1
Vendor specific
Descriptor (Handle 0x0000)
/org/bluez/hci0/dev_DC_30_32_2E_9B_0F/service0017/char001d/desc001f
00002902-0000-1000-8000-00805f9b34fb
Client Characteristic Configuration
Characteristic (Handle 0x0000)
/org/bluez/hci0/dev_DC_30_32_2E_9B_0F/service0017/char001b
00000003-19ca-4651-86e5-fa29dcdd09d1
Vendor specific
Characteristic (Handle 0x0000)
/org/bluez/hci0/dev_DC_30_32_2E_9B_0F/service0017/char0018
00000002-19ca-4651-86e5-fa29dcdd09d1
Vendor specific
Descriptor (Handle 0x0000)
/org/bluez/hci0/dev_DC_30_32_2E_9B_0F/service0017/char0018/desc001a
00002902-0000-1000-8000-00805f9b34fb
Client Characteristic Configuration
Primary Service (Handle 0x0000)
/org/bluez/hci0/dev_DC_30_32_2E_9B_0F/service000e
0000180a-0000-1000-8000-00805f9b34fb
Device Information
Characteristic (Handle 0x0000)
/org/bluez/hci0/dev_DC_30_32_2E_9B_0F/service000e/char0015
00002a26-0000-1000-8000-00805f9b34fb
Firmware Revision String
Characteristic (Handle 0x0000)
/org/bluez/hci0/dev_DC_30_32_2E_9B_0F/service000e/char0013
00002a27-0000-1000-8000-00805f9b34fb
Hardware Revision String
Characteristic (Handle 0x0000)
/org/bluez/hci0/dev_DC_30_32_2E_9B_0F/service000e/char0011
00002a25-0000-1000-8000-00805f9b34fb
Serial Number String
Characteristic (Handle 0x0000)
/org/bluez/hci0/dev_DC_30_32_2E_9B_0F/service000e/char000f
00002a29-0000-1000-8000-00805f9b34fb
Manufacturer Name String
Primary Service (Handle 0x0000)
/org/bluez/hci0/dev_DC_30_32_2E_9B_0F/service000a
00001801-0000-1000-8000-00805f9b34fb
Generic Attribute Profile
Characteristic (Handle 0x0000)
/org/bluez/hci0/dev_DC_30_32_2E_9B_0F/service000a/char000b
00002a05-0000-1000-8000-00805f9b34fb
Service Changed
Descriptor (Handle 0x0000)
/org/bluez/hci0/dev_DC_30_32_2E_9B_0F/service000a/char000b/desc000d
00002902-0000-1000-8000-00805f9b34fb
Client Characteristic Configuration
Should I try subscribing to any one in particular?
Edit: the device disconnects after a couple of minutes without activity.
so it could be the issue is when you are connecting to both trainer and the click? can you try to connect to both? first connect to the trainer, and then try to subscribe to the 0x2AD2 for example and then connect to the click. let's see if it works
I tried that and it all seems OK. I even subscribed to notifications on 0x2AD2
. Although I'm not sure if anything should happen. But every step threw a success message.
OK it could be something about the fact that qz is trying to also broadcasting over Bluetooth at the same time. Disable the virtual Bluetooth device from the qz settings so we should be on the same Bluetoothctl context
Roberto Viola Software engineer and open source enthusiast http://robertoviola.cloud
Il giorno dom 1 dic 2024 alle 09:35 Mazafra @.***> ha scritto:
I tried that and it all seems OK. I even subscribed to notifications on 0x2AD2. Although I'm not sure if anything should happen. But every step threw a success message.
— Reply to this email directly, view it on GitHub https://github.com/cagnulein/qdomyos-zwift/issues/2810#issuecomment-2509634714, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAALYWB7AZZP2PIQHWEDOYD2DLC5XAVCNFSM6AAAAABSI37RMOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKMBZGYZTINZRGQ . You are receiving this because you were assigned.Message ID: @.***>
Thanks. That makes sense. What’s the terminal parameter for that?
Cheers
I guess there is not. You can run the UI to do so just for a test
Roberto Viola Software engineer and open source enthusiast http://robertoviola.cloud
Il giorno dom 1 dic 2024 alle 10:20 Mazafra @.***> ha scritto:
Thanks. That makes sense. What’s the terminal parameter for that?
Cheers
— Reply to this email directly, view it on GitHub https://github.com/cagnulein/qdomyos-zwift/issues/2810#issuecomment-2509651343, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAALYWHTPMAY5GCUODU6C4T2DLIGTAVCNFSM6AAAAABSI37RMOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKMBZGY2TCMZUGM . You are receiving this because you were assigned.Message ID: @.***>
Thanks Roberto. I'm on a headless Rpi. Any chance I get this setup done via a config file or similar?
i created this
"-no-virtual-device-bluetooth"
build qz from the master, i just added it for you
Thanks a ton!! Now it works!!! Obviously without virtual bluetooth device.
What can we do then now? Is the problem the number of bt channels occupied or something else? Did you experience something similar on your Rpi zero?
never tried to pair the click too on the raspberry. i guess yes, it's some sort of limitation on the raspberry. one workaround could be connect first the click and then finally the trainer so the broadcasting interface will be the last one. just a question: why are you connecting now the click on zwift directly? weren't you connecting on the qz app on the raspberry?
To connect the Click I just followed this tutorial https://www.youtube.com/watch?v=mJl2zkQ2SuA. Isn't it the proper way?
there are 2 ways, check here https://github.com/cagnulein/qdomyos-zwift/wiki/Virtual-Gearing-on-QZ-with-Zwift,-Rouvy,-Mywhoosh-and-Traning-Peaks
if you use the method with qz directly, you can avoid to use the bluetooth interface on zwift so it would already work with the actually raspberry version (the only downside is that you will not see the gears on zwift)
OK. That's not too bad. I won't see the gear number neither in Zwift, neither in QZ because the raspberry does not have screen, but I can live with that.
With Trainingpeaks virtual and others simulators the behavior would be the same?
yes it would work the same, since now qz has MQTT you can display the gears on home assistant for example!
Thanks. How do I need to configure the screen below?
you can leave as it is, as i said, without the bluetooth interface we can't have the gears from/to zwift since it's bluetooth based
I guess it's what I fixed here @mazafra1
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.