Garmin shows 0.0 speed sent by esp32 over BLE

  1. Hi..

I've been working on esp32 project to get treadmill speed sent to my Gamin Fenix5. 

The idea is simple. Esp32 reads the speed from flywheel via reed relay and transmits the speed data over BLE to my watch.  The Garmin connects to esp32 but doesn't show the speed. The reading is 0.0.

nRF connect shows this:

nRF Connect, 2022-03-20
Footpod(3C:61:05:30:B2:06)
V 08:45:07.813 Connecting to 3C:61:05:30:B2:06...
D 08:45:07.813 gatt = device.connectGatt(autoConnect = false, TRANSPORT_LE, preferred PHY = LE 1M)
D 08:45:08.039 [Callback] Connection state changed with status: 0 and new state: CONNECTED (2)
I 08:45:08.039 Connected to 3C:61:05:30:B2:06
D 08:45:08.065 [Broadcast] Action received: android.bluetooth.device.action.ACL_CONNECTED
I 08:45:08.412 Connection parameters updated (interval: 7.5ms, latency: 0, timeout: 5000ms)
V 08:45:08.751 Discovering services...
D 08:45:08.751 gatt.discoverServices()
D 08:45:08.771 [Callback] Services discovered with status: 0
I 08:45:08.771 Services discovered
V 08:45:08.776 Generic Attribute (0x1801)
- Service Changed [I] (0x2A05)
   Client Characteristic Configuration (0x2902)
Generic Access (0x1800)
- Device Name [R] (0x2A00)
- Appearance [R] (0x2A01)
- Central Address Resolution [R] (0x2AA6)
Running Speed and Cadence (0x1814)
- Sensor Location [R] (0x2A5D)
- RSC Measurement [N] (0x2A53)
   Characteristic User Description (0x2901)
   Client Characteristic Configuration (0x2902)
D 08:45:08.777 gatt.setCharacteristicNotification(00002a05-0000-1000-8000-00805f9b34fb, true)
D 08:45:08.780 gatt.setCharacteristicNotification(00002a53-0000-1000-8000-00805f9b34fb, true)
I 08:45:08.907 Connection parameters updated (interval: 35.0ms, latency: 0, timeout: 5000ms)
V 08:45:12.723 Enabling notifications for 00002a53-0000-1000-8000-00805f9b34fb
D 08:45:12.723 gatt.setCharacteristicNotification(00002a53-0000-1000-8000-00805f9b34fb, true)
D 08:45:12.725 gatt.writeDescriptor(00002902-0000-1000-8000-00805f9b34fb, value=0x0100)
I 08:45:12.860 Data written to descr. 00002902-0000-1000-8000-00805f9b34fb, value: (0x) 01-00
A 08:45:12.860 "Notifications enabled" sent
V 08:45:12.868 Notifications enabled for 00002a53-0000-1000-8000-00805f9b34fb
I 08:45:13.916 Notification received from 00002a53-0000-1000-8000-00805f9b34fb, value: (0x) 03-BB-06-01-01-00-0A-00-00-00
A 08:45:13.916 "Speed: 6.73 m/s, Candence: 1 RPM,
Instantaneous Stride Length: 0.01 m,
Total Distance: 1.0 m,


Speed is sent but Garmin won't show it. 

I believe something is missing from BLE characteristics.

Any idea?

Thanks.

  • Here is part of the output, you can get the complete log from the link:

    https://1drv.ms/u/s!Ak4dmTIvLDvxi6JMqcNBQJdJj7-jYA?e=oWML83

    Things I thing I should provide later:

    - Check if FR935 keeps reading the foot pod as expected, as it was for example on previous FW versions....Who knows, maybe all this is useless now.

    - Get the same logs while running....and staying alive Slight smile


    nRF Connect, 2023-01-17
    Polar RUN 34FB542E (CE:BD:E9:D9:E2:FA)
    V    19:49:34.532    Connecting to CE:BD:E9:D9:E2:FA...
    D    19:49:34.532    gatt = device.connectGatt(autoConnect = false, TRANSPORT_LE, preferred PHY = LE 1M)
    D    19:49:35.610    [Callback] Connection state changed with status: 0 and new state: CONNECTED (2)
    I    19:49:35.610    Connected to CE:BD:E9:D9:E2:FA
    D    19:49:35.645    [Broadcast] Action received: android.bluetooth.device.action.ACL_CONNECTED
    V    19:49:35.646    Discovering services...
    D    19:49:35.646    gatt.discoverServices()
    I    19:49:36.130    Connection parameters updated (interval: 7.5ms, latency: 0, timeout: 5000ms)
    D    19:49:36.614    [Callback] Services discovered with status: 0
    I    19:49:36.614    Services discovered
    V    19:49:36.681    Generic Access (0x1800)
    - Device Name [R W WNR] (0x2A00)
    - Appearance [R] (0x2A01)
    - Peripheral Preferred Connection Parameters [R] (0x2A04)
    Generic Attribute (0x1801)
    Unknown Service (6217ff4e-d9eb-0491-37b3-801a13fbc64e)
    - Unknown Characteristic [R] (6217ff50-d47e-de85-55c5-d0700a757d7f)
    - Unknown Characteristic [N] (6217ff51-ee40-19e2-b56b-d44a3bd8b303)
       Client Characteristic Configuration (0x2902)
    Device Information (0x180A)
    - Serial Number String [R] (0x2A25)
       Characteristic Presentation Format (0x2904)
    - Manufacturer Name String [R] (0x2A29)
       Characteristic Presentation Format (0x2904)
    - Firmware Revision String [R] (0x2A26)
       Characteristic Presentation Format (0x2904)
    - Model Number String [R] (0x2A24)
       Characteristic Presentation Format (0x2904)
    - Software Revision String [R] (0x2A28)
       Characteristic Presentation Format (0x2904)
    - Hardware Revision String [R] (0x2A27)
       Characteristic Presentation Format (0x2904)
    - System ID [R] (0x2A23)
    Battery Service (0x180F)
    - Battery Level [R] (0x2A19)
    Running Speed and Cadence (0x1814)
    - RSC Measurement [N] (0x2A53)
       Client Characteristic Configuration (0x2902)
    - RSC Feature [R] (0x2A54)
    - SC Control Point [I W] (0x2A55)
       Client Characteristic Configuration (0x2902)

  • But what does your ciq app see?  Is onCharacteristicRead and/or onCharacteristicChanged() called?

    have you tried using println() to the value passed to those calls?

    Do you see you are connected by way of onConnectedStateChanged()?

    when you queue up reads and writes, you do need your own queue with CIQ.  You can't do a second read until the 1st one complete.  If you are turning on notifies, same thing.

  • Jim sorry, I don't know what you are talking about, don't know if my english level is poor or because I am not a programmer.

    As I understand the issue is about making an ESP32 works as a regular foot pod. So no Connec IQ or App related issue here. The watch should recognize the sensor directly through its Sensors & Accessories menu under settings. Then it must provide related data during workout. For this a bluetooth capable model is needed, in my case a FR935.

    I used to pair my garmin foot pod (ANT+) to my FR, while using de Polar RUN pod with Zwift at the same time. I wasn't happy specially with Zwift accuracy, so I change the Polar with an ESP32. Never used the ESP32 with the watch, but with the code I have I think it doesn't work.

    This images shows the Polar RUN pod working with my FR935. If there is any doubt about its functionality.

    1drv.ms/.../s!Ak4dmTIvLDvxi6JXvQ2F4YnJcZQodw

  • Jim your BleScan app doesn't have Fenix 5 nor Forerunner 935 within its compatible devices, so I cannot test it in my watch. Now I want a 945 LOL