The code for this project is on my GitHub (here).
While newer blood glucose monitors (BGM) have Bluetooth capability (BLE), they are often designed only to sync data to their own clouds. Many applications call for mixing glucose measurements with data like weight, activity, carb consumption from other apps to enable consumers themselves, coaching, or care teams to use the information directly.
This code pulls glucose measurements from a BLE-enabled BGM and stores in:
- HealthKit. Many apps and EHRs have HealthKit integration and can use HK as a channel to import glucose data.
- Open format. Developer can integrate into other database systems.
The code was developed using a Contour Next One BGM since it was found in a study published by the Diabetes Technology Society to be the most accurate of the set of 18 BGMs tested and one of the few to meet the FDA accuracy standard for glucometers.
The Bluetooth Forum developed a standard “GATT” profile for BGMs. Details can be found here.
Reads from the BGM are performed via its “Record Access Control Point (RACP)” characteristic. The code writes to RACP requesting data from the Bluetooth Glucose Measurement