These are chat archives for nightscout/intend-to-bolus

1st
Apr 2019
vsherbeck
@vsherbeck
Apr 01 00:11
well that would do it... lol. ok I'll try that.
hmm... it just says "waiting to connect to bluetoothd..."
Scott Leibrand
@scottleibrand
Apr 01 00:56
Reboot and try again.
(You probably killed the process by following the directions, but it’ll get restarted on reboot.)
vsherbeck
@vsherbeck
Apr 01 01:11
I rebooted... and am getting much farther now :)
vsherbeck
@vsherbeck
Apr 01 01:24
I think... I managed it... coincidentally NS went down so... nice test of it lol
tepidjuice
@tepidjuice
Apr 01 04:07
Getting this radio error again: cannot connect to CC111x radio on /dev/spidev5.1 2019/04/01 15:06:23 cc111x: no response
marafie
@marafie
Apr 01 10:36
hi, can someone help,,, i am getting this when i run again,
`Cleaning up...
xdrip selected as CGM, so configuring xDripAPS
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
libsqlite3-0
Suggested packages:
sqlite3-doc
The following packages will be upgraded:
libsqlite3-0 sqlite3
2 upgraded, 0 newly installed, 0 to remove and 164 not upgraded.
Need to get 1,430 kB of archives.
After this operation, 2,733 kB of additional disk space will be used.
WARNING: The following packages cannot be authenticated!
sqlite3 libsqlite3-0
E: There are problems and -y was used without --force-yes
Can't add xdrip cgm - error installing sqlite3
root@unilinux:~#~
marafie
@marafie
Apr 01 10:58
i was able to run sudo apt-get -y --force-yes install sqlite3
now its running
Riko L
@Ricco555
Apr 01 12:56
just for reference, yesterday I managed to run openaps on jubilinux 0.4.1 image. Had some issues first with bootstrap script and npm due to reference to older repo, but overcame it. Later I saw @cluckj PR that solves the issue.
vsherbeck
@vsherbeck
Apr 01 17:44
This is kinda stupid as it's ~aesthetic~ but my HAT display updated and it's now black on white lettering rather than white on black... I prefer the original white on black, is there a way to change it back ?
Scott Leibrand
@scottleibrand
Apr 01 18:16
yes, if you want screen burn-in. :)
it now alternates between the two to help avoid burn-in
vsherbeck
@vsherbeck
Apr 01 18:45
ahhh ok
Scott Leibrand
@scottleibrand
Apr 01 18:46
there are controls for when it switches. you can do day vs. night mode, or random
vsherbeck
@vsherbeck
Apr 01 18:47
is there a place I might find more information on how to control that ?
Jon Cluck
@cluckj
Apr 01 20:06
you can also turn it off, see the openaps-menu repo readme :)
(but you will get some pretty ferocious burn-down after a few months)
Abigail Cember
@acember
Apr 01 20:51
Hey guys, I think I finally figured out what's happening when I try to loop offline, but I don't know how to fix it. It looks like I am getting to line 248 if oref0-pump-loop, where oref0-set-device-clocks is being called, but then the function oref0-set-device-clocks does not have any provision for what to do if NTP is not available, so my pump loop fails every time unless I either a) have internet or b) manually set the system clock.
The function oref0-set-system-clock is not called until within the function smb_verify_suggested(), so I am never reaching it.
Scott Leibrand
@scottleibrand
Apr 01 20:53
you don't want oref0-set-device-clocks
you want oref0-set-system-clock
Abigail Cember
@acember
Apr 01 20:53
Note that I'm not at all experienced in reading JS (maybe that's not even the language this is in), so I could be misinterpreting
Scott Leibrand
@scottleibrand
Apr 01 20:54
oref0-set-device-clocks sets the pump time from the rig. oref0-set-system-clock sets the rig time from the pump
Abigail Cember
@acember
Apr 01 20:54
Yeah, that's what I realized. But oref0-set-system-clock is never called unless smb_verify_suggested is called, right?
Scott Leibrand
@scottleibrand
Apr 01 20:54
see line 631
in function enact { there's grep incorrectly enact/suggested.json && oref0-set-system-clock 2>&3
that should call oref0-set-system-clock if the suggested.json shows "incorrectly"
Abigail Cember
@acember
Apr 01 20:55
Ok, I see that. But it looks like I'm never getting past smb_reservoir_before
Scott Leibrand
@scottleibrand
Apr 01 20:56
ok, why's that? what's it dying on?
Abigail Cember
@acember
Apr 01 20:58
I'm trying to figure that out...what is supposed to happen if try_fail smb_reservoir_before "fails"?
Riko L
@Ricco555
Apr 01 20:58
I am trying to troubleshoot a friends pi+HAT. it stopped finding the pump even tough it is sitting on top of it. mmtune runs and does not write anything, so openaps just goes through preflight and fails and repeats. Any pointers in right direction, I haven't played with HAT before, so if anyone experienced this before any help is welcomed .
Abigail Cember
@acember
Apr 01 20:59
The output that I get is just "Error: pump clock refresh error/mismatch"; oref0-pump-loop failed.
Then everything starts over again, and fails the same way
@Ricco555 You're saying you don't get any values at all from mmtune? No -99 at the end?
Riko L
@Ricco555
Apr 01 21:00
no.. nothing just empty
Abigail Cember
@acember
Apr 01 21:02
@Ricco555 Not even frequencies are listed? I had a problem for a while with pump/rig communication that was also time related, but this sounds like a hardware issue that I didn't have :(
Also, this is a dumb question, but you have an antenna attached? They originally sent my HAT without an antenna, and it took me a little while to realize that that was a mistake...
@scottleibrand So yeah, I've been trying to follow what is supposed to happen when these different steps fail, but I'm getting lost :/
Riko L
@Ricco555
Apr 01 21:05
hmm .. the only scenario when I saw this (on another rig) is when I run openaps without the pump in the neighborhood. so my best guess is no signal whatsoever. will try your suggestion @acember and try to jog the antenna .maybe it lost a contact.
But, does the HAT have a onboard antenna or not?
Abigail Cember
@acember
Apr 01 21:09
@Ricco555 Mine did not appear to have an antenna at all...but I think there may be different versions. If you saw a similar thing when the pump was nowhere nearby, then maybe it's a serial number mismatch? Oh -- one other thing is to make sure that you have remote turned "on". Some people say that it doesn't make a difference, but mine definitely did not work when remote was turned "off".
Riko L
@Ricco555
Apr 01 21:19
remote? what is that?
vsherbeck
@vsherbeck
Apr 01 21:19
I've been trying to do the BT tethering for pi based setup. They are paired, I have btautotethering up, but I'm not seeing any data flowing to the rig... Is there some sort of setting in xdrip or something I need to engage?
Riko L
@Ricco555
Apr 01 21:20
@acember do you mean on the pump or somewhere in the preferences.json?
cstoerner
@cstoerner
Apr 01 21:20
I have one of my backup rigs that has been throwing this message. I figured that the radio was bad because when I switched the pihat/radio out with another one that I had on hand, it immediately started working great, but I had been struggling with that rig intermittently working fine for a few hours and then refusing to loop for hours, then suddenly working again without any intervention on my part. The mmtune comes back fine (-80s to -70s). Do those symptoms sound anything like what you experience?
Abigail Cember
@acember
Apr 01 21:20
@Ricco555 In the pump menu, go to Utilities/Remote Options. You should see the options "On" or "Off". Choose "On".
cstoerner
@cstoerner
Apr 01 21:21
Apologies-prev post @tepidjuice
Scott Leibrand
@scottleibrand
Apr 01 21:21
@acember maybe we need to add the incorrectly check to function fail()
Abigail Cember
@acember
Apr 01 21:23
Yeah, I would say so. It doesn't look like fail() is really expecting to have been the result of a time problem.
Just for my education, where exactly does fail() get called from the main function?
It appears to be a result of the try_fail keyword?
Scott Leibrand
@scottleibrand
Apr 01 21:40
try_fail() calls fail()
try adding grep incorrectly enact/suggested.json && oref0-set-system-clock 2>&3at https://github.com/openaps/oref0/blob/dev/bin/oref0-pump-loop.sh#L138
Eric
@ecc1
Apr 01 21:44

@Ricco555 There are some low-level commands from the medtronic software that should be available on the command line when you're logged into the rig. Try running "sniff" and see whether you can see packets from the pump or another rig (it mightl also print error messages that would be useful to see). If that works, you can run the low-level "mdt" commands, like "mdt battery" which does a simple request to the pump to get the battery level, etc. Again, what it prints on the console would be useful to see.

There's no onboard antenna, just the U.FL connector which needs an antenna connected to it. That connector is delicate (only rated for 30 connect/disconnect operations)

Scott Leibrand
@scottleibrand
Apr 01 21:45
correct: for the Explorer Board (for Edison) there was an onboard antenna, so the u.fl connected external antenna was optional. for the Explorer HAT (for Pi) we skipped the onboard antenna to save space and just did the external connector
Eric
@ecc1
Apr 01 21:47
@vsherbeck it's not enough to have the BT devices paired, there needs to be a bnep0 interface on the rig (the BT "personal area networking" interface), which only gets created when the rig does the bt-pan script (or you use network-manager) and the phone has a BT hotspot already running
Abigail Cember
@acember
Apr 01 21:55
@scottleibrand Yeah, that makes sense. And now for the ignorant question: How exactly do I edit the code that my rig is running? I think I know how to create my own fork and make edits, but I don't understand how to get my my own version onto the rig...
Wait, I think I found that in the docs: Alternative step 1b in "How to update oref0". [Takes deep breath]. This will be by far the most technically advanced thing I've ever done in my life, but there do appear to be instructions.
Riko L
@Ricco555
Apr 01 22:01
@ecc1 ohw do I set other frequency, when I use sniff it defaults to 915,600Mhz
root@Manijak:~# sniff
21:59:47.556431 connected to CC111x radio on /dev/spidev0.0
21:59:47.558509 setting frequency to 916.600
^C21:59:59.991434 disconnecting CC111x radio on /dev/spidev0.0
Abigail Cember
@acember
Apr 01 22:08
Also for my education: is doing both of these things linked with the && symbol pretty much the same as having an if statement of the form
if grep incorrectly enact/smb-suggested.json 2>&3; then
echo "Checking system clock against pump clock:"
oref0-set-system-clock 2>&3 >&4
fi
?
Riko L
@Ricco555
Apr 01 22:20

@ecc1 ohw do I set other frequency, when I use sniff it defaults to 915,600Mhz

the same with mdt commands. can I set it to to use 868 MHz somehow?

Eric
@ecc1
Apr 01 23:12
@Ricco555 export MEDTRONIC_FREQUENCY=868.5 or whatever
good sign that it's seeing the radio though
Riko L
@Ricco555
Apr 01 23:13
@ecc1 :+1: thanks, my bet is on antenna connector.
Scott Leibrand
@scottleibrand
Apr 01 23:22
@acember yes, for a simple foo && bar statement, your if; then; fi statement is equivalent. it gets more complicated when you chain multiple && and || ones
I think you should have a ~/src/oref0 directory already: you should be able to go there, edit bin/oref0-setup directly with vi or nano, and then do npm run global-install to make sure it's installed