This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Why my sensor can’t connect to a Garmin device?

Over the years of working on QZ Fitness ( http://qzfitness.com ), I believe I can now consider myself an expert in Bluetooth technology. I have reverse-engineered hundreds of different Bluetooth protocols to make Bluetooth a standard, if not the only standard, in the fitness world.

QZ floating window with the Peloton app

Currently, I’m tackling one of the last remaining problems: compatibility with Garmin devices. Garmin devices have the ability to connect to both ANT+ and Bluetooth sensors. QZ is already compatible with ANT+ on Android, but unfortunately, iOS does not have ANT+ hardware capabilities. QZ can read heart rate from a Garmin Watch via ANT+ and even send power, watts, and cadence as a sensor.

To overcome the lack of compatibility between iOS and Garmin devices, I delved into debugging Bluetooth compatibility. After some development, I managed to connect any type of virtual sensor from my QZ app to a Garmin Watch or Edge cycling computer using:

– MacOS
– Raspberry Pi
– ESP32

Through Bluetooth sniffer Adafruit ( https://www.adafruit.com/product/2269 ),

I discovered that Garmin devices require sensors to connect via a public address and not a random one. iOS and Android versions 5 and up do not allow Bluetooth 4.0 advertising with a public address for privacy reasons. (more info here: https://stackoverflow.com/questions/28602672/android-5-static-bluetooth-mac-address-for-ble-advertising )

For the nerds, you can find the C code for ESP32 here, which allows you to diagnose the issue on the fly. https://gist.github.com/cagnulein/b04b6d87e8b5d318aa59b510cf8b234e

So, I am formally requesting that Garmin remove this unnecessary and silly control so that any virtual device can connect. I will update this post with Garmin’s response.

In the meantime, many may wonder why I don’t simply develop a Garmin Connect IQ application that reads values from QZ and saves them to the Garmin workout. The answer is simple: Garmin has another limitation. IQ apps cannot write data to standard metrics like heart rate, power, cadence, speed, and distance. They can only use custom fields (more details here: https://forums.garmin.com/developer/connect-iq/f/discussion/4854/fitcontributor-nativenum-functionality ) This means that a workout created by an IQ application will not show metrics detected by QZ or third-party apps on Garmin Connect.

This additional limitation by Garmin makes sense in the outdoor sports world, where Garmin devices with their fantastic sensors can collect metrics better than any other device or app. However, in the indoor world, Garmin cannot connect to devices with proprietary Bluetooth or Wi-Fi protocols like QZ does. Therefore, this additional limitation is simply ridiculous.

Let me know what you think.

More details here: robertoviola.cloud/.../

  • You should move this discussion into the ConnectIQ forums. 

    It sounds like this is only an issue for paired sensors, right?  I.e. it pairs the first time but then next time the address has changed so the Garmin device doesn't recognize it?

  • Hi @kokketiel , actually I think this is the right section of the forum because I'm talking about sensor not ConnectIQ app. The ConnectIQ app topic on my thread it could be a workaround to the main issue. And about your question: no it never connects to it. The Garmin device found the sensor (adv frames are correctly received) but it never tries to connect because the Garmin firmware has a simple (and stupid) check about the public/private flag of the advertisment frame. It sounds to me like a classic firmware bug.

  • Interesting.  Are you talking about the Tx Address:Random flag in the capture snippet below?

  • exactly! you can check the gist on my post. 

  • Hmmm - I wrote a ConnectIQ data field that connects to a BLE device.  It works on all my Garmin devices (Edge 530 and FR945).  That device also has that flag set to 1 in the advertising packet.

  • it's a different thing. the privacy's thing is about only if you connect a device as a sensor. with garmin connect iq this is meanless. 

    but, on the other hands, if you use the garmin connect iq api you can't write the standard metrics in the fit file.