Developing a CIQ BLE Client for Treadmill and Fitness Equipment

I want to run on my smart treadmill and get EXACT speed and grade information via BLE.  Previously, I created an Arduino ESP-32 solution running as a BLE server that runs on the treadmill.  This server works well with Zwift etc, so I know it works.  Now the plan is to create a CLIENT on my fenix-5.  Eventually, I want to save and thereafter load my treadmill runs into Strava.  In the far away future, I would like to control my treadmill from the fenix-5 (using watch buttons to speed-up, tilt up etc) .  In the far,far,far away future, I would like to automatically adjust treadmill speed and grade based on complicated pre-planned-workouts (intervals, hill repeat etc).

REFERENCE INFO

GATT SERVICES

Plan to read data from:

  • Fitness Machine Service UUID: 0x1826
    • Fitness Machine Feature Characteristic 0x2acc 
    • Treadmill Data Characteristic 0x2acd
      • 2902 Enable Notify Descriptor 0x2902
        • This is required so client gets more than one data point.
    • Supported Speed Range Characteristic 0x2ad4
    • Supported Incline Range Characteristic 0x2ad5
  • Keep Alive UUID

Long Form "standard" UUIDs take the form of 

xxxxxxxx-0000-1000-8000-00805F9B34FB
where xxxxxxxx is the zero-padded short-form uuid (see above)
E.G. Fitness Machine Service long UUID would be 00001826-0000-1000-8000-00805F9B34FB

  • Great job Chris! May I ask what your refresh rate and if you don't have problems with BLE signal quality and stability? We are developing app for Fenix 6 with our custom BLE sensor and we are facing issues with data communication. Have you tested your app also on Fenix 6 watches?

  • I missed your message from months ago.  I use the hex files as stated in the wiki here on getting started with ble.  As far as I know, Nordic provided them.  I just use them.

  • I have a number of apps that use various sensors and raspberry pi systems, and have never really had any problem, with any watch.

    Range wise, in the same room seems fine, but with one app, a couple of rooms away works to.  I often check the rssi to make sure it's at a good level before I try to pair.

  • Thank you Jim for your answer. I'm using Microchip's BM71 module and when I check transmitting data on my mobile phone everything is correct but on my Garmin watches it has problems with refreshing values. My current RSSI is -93 and this is probably source of my problems. I'll try to increase the transmit power of my BLE module.

  • That is mighty low.  In one of my apps, I insure -65 or above, which is pretty much "in the same room" with it.  In another, -80 or more, as it's got to go through a metal garage door.

    I can definitely see where -93 could be an issue,  Can you see what it is on the sensor end? I can with the pi.

  • The problem was really in the bad configuration of the BM71 module. I have selected class 2 of Bluetooth Power Profile. When I changed it to class 1 RSSI is from -65 to -86. Thank you Jim for your help.