Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initial support for libre pro. #2075

Merged
merged 4 commits into from
Apr 27, 2022
Merged

Initial support for libre pro. #2075

merged 4 commits into from
Apr 27, 2022

Conversation

tzachi-dar
Copy link
Contributor

Based on information and code that I have received from @keencave

This is not tested as I don't have libre pro sensors.
Would be nice if someone with such a sensor can check this.
Should work with direct nfc scan or devices like miaomiao.

Can be downloaded from: https://drive.google.com/file/d/1VGVvnx-ktEsvHfuxSHm9RJ8KsJtWuIsF/view?usp=sharing



// Get the trend data for libre1/2
private static ArrayList<GlucoseData> parseTrendData(byte[] data, int sensorTime, long sensorStartTime, Long CaptureDateTime) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

parseHistoryData and parseTrendData are almost identical with the exception of the index (26 vs 27) and data size (16 vs 32). To reduce code duplication these two functions could be merged.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@gui-dos I've just compared parseHistoryData and parseTrendData and the code is identical with the exception of the two mentioned cases. These can be parameterized. If the Libre Pro history ist totally different than something else should be implemented.

Copy link
Collaborator

@tolot27 tolot27 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Will it fix #1329?

@tolot27 tolot27 linked an issue Apr 13, 2022 that may be closed by this pull request
@keencave
Copy link
Contributor

It should fix #1329. As referenced there the LimiTTer transmitter supports Libre Pro. That code base was used for this PR.

@tzachi-dar
Copy link
Contributor Author

I think that parsing the history is not realy feasible. We are using devices like miaomiao and their fw needs to change in order to support that. From what I read in their website they do not support history as well.

@keencave
Copy link
Contributor

I agree on history readings. The need to have modified firmware in the given transmitter models to even access the history data structures is not feasible.

@prakashdevadas69
Copy link

Hi,
I tried but was not able connect to Libre Pro and Miao Miao 3
It was stuck with collecting initial data
3B487B81-F445-4952-8237-3818927EF3A5

@tzachi-dar
Copy link
Contributor Author

Can you please see what you have in your logs?
Please go to the 3 dots on the right, press view events log and let us see what you are getting.

Thanks
Tzachi

@prakashdevadas69
Copy link

prakashdevadas69 commented Apr 13, 2022

This is the log..I have also uploaded log..
69B95279-3438-4825-8EEE-27B2DC7AC749

@tzachi-dar
Copy link
Contributor Author

There was a problem with the checksum.
Please try again, I think that I have found the error.
https://drive.google.com/file/d/1VGVvnx-ktEsvHfuxSHm9RJ8KsJtWuIsF/view?usp=sharing

@prakashdevadas69
Copy link

Still stuck at receiving data
3613211B-EEC7-4F84-B3FB-A9ED4E6C5FA4

@prakashdevadas69
Copy link

After stopping sensor and restart sensor got this
7A267908-D7B0-45E6-8C85-D9A6B50ED672
95FE52D0-0D09-4FCB-957F-6EAA9B7684C6

@tzachi-dar
Copy link
Contributor Author

tzachi-dar commented Apr 14, 2022

Good thing is that the logs show that you have received two different points, so we are making progresses.

Next step is to enable more logging, collect data of 30 minutes, and send it to me:
Please go to settings->less common settings ->logging->extra tags for logging and add there:
"BgReading:d,jamorham librereceiver:v,LibreOOPAlgorithm:v,jamorham nsemulator:v,DexCollectionService:v"

Than please press on the 3 points on the right side, import export features->export database.
When back is complete, please press share and send it to tzachi.dar@gmail.com

There is also a chance that if you wait longer it will ask for calibration, but I guess that I'll know more once I'll receive the logs.

@tzachi-dar
Copy link
Contributor Author

A short update.

The latest version has been working well on libre pro sensors. I have added more checksum checks and more tests to see that nothing is broken.

Here is a link to the latest version:
https://drive.google.com/file/d/1ORxDCa-A9Aig3cv3zUjKgXuNOr9qNbVX/view?usp=sharing

@saurabh1480
Copy link

Thank to all developers for libre pro version for india,thabk you very much from all

@Navid200
Copy link
Collaborator

@saurabh1480 Does it work?

@prakashdevadas69
Copy link

@saurabh1480 Does it work?

Yes it does work like a GEM..!!..thank you for making this change..

@Navid200
Copy link
Collaborator

Thanks go to @tzachi-dar and @keencave

@jamorham
Copy link
Collaborator

Please confirm this is tested and ready for merge? I have other changes relating to Libre so I will merge this first if its looking good. @tzachi-dar

@prakashdevadas69
Copy link

Please confirm this is tested and ready for merge? I have other changes relating to Libre so I will merge this first if its looking good. @tzachi-dar

Yes..XDrip is working fine in all aspects with libre pro..
Thank you .. and you may kindly merge with main release

@jamorham jamorham merged commit 7c0ef79 into master Apr 27, 2022
@terra-alex
Copy link

terra-alex commented Jun 7, 2022

Just a quick comment on this - can we still not get history values from the libre pro? It seems there are a few major caveats with the current code for it

  1. The trend value only returns a single reading
  2. The history values are not being processed (the manual reader seems to be able to read up to all 14 days of data)

This means that we'd have to keep scanning the sensor? Since this is only the instantaneous reading within the last minute, whereas the whole point of the sensor is not to need to scan it all the time

@tolot27 tolot27 deleted the tzachi-libre-pro branch May 30, 2024 19:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support Libre Pro sensors
8 participants