Note: with the recent Spike-App issues, I have updated this blog post with current information for clarity. This app works for both G5 and G6.

First, let me preface by saying that I adore, love, respect, and covet my Dexcom system.  It gives us a stability with type 1 diabetes that we would never be able to do without now.  But what I'm about to tell you is a bit of a hack on their system.

There's been one thing I really have not enjoyed about moving from the G4 to the G5 system about four months ago.  The G4 transmitters were warrantied for 6 months, but usually the battery in those would go for a year…meaning we had the opportunity for much of the transmitter's useful life to have a backup on the shelf at all times.  If the G4 transmitter failed for any reason, we could pick one off our shelf and not stress about how long it would take to get a new one.  Overseas travel and 2-week long diabetic summer camps were not a big deal…we could pack a backup.

Then we switched to the G5 system at the beginning of this year so that Anna didn't have to carry a receiver while she did track team workouts.  This dramatically improved the likelihood that she would stay in good BG range during workout because our DIY loop system would have BGs available the entire workout to help her insulin needs.  If Anna had to carry a receiver during track workouts, that would've been the straw that broke the camel's back in terms of diabetes gear she was willing to manage.

So, we've loved the G5 and G6.  It has worked well; not really having any problems with signal loss, BGs are accurate, we have enjoyed Clarity reports.  All good EXCEPT those G5/G6 transmitters being shut-off by Dexcom  at 112 days.  At 90 days, you get a warning and your warranty is up.  At 112 days, your transmitter is artificially shut-off even though the batteries have some useful life left.  How much life?  Well, that depends, but for most users it is about a couple more months of life.

The problem with this system is that my insurance covers 2 transmitters in one order every 6 months.  So, for the first 90 days (3 months) after a transmitter order, I will nicely have a backup sitting on the shelf in case things go wrong.  BUT, for the next 3 months, I will have no backups on the shelf.  If that second transmitter dies early, I would have to wait for Dexcom to send us a new one.  If we were overseas or traveling, this could be very inconvenient.  I definitely won't have one to send with Anna to her 2 weeks of summer camp based on how I can forecast our insurance refills already.

And here's the really great news.  You can now reset the clock on that 112 day shut-off by building an app that Pete Schwamb released, building on Nate Racklyeft's work of decoding the Dexcom protocol.  This doesn't buy you heaps of extra time…as the battery will only go for about 2 more months (maybe even less?) past 112 days…but that could be just enough time to start to be able to keep a backup transmitter on the shelf for longer between orders.

Another really good plus?  You can use this reset on G5/G6 transmitters that have had their batteries replaced AND still use the Dexcom official app…you won't have to try to use a different app (like Spike-App or X-drip+).

HOW TO BUILD RESET APP

What you will need:

  • iPhone (iOS 11.1 minimum, (this should also work on iPod touch 6th generation or newer…I just don't have one laying around to confirm)
  • Apple computer (macOS 10.13.6 High Sierra  or 10.14.3 (or newer) Mojave)
  • Xcode 10.1 or 10.2 (or newer)
  • Apple ID email

IMPORTANT BEFORE WE GO ANY FUTHER…the version of iOS you have on your phone will make a difference in how you proceed. So, take a minute to check what iOS version you have in your iPhone Settings -> General -> About -> Software Version.

**IF you have iOS 12.2, you will have to use Xcode 10.2. No way around that. And in order to use Xcode 10.2, you will need macOS Mojave 10.14.3 at a minimum. High Sierra and Xcode 10.1 will not work for installing on iPhones that have iOS 12.2.**

Check to see if you need to update your macOS based on the version of iOS you have, as just discussed.  You can check your macOS by clicking the apple logo in your computer display's upper left corner and selecting About this Mac.   If you are due for an update, click the Software Update button.

Now that you have the macOS updated (to Mojave if you have iOS 12.2), we need to add a little program called Homebrew.

Homebrew is a program that will allow us to install the needed packages to build Loop. Open the Terminal application on your computer. It is located in the Applications folder, and then look in the Utilities subfolder for the Terminal application.

Terminal app is very plain looking when you open it. That is normal. Copy and paste the line below into Terminal prompt.  Take the copy all the way from the first / to the last "Press return after you paste it into Terminal app.

                /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"              

There will be a prompt asking if you want to continue. Press return to continue, then it will prompt for your password. Enter your computer user password ( don't worry, Terminal app doesn't show keystrokes when you enter passwords, but it is still reading your typing ).

Wait while the script does its thing…you'll see info scroll by and then it will pause for awhile. Eventually, it will be done and you'll see something that says "Installation successful" and you'll have a ready Terminal prompt again.

Last step is to copy and paste this red line below into Terminal app:

brew install carthage

This should result in the installation of Carthage version 0.33. (If you have an older version of Carthage already installed because of previous work on your computer, the command is brew update && brew upgrade carthage to get Carthage updated to the new version you'll need. )  You're all done with the Terminal application now. You're done with it.

You can now download and install the app called Xcode from the App Store on your computer. Xcode 10.2 is what you need for iOS 12.2 users. When the installation is finished, open Xcode by double-clicking on it from your Applications list. And yes…the download and installation of Xcode can take a long time depending on internet speed and computer. It takes upwards of 45 minutes for many people.

Note: If this is the first time you are opening Xcode, you may get an initial message telling you that Xcode is installing command line tools.  Please let that run and complete the installation.  Command Line tools are a needed installation.

Go to the Xcode menu on the top of your screen, and click on Xcode and then Preferences...

Within Preferences, click on the Accounts tab and then the + button in the bottom left corner to add an account.  You are going to add an Apple ID type account.

Enter in your Apple ID email and password.  This process automatically makes a free Apple Developer account associated with your Apple ID email.  The account will show up in your Xcode preferences now with your name and (personal team) as a suffix in the name.  Once your account is added, close the Preferences screen by clicking on the red circle in the upper left corner.

Now we need to download the code for the ResetTransmitter app. The code that will work will be dependent on your Xcode version.

Click here to download ResetTransmitter App's code

Open your downloads folder and navigate to the CGMBLEKit-3.0 folder that you downloaded. Inside that folder, find the file CGMBLEKit.xcodeproj file.  Double-click on that file and the project will open in Xcode automatically.

Click on the open button when the message appears asking:

"CGMBLEKit" is a project downloaded from the Internet. Are you sure you want to open it?

{Take the time now while the project opens to plug in your iPhone to the computer using your lightning cable.  Please accept any prompts about trusting your computer and unlock your phone so that it stays awake through the build process of the app that we are about to finish.}

Now click on the CGMBLEKit at the top of the left column, and then click on the small box as shown on the screenshot below to show the list of "Targets" below it.  Select the "ResetTransmitter" target.

Now, look at the screenshot above.  See that part highlighted in blue? You will need to change the loopkit part of the Bundle Identifier to a unique-to-you word or phrase (no spaces).  Make sure that when you make the edit, you do not delete the period before and after.

Once you have the name edited, then go down to the Team section and select your (personal team) signing name from the drop down menu selection.  [Note: if you have a paid developer account, you can use that signing name instead.]

After you finish signing, a Provisional Profile will automatically be created and you're close to done.

If you see a prompt under the status area below the Team about your device not being registered, please click on the Register Device button provided there to register the iPhone to your developer account (see screenshot below).

Now, navigate up to the top of your window and select two things; one from the left side of the box you're going to select ResetTransmitter and from the pop-out, you're going to select your phone's name from the very top of the device list (not just your phone model…you want to go all the way to the top of the list for your phone's name).


Stop and double check…. most common mistake is forgetting to select ResetTransmitter as shown in the screenshot below and mentioned above.  Do not leave the selection on CGMBLEKit…if you do, your app will build properly nor will it appear on your phone.


If your phone/device name has (untrusted) after the name (see screenshot below), please open the phone and click on the Trust button that should appear on the main screen.  If the (untrusted) tag hasn't disappeared after that, just unplug and replug the phone into the computer.  That should get rid of the (untrusted) tag.  If you try to build an app onto an "untrusted" device, you'll get an error message reminding you to do the steps above.

When you're done, the screen should look like the screenshot below; ResetTransmitter on the left, your phone's name on the right, and no red error messages under the signing team area.  If your screen looks correct, then go ahead and press the build/play button.

Depending on if this is the first time you've built on Xcode, you may get prompts for codesign access and keychain access.  If those prompts appear, please enter your computer's password and click on the always allow button to confirm.

Also, if this is your first time building with this developer account onto your iPhone, you may get another warning that the app could not launch because an issue with trust on your Developer Account on your phone.

Follow the directions on the warning.  Open your iPhone Settings >> General >> Device Management and then select your Developer App certificate and trust it.

Once you click the Trust on your iPhone, go back to Xcode, click on the blue OK button for the warning and then press the build/play button one more time.  This will finish the build of the app onto your phone.  Success!  You can unplug your phone from the computer and use the app now.

BUILD ERROR?

If your app did not build correctly and you got a "Build Failed" message and some red error message about "LoopKit" not being found…here's the solution.

  1. Open Terminal app again (remember, you opened it before to install Homebrew earlier in the directions).
  2. Copy & paste this command into the screen:cd downloads/cgmblekit-dev && carthage update  and then press return.
  3. Wait for the command to finish running. Might take about 5-10 minutes, and then you'll be returned to a blank line beginning with a $. You're all done with Terminal app, you can close out.
  4. Now go back and try build button again in Xcode.

USING THE RESET APP

Special note for Loop users : Remove your Dexcom from Loop settings during the reset process described below. Only add your CGM source back in Loop settings after the reset is completed. Including all the way through re-pairing the reset transmitter back in Dexcom app and getting CGM data in Dexcom app. Once Dexcom is all happy and working again, then add the info back into Loop settings.

There are some warning messages in there about the use of this app.  One known impact of using reset transmitters is that you will have gaps in CGM data in your Clarity account. Most users see about 10-30% of their CGM data making it into Clarity on a reset transmitter…so be aware that your Clarity statistics may be spotty. Share accounts (follow and users) appear unaffected at this point in time. After resetting a transmitter, you can use the transmitter on a Dexcom app for replaced battery transmitters as well.

You cannot reset a transmitter that is currently in a session and/or paired with Dexcom or Spike, or any other device/app.  So, stop any currently running sessions, and quit the Dexcom app.   Forget the transmitter from your iPhone's bluetooth list.  Forget all Dexcom transmitters from the list…no reason to keep old ones that you aren't using anymore anyways. Re-open the ResetTransmitter app, enter your Transmitter ID and press the red Reset button.  Within 5 minutes you should get a pairing request.

If you do not get a pairing request and instead see a message "Unable to parse auth challenge: timeout" that means your transmitter is still busy with another app.  Double-click the iPhone's home button and scroll through the open apps.  Upswipe on the Dexcom and the Reset apps to close them.  Restart the phone, re-open the Reset app, enter in the transmitter ID again and press the red Reset button again.  Within 5 min you should now see a pairing request.

If you STILL don't see a pairing request, some users have reported that turning off Dexcom's cell data within the iPhone Settings >> Dexcom G5 app can also help release the transmitter from Dexcom app's influence.  If that fails…you can try deleting the Dexcom app and reinstalling it at the end of the reset process.

If you still don't get a pairing request, make sure the transmitter is within pairing range of the iPhone (but not in active session).  The Reset app needs the transmitter close enough to be able to pair with it in order to reset the clock.

Once you press the pairing request, the reset command is immediately issued and you should get a confirmation screen like below:

You can now close the Reset app (double-click phone's home button and upswipe Reset app) and forget the transmitter in the iPhone's bt list again.  Reopen your Dexcom app and you'll be able to use your transmitter for another 112 days or until the battery gives out…whichever comes first.

The free developer account that you signed the Reset app with only allows the app to be used for 7 days.  After 7 days, the app will simply produce a quick white screen and self-close if you try to open it.  You can rebuild the app anytime after the 7 days to use it again.  Simply double-click on the file in your CGMBLEKit folder download to open the project in Xcode again, plug in your iPhone, and press the build/play button.  All your previous changes will have been saved, so the rebuild is quite easy.

You can reset any amount of transmitters.  The app does not know transmitter ownership, nor does it have a limit on how many times you can use the app to reset transmitters.

The transmitter does not have to be on a sensor in order to be reset, just needs to have battery life left and not be paired already with another app.