What about Bluetooth?


Running Speed and Cadence Specification 

This project only uses ANT+ because I only needed to get the treadmill speed and distance to Garmin watches. Bluetooth is definitely an option; although, and it might not be too difficult given the example provided in the nRF5 SDK.
examples/ble_peripheral/ble_app_rscs
It looks like the examples were written for boards other than the NRF52840 Dongle so some of the steps in the upcoming Porting an Existing Project post will also apply here. This is a good spot to note that I haven't tested any of this so it's more of a thought experiment to how I'd approach it. We do have an Apple Watch in the family device lineup, so maybe I'll get back around to trying to make Bluetooth work.

The Bluetooth specification is called Running Speed and Cadence (RSC) and being the first Bluetooth specification that I've ever even skimmed through, it was a little more difficult to follow than the ANT+ SDM profile. Fortunately, I eventually found the details of an RSC Feature:
The RSC Feature characteristic is used to describe the supported features of the Server.
and RSC Measurement:
The RSC Measurement characteristic is a variable length structure containing a Flags field, an Instantaneous Speed field and an Instantaneous Cadence field and, based on the contents of the Flags field, may contain a Stride Length field and a Total Distance field.
So this is looking very similar to the ANT+ SDM profile. Although the Instantaneous Cadence Measurement is marked as Required whereas cadence is optional in ANT+ SDM. So this might cause slight headaches down the road because this version of the treadmill SDM has no concept of cadence, but I already talked about that in the last post.

The SoftDevices

When it comes to Bluetooth there are two SoftDevices, or prebuilt protocol stacks, that would work. For Bluetooth only, there's the S140 SoftDevice. For dual ANT+ and Bluetooth, there's the S340 SoftDevice. For the S340, you'll need to be an ANT+ Adopter, the same as with the S212 SoftDevice for ANT+ only.

To Wrap This Up

Supporting the Bluetooth Running Speed and Cadence Profile instead of or in addition to the ANT+ SDM Profile looks like it's definitely possible with the NRF52840 Dongle. Of course, the devil is always in the details and there were certainly some small details that worked out in unexpected while making this project work just with ANT+. Next time I'll talk about taking an example project from the nRF5 SDK and porting it to fit our needs.

Comments