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


https://learn.adafruit.com/clue-step-cou...t-lsm6ds33

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:

https://fellrnr.com/wiki/Stryd

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

https://play.google.com/store/apps/detai...r&hl=de_CH

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.
  Reply
#12
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:


https://www.ncbi.nlm.nih.gov/pmc/articles/PMC6732081/


https://www.dcrainmaker.com/2019/03/pola...eview.html


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:


https://github.com/PeterGamma


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.
  Reply
#13
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.

https://zwift.com/shop/product/zwift-runpod

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


https://forums.adafruit.com/viewtopic.php?f=65&t=166045


but the Pinephone would be the better platform for a open source bike computer or sports watch.
  Reply
#14
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.
  Reply
#15
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.
  Reply
#16
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.
  Reply
#17
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:


https://www.dcrainmaker.com/2013/05/pola...otpod.html




Here’s the easiest way to lookup which products support which Bluetooth profiles:
https://launchstudio.bluetooth.com/Listings/Search

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.
https://launchstudio.bluetooth.com/Listi...ils/101146

Oh, and here’s most (all?) of the current Bluetooth Smart profiles:
https://www.bluetooth.com/specifications/gatt/



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:

https://github.com/PeterGamma

Questions about Bike computers can also be asked here in DC Rainmakers Blog:

https://www.dcrainmaker.com/2020/01/comp...loton.html
  Reply
#18
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.
  Reply
#19
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:

https://forums.adafruit.com/viewtopic.php?f=65&t=166045

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.
  Reply
#20
But also in Python, there are great analysis tools, like the Python Heart Rate Analysis Toolkit:

https://python-heart-rate-analysis-toolk...start.html

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.
  Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Slarm64 on PinePhone [Unofficial Slackware ARM - 64 bit] acid andy 33 24,182 04-09-2024, 01:17 PM
Last Post: donchurch
Wink PINEPHONE not booting Touchwood 2 379 02-23-2024, 07:27 AM
Last Post: Touchwood
  Slack on PinePhone Adam Seline 5 5,302 12-20-2023, 07:20 AM
Last Post: nickolas
  Struggle to install LibreOffice on the PinePhone Peter Gamma 48 23,610 11-24-2023, 07:02 AM
Last Post: Peter Gamma
  Which word processor to choose for the Pinephone? Peter Gamma 8 1,886 11-23-2023, 01:06 AM
Last Post: Peter Gamma
  openSUSE for Pinephone Alefnode 75 100,954 11-17-2023, 08:37 AM
Last Post: Uturn
  Using Signal on PinePhone in mid-2023? dante404 45 12,632 11-17-2023, 04:23 AM
Last Post: Kevin Kofler
  Genode- Sculpt OS for the PinePhone (non Linux) Surehand53 1 926 11-04-2023, 07:23 PM
Last Post: tllim
  Abiword as a office mobile word processor for the Pinephone? Peter Gamma 11 2,080 10-24-2023, 08:57 AM
Last Post: Peter Gamma
  What File Manager Options Are There For The Pinephone? pinephoneuser22 7 2,302 10-18-2023, 08:37 AM
Last Post: luppivega

Forum Jump:


Users browsing this thread: 1 Guest(s)