An iOS framework to read data from a Dexcom G4 Share receiver over Bluetooth.
The Dexcom Share app interacts with a G4 Share receiver via BLE to read continuous blood glucose data. The app displays that data in real-time, and uploads it to the Dexcom Share servers immediately.
Dexcom, in an absurd nod to obsolete FDA device classification rules, does not add the data to HealthKit until 3 hours later. For another iOS app to access the data in real-time, one option is to add unnecessary network hops and poll the Dexcom Share servers using ShareClient. Another option, presented here, is to spy on the Bluetooth communications between the Dexcom Share app and the G4 Share receiver.
This project is designed to be used concurrently with the official Dexcom Share app. It does not pair with the receiver nor send commands to read data. Rather, it passively listens to the Share app's Bluetooth communications with the receiver.
To use, instantiate a Receiver
and assign it a delegate which adopts the ReceiverDelegate
protocol.
To see its use in a real app, see Loop, an iOS app template for building an artificial pancreas.
This project leverages the hard work of many others, particularly:
- dexcom_reader by @compbrain
- decoding of the G4 receiver's packets
- openxshareble by @bewest
- port of dexcom_reader and the G4 Share BLE protocol to Python
- xDrip by @StephenBlackWasAlreadyTaken
- port of dexcom_reader and the G4 Share BLE protocol to Android
- xDripG5 by @loudnate
- decoding of the Dexcom G5 BLE communications
This project is neither created nor endorsed by Dexcom, Inc. This software is not intended for use in therapy.