-
• #27
I guess that the vcare library is not open source?
Does the library also compute HR?Typically there are two separate parts, the low level driver stuff that can turn on/off the led(s), setup the sensitivity, detect proximity (=you are wearing it)
and once you get stream of data there is higher level heartrate algorithm library you feed the data to that gives you heart rate.The lower level part is not a problem to have open source, the information comes from datasheet or sample code available or reverse engineering. We found enough of this for VC31 (well, except the datasheet).
The higher level comes as static library that can be linked to the project and is not opensource. This is of course not usable for us and is probably even not worth it.
Previously I had same experience with PAH8001 (DS-D6) and HRS3300 (many other watches) - same structure, very similar library where you feed sensor data and accelerometer x,y,z periodically and after some time it starts giving you heartrate.
As for VC31 the manufacturer page is http://www.vcaresensor.com/ and there was even VC31 subpage some time ago but it gives 404 now. When I tried to contact them (months ago) for more information via their contact email I got no reply. Fortunately someone published enough information on github as part of his hardware project that includes this sensor. There is even the high level closed source library. But still, this can be used just as a reference. Not sure if the library would even link correctly with nrf52 build.
-
• #28
Hi @fanoush, I have followed your work closely in the past. I can see that this is a collaboration among the best experts in reverse engineering watches there are around 😀!
As far as I understand what you are saying, the driver is just an implementation of the I2C protocol, and you have reverse-engineered it. Quite an achievement without a datasheet.
As for the higher level library, the reason why you do not want to use it is because it's not open sourced?
In any case, the fact that it requires acceleration is an indication that it makes use of it to probably discard data that is corrupted by movement. We could probably record some raw signals, including acceleration and PPG and put them in a repository for benchmarking different versions of algorithms. We would also need a reference heart rate for that, which we can obtain from another device, like a Polar or similar. Then we could invite people to test their best algorithms in some sort of competition...
I am working on an HR detection algorithm with students, but using the PPG from a smartphone. As the problem is similar, I may try to include data from the BangleJS as well. I'll keep you informed.
-
• #29
As far as I understand what you are saying, the driver is just an implementation of the I2C protocol, and you have reverse-engineered it. Quite an achievement without a datasheet.
Fortunately as I mentioned there is also the stuff found on github with C source and headers that describes registers but it is combined effort, yes, before this appeared there already was some VC31 reverse engineering done by @Gordon, also the source in Espruino tree regarding Bangle 2 is all his. This watch was independently discovered by more people so some collaboration is here https://hackaday.io/project/175577-hackable-nrf52840-smart-watch , the Q3 is a successor of Q2 https://hackaday.com/2020/01/30/sma-q2-smart-watch-is-completely-hackable/
the reason why you do not want to use it is because it's not open sourced?
cannot talk for Gordon and Bangle.js but yes, I think it is better to have one developed by community as the library is kind of black box and I hope over time we can have better one anyway like with the step counting
-
• #30
What's happened with the VC31 is I'd decompiled the original firmware, and had something working(ish) - but without register names it was basically impossible to work with.
As with @fanoush I tried to contact Vcare multiple times but never got a reply .
@fanoush managed to find a VC31 driver online somehow, and I took the register names there, what I'd learnt from the reverse engineering, and got something going. However I do wonder if the driver @fanoush found isn't also the result of decompiling too as there are some telltale signs in there...
the reason why you do not want to use it is because it's not open sourced?
I think legally I'm on slightly shaky ground pulling in a closed source blob and hosting it on Espruino's GitHub, but yes, also it doesn't look great and isn't maintainable. However I seem to recall that when I decompiled the code in question it didn't actually look that complex, so I may at some point go through it properly, try and get a full idea of what it's doing and then re-implement it.
Worth noting that the original watch claims to do blood pressure too, so potentially the algorithm could do that (although I'm dubious!).
Hi, I was wondering for Bangle.js V2 if the double buffered mode is full screen?
Yes. The screen is actually double-buffered by default now, so there is no specific screen mode :)
-
• #31
Ok thanks!
Hi, I was wondering for Bangle.js V2 if the double buffered mode is full screen?