-
I just tried the nRF Toolbox for bluetooth LE. I was able to get HR, but nothing else
That will work after sending one message to initialize the stream. Afterwards all the data is send just like HR. That is oficially documented. See here for SDK https://github.com/polarofficial/polar-ble-sdk
As said I did this in a python program some time ago and it was pretty straight forward. Was just a few lines. For someone familiar handling blluetooth on bangle that should be very easy.
If someone wants to try, I'll go try to find my old python program.
Or maybe just look around on the net, I am pretty sure I am not the only one that did that.
Maybe there is already js code. -
Do you have an Android device? Try "Polar Sensor Logger"!.
As far as I know not an official app, but one written by a polar employee privately.
Its an easy small app that connects with the H10,- can show all incoming sensor data graphically (HR, ECG, Acc)
- can record that data
- write the recording to a text file (that you can analyse, probably even with excel)
- can show all incoming sensor data graphically (HR, ECG, Acc)
-
-
-
Polar H10, as it seems it's going to provide the needed data, but if someone has other suggestions, I'm all ears.
I do use the H10 all the time and can really recommend it. Works with bangle and "Bluetooth heart rate monitor" out of the box for HR much more reliable than the optical sensor in bangle.
As said I got acceleration and also a very good Electrocardiogram (much more detailed heart information) via python and it should not be difficult to get this into bangle since it is broadcast in the same as HR or HRV (there is also an app for HRV) after initialization. -
Time is also limited here, but I certainly can give you some guidance.
I did use the H10 SDK in the past. It was very easy to get acceleration, HR, ECG.
More advanced features I did not get to work in limited time although that should also be doable.
Eg. start/stop/download the internal memory which can record some 24h HR on its own without smartphone. (Anyone has JS or python code for that? I would be interested)I will just extract the .fit files from the watch and use them in Golden Cheetah, to keep privacy
Did you manage to do that? Get the interesting information out of garmin watch without cloud?
I gave up on suunto watches because that was not possible anymore at the time.but not running dynamics. This only comes if using a compatible chest strap with an accelerometer
Do you have such a compatible chest strap? Then you can wear garmin in your experiments and produce a fit file as "ground truth" reference for the information you finally want to extract from the bangle sensor. Such reference helps a lot in development.
-
Good, keep us up to date about your findings.
Next idea: Another bangle (eg. if you have a bangle 1 laying around) strapped to the ankle could do the trick also instead of a puck. And there is already SW to record the ACC data for first tests.
So for a very first test you could just use the bangle you have, strap it to the ankle, record ACC data with recorder ( don`t know what frequency is available and necessary. I guess you want at least 5-10 measurements per step) and visualize the result (if you are not a programmer, excel will do at first).
I would assume the time of contact is very clearly visible and the acceleration in forward swing has a clear correlation to stride length - which could even be calculated pretty accurately with a biomechanical model (big word for simple thing given that only two 2d joints are really involved at any given time) -
-
the accelerometer might be the only sensor needed to get all the other data that I'm interested in
Correct, but there needs to be software to convert the raw sensor signals to what you want. If that is done in the garmin watch, you cant use it for bangle. And if nobody writes that for H10 your out of luck also, even if all you need is implicit in the raw signal - but you need it explicit.
To get a desired information its important what sensor, where placed and how processed.
With the right sensor at the right place processing can be near trivial, otherwise difficult or impossible.
For HR or HRV measuring electrical signals near the heart (what the chest belt does) gives very accurate and very easy to process signals and is not very sensitive to movement. In contrast Optical measurements at the wirst (PPG) is pretty difficult to interpret and very sensitive to movement. Which is why bthrm is much more reliable in principle, not only because of difference in software sophistication.
Now to acceleration data. The more direct to the source of movement it is connected, the better the results, the simpler the software can be. I used to have a suunto footpod attached to the shoe. There foot contact is near trivial to detect and very precise, as would cyling frequency and the like have been. Compare in contrast the movement of your wrist, which is decoupled from the foot by a large number of joints, so to measure those things with bangle directly (which has ACC) would be at least very involved, maybe impossible.
Chest is somewhere in the middle here, but if you are not a beginner and running/cycling smooth I guess your hip does a lot of decoupling.
What does that mean? Golden Cheetah (great program, used it in the past together with TACX data) will not do the trick alone - except garmin does the calculations in the chest belt, possible but I doubt it, and sends the results in a documented format over BT characteristics, again possible but I doubt it.
If you can find a documentation about what the garmin sensor does send over bluetooth characteristics or even better a github repository with example code, that would be great. Otherwise you probably need to assume you can't use those features, maybe not even have access to the raw ACC data as we know the H10 provides. You also can try to find a github with open source code to extract what you want from H10 data.
If you have found one of those I can help to make it work together with bangle or Cheetah. -
For those "smart features" is says "with compatible smart watch".
I would guess the processing from Accelerator data to semantic features is done in watch, not chest.
The H10 also has a accelerometer. I know from own experience that this is easy to get (did it with python program on PC, but should be pretty easy from bangle as well).
Now the question is if and how the analysis can be done for the features you want.
Stride time might be pretty simple, which could give stride length together with smoothed gps from bangle or phone, etc. -
For me and my wife "Adjust Clock" solved the issue completely.
Almost no more drift during the whole year. So the offset seems to be pretty fix and not influenced by temperature much (at least on the wrist when outside and within range of room temperatures inside). Before she had 3-4 minutes a month. -
Unless we saved the key on the watch ... but I'm a little out of ideas.
What about storing the key only in RAM and only when connected to the phone?
So the phone stores and provides the key. Shortly after they get separated the key is deleted on the watch. As soon as they are close by again the phone provides the key to the watch again.
This assumes that you only need to watch=decode the data while you have your phone with you. Going to a run and storing=encoding data could be done without phone still using asymmetric keys.That should be safe as long as the phone is not stolen together with the watch .
-
-
-
Wanted to share the following observation and ask maybe other users to share their ppm value.
- Its about two bangle2 from kickstarter.
- On my watch I did set the time beginning of May and noted the deviation about every week. There were rainy cold weeks and very warm ones like the last. Sometimes I did wear the watch all the time, other times not for several days.
- For the watch of my wife I measured the deviation since a good week ago.
To my surprise all deviations were about 70 (+-2)ppm!
So maybe temperature has not such a big influence?
Is it a coincidence that the two watches do have such a similar constant - or were might this systematic deviation stem from? (which after all makes about a whole minute every 10 days)And thanks for that widget. With so constant deviation we are looking forward to a pretty exact watch time in the future :-)
- Its about two bangle2 from kickstarter.
-
Thanks a lot!
- Indeed, download with app loader worked immediately (wasn't aware of that option, always used IDE so far)
- Also 0.27 works as intended. Possible reason why it didn't before: number was at 5 and I manually increased it to 6 before start recording (see next point). So it used that. Looks like you set the date filename with the new button after you detect a conflict?
- Could this conflict menu made optional somehow? I personally never have used the Overwrite/Append/No, so its always "new". Besides the extra tap I always am a bit afraid to accidentally overwrite/append given the small buttons. So I typically manually increased the number before start (some more taps). With the date format I was hoping to get rid of that fear and taps - just start recorder with one tap.
If this is only me interested in or difficult: don't mind. I plan start/stop recorder from within a watch face/own app anyway and saw I can force new in the api, so should be fine
WIDGETS["recorder"].setRecording(true, {force:"new"/"append"/"overwrite")
Pretty happy to get dates instead of numbers here.
- Indeed, download with app loader worked immediately (wasn't aware of that option, always used IDE so far)
-
-How do I activate this?
I installed recorder 0.26 (seems to be the same on dev and regular in the meantime, dev doesn`t offer update), and did a recording. Came out as numbered.
Do all numbered recordings need be deleted?
I do have one still on the watch that IDE doesn't manage to download (it was the longest, so too long probably?!)
-Any hints for the easiest way to get this long recording? -
-
FYI: just checked here with kickstarter bangle2: HR is 10bpm(+-2) below chest belt in rest
with Firmware 17.93 (already binary blob, right?) and current stable 18.00.
With older firmware it was pretty exact at rest. So looks like this is a reproducible general effect.
Glad you already have an idea about the cause. -
I guess you not think of GPS but double integration of acceleration.
Be warned, that is very difficult - basically an ill posed problem for several reasons!Main thing is that every sensor is noisy. Integration amplifies this noise, so you will have wrong speed. This will change your location all the time without bounds, even if in reality you are standing still. So after double integration you will have very big error after very short amount of time.
The only way you have a chance to get reasonable location from accelerometer is to make use of some other constraints.That could be the Magnetometer if you operate quite close to a strong magnet, but no way to count on earth magnetic field (lots of noise from all kind of metal and fields in the environment)
Depending on what you want to do, you might think of instead make use of the gravity, since this is something that can anker you. But of course only if you can discriminate gravity and acc through some other constraints or system model (not magnetometer unfortunately).
All this is not specific to bangle but true even for much more expensive sensors.
-
For just HR the bangle recorder works just fine.
which apps do you use for ECG analysis, Jukka Happonen's?
Yes, I use this for recording ECG on the go.
Locally I use a python app that gets all the data streams on a desktop computer, shows stores and analysis it there. The communication part looks pretty simple "just" initializing and receiving Bluetooth characteristics. The basis was from a blog post example. That link doesn't exist anymore though - just checked. There were a number of options at the time, so I think you should find several examples in the net somewhere.To me that looks all pretty basic BLE stuff (without being an expert) that I have seen similarly in bangle sw. So I guess it would be easy to write an bangle app for ECG and ACC, maybe even stop/start offline recording in the sensor.
For ECG/ACC maybe just expanding BLE Heart Rate App a bit with additional characteristics.Is Polar's SDK open source?
Yes there is a open SDK for Android. Its not complete though. All basic stuff is in there, including downloading the internal memory (H10 can record HR without device, not ECG though).
https://github.com/polarofficial/polar-ble-sdkCould EGC and the 2 Bluetooth devices support be implemented with open source?
ECG yes.
When I checked last I found no way to activate the 2 connection feature open source, but that may have changed (approx 2 years ago). As far as I understand it can be used open source once activated with proprietary app.Any source of documentation would be appreciated.
Just google a bit. As said my original source is no longer online, but I could find a number of projects on github immediately, including swift or ROS.
Eg:
https://github.com/kylehovey/polar-h10-ecg
https://github.com/wideopensource/polarpy -
I use polar H10. Very happy with it together with bangle.
It additionally can provide real ECG Data, HRV, Accelerometer.
There is already a bangle App for HRV.
Not yet for ECG and ACC, but that would be not very difficult.
So far I record this with an non-cloud Android app (the original polar is cloud only)
The H10 is able to send Bluetooth to 2 receivers at the same time (eg bangle and phone or workout machines) but I didn't use this so far because its difficult to activate without polar cloud. -
Is there a way to save this "Offline" HRM data and collect it, when banglejs and phone connect? Is this planned?
Not sure if you search specifically for a gadgetbridge HRM "cache" or any offline HRM while doing sports. Some thoughts on this (not knowing what you know already):
- There are a number of apps recording hrm offline like recorder or run app. But need to be started/stopped manually and later downloaded manually. I am not aware of an automatic sync. Typically you set them to sample hrm much more often than you might have set for the health app.
- For soprts the build in sensor is not very reliable with the current firmware. But Bangle can recieve chest belt signal and store this (or both) also offline
[see https://forum.espruino.com/conversations/372681/ for more information about PPG at rest / strong movement]
- There are a number of apps recording hrm offline like recorder or run app. But need to be started/stopped manually and later downloaded manually. I am not aware of an automatic sync. Typically you set them to sample hrm much more often than you might have set for the health app.
-
Try same in a dark room. If I remember right it will not turn off there. So I think its only the brightness that is measured.
That can be beneficial for isWorn, but only in one direction: not worn if bright, but unknown if dark.
And yes, those values are readily available. (eg see https://forum.espruino.com/conversations/384077/#comment16877590)
Exactly. That is in g, so in the picture set to 2g.