cagnulein / qdomyos-zwift

Zwift bridge for smart treadmills and bike/cyclette
https://www.qzfitness.com/
GNU General Public License v3.0
340 stars 104 forks source link

connect garmin fenix 6 #91

Closed mgsimon closed 2 years ago

mgsimon commented 3 years ago

Could not use this bridge to connect between domyos bike 500 and garmin fenix 6.

fenix 6 shall identify spped and cadence sensor if qdomyos advertise itself as a bluetooth cadence sensor or FTMS sensor, or? Do I miss something or does fenix 6 not support this type of advertisement?

cagnulein commented 3 years ago

Hi micheal, I'm aware of it, infact it's not an issue of code, infact if you try to advertise ftms or cadence from nrfconnect you will see the same result. I think garmin see it as a phone and avoid to connect to it as a sensor. Could you please investigate about this? I don't have a Garmin watch Thanks

Il sab 26 dic 2020, 08:37 Michael Simon notifications@github.com ha scritto:

Could not use this bridge to connect between domyos bike 500 and garmin fenix 6.

fenix 6 shall identify spped and cadence sensor if qdomyos advertise itself as a bluetooth cadence sensor or FTMS sensor, or? Do I miss something or does fenix 6 not support this type of advertisement?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/cagnulein/qdomyos-zwift/issues/91, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAALYWCMNUFY65O5BUSN3QTSWWHCZANCNFSM4VJWLD7Q .

mgsimon commented 3 years ago

Hi Roberto, I test the connection with the bridge on my linux dev notebeook and have no idea how to investigate what garmin watch is searching?

How do I cann setup test advertiser for ftms or cadence in nrfconnect to test if a connection from fenix to a virtual sensor is possible?

New advertising packet?

cagnulein commented 3 years ago

Yeah you're right, it's not so easy on nrfconnect. Another idea: have you got a sensor (heart rate, cadence, or other) that your garmin already see? We can compare it to our bridge on nrfconnect in order to see the differences. What do you think?

Il sab 26 dic 2020, 09:10 Michael Simon notifications@github.com ha scritto:

Hi Roberto, I test the connection with the bridge on my linux dev notebeook and have no idea how to investigate what garmin watch is searching?

How do I cann setup test advertiser for ftms or cadence in nrfconnect to test if a connection from fenix to a virtual sensor is possible?

New advertising packet?

  • name?
  • record?
  • options?
  • connectable?
  • scannable?
  • intervall?
  • tx power level?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/cagnulein/qdomyos-zwift/issues/91#issuecomment-751333754, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAALYWAFQVXMW4WNI3JQW4TSWWK5XANCNFSM4VJWLD7Q .

mgsimon commented 3 years ago

I have heart rate and running pod sensor for my watch but I thinke these devices will use ant+ instead of BLE.

cagnulein commented 3 years ago

Ok, in the meanwhile I remember that my old polar m430 has the same ability of the Fenix 6 to connect to some sensor. I will give it a try too and i let you know

Il sab 26 dic 2020, 09:45 Michael Simon notifications@github.com ha scritto:

I have heart rate and running pod sensor for my watch but I thinke these devices will use ant+ instead of BLE.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/cagnulein/qdomyos-zwift/issues/91#issuecomment-751335752, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAALYWAVH7ZTZ6Y2ZP3O7YLSWWPCBANCNFSM4VJWLD7Q .

cagnulein commented 3 years ago

Screenshot_20201226_123909_no.nordicsemi.android.mcp.jpgScreenshot_20201226_123703_no.nordicsemi.android.mcp.jpgScreenshot_20201226_123648_no.nordicsemi.android.mcp.jpgScreenshot_20201226_123618_no.nordicsemi.android.mcp.jpgScreenshot_20201226_123609_no.nordicsemi.android.mcp.jpgScreenshot_20201226_123546_no.nordicsemi.android.mcp.jpg

These are from my runpod, i already saw a few things that I would like to try.

mgsimon commented 3 years ago

My Garmin RD Pod is using ANT+ but fenix shall support BLE sensors also. Would be nice to test some of your ideas to get it running.

cagnulein commented 3 years ago

Yeah i will do some test today

Il sab 26 dic 2020, 13:41 Michael Simon notifications@github.com ha scritto:

My Garmin RD Pod is using ANT+ but fenix shall support BLE sensors also. Would be nice to test some of your ideas to get it running.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/cagnulein/qdomyos-zwift/issues/91#issuecomment-751352321, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAALYWEWPY7A2RQ57FDSBG3SWXKX5ANCNFSM4VJWLD7Q .

mgsimon commented 3 years ago

I checked my heart sensor HRM-Tri from Garmin, but support ant+ only also. Have no bluetooth sensor ... :-(

cagnulein commented 3 years ago

@mgsimon i just added a cli argument called "-bike-cadence-sensor" that emulate a cadence sensor instead of a FTMS one. Could you please try to pull it, build it and give it a try? I'm doing the same thing on my Polar M430. Thanks

cagnulein commented 3 years ago

I got it!!! I will push the commit soon!

mgsimon commented 3 years ago

:+1:

Currently I have a problem with my setup.

Bluetooth: Bus 003 Device 002: ID 0b05:17cb ASUSTek Computer, Inc. Broadcom BCM20702A0 Bluetooth

e.g.

...
Warning:   received advertising error
Debug: bluetooth.cpp void bluetooth::debug(QString) "Sa. Dez. 26 15:58:59 2020 1608994739513 virtualbike::controller:ERROR AdvertisingError"
Debug: bluetooth.cpp void bluetooth::debug(QString) "Sa. Dez. 26 15:58:59 2020 1608994739513 virtualbike::reconnect"
....

Could you support me with APK for a fast test from my tablet / phone?

cagnulein commented 3 years ago

@mgsimon if you want i could send it to beta tester group on google. is it ok for you?

mgsimon commented 3 years ago

yes, pls. add my account to this group? :-)

cagnulein commented 3 years ago

Write me it to roberto.viola83@gmail.com I will do it in about 3 hours

Il sab 26 dic 2020, 16:18 Michael Simon notifications@github.com ha scritto:

yes, pls. add my account to this group? :-)

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/cagnulein/qdomyos-zwift/issues/91#issuecomment-751365631, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAALYWHN62HPK6TIJ5WQ6VLSWX5DFANCNFSM4VJWLD7Q .

cagnulein commented 3 years ago

@mgsimon 1.8.5 Is available on beta testing. Give it a try!

mgsimon commented 3 years ago

My fenix could not find any sensor ... :-(

First try with setting "Cadence Sensor (Peleton compatibility)" and second without ...

btw, I'm not connected with zwift, want to connect cadence and speed to watch only. I will send log files by mail.

cagnulein commented 3 years ago

Ok FTMS is not supported from garmin fenix 6 https://forums.garmin.com/outdoor-recreation/outdoor-recreation/f/fenix-6-series/224367/fenix-6-treadmill-bluetooth-ftms-fitness-machine-service-protocol

So we need to play with cadence

mgsimon commented 3 years ago

I think ant+ is supported for sensors only? Could not find any setup with a BLE sensor, all with Bluetooth and ANT+?

cagnulein commented 3 years ago

Did you check on the manual?

Il sab 26 dic 2020, 20:40 Michael Simon notifications@github.com ha scritto:

I think ant+ is supported for sensors only? Could not find any setup with a BLE sensor, all with Bluetooth and ANT+?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/cagnulein/qdomyos-zwift/issues/91#issuecomment-751389320, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAALYWDUM76DVYNMVEUN3FDSWY34XANCNFSM4VJWLD7Q .

cagnulein commented 3 years ago

Are you following these steps https://www8.garmin.com/manuals/webhelp/fenix66s6xpro/EN-US/GUID-0AA57B88-BA13-4983-ADAC-7EA7DABC735D.html ?

Il sab 26 dic 2020, 20:43 cagnulein cagnulein@gmail.com ha scritto:

Did you check on the manual?

Il sab 26 dic 2020, 20:40 Michael Simon notifications@github.com ha scritto:

I think ant+ is supported for sensors only? Could not find any setup with a BLE sensor, all with Bluetooth and ANT+ ?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/cagnulein/qdomyos-zwift/issues/91#issuecomment-751389320, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAALYWDUM76DVYNMVEUN3FDSWY34XANCNFSM4VJWLD7Q .

mgsimon commented 3 years ago

Sure, many times ...

In manual ant+ or bluetooth but could not find any hint in Garmin SDK for cadence or speed in context of bluetooth. Seems to be more generic. E.g ant+ listener exists and all found buyable sensors support ant+ and bluetooth.

cagnulein commented 3 years ago

Could you try, with my app open and connected to the bike, check how your phone is advertising over bluetooth? You need a another phone/tablet with nrfconnect to do it. I'm interested about the nrfconnect scan page, where it shows the full details of the advertisement data. Thanks

Il sab 26 dic 2020, 23:09 Michael Simon notifications@github.com ha scritto:

Sure, many times ...

In manual ant+ or bluetooth but could not find any hint in Garmin SDK for cadence or speed in context of bluetooth. Seems to be more generic. E.g ant+ listener exists and all found buyable sensors support ant+ and bluetooth.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/cagnulein/qdomyos-zwift/issues/91#issuecomment-751400966, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAALYWBGAFAM3SODU5IEQS3SWZNIHANCNFSM4VJWLD7Q .

mgsimon commented 3 years ago

Cadence Sensor (Peloton compatibility) active: Screenshot_20201227-084019_nRF Connect

mgsimon commented 3 years ago

Scan: SmartSelect_20201227-083703_nRF Connect

cagnulein commented 3 years ago

@mgsimon maybe your fenix has some issue because it saw that the mgNote8 has cadence and heart rate too. Maybe if i remove (with a setting) the heart rate service, it will find it. What do you think? Infact nrfConnect shows a heart icon too...

mgsimon commented 3 years ago

You can test CSC with nRF Toolbox. If this works then we can test fenix connectivity again.

Maybe additional usefull informations:

cagnulein commented 3 years ago

Ok i guess it's already working with that. That's how i test my app at first. Anyway I will give another round later this morning and i will let you know.

Il dom 27 dic 2020, 09:39 Michael Simon notifications@github.com ha scritto:

You can test CSC with nRF Toolbox. If this works then we can test fenix connectivity again.

Maybe additional usefull informations:

- https://learn.adafruit.com/bluetooth-bicycle-speed-cadence-sensor-display-with-clue/cycling-speed-and-cadence-service

https://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.sdk5.v14.0.0%2Fble_sdk_app_csc.html

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/cagnulein/qdomyos-zwift/issues/91#issuecomment-751440818, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAALYWBCOTWR47CC6NT66IDSW3XEJANCNFSM4VJWLD7Q .

mgsimon commented 3 years ago

btw I was not be able to connect with nRF Connect to advertiser by qdomyos, so I will try it with nRF Toolbox also.

Here is how my watch is advertising RSC profile maybe this could help also?

SmartSelect_20201227-094739_nRF Connect

cagnulein commented 3 years ago

If your Watch doesn't see at all the Bridge, we have to focus on the advertising page (scan page on nrfconnect). I guess it want to see just 1 main service. I'm out with my dog now, i Will check my idea soon :) Have a nice Sunday!

Il dom 27 dic 2020, 09:54 Michael Simon notifications@github.com ha scritto:

btw I was not be able to connect with nRF Connect to advertiser by qdomyos, so I will try it with nRF Toolbox also.

Here is how my watch is advertising RSC profile maybe this could help also?

[image: SmartSelect_20201227-094739_nRF Connect] https://user-images.githubusercontent.com/3304867/103167168-00d8cf80-4829-11eb-81bf-5dc9882264a9.jpg

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/cagnulein/qdomyos-zwift/issues/91#issuecomment-751441980, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAALYWDMZ4ESNBDKCLF2D7LSW3Y2VANCNFSM4VJWLD7Q .

mgsimon commented 3 years ago

nRF Toolbox will list my MGNOTE8 in CSC as available service but no values will be displayed if I connect to this one.

Which setup are you using to run qdomyos, Android device also? I could try to setup my Raspberry Pi to eliminate issues e.g. by Android.

Which distro do you use on Raspberry?

Have a nice Sunday also!

cagnulein commented 3 years ago

nRF Toolbox will list my MGNOTE8 in CSC as available service but no values will be displayed if I connect to this one.

ok i'm trying now

Which setup are you using to run qdomyos, Android device also? I could try to setup my Raspberry Pi to eliminate issues e.g. by Android.

yes, i have a Xiaomi Mi3 and a Honor P20 lite

Which distro do you use on Raspberry?

Raspbian :)

cagnulein commented 3 years ago

@mgsimon ok wait now nrf toolbox says me that my bridge doesn't have the supported services. i'm digging into it

cagnulein commented 3 years ago

nrf toolbox wants a battery service. now it seems to work. i'm doing other some test and i will push it

mgsimon commented 3 years ago

I will try to setup my Raspberry Pi.

cagnulein commented 3 years ago

ok @mgsimon i pushed the modification. so on the raspberry try to run

# ./qdomyos-zwift -battery-service -bluetooth-relaxed

it should connect to your bike and nrftoolbox should see it. tell me what you will see, i'm really curious about this :)

mgsimon commented 3 years ago
$ sudo ./qdomyos-zwift -battery-service -bluetooth-relaxed

Could connect with my Raspberry PI to Domyos bike and see DomyosBridge in nRF Connect but I'm not be able to connect CSC by nRF Toolbox.

Scan SmartSelect_20201227-132146_nRF Connect

Client SmartSelect_20201227-132215_nRF Connect

Server SmartSelect_20201227-132234_nRF Connect

cagnulein commented 3 years ago

Sorry you have also to add

-bike-cadence-sensor

Il dom 27 dic 2020, 13:35 Michael Simon notifications@github.com ha scritto:

$ sudo ./qdomyos-zwift -battery-service -bluetooth-relaxed

Could connect with my Raspberry PI to Domyos bike and see DomyosBridge in nRF Connect but I'm not be able to connect CSC by nRF Toolbox.

Scan [image: SmartSelect_20201227-132146_nRF Connect] https://user-images.githubusercontent.com/3304867/103170880-17daea00-4848-11eb-8eed-9a8ba2e28dad.jpg

Client [image: SmartSelect_20201227-132215_nRF Connect] https://user-images.githubusercontent.com/3304867/103170877-16a9bd00-4848-11eb-92da-a3cf40adcb65.jpg

Server [image: SmartSelect_20201227-132234_nRF Connect] https://user-images.githubusercontent.com/3304867/103170883-19a4ad80-4848-11eb-9807-aec91e91367d.jpg

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/cagnulein/qdomyos-zwift/issues/91#issuecomment-751462607, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAALYWB77TM3IWYLW2YYLR3SW4SX7ANCNFSM4VJWLD7Q .

mgsimon commented 3 years ago

I could not see bridge anymore in nRF Connect with this addtional parameter.

$ sudo ./qdomyos-zwift -battery-service -bluetooth-relaxed -bike-cadence-sensor
cagnulein commented 3 years ago

Yes because the services are changed. Try to reboot your phone. It usually helps

Il dom 27 dic 2020, 14:03 Michael Simon notifications@github.com ha scritto:

I could not see bridge anymore in nRF Connect with this addtional parameter.

$ sudo ./qdomyos-zwift -battery-service -bluetooth-relaxed -bike-cadence-sensor

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/cagnulein/qdomyos-zwift/issues/91#issuecomment-751465374, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAALYWD7XGPKWEML73GQJCLSW4WCXANCNFSM4VJWLD7Q .

mgsimon commented 3 years ago

Does not work. I restarted my tablet and raspberry. Zwift Connection Status is not active. I'm not sure but is this an indicator for active advertising?

used cmd:

$ sudo ./qdomyos-zwift -battery-service -bluetooth-relaxed -bike-cadence-sensor
cagnulein commented 3 years ago

@mgsimon i don't understand: don't you see the bridge anymore? could you please add me on facebook ( https://www.facebook.com/cagnulein/ ) or wherever you want just to follow you in real time? i really want to help you on this. it should work, at least on nrf toolbox

cagnulein commented 3 years ago

try to remove "-bluetooth-relaxed"

mgsimon commented 3 years ago

does not work could see any bridge ... :-(

cagnulein commented 3 years ago

@mgsimon but you saw before with the same binary, so it has to work. so first step try without -bike-cadence-sensor

It worked before so it has to work now too If it so, move on, and try with -bike-cadence-sensor

try even with different phone, some phone stores the services of a bluetooth device and keep them in a local cache.

I repeat: if you want, choose a chat service, and i can follow you in realtime :)

mgsimon commented 3 years ago

There are some issue ... ... test with my phone instead of tablet:

Bridge is available again ...

SmartSelect_20201227-152944_nRF Connect

... but for a short time only.

SmartSelect_20201227-153350_nRF Connect

used cmd:

$ sudo ./qdomyos-zwift -battery-service -bluetooth-relaxed -bike-cadence-sensor

chat is with my setup not possible / very useful have to use this bike for each test and difficult to cycle and handle all device in same time

cagnulein commented 3 years ago

try to remove the -bluetooth-relaxed

mgsimon commented 3 years ago

unbelievable works :+1:

20201227_155535

and I could connnect my fenix with DomyosBridge also! :-)

Now we know it could be possible to use this bridge to connect garmin fenix 6 also, but some is missing / wrong ...

cagnulein commented 3 years ago

@mgsimon

1) cadence: maybe it's just a *2 factor? or something different? The cadence that i show in the qdomyos-app is correct? 2) speed should be autocalculated from the ratio that you've specified in the setting of nrf toolbox, isn't it? i will check again the CSC specs, but i don't remember if there is a speed attribute... 3) mmm i thinks it just a case...please retry this, UI and bluetooth have nothing releated

Questions: 1) so you're gonna use the raspberry, or do you wanna still try with the android phone? 2) what do you see on the fenix? could you take some screenshot?

Thanks for your time!

cagnulein commented 3 years ago

@mgsimon you're right about the cadence, i'm gonna push it a small modification!