upetersen / libremonitor Goto Github PK
View Code? Open in Web Editor NEWMonitor your Freestyle Libre
License: Apache License 2.0
Monitor your Freestyle Libre
License: Apache License 2.0
Hello,
I built a limiter myself.
Some questions:
Regards,
Hugo.
In SensorData.swift file
let headerRange = 0..<24 // 24 bytes, i.e. 3 blocks a 8 bytes
let bodyRange = 24..<320 // 296 bytes, i.e. 37 blocks a 8 bytes
let footerRange = 320..<344 // 24 bytes, i.e. 3 blocks a 8 bytes
self.nextTrendBlock = Int(body[2])
for blockIndex in 0...15 {. //The trendMeasurement function logic is
var index = 4 + (nextTrendBlock - 1 - blockIndex) * 6 // runs backwards
let range = index..<index+6
let measurementBytes = Array(body[range])
.......
Following is the byte array read through NFC from the Libre Sensor
-86 45 0 0 3 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 74 70 71 89 48 56 50 45 84 48 56 56 52 63 -36 73 102 -125 16 0 105 10 -64 78 20 3 -106 -128 90 0 -19 -90 26 127 90 -22 4 -27 -118 104 -46 2 -56 27 0 0 0 0 -70 40 -85 16 11 0 28 1 -35 67 -22 -60 -103 2 -44 67 -22 -40 90 2 -60 67 -22 -20 90 2 -59 67 -22 -64 -102 2 -66 67 -22 -24 27 2 -70 67 -22 -28 90 2 -75 67 -22 20 91 2 -75 67 -22 32 91 2 -82 67 -22 56 91 2 -80 67 -22 24 91 2 -87 67 -22 -8 -102 2 -26 67 -22 -52 27 2 -52 67 .......and more bytes
Note: Bold ones is at 26th position, i.e, body[2], (24 bytes for header & 2nd byte in body)
self.nextTrendBlock = Int(body[2])
=> since body[2] = 71, therefore nextTrendBlock = 71.
var index = 4 + (nextTrendBlock - 1 - blockIndex) * 6
=> index = 4 + (71 - 1 - 0) * 6 = 424
Here, the index comes to be 424, but the bodySize is expected to be 296 bytes, i.e., out of index.
So I am concerned here if
a) The byte layout has changed since this code was first written.
b) Was this code developed for a fixed byte layout format.
PS: I used NFC to pull out data from the LibrePro sensor.
I created this issue only to thank you UPeterson.
My current INO file it's very different but finally working now !
Your layout helped me go to there.
I had to remap the original pins: http://www.rfdigital.com/wp-content/uploads/2014/03/rfduino.ble_.programming.reference.pdf and probably it's one difference comparing to Simblee.
I wanted the pins on the same configuration as yours because fits perfectly on BM019.
Best regards,
Hugo.
Not so much of an issue as a question. Our project is looking to use the same algorithm in an iOS application. is there any reason it could not be ported to Swift? Also, in case the owner of this repo is available for such work, please hit up peter a-t viv d-o-t co, thanks!
Hello,
I already connected all wires on a breadboard (RFDuino + NFC-BM019).
I saw a lot of compile issues on your RFDuino ino version so I downloaded the original one and replaced all Simblee references to RFDuino. Compiled and uploaded to the hardware.
My Android App (that previous worked with Limitter, so the main difference should be the UUID address) is never notified but I also noticed that the NFC chip have the light always fixed.
On my previous version (based on Limitter), the light is off when is sleep mode and turn on when is reading.
PS: I already checked the wire connections over and over again.
Regards,
Hugo.
Hello,
I made 2 tests with a full charged batteries:
Do you think this is a normal behaviour ?
Regards,
Hugo.-
Thx for your amazing work. I am working on a raspberry pi version, your code is my basis to communicate with FreeStyle. I wonder if you have links for more details about the protocol. Glimp (closed source) can indicate for example if sensor is outdated...
My goal is to send datas directly to nightscout (not yet enough info to do that).
Could you indicate a switch lipo charger URL to appreciate?
The lipo link indicated is broken
I was hoping to get in touch and pose a few questions about your work and how it relates to LiberOOPAlgorithm. But I fail to find any contact details. Twitter/E-mail?
Hi!
I'm a IT student at the IT-university of Copenhagen. I'm about to write my master thesis about diabetes and how technology can support parents with children diagnosed with diabetes.
I have a question regarding the code which scans the NFC tag from the Freestyle Libre Sensor.
I can't seem to find the files for the Arduino, where the actual scanning and processing of the NFC dataset from the sensor to the Arduino is done.
The goal is to develop an iOS application, which can scan the NFC tag directly from the Freestyle Libre Sensor, instead of sending it over bluetooth.
Best Regards,
Jakob
Hi Uwe,
As I said before, I was able to run the app from the version you indicated, but I can not get the app to show the blood glucose level, blocks, status and start of the sensor, and the graph with the measurements. I see in the Arduino IDE that the BM019 reads the sensor and sends, via Simblee, the packets and information so much that I can see the ID of the BM019, the sensor ID and the ambient temperature and voltage, as in the image below. I'm not using lipo, I'm using the USB cable on the Mac.
I did the tests with some sensors, already expired and with an active sensor that my son is using.
If you need more information, just talk.
I'm grateful for your help.
Thank you,
Jorge
Hello,
After several weeks of delaying, I finally got my RFDuino (similar to yours).
How did you safely remove the plastic from the pins to attach on the NFC board ?
Regards,
Hugo.
This is regarding reuse the sensor but with another ADC device . Since the clever bits of libre are the pt-ir skin sensor , and the current measurement pads are exposed ,is it possible to read them using another current measurement op amp and ADC?
Since the sensor just wears out when the reagents are used up (and it seems to be software locked to 14 days) would interfacing directly with the sensor be a viable way to extend the life of sensor?
My embodiment of this idea is to use a hacked /normal finger prick meter to actually measure the sensor still stuck to the skin.
Sure its not a flash CGM but its 90% there. Apologies in advance if not correct forum.
Trying to understand how things work has always fascinated me and I found your "Libre OOP Investigation" very interesting.
You said:
To sum up: We have
a linear glucose response by the LibreOOP algorithm with respect to raw glucose variations, when raw temperature is kept constant, and a linear glucose response by the LibreOOP algorithm with respect to raw temperature variations, when raw glucose is kept constant.
In this case we can use a bi-linear function (as is, for example, used in linear finite element formulations):
z = a1 + a2 x + a3 y + a4 xy
These 4 constants can (relatively easily) be found if we have 4 known values of z for given x and y.
This might give us a smaller target to aim for in trying to find some clues in the header / footer.
From your investigation, it is clear that each sensor will have different values for these a1 to a4.
Perhaps we can find promising candidates in the header or footer.
Just for the record, the "traditional" "slope" and "offset" can be calculated for each raw temperature as follows:
offset[T] = a1 + a3(T)
slope[T] = a2 + a4(T)
Regards
jtx
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.