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

x15 pumps - incorrect "bolus many not have succeeded" notification after bolus #587

Open
dabear opened this issue Sep 22, 2017 · 46 comments

Comments

@dabear
Copy link
Contributor

commented Sep 22, 2017

I am using a medtronic 715wws pump.
I am using offline-mode only with dexcom share.

Loop 1.4 no problems.
Loop 1.5: boluses fail every time with the attached error message
img_0061

The pump actually successfully enacts the bolus every time, despite this error message. 20 minutes after, the loop sends a notification that loop hasn't run successfully in 20 minutes and the loop circle is red.

Here's the output from xcode terminal while running a bolus:
https://gist.github.com/dabear/eab8ac4b982307e44167fc97c3a6f9a6

@lostinthemidwest

This comment has been minimized.

Copy link

commented Sep 27, 2017

I have the same problem with the 715. The strange thing is that the bolus does succeed. I have a rfcat; I'd be happy to send you capture logs if you let me know how to use it and what to capture.

@dabear

This comment has been minimized.

Copy link
Contributor Author

commented Sep 28, 2017

@lostinthemidwest this is a regression in Loop 1.5 it seems. If you take a look at the gist I provided earlier, the pump is indeed sending a form of ACK (an "OK, SUCCESS" message) to Loop. For some reason there are probably multiple types of ACKs and loop doesn't know about the specific ACK sent from our pumps.

@dabear

This comment has been minimized.

Copy link
Contributor Author

commented Oct 4, 2017

I guess this is relevant: ps2/rileylink_ios@d776d79

@dabear

This comment has been minimized.

Copy link
Contributor Author

commented Oct 5, 2017

This hack worked for my pump. I can now bolus again from loop: dabear/rileylink_ios@02a5a3c

@ps2

This comment has been minimized.

Copy link
Collaborator

commented Oct 6, 2017

I'm wondering if there is some firmware version difference going on here. I would appreciate if any x15 pump users are able to try out 1.5 and report here their firmware version, and whether or not 1.5 works for them.

@ps2

This comment has been minimized.

Copy link
Collaborator

commented Oct 6, 2017

I believe the firmware version on the pump I tested this code with is 1.2A 1.1 0B 0B

@dabear

This comment has been minimized.

Copy link
Contributor Author

commented Oct 6, 2017

Paradigm 715ww
Ver 2.3A 1.1 0B 0B

@christerjensen

This comment has been minimized.

Copy link

commented Oct 21, 2017

Dabear's solution worked. 715 ww 2.3A 1.1

@dabear

This comment has been minimized.

Copy link
Contributor Author

commented Oct 21, 2017

For anyone doing this manual update using my hack, please note the following:

You must update carthage to latest version.
You will need to update your Loop's carthage file to point to your own rileylink_ios repository

(The following problems were present for myself and christerjensen )

It is really, really important that you remove the cached version of rileylink_ios before running "carthage update"

rm -rf $HOME/Library/Caches/org.carthage.CarthageKit/dependencies/rileylink_ios/

If you get the error no tagged version for dexcom share client, delete the cached version before running "carthage update"

rm -rf $HOME/Library/Caches/org.carthage.CarthageKit/dependencies/dexcom-share-client-swift/
carthage update
@john36m

This comment has been minimized.

Copy link

commented Oct 21, 2017

My backup pump is a 515. I hope this gets fixed eventually.

@jlaes

This comment has been minimized.

Copy link

commented Oct 25, 2017

Our pump is a 515 WW, firmware is 2.3A and we are having the same issue, will try the hack tonight for it

@jlaes

This comment has been minimized.

Copy link

commented Oct 25, 2017

dabear is it enough just to follow your instructions on removing the cache and doing the changes in: dabear/rileylink_ios@02a5a3c

Is there anything else that needs to be changed for it to work somewhere else? Do I need to change also this:

ps2/rileylink_ios@d776d79

I'm guessing the hack could fix our 515 WW 2.3A which is having these issues.

I would love to try this but unsure what all I need to do to go through it.

@dabear

This comment has been minimized.

Copy link
Contributor Author

commented Oct 25, 2017

you don't need to change the last part

@rodzilla55

This comment has been minimized.

Copy link

commented Jan 9, 2018

515 2.0A 1.1 0B 0B
Haven’t tried the fix yet.

@rodzilla55

This comment has been minimized.

Copy link

commented Jan 12, 2018

@dabear I am an experienced coder, but completely novice on the IOS platform and unfortunately pretty green on github. I'm not understanding how to make the code mod above (where to make it). I have only downloaded and deployed the loop app... and I see that it imports "RileyLinkKit" and "MinimedKit", but I don't know where those source files are to modify them (specifically looking for pumpmodel.swift)?

@dabear

This comment has been minimized.

Copy link
Contributor Author

commented Jan 13, 2018

@rodzilla55 loop imports a binary version of rileylink_ios which needs to be edited. You will have to do two things;

  1. Fork a copy of rileylink_ios and do the changes in rileylink_ios mentioned previously nad push the changes to your github fork
  2. Update Loop to use your new version of rileylink_ios.
rm -rf $HOME/Library/Caches/org.carthage.CarthageKit/dependencies/rileylink_ios/
cd into_loop_dir
vim Cartfile

cartfile

Run "carthage update" to utilize your new version. Carthage will compile the new version of rileylink_ios for you and loop will use that version now. You should inspect "cartfile.resolved" after, to make sure that loop is actually using your version of rileylink_ios.
@dabear

This comment has been minimized.

Copy link
Contributor Author

commented Jan 14, 2018

I have now temporarily access to another 715 pump, this time a US version
Ver 1.2A 1.1 0B 0B
This pump does not need the workaround described here.

@ps2 What do you think about making expectedResponseType an array of [.errorResponse,.pumpAck] for the x15 models (and an array with one entry of [.pumpAck] for all others?). Shouldn't that solve the problem? Will it have any negative impact?

@xpucuto

This comment has been minimized.

Copy link

commented Jan 30, 2018

Ok so updated my RL branch and got all the suggested changes in my repo. Haven't personally made the changes as @ps2 had already merged them. changed the rileylink source in the Carthage file with my repo and did Carthage update. Then rebuilt Loop but I still get the error when sending a bolus ?
This is in my cart file resolved
github "LoopKit/LoopKit" "v1.5.3"
github "LoopKit/xDripG5" "v0.8.1"
github "amplitude/Amplitude-iOS" "v3.14.1"
github "i-schuetz/SwiftCharts" "0.6.1"
github "mddub/G4ShareSpy" "v0.3.3"
github "mddub/dexcom-share-client-swift" "v0.4.1"
github "xpucuto/rileylink_ios" "475d2d5fe55707cfa7e64a86d3b7be57a0f70c0c"

I am using WW 715 VER 2.3A 1.1 0B 0B
Amy ideas what have I missed ?

@dabear

This comment has been minimized.

Copy link
Contributor Author

commented Jan 31, 2018

@xpucuto the problem is that you merged your version from rileylink_ios dev branch. Your assumption that dev branch fixes the problem looks incorrect to me on first glance. In anycase, follow the receipe, use the master branch and apply the changes mentioned here.

Remember to do this again:

rm -rf $HOME/Library/Caches/org.carthage.CarthageKit/dependencies/rileylink_ios/

then update your cartthage file, run carthage update and rebuild loop

@xpucuto

This comment has been minimized.

Copy link

commented Jan 31, 2018

@dabear I did use my master branch
github "LoopKit/LoopKit" == 1.5.3
github "LoopKit/xDripG5" ~> 0.8.1
github "i-schuetz/SwiftCharts" == 0.6.1
github "mddub/dexcom-share-client-swift" == 0.4.1
github "mddub/G4ShareSpy" == 0.3.3
github "xpucuto/rileylink_ios" "master"
github "amplitude/Amplitude-iOS" ~> 3.8.5
will start over by reforking the RL repository

@xpucuto

This comment has been minimized.

Copy link

commented Feb 1, 2018

Ok I so built 1.5.2 today , changed my RL repo in the Carthage file , did the two commands @dabear mentioned above before the Carthage update and still got the error when performing a bolus .
here is the info from Xcode

2018-02-01 13:25:56.799167+0200 Loop[18868:26559923] Updated response count: 180
2018-02-01 13:25:57.190082+0200 Loop[18868:26559923] Response to command: f77ca969b1d15c9a68d5595638d68f18e5555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555b0d5
2018-02-01 13:25:57.190742+0200 Loop[18868:26562320] Pump responding despite our wake timer having expired. Extending timer
2018-02-01 13:25:57.191290+0200 Loop[18868:26562320] Writing command to data characteristic: 0500000000000000b403a969b1d15c9ab0e5559a3000
2018-02-01 13:25:57.608955+0200 Loop[18868:26559923] Updated response count: 181
2018-02-01 13:25:57.969992+0200 Loop[18868:26559923] Response to command: 187da969b1d15c9ab0e5635635555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555558ea5
2018-02-01 13:25:57.970596+0200 Loop[18868:26562320] Writing command to data characteristic: 0500000000000000b403a969b1d15c9ad32555ab4000
2018-02-01 13:25:58.303484+0200 Loop[18868:26559923] Updated response count: 182
2018-02-01 13:25:58.359445+0200 Loop[18868:26559923] Response to command: 107ea969b1d15c9a566555ca65
2018-02-01 13:25:58.359855+0200 Loop[18868:26562320] Writing command to data characteristic: 0500000000000000b403a969b1d15c9ad32571571555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555366000
2018-02-01 13:25:59.109845+0200 Loop[18868:26559923] Updated response count: 183
2018-02-01 13:25:59.170860+0200 Loop[18868:26559923] Response to command: 0f7fa969b1d15c9a566555ca65
2018-02-01 13:25:59.174961+0200 Loop[18868:26562320] [Bolus] (
(
"RileyLinkKit.SetBolusError.uncertain(RileyLinkKit.PumpCommsError.unexpectedResponse(PumpMessage(carelink, pumpAck, 614028, 00), from: PumpMessage(carelink, bolus, 614028, 0101000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000)))"
)
)
2018-02-01 13:25:59.179675+0200 Loop[18868:26562320] ------------------------ Set normal bolus ---------------------------
2018-02-01 13:25:59.183845+0200 Loop[18868:26559923] idleDetectDispatchGroup empty

@christerjensen

This comment has been minimized.

Copy link

commented Feb 1, 2018

I also had problems getting the right rileylink_ios - have you check the rileylink_ios ID is the same as in your Github fork?

The chartage update should have a rileylink_ios number ("74ab2xxxxxxxxx") that matches your Rileylink_ios fork in Github.

https://scontent.ftrd1-1.fna.fbcdn.net/v/t35.0-12/22751489_10154825090687115_695949521_o.jpg?oh=d3039e2831d59404ed563d84fa2731de&oe=5A756ADD

https://scontent.ftrd1-1.fna.fbcdn.net/v/t35.0-12/22711671_10154959212826512_1118976936_o.png?oh=c7bda4a3ff5c7fc97dc16ca07f0e7501&oe=5A7572D8

@christerjensen

This comment has been minimized.

Copy link

commented Feb 1, 2018

@xpucuto You did change the PumpModel.swift code?

image

@christerjensen

This comment has been minimized.

Copy link

commented Feb 1, 2018

Checked your repository @xpucuto - you forgot to change line 67.

This is from your pumpmodel.swift
image

@xpucuto

This comment has been minimized.

Copy link

commented Feb 1, 2018

@dabear dabear changed the title Loop 1.5 bolus fails then Loop circle turns red x15 pumps ww - Loop 1.5 bolus fails then Loop circle turns red Feb 1, 2018

@DConmy

This comment has been minimized.

Copy link

commented Feb 18, 2018

@ps2

I have a 515LNAS with firmware 2.1A 1.1 0B0B that fails on boluses with the current code (rileylink_ios/master). While I could do the workaround, I'd like to help get a cleaner change that can get merged into master.

Please let me know if there is data I can collect, or code changes I could make to help understand the difference between what you are seeing, and others that have failures that are seeing.

I see the change described in this thread is basically backing out the change you did in Aug. I assume that was trying to fix something else, so backing it out, in general, would affect whatever it was trying to fix.

@Kdisimone

This comment has been minimized.

Copy link
Collaborator

commented Apr 13, 2018

I posted a merged version of Loop 1.5.3dev and the x15 fix listed above. Just an fyi if anyone wants it.

https://github.com/Kdisimone/Loop/tree/x15-dev-fix

@jeremybarnum

This comment has been minimized.

Copy link

commented Jun 24, 2018

We are seeing this problem on a 515 (will post firmware shortly - not with the pump now) after moving to current master branch from 1.5.0. Easy enough to fix by following above instructions but are others seeing this and any reason not to fix it in master?

@dabear

This comment has been minimized.

Copy link
Contributor Author

commented Jun 24, 2018

The problem is that some x15 behaves differently. So if you fix it for some pumps, the others will fail - and vice versa.

@diggabyte

This comment has been minimized.

Copy link

commented Jun 28, 2018

Using pump 515 v2.3A 1.1 0B 0B. Here's something interesting... I never ran into this issue with my builds of Loop 1.5.6 (using xcode 9.3, iOS 11.3).

However, after upgrading to xcode 9.4 and iOS 11.4 and still staying on Loop 1.5.6, this error has now mysteriously appeared. No other changes were made.

Seems to me that would suggest the issue is framework related since neither Loop, RL, nor the Pump code changed at all, only xcode & ios changed.

Here's the relevant log data when a bolus is executed: https://gist.github.com/diggabyte/ee389844561721cc1a64e2aa1682e1f4

@Kdisimone

This comment has been minimized.

Copy link
Collaborator

commented Jun 28, 2018

@diggabyte. I think we’ve known that for awhile because other earlier versions of Loop also used to have no issues for x15 users. In order to figure out what’s happening, and IF pete (or other willing volunteer) had the time, he’d need both a no-error and error 515 to compare outputs from. I’ve found an error 515 and will be getting a non-error 515 soon...but I don’t expect he’d have priority time necessarily to look into this especially as there is a fairly easy work around.

@diggabyte

This comment has been minimized.

Copy link

commented Jun 28, 2018

Unfortunately, I've applied the patch and am still getting the error. So this workaround may not work in all cases. Here's the steps, just to illustrate I haven't missed anything:

  • Forked rileylink_ios (tried both 2.0.0 tag and master), then applied the patch
  • updated Cartfile to point to my fork / branch
  • clear carthage cache (rm -rf ~/Library/Caches/org.carthage.CarthageKit/dependencies/rileylink_ios)
  • carthage update
  • verified Cartfile.resolved contains my fork's hash (d46f45a...)
  • build Loop, execute bolus

Expected: no error
Actual: Still produces the unexpected response error

@jeremybarnum

This comment has been minimized.

Copy link

commented Jun 30, 2018

@diggabyte have you managed to get it to work? I'm about to try, so would love to know if you've figured it out.

@Kdisimone

This comment has been minimized.

Copy link
Collaborator

commented Jun 30, 2018

It’s worked for me...

@jeremybarnum

This comment has been minimized.

Copy link

commented Jun 30, 2018

Yeah we just did it and it worked too. 2.3A 1.1. It's weird because @diggabyte 's steps look exactly right.

@diggabyte

This comment has been minimized.

Copy link

commented Jul 2, 2018

@jeremybarnum @Kdisimone yeah, tried several times and double-checked all my steps with v2.3A 1.1. Still produces the error. The strange part is that it never occurred with my builds via xcode 9.3 / iOS 11.3. It only surfaced when I updated to xcode 9.4 / iOS 11.4 and now I can't get it to go away.

Are you both on 9.4 / 11.4 as well?

@Kdisimone

This comment has been minimized.

Copy link
Collaborator

commented Jul 2, 2018

Yes. 9.4/11.4

@Kdisimone

This comment has been minimized.

Copy link
Collaborator

commented Jul 2, 2018

I’ll try building with your RL_ios today and see if it works for me.

@diggabyte

This comment has been minimized.

Copy link

commented Jul 2, 2018

@Kdisimone thank you. On my fork, I've patched both master and also created a 515-patch branch whose parent was the 2.0.0 tag.

@Kdisimone

This comment has been minimized.

Copy link
Collaborator

commented Jul 2, 2018

Which Loop branch are you trying?

@diggabyte

This comment has been minimized.

Copy link

commented Jul 2, 2018

I've been using Loop 1.5.6 (master), both when I was on 9.3/11.3 and also 9.4/11.4 xcode/ios.

@diggabyte

This comment has been minimized.

Copy link

commented Jul 2, 2018

I believe I finally got to the bottom of why my build was still showing the error despite the workaround being applied.

It seems the carthage binaries were not actually being recompiled successfully because the following xcode preference was never set:
Xcode -> Preferences -> Locations -> Command Line Tools

As a result, when running carthage update there was a hard-to-see error listed in the output:
xcrun: error: unable to find utility "xcodebuild", not a developer tool or in PATH

Some googling revealed that the Command Line Tools location must be set from within xcode itself. For whatever reason, this was never set by default. I had to manually set it, as seen from this screenshot from a stackoverflow user:

image

After setting this preference and again running carthage update I could see that the binaries were indeed being built from scratch now without any error messages. Previously, it was just using the existing binaries, thus the patch never seemed to work.

@mieslep

This comment has been minimized.

Copy link

commented Dec 2, 2018

We're on v1.9.3-spike-master (from Kdisimone/Loop) with a 515WWL v2.3A 1.1, and a completely fresh build (new-to-Loop this weekend!), and getting this error. Trying to follow above and it seems this problem hasn't been resolved on master as yet? So (being super-familiar with git but not in the least familiar with iOS development) trying to work out the most sensible way to try to get this patch into the main Loop master branch?

@Kdisimone

This comment has been minimized.

Copy link
Collaborator

commented Dec 2, 2018

The “solution” is is just a bandaid. Ideally a more comprehensive fix would be developed before landing in master. If you want to stay on my branch, I’d recommend using the x15-fix (or whatever it’s exactly named) branch I have and making the spike edits yourself on that one.

@mieslep

This comment has been minimized.

Copy link

commented Dec 3, 2018

Following #587 (comment) from @diggabyte , with rileylink_ios v2.0.7 and @Kdisimone 's spike-master branch (at v1.9.3 plus Spike-ey bits) and the error is "resolved".

@Kdisimone Kdisimone changed the title x15 pumps ww - Loop 1.5 bolus fails then Loop circle turns red x15 pumps - incorrect "bolus many not have succeeded" notification after bolus Jan 6, 2019

@Katrin620

This comment has been minimized.

Copy link

commented Jun 11, 2019

Hi all - it is amazing how much work has gone into assisting others with this issue. I have to admit though that I have been searching desperately for a description how to implement this fix 'for dummies'. I am completely lost with the descriptions. I can find and edit the lines, but doing something in github, forking and catharge - this sounds like greek. I've followed the step by step descriptions in the loopdocs, but this seems way off the deep end now...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
You can’t perform that action at this time.