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

Updates/clarification for offline looping #1595

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion docs/docs/Customize-Iterate/bluetooth-tethering-edison.md
Original file line number Diff line number Diff line change
Expand Up @@ -239,12 +239,14 @@ Finally, it's time to take a walk. About a minute after walking out of range of

### Additional App requirement on Android to enable automatic BT Tethering reconnects

On Android, the Bluetooth tether will shutdown if there is no tethering request within 3 minutes. Installing the application "BTAutoTethering" on your phone from the Play store will resolve this issue and allow the rig to switch to your phone when out of wifi range with no manual intervention.
On Android, the Bluetooth tether might shutdown on some phones if there is no tethering request within a few minutes. Installing the application "BTAutoTethering" on your phone from the Play store will resolve this issue and allow the rig to switch to your phone when out of wifi range with no manual intervention.

This app has been used by numerous OpenAPS users, and found to work. It can be found [here](https://play.google.com/store/apps/details?id=nu.mine.qos.btautotethering&hl=en).

Another app which others have found to work better (depending on phone and carrier OS tweaks) is [Blue Car Tethering](https://play.google.com/store/apps/details?id=com.xplota.bluecartetheringauto&hl=en).

**Update June 2024:** Apps that automatically enable tethering may not work anymore, especially on phones made within the past few years. See the [first half of this post on GitHub](https://github.com/NightscoutFoundation/xDrip/discussions/3399#discussioncomment-8906575) to learn more, and for some possible alternatives.

### Additional Troubleshooting Steps for Some Carriers

If you are able to set up a tethering connection (and even obtain a local IP) but your rig is unable to access the internet through your device's mobile connection, the following steps may be helpful:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,11 @@ Dexcom CGM users have a few different alternatives to retrieve blood glucose val

### A. xDrip+ for Android users

Android users can use the xDrip+ Android app for offline looping, assuming xDrip+ is used as the CGM data source. There are two ways to get offline looping to work with xDrip+. Firstly, when connected to an Android phone running xDrip+, you can enable the phone to share the CGM information to OpenAPS, after which OpenAPS will automatically fetch the CGM data directly from the phone when connected onto the phone hotspot, even in cases where the phone is actually offline.
Android users can use the xDrip+ Android app for offline looping, assuming xDrip+ is used as the CGM data source. There are two ways to get offline looping to work with xDrip+: the xDrip+ Web Service, or linking xDrip+ on the phone with xDripAPS on the rig.

#### A.1. xDrip+ Web Service

When connected to an Android phone running xDrip+, you can enable the phone to share the CGM information to OpenAPS, after which OpenAPS will automatically fetch the CGM data directly from the phone when connected onto the phone hotspot, even in cases where the phone is actually offline.

To enable the xDrip service for OpenAPS, go to the Inter-app settings section in xDrip settings and enable the xDrip Web Service and Open Web Service settings, then enter xDrip Web Service Secret, which has to match the same secret you have configured for Nightscout. After these settings are turned on,OpenAPS will query your phone for the CGM data automatically without additional configuration settings. You can validate the offline looping works by connecting your rig to the xDrip hotspot and checking the ns-loop.log has a line saying `CGM results loaded from xDrip`. Use

Expand All @@ -43,6 +47,8 @@ to watch the ns-loop.log file for the 'CGM results loaded from xDrip' text.

</details>

#### A.2. xDripAPS

The second method involves installing an application called xDripAPS onto your rig. The details for setting up xDripAPS are described in the [section below](https://openaps.readthedocs.io/en/latest/docs/Customize-Iterate/offline-looping-and-monitoring.html#xdripaps-offline-looping-for-users-of-the-xdrip-android-app). The naming can be confusing. xDrip+ (maintained by [@jamorham](https://jamorham.github.io/#xdrip-plus)) is the app being actively developed. While Google may lead you to several older versions of the xDrip/xDrip+ Android app, you can always get the latest version here:
* xDrip+: [https://github.com/NightscoutFoundation/xDrip](https://github.com/NightscoutFoundation/xDrip)
* There is no direct iOS version of xDrip+. [Spike](https://spike-app.com/) is a different app with a different set of features.
Expand Down Expand Up @@ -304,6 +310,7 @@ NOTE: To ensure your OpenAPS rig recieves glucose data through XdripAPS please c
#### Known limitations of xDripAPS
* xDripAPS does not process anything other than CGM data. If you use the xDrip+ Android app to enter carbs, these will not be processed by OpenAPS. If you upload to Nightscout simultaneously, OpenAPS will download the carbohydrate entries from Nightscout once it has internet connectivity. For alternative solutions for offline carb entry see above.
* Changing between xDripAPS and Nightscout as sources for CGM data may lead to problems with the calculation of carbohydrate absorption. This can be avoided by leaving the OpenAPS rig tethered to the phone via Bluetooth or WiFi as long as there are carbs on board.
* The IP address of the rig can change periodically when using a WiFi hotspot or Bluetooth tethering on a phone, resulting in the need to update it in xDrip+ on the phone. There are some potential work-arounds for this issue. See [this discussion on GitHub](https://github.com/NightscoutFoundation/xDrip/discussions/3399#discussioncomment-8906575) to learn more.

#### Manual installation steps for xDripAPS

Expand Down