Sample setup: Samsung S7, Dana RS, Dexcom G6 and Sony Smartwatch¶
Description¶
In this setup, the Samsung Galaxy S7 smartphone is used as control center of the loop. The slightly modified Dexcom App reads glucose values from the Dexcom G6 CGM. AndroidAPS is used to control the Dana RS insulin pump from Korean manufacturer SOOIL via bluetooth. Further devices are not required.
As the Dexcom App only offers limited alarm options the open source app xDrip+ is used to define not only high and low alarms but also additional alarms according to individual requirements.
Optionally an Android wear smartwatch can be used (in this sample setup the Sony Smartwatch 3 (SWR50)) to display glucose and AndroidAPS values on your wrist. The watch can even be used to control AndroidAPS (i.e. discreetly set a meal bolus).
The system works offline. This means there is no need for a data connection from the smartphone to the Internet for operation.
Nevertheless, the data is automatically uploaded to Nightscout ”in the cloud“ when a data connection is established. By doing so you can provide comprehensive reports for the doctor’s visit or share the current values with family members at any time. It is also possible to send data to Nightscout only when using a (predefined) Wi-Fi connection in order to profit from the different Nightscout reports.
Required components¶
Samsung Galaxy S7
Alternatives: see list of tested phones and watches for AndroidAPS
-
Alternatives:
Other pumps might be available in the future, see future possible pump drivers for details.
-
Alternatives: see list of possible BG sources
Optional: Sony Smartwatch 3 (SWR50)
Alternatives: All watches with Google Wear OS should work fine, for details see list of tested phones and watches for AndroidAPS (OS must be Android Wear)
Nightscout setup¶
See detailed Nightscout setup
Computer setup¶
To be able to create an Android app from the freely available AAPS open source code you need Android Studio on your computer or notebook (Windows, Mac, Linux). A detailed instruction can be found at building the APK.
Please be patient when installing Android Studio as the software downloads a lot of additional data once installed on your computer.
Smartphone setup¶
Check smartphone firmware¶
Menu > Settings > Phone info > Software info: At least ”Android-Version 8.0“ (successfully tested up to Android version 8.0.0 Oreo - Samsung Experience Version 9.0)
For firmware update: menu > Preferences > software update
Allow installation from unknown sources¶
Menu > Settings > Device security > Unknown sources > slider to right side (= active)
For security reasons this setting should be set back to inactive once the installation of all apps described here has been completed.
Enable Bluetooth¶
Menu > Settings > Connections > Bluetooth > slider to right side (= active)
Menu > Settings > Connections > Location > slider to right side (= active)
Location services (”GPS“) must be activated in order for Bluetooth to work properly.
Install Dexcom App (modified version)¶
The original Dexcom app from the Google Play Store will not work because it does not broadcast the values to other apps. Therefore, a version slightly modified by the community is required. Only this modified Dexcom app can communicate with AAPS. Additionally the modified Dexcom App can be used with all Android smartphones not only the ones in Dexcom’s compatibility list.
To do this perform the following steps on your smartphone:
If the original Dexcom app is already installed:
Stop sensor
Uninstall app via Menu > Settings > Apps > Dexcom G6 Mobile > Uninstall
Download and install the BYODA Dexcom ap
Start modified Dexcom G6 app, activate/calibrate the sensor according to the given instructions and wait until the warm-up phase is finished.
Once the modified Dexcom app shows actual glucose value, setup the warnings (hamburger menu on top left side of the screen) as follows:
Urgent low
55mg/dl
/3.1mmol/l
(cannot be disabled)Low
OFF
High
OFF
Rise rate
OFF
Fall rate
OFF
Signal loss
OFF
Install AndroidAPS¶
Follow the instructions to build the APK
Transfer the generated APK to your phone
Configure AndroidAPS according to your needs using the setup assistant or manually
In this sample setup we used (among others)
BG source:
Dexcom G6 App (patched)
– click cock-wheel and activateUpload BG data to NS
andSend BG data to xDrip+
(see BG source)
NS Client activated (see Nightscout setup)
Install xDrip+¶
xDrip+ is another mature open source app that offers countless possibilities. In this setup, contrary to what the developers first wrote the app for, xDrip+ is not used to collect glucose data from the Dexcom G6, but only to output alarms and to display the current glucose value including the curve on the Android home screen in the widget. With xDrip+ the alarms can be set much more individually than with the Dexcom software, AAPS or Nightscout (no limitation in the selection of sounds, different alarms depending on day/night time etc.).
Download the latest stable APK version of xDrip+ with your smartphone https://xdrip-plus-updates.appspot.com/stable/xdrip-plus-latest.apk - not the version from the Google Play Store!
Install xDrip+ by selecting the downloaded APK file.
Start xDrip+ and make the following settings (hamburger menu at top left)
Settings > Alarms and Alerts > Glucose Level Alert List > Create Alerts (high and low) according to your needs.
The existing alarms can be changed with a long press on the alarm.
Settings > Alarms and Alerts > Calibration Alerts: disabled (reminded via the modified Dexcom app)
Settings > Hardware Data Source > 640G/EverSense
Settings > Inter-app settings > Accept Calibrations >
ON
Menu > Start sensor (is only ”pro forma“ and has nothing to do with the running G6 sensor. This is necessary otherwise an error message will appear regularly.)
For more information about xDrip+, see here BG source page.
Example of an alarm setup¶
The ”Urgent low alarm“ (below 55 mg/dl resp. 3,1 mmol) is a standard alarm from the modified Dexcom app that cannot be disabled.
Tip for meetings / church visits / cinema etc..:
If ”Do not disturb“ mode is activated in the Samsung Galaxy S7 (Menu > Settings > Sounds and vibration > Do not disturb: slider to right side (= active)), the phone only vibrates during urgent low alarm and does not issue an acoustic warning. For the other alarms set up via xDrip+ you can select whether the silent mode should be ignored (acoustic sound played) or not.
Disable power saving option¶
On your Samsung Galaxy S7 go to Menu > Settings > Device Maintenance > Battery > Unmonitored Apps > + Add apps: Select the apps AndroidAPS, Dexcom G6 Mobile, xDrip+ and Android Wear (if smartwatch is used) one after the other
Optional: Setup Sony Smartwatch 3 (SWR50)¶
With an Android Wear smartwatch life with diabetes can be made even more inconspicuous. The watch can be used to display the current glucose level, the status of the loop etc. on the wrist. The watch can even be used to control AndroidAPS (i.e. discreetly set a meal bolus). To do this, double tap the CGM value of the AAPSv2 watchface. The SWR50 usually runs for a full day until the battery needs to be recharged (same charger as the Samsung Galaxy S7: microUSB).
Details about the information displayed on the watchface can be found here.
Install the app ”Android Wear“ on your smartphone via the Google Play Store and connect the smartwatch according to the instructions there.
In AAPS choose hamburger menu (top left corner) > Config Builder > General (at the bottom of the list) > Wear > activate on left side, click cock wheel > Wear settings and activate
Controls from Watch
On your smartwatch: Long press display to change watchface and select
AAPSv2
If necessary restart both devices once.
Pump setup¶
see Dana RS pump