Professional Documents
Culture Documents
There are many different interpretations of the OpenAPS algorithm. Initially it used old
models of pumps Medtronic with minicomputers like Raspberry Pi. This method allows
use of the full potential of OpenAPS with all of its functions, but it is relatively difficult
to implement. It requires special hardware, special pump (Medtronic with software
version 2.6 below) and some knowledge in programming and soldering.
Alternatives are:
Loop - version of the iPhone and Rileylink, again required pump is Medtronik with
software version prior to 2.6.
AndroidAPS - which require only Android phone, Dana pump and some type of CGM. At
present this is the only program that can be used with new pumps without requiring any
additional hardware to them because real functions of mini computers, which is actually
your mobile phone.
Insulin pump - Which must have already been installed and configured by a specialist
insulin pump. For specific software we are focused on here you need the pump to be
Sooil Dana Diabecare R, if you want to be in Closed loop mode. In open loop and you
can try every brand/model available. Opportunities to include other models are being
developed, but at the time AndroidAPS does not support other brands and models.
Mobile Phone - is imperative ( you'll need someone to do the calculations) with these
technical specifications
- Android OS 5 or higher
- Bluetooth - to be able somehow to communicate with other devices
- NFC chip - (only for Freestyle Libre) to be able to read data from the sensor
- Mobile data / WiFi - network connectivity in order to upload data of BG readings and
conducted treatments in NightScout
Which phones are not suitable for Freestyle Libre? - According to some Internet
communities there are problems with certain models of mobile phones that overheated
BG sensor (Freestyle Libre) and render it useless, for that reason it is not recommended
to use them. These are:
· Huawei Nexus 6P
· Samsung Galaxy Young 2
· Samsung Galaxy Core Prime
· Samsung Galaxy Grand Prime
· Samsung Galaxy J5
BG sensor
The options are two:
Abbott Freestyle Libre - That 's sensor which is placed on the arm, developed by the
British company Abbott, but it gives information about current BG only when scanned
with NFC device (remember that we've already wrote about NFC chip phone) so that this
is not a CGM (Continuous Glucose Monitoring), but FGM (Flash Glucose Monitoring)
and with no additional gadget it cannot be used in a closed loop. For information about
closing the loop see Section - Other gadgets.
The sensor retains in its internal memory the data of the measured blood glucose for the
last 8 hours (measured at an interval of 15 min), and the last 15 minutes (at an interval of
1 min).
Dexcom G4- This is actually an American company that has focused on sensors that
constantly measure blood glucose (CGM). Unlike Freestyle Libre this sensor measures
and transmits blood sugar every 5 min., Even has alarms for high and low sugar. The
continuous stream of data makes it ideal for artificial pancreas systems. Newest model is
currently G5, that officially works with mobile phone iPhone and miniature transmitter
placed on the patient's body. More common is the older model G4, which uses a special
reader instead of a mobile phone. Both models use unofficial program running for now
only in android called xDrip, which receives data directly from the transmitter in model
G5 or receiver in G4 and transmit them locally to the phone where AndroidAPS is
running. It is important to clarify that the official applications of Dexcom don't work with
AndroidAPS, and generally they have very limited options as time of use and the ability
to monitor the data. Currently, the most common option is G4 with receiver "share",
which unfortunately is sold only in the US but has the necessary Bluetooth connection to
android phone.
Nightscout account with necessary plug-ins - - Here is not the place to explain how to
install your Nightscout (NS) website, there're a lot of explanations/guides online.
http://www.nightscout.info/wiki/welcome
http://www.nightscout.info/wiki/welcome/website-features/cgm-remote-monitor-care-
portal- this is a MUST HAVE one
o ENABLE = careportal boluscalc food bwp cage sage iage iob cob basal ar2 rawbg
pushover bgi pump openaps
o DEVICESTATUS_ADVANCED = true
o PUMP_FIELDS = reservoir battery clock
Click "Save" at the top of the panel.
This is the basic setup of your Nightscout/Azure site needed for AndroidAPS use.
xDrip - program running under Android which main purpose is receiving BG data and
sending it to Nighscout. It is widely used mainly by parents remotely monitoring BG
levels of their children. In our case it will accept the data from the BG sensor and will
send it to AndroidAPS and to your NighScout website. Here the basic settings required
are Hardware Data Source as well as API upload - Enabled - BaseURL format https: //
your_API_secret@your_site.azurewebsites.net and checked option Broadcast locally.
NSClient - A small program with the main task to upload the data of BG levels and any
treatments in your NS site.
Download the latest version from - https://github.com/nightscout/NSClient-
Android/releases
Install and configure the phone with the data from your NS website.
Once installed NSClient must be configured to connect to your NS website. This is done
by choosing Prefences (three points at the top right corner of the program).
Click on Nightscout URL and enter the address of NS your site (for example
https://ivanivanov.azurewebsites.net/) and confirm by pressing OK.
Then select Nightscout API Secret and in the window that appears, enter the password for
your site, (no my API secret is not *********** :)) and confirm with OK.
If you'll be using the Glimp software and Freestyle Libre it's recommended to turn on
xdrip emulation.
AndroidAPS - The program was created by Czech developer Milos Kozak. He started
getting involved with this project at the end of 2015 while trying to make a program for
his daughter, who was then 6 years old. By mid-2016 he had a complete and sufficiently
secure management pump program through OpenAPS. Due to the unpopularity of Dana
pumps in the US, he developed his program almost alone. Gradually promote the
program and if at the end of July 2016 and the use is limited to his daughter and another
two enthusiasts, the currently active users of the program are 27, and this number is
constantly increasing. Milos Kozak continues to try to help every individual completely
free of charge, guided by purely moral motives, which he deserved infinite respect of his
followers. Thanks to one of us has even translated into Bulgarian.
The problem is that the program cannot be found as "ready to install" (no .apk file for
download) as request of the author. This means that you will need to download the source
code from:
https://github.com/MilosKozak/AndroidAPS
Extract it somewhere on the hard drive of your computer and go to the next step.
Install AndroidStudio(on your PC):
Download Android Studio from:
https://developer.android.com/studio/index.html
Install it after downloading
After the installation has finished you need to start Android Studio and open the folder
where you've unpacked the source code of AndroidAPS
Choose AndroidAPS-master and confirm with OK
AndroidStudio automatically begins to perform its tasks and if after some time (several
minutes) in the lower left corner window will show something like
Which means - There are no errors and you can proceed to the next step.
Which is:
From the bottom left corner select Build Variants, and from the window that appears
(under the Build Variants) choose fullWearDebug.
To go to the next step you need to enable USB Debugging on your phone.
Here are some steps to enable the USB Debugging If you have difficulties with that:
Make sure you have ADB drivers for your phone installed on your computer and that you
have enabled USB Debugging on the phone you will use. Connect it with micro USB
cable to your computer and select Run App in Android Studio
Wait a few minutes and after you see AndroidAPS running on your phone disconnet it
(the phone) from your USB cable.
Then simply pair your phone with watch, download and install Libre Alarm application
from Google Play and xDrip + from
https://xdrip-plus-updates.appspot.com/stable/xdrip-plus-latest.apk
Upload it to your phone after downloading and install it - connect your phone with an
USB cable to the computer on which you have downloaded xDrip+ .apk file, copy the
file to a temporary directory on phone. Disconnect the cable, open the folder and install
(open the .apk file).
Next you need to set-up xDrip+ program:
After running Xdrip + click in the upper-left corner (three bars) and from the menu select
Settings
From the window that appears is important to change Glucose units of mmol / l (if you
use it) and Hardware Data Source of Libre Alarm, and Run Collector in foreground.
Then scroll down in Settings and tap on API Upload (REST)
Enabled must be ON and in the field "Base URL" enter "https: //" +yourAPISecret+
@NightscoutURL + "/api/v1/"
Overall input should look like this:
https://myAPIsecret@mysite.azurewebsites.net/api/v1/
Then go back again to Settings and check if the field "Broadcast locally" is "On" ( it
must be ).
The only thing that remains here is to start the sensor - click on the three bars and select
"Start sensor". You will be asked for 2 calibrations. I usually scan with the Libre reader
(one gadget that looks like a meter) and enter the values (two identical values).
Then you are ready to scan sensor with the phone as the phone is close to the sensor with
NFC ON. It is also good to check whether the scanned values appear in Nightscout your
site and AndroidAPS, if not then go back through the steps of setting up xDrip+ and
verify that all values are entered correctly.
Other gadgets
To convert Freestyle Libre from FGM to a fully operational CGM you'll needed 2 more
gadgets
- Smart watch Powered by Android Wear and NFC chip - currently on the market that's
just Sony Smartwatch 3
- Some kind of a case or a way to attach the watch on the Freestyle Libre sensor.
Sony Smartwatch 3 is the only Powered by Android Wear with NFC chip(for now), but
this chip is disabled in the operating system and is necessary to make some software
changes to use it.
Brief description of how to do this can be found at:
https://github.com/pimpimmi/LibreAlarm/wiki/How-to-install-NFC-on-Sony-
Smartwatch-3
After you've done everything in the description (without problems) - in programs the
watch you should find "Settings NFC", where you can activate the chip.
If this pass you can proceed to the installation of Andoid Wear and Libre Alarm on the
phone. Once you have done and Libre Alarm shows your BG data you are ready to attach
the watch to the sensor and have a working CGM.
The case - the most convenient way to attach the watch is by 3D printing
Download the file from the link below:
http://www.deebee.it/download/vH45_GlimBee_DeeBee.stl
Send it to someone performing services for 3D printing or friend with a 3D printer and
when you have that plastic case remove the watch from the strap, separate the two parts
of the case, insert the clock in between with the display facing to the circular opening and
close the case. Find yourself a long enough elastic band and spend two ends of the strip
into the side openings of the case. Put your hand in and place the case over the sensor
(circular hole is exactly the size of Freestyle Libre sensor, so that it fits and can not
move). Tighten the elastic band to secure the case ( not to move freely ), but not so tight
to create discomfort and voila - you're ready.
By this point you should have everything you need to start AndroidAPS in a closed loop
mode and it can make the necessary adjustments of insulin dosage when your BG is out
of bounds.
About setting up and useing AndroidAPS - wait for the second part of this manual.
Written by:
Radoslav Radev
Rumen Georgiev
SeungYeop Kang