Bluetooth low energy & ANT+ sports sensors Pinephone distro?
Adafruit has excellent open source BLE software, for instance for the Pyloton open source bike computer. But there is also a Adafruit step counter:

Garmin is marked leader for optical heart rate watches and GPS watches, and has also step counting support. Step counting is most accurate with a foot pod, which is mounted on your foot, like the stryd foot pod:

But software support for step counting from Adafruit and from Garmin is poor. Adafruit has no option to sync the step counting devices to a PC. And Garmin removed the number of steps during an activity from Garmin Connect. I suppose because of user complaints about inaccuracy.

But step counting can be done very accurately. The android application a training tracker

can count steps from ANT+ foot pod, and a training tracker counts steps very accurately, I ve tested it and it is very accurate and impressive. But a training tracker offers no synchronization of steps to a PC.

An implementation of a highly accurate step counter with a foot pod on the Pinephone would be better.
The accuracy of sports heart rate sensors doday is near to the accuracy of ECG devices, which are the most accurate devices on the market, which is scientifically validated:

Polar H7 BLE chest strap, Polar OH1 BLE optical heart rate sensor have an accuracy wich is near to an ECG device, and the Stryd foot pod is the most accurate foot pod on the market, which can be seen in the above mentioned review.

These devices are very accurate, which makes them attractive not only for sporting activites, but also for biomedical and scientific purposes.

The problem is that Garmin does not allow an easy access to sports sensor raw data, which is not satisfying for biomedical and scientific purposess. An implementation on the Pinephone could solve these problems. And an implementation on the Pinephone could also solve the problems of people who had to deal with closed, unfriendly and ego ANT+ developers, as it is described above.

I put together a list of all currently available devices and tools for low-cost high quality pysiological sensors I know and which are of interest to me personally here:

I m not a professional software developer, and I m doing this review for fun and in my spare time, and it is non-commercial. It is diffucult to make money out of these projects, since only few are interested in these.

It is for sports men, yogis and scientists and all other people who love experimenting which such pysiological sensors and want to know what can be done with those. The Pinephone would be a great hardware platform for these sensors, and I hope to find new friends in the Pine64 community. Allmost all software is there, and it needs a bit experimenting and debugging of all the posibilties. I m interested on the long-term in this project.
The Styd foot pod is very accurate, and does not need to be calibrated, but it is expensive. The Zwift run (formerly Milesone foot pod) is also BLE and costs much less. When calibrated, the accuracy is near to a Stryd foot pod, see the feview of the Stryd foot pod mentioned above. DC Rainmaker, renowned reviewer for sports watches uses a Milestone foot pod.

The Pyloton open source bike computer is Arduino compatible, and can be streamed to Matlab or Python through usb:

but the Pinephone would be the better platform for a open source bike computer or sports watch.
The important question for interacting with these devices from anything other than their manufacturer's app is whether they work with just the standard BLE profile interfaces, or with other openly documented interfaces. If they don't then you'll have to spend time reverse engineering them, or (more likely) getting one that does.
I have not yet looked in detail at the code of the Adafruit open source bike computer. But the code is well explained and documented. The pyloton can deal with heart rate, speed and cadence, and I suppose that they are using standard BLE energy protocols. I would be suprised when Adafruit would use non standard protocols. And I suppose it should be possible to add new BLE protocols, for instance for stride sensors, to make the device also attractive for non bikers. The Adafruit instruction is really excelllent, and it s worth looking at it.

added comment:

The Adafruit Pyloton is an open source bike computer, therefore I suppose no reverse engineering of the software is necessary. Thanks, Wibble.
If there's an open, documented protocol for BLE then it should be relatively easy to add support for receiving the data. That would apply to the Adafruit pyloton code, the PineTime, an Android phone or more generic linux device. I'm basing this on having had a look at the standard GATT profiles, and some of the code that uses them on the PineTime end and GadgetBridge (an open app for Android that communicates with several watch / fitness tracker devices.

What I meant about use with ONLY open protocols is at the sensor device end - heart rate monitor, step counter, cadence sensor etc. It's not unknown for them to use proprietary protocols for some necessary step in setting them up. For example some of the devices supported by GadgetBridge need to be paired first using the manufacturer's app (I think - I forget the details because they weren't devices I was interested in.) In that case you wouldn't be able to use it with pyloton because you wouldn't be able to pair with it.
I think it is best to test the software first on the Pyloton clue. I have currently no plans to do this, but I m interested on the long term in this project, until my final breath I take in my life.

I m currently using the android app a training tracker. I managed to record .csv data from BLE sensors with a training tracker, which really is a present from heavon to get such raw data in the Garmin .fit file world.

It works best when pairing the sensors fist to the smartpone via BLE in the settings. Then the app has an additional search engine for BLE.

I also discussed with DC Rainmaker about BLE. ANT+ is a well established standard. But almost all ANT+ protocols are also available for BLE:

Here I just copy and paste some infos from the DC Rainmaker s blog:

Here’s the easiest way to lookup which products support which Bluetooth profiles:

Type in something like ‘Polar’, then find a product, and you can open it up and look at all the official device profile names. Though, some of these don’t seem certified well (like this Polar H9 which doesn’t transmit running cadence/speed), but that’s aside from the issue.

Oh, and here’s most (all?) of the current Bluetooth Smart profiles:

Correct, there are a number of ANT+ profiles not in Bluetooth Smart, for example cycling radar or ANT+ lights, or even a draft ANT+ Aero sensor profile.
It’s not so much a case of skill, but rather whether its ANT+ or Bluetooth Smart, it’s a committee of companies that agree upon the exact nuances of how a specification is implemented. Typically profiles take 1-3 years to formalize and ensure they meet the needs of everyone (read: the companies and the specific products they’re trying to make).
Ultimately, the core profiles for a sports watch as I see it are:
ANT+ & Bluetooth Smart Heart Rate
ANT+ & Bluetooth Smart Cycling Power
ANT+ & Bluetooth Smart Running Footpod (Stride sensor)
ANT+ & Bluetooth Smart Cycling/Speed Sensors (this is technically three different types of sensors: Speed-only, cadence-only, and Speed/Cadence combo).

DC Rainmaker is really t h e expert for bike computers, and his information where very helpful to me personally, although I needs time to work yourself through all that information which I currently don t have.

But DC Rainmakes seems also to be interested in BLE stuff, and I hope I will give further great answers to that subject in the future in his blog.

I put links to my contributions to ANT+ and BLE sensors projects here:

Questions about Bike computers can also be asked here in DC Rainmakers Blog:
Looking forward to the day when the Pinephone BLE wearables and bike computers are better than the Garmin wearables and Bike computers and replace them.
When GNU Octave runs on the Pinephone, which is good news, since neither Matlab nor Bitalino OpenSignals software runs on the Pinephone, I suppose the easiest way to start a Pinephone Bike and Sport watch project would be to connect the adafruit Clue via usb to the Pinephone, and run the Octave toolbox mentioned in the Adafruit community on the Pinephone:

but also this needs to be tested due to the usb issue of the Pinephone. Neither Bitalino biomedical toolkit nor Scott Hardens, PhD. Sound card ECG have a mobile data processing software.
But also in Python, there are great analysis tools, like the Python Heart Rate Analysis Toolkit:


Sensor raw data can be used for calculating heart rate variability or respiratrory rate in Matlab.  But I don t know whether it is possible to get sensor raw data from the Pyloton bike computer. I suppose the code for the Pyloton needs to be extended for this.

Possibly Related Threads…
Thread Author Replies Views Last Post
  What File Manager Options Are There For The Pinephone? pinephoneuser22 3 112 05-28-2023, 02:16 PM
Last Post: pinephoneuser22
  Article: Inside a Smartphone Accelerometer: PinePhone with NuttX RTOS lupyuen 22 3,101 05-28-2023, 06:09 AM
Last Post: lupyuen
  PinePhone app development WhiteHexagon 14 659 05-17-2023, 10:41 PM
Last Post: Kevin Kofler
  When should new OS's like Genode & NuttX RTOS get their own PinePhone subforum? PineFone 1 259 05-17-2023, 06:38 PM
Last Post: lupyuen
  Article: NuttX RTOS for PinePhone: Phone Calls and Text Messages lupyuen 2 331 05-03-2023, 05:03 PM
Last Post: lupyuen
  Bliss OS on pinephone lcayer1 5 4,840 05-01-2023, 11:33 PM
Last Post: erickonix
  Fedora on Pinephone pasifi808 7 618 04-28-2023, 06:32 PM
Last Post: zetabeta
  Article: NuttX RTOS for PinePhone: 4G LTE Modem lupyuen 2 537 04-10-2023, 10:19 PM
Last Post: lupyuen
  Article: NuttX RTOS for PinePhone: USB with Enhanced Host Controller Interface lupyuen 2 648 04-07-2023, 03:47 AM
Last Post: lupyuen
  Slack on PinePhone Adam Seline 4 3,692 03-23-2023, 12:03 AM
Last Post: hall

Forum Jump:

Users browsing this thread: 1 Guest(s)