avouspierre / freeaps

FreeAPS X - an artificial pancreas system for iOS based on OpenAPS
MIT License
10 stars 5 forks source link

Dash Pod "not connected" average 4-5 loops per hour #2

Open tswire opened 2 years ago

tswire commented 2 years ago

Hardware: iPhone XR with iOS 16 RC Dash Pod in Canada with firmware 3.29.0 and BLE firmware 8.8.0. NXP is device name in bluetooth menu

I have been watching each 5 minute loop just to get used to the system (coming from AAPS) and noticed red loops approx every 4-5 times due to "pod not connected". I immediately try to issue a very, very small bolus and it connects fine, manually, Also have immediately tried communicating with pod (test beeps) and same thing....connects right away. Another, probably related situation is I manually bolused for a meal. It was done (have beeps ON and it was done for about 3 minutes) and FAX went to loop (next 5 min was up) and gave error: invalid pod state. pump is bolusing. See attached log FAX Dash log.txt

tswire commented 2 years ago

Working with Loop Dev team and have my NXP Dash pods working successfully on that. I think we have determined that FAX is missing the proper (or same as Loop Dev) CGM Dexcom G6 or xdrip4iOS BT pulse to keep FAX awake on the phone. Since NXP pods are not able to connect and disconnect automatically (need to be pinged) it seems like the Pump side "pulse" that is implemented in FAX is not working for NXP. This would require looking at Dexcom CGM implementation or having Johan D (xdrip) add the BT heartbeat functionality to xdripswift in FAX.

aug0211 commented 1 year ago

Also experiencing issues with Dash pods in FAX. Specifically in bdb branch, however am sharing here rather than bdb branch after community discussion in Discord

Had been using Loop Dev for months with generally good connectivity. In FAX, we are seeing missed loops multiple times/hour.

This is on an iPhone 8 running iOS 16 with Dexcom G6 sensor. Have confirmed consistent behavior both with native Dexcom G6 app and also xDrip directly paired with the transmitter. These are TWI board pods, not NXP.

Pod connectivity seems OK in this time periods as we can manually chime the pod sound from FAX during these times.

BG readings are not being missed during/leading up to these missed loop cycles - they are coming in from G6 consistently, but FAX fails to loop.

Keeping the device open and unlocked (easier to do overnight when plugged in) does appear to help, though have not yet gathered strong data on this to back this beyond a casual observation.

@avouspierre please let me know which files will be most helpful for you and I will grab them to attach! If there is something else I can do to help, please let me know.

tswire commented 1 year ago

@avouspierre @aug0211 I wonder if the CGMBLE implementation in FAX (which I don't think you touched) is not working well for DEXCOM whether through native app or xdrip4ios in that there is no BT heartbeat on that side. Apparently FAX is trying to get this stay awake heartbeat from the pump side (whether BT direct to DASH, or to Rileylink for Eros or Medtronic) and for DASH pods, whether NXP or TWI, this is not reliable. Loop Dev has this heartbeat on both sides and for Dash with Dexcom, maybe that is the missing link?

aug0211 commented 1 year ago

This sounds promising. It definitely seems like a heartbeat issue, and I recall issues in Loop Dev with early Dash testing that sounded similar to what we’re experiencing. Perhaps this is when these changes were made in Loop Dev.

Able to review the Loop Dev implementation to port into FAX?

aug0211 commented 1 year ago

log.txt log_prev.txt