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

27th
Jun 2018
lyntonr
@lyntonr
Jun 27 2018 04:13
getting a "radio check failed" message any tips how to debug further on this ? Is this perhaps related to the wrong antenna I have ?

log shows 'Starting oref0-pump-loop at Wed 27 Jun 13:46:04 AEST 2018 with 19 second wait_for_silence:
Waiting up to 4 minutes for new BG: ls: cannot access '/tmp/pump_loop_completed': No such file or directory
ValueError: Invalid SPI context

Radio check failed. ValueError: Invalid SPI context
Listening for 40s silence before mmtuning: .................................................................................................................................................................................................................................................................................................................................................'

Scott Leibrand
@scottleibrand
Jun 27 2018 04:16
No, that has to do with the SPI comms channel between the CPU and the radio chip.
You might try a full power cycle, but if it persists after that it might be a software misconfiguration issue (or mismatch with your hardware).
Is this an Explorer Board/HAT, or something else?
lyntonr
@lyntonr
Jun 27 2018 04:20
new explorer pi hat with raspbian stretch upgraded to latest running oref0-dev-0.6.2 . I get the unicorn on the screen so appears working
Jon Cluck
@cluckj
Jun 27 2018 04:28
did you reboot after installing?
Martin Haeberli
@mhaeberli
Jun 27 2018 04:29
:+1: concur it’s important to reboot after install ...
from practical experience
Scott Leibrand
@scottleibrand
Jun 27 2018 04:29
It’s supposed to force a reboot after oref0-setup
(The first time, when it installs the SPI stuff.)
lyntonr
@lyntonr
Jun 27 2018 04:33
still happens after a full power cycle what should i try next ? and yes it did reboot after install .
Jon Cluck
@cluckj
Jun 27 2018 04:35
check to see if dtparam=spi=on is in /boot/config.txt?
lyntonr
@lyntonr
Jun 27 2018 04:38
yes config.txt shows dtparam=spi=on
Martin Haeberli
@mhaeberli
Jun 27 2018 04:39
naive question - do you have another Pi Zero W? if so, try shutting it all down, move the flash card to the other one, move the Explorer Hat to the other one, and try again...
in the alternative, if you have another Pi Hat, try that on the current pi zero w
lyntonr
@lyntonr
Jun 27 2018 04:40
i have other pis but none with headers atm. I can solder one up, but first is there maybe there is some sort of test I can run to check SPI functionality ?
Martin Haeberli
@mhaeberli
Jun 27 2018 04:40
(hypothesis here - spi connection bad at either the Pi zero end or at the hat end
you can use an RPi 3 B + … just for testing - with the same flash card
good question re SPI test; I don’t know
Jon Cluck
@cluckj
Jun 27 2018 04:46
did MRAA install?
ldconfig -p | grep -q mraa or check in ~/src/ for mraa
lyntonr
@lyntonr
Jun 27 2018 04:53
/dev show spidev0.0 and spidev0.1 ldconfig shows nothing but if i remove the -q param to grep i see root@lynton_rig:~/src/oref0# ldconfig -p | grep mraa libmraa.so.1 (libc6,hard-float) => /usr/local/lib/libmraa.so.1 libmraa.so (libc6,hard-float) => /usr/local/lib/libmraa.so
Jon Cluck
@cluckj
Jun 27 2018 04:55
oh, lol, I'm tired and copied from the setup :laughing:
Jon Cluck
@cluckj
Jun 27 2018 05:04
I've gotta go to sleep, but the times I've seen that invalid spi context message is when spi_serial or mraa are not installed
lyntonr
@lyntonr
Jun 27 2018 05:15
thanks @cluckj and others I'll fish around some more and maybe try reinstalling on a new card
lyntonr
@lyntonr
Jun 27 2018 11:16

oh man its working WOW! I reinstalled from scratch on a new card of note was this error just before the set cron question at the end. 'ResettiMRAA ng spi_serial
Traceback (most recent call last):
File "/usr/local/bin/reset_spi_serial.py", line 3, in <module>
s = spi_serial.SpiSerial()
File "/usr/local/lib/python2.7/dist-packages/spi_serial/spi_serial.py", line 11, in init
self.dev = m.spiFromDesc("spi-raw-0-0")
File "/usr/local/lib/python2.7/dist-packages/mraa.py", line 636, in spiFromDesc
return _mraa.spiFromDesc(desc)
ValueError: Invalid SPI context
Schedule openaps in cron? y/[N]'

Earlier when it was building MRAA it warned not to use it before reboot so Im guessing thats why this occured.
Also when it asked to reboot the reboot did not happen and manually typong reboot after breaking out also failed to reboot. I had to power off to restart.
ANyway all is good no more SPI context errors and data is being read from pump and temp basals being set.
Im a looper now :)))

Greg Eden
@skaffen
Jun 27 2018 14:39
Hi all - Having difficulty with an Edison/Explorer board v1.2 overheating and shutting down when connected via USB in to charge. Usually overnight when it's most needed! It didn't do this in the first few weeks. Any ideas?
Tried a few different batteries. Currently using brand new ADAfruit 2500mAh, similar behaviour with a 2000mAh
Jon Cluck
@cluckj
Jun 27 2018 14:45
@lyntonr great :D
JohnDoeAkira
@JohnDoeAkira
Jun 27 2018 14:46
alright, after a couple of days of careful inspection of this old-timer 722 pump, I am officially looping now !! Very excited !
Jon Cluck
@cluckj
Jun 27 2018 14:49
:clap:
Dana Lewis
@danamlewis
Jun 27 2018 15:20
Congrats @lyntonr and @JohnDoeAkira !
@skaffen what kind of case is your rig in, or how/where does it sit at nights?
lyntonr
@lyntonr
Jun 27 2018 15:23
Thanks @danamlewis and @cluckj lying in bed su window on tablet , xdrip on phone ,
termina
Meant to say thanks to everyone here, this is nothing shor
Jon Cluck
@cluckj
Jun 27 2018 15:25
@lyntonr did you use pibakery to flash raspbian?
lyntonr
@lyntonr
Jun 27 2018 15:25
This time yes
Jon Cluck
@cluckj
Jun 27 2018 15:27
hmm okay
lyntonr
@lyntonr
Jun 27 2018 15:28
Why hmmmm
Jon Cluck
@cluckj
Jun 27 2018 15:29
we've seen the reboot and shutdown commands not working on pibakery
lyntonr
@lyntonr
Jun 27 2018 15:31
Yes that's what happened for me both shutdown -h now and reboot failed. Is there a way to fix it ?
Jon Cluck
@cluckj
Jun 27 2018 15:34
I have a feeling about what the issue is, but I need to confirm it :)
lyntonr
@lyntonr
Jun 27 2018 15:36
Ok let me know if I can help test your theory somehow
Jon Cluck
@cluckj
Jun 27 2018 15:37
my guess is that the pibakery reboot and shutdown scripts replaced the system commands, and aren't being called as root
Greg Eden
@skaffen
Jun 27 2018 15:39
@danamlewis I'm currently using the Robert Silvers and Eric Burt dual battery 3D printed case. Prior to that we used the Rob Kresha 3d printed case.
Dana Lewis
@danamlewis
Jun 27 2018 15:41
@skaffen does it get flipped over so the vents are down? I've only ever had a problem at night when my rig got covered by covers (smothered, no air flow). So you should try taking it out of the case, or flipping it over and see if that makes a difference
Greg Eden
@skaffen
Jun 27 2018 15:41
I'm going to experiment with using a few different USB chargers, perhaps the board doesn't handle higher inputs very well.
@danamlewis Understood on covered vents. Today's test was on an open surface with unobstructed vents. Admittedly it's quite warm in the UK at the moment. It went from 49 degrees idling to 90 degrees in the space of a few minutes after being plugged in to charge. (I logged coretemp to a text file.)
Dana Lewis
@danamlewis
Jun 27 2018 15:52
definitely worth swapping cords etc to see if you can narrow down what's contributing to it.
Greg Eden
@skaffen
Jun 27 2018 16:13
is there a quick way of monitoring charge level on the command line? A plain old iPhone charger seems to be keeping charging temp lower (79 degrees) than the whizzy Anker Quickcharge 3 charger.
garykidd
@garykidd
Jun 27 2018 16:31
is this correct?
cd ~/myopenaps && sudo service cron stop && killall -g openaps ; killall -g oref0-pump-loop; openaps-use pump mmtune && sudo service cron start
Martin Haeberli
@mhaeberli
Jun 27 2018 17:32
new experiments - over a longer baseline - display off, underclocked to 500MHz; HDMI off, led off: 136 mA; display on, default clock 1 GHz, HDMI on, led on, 181 mA
Jon Cluck
@cluckj
Jun 27 2018 17:34
wow
Zach Gohr
@zgohr
Jun 27 2018 17:35
that’s while looping?
Martin Haeberli
@mhaeberli
Jun 27 2018 17:37
yes, although this is on a test pump shadowing real CGM data ...
peterfulvi
@peterfulvi
Jun 27 2018 17:37
Ijust ran seup with my PI-HAT. I chose G5 for CGM . Do i have to plug in the reciever to get BG values to my rig. I thought the rig reads the BG values from your transmitter .
Martin Haeberli
@mhaeberli
Jun 27 2018 17:38
so there are arguably some edge cases not covered - say, frequent SMBs, etc. Not clear that this would have an adverse impact on power use.
Dana Lewis
@danamlewis
Jun 27 2018 17:38
@peterfulvi you'll need to set up lookout or logger if you want that. G5 just tells OpenAPS that you'll get G5 data from Nighstcout
peterfulvi
@peterfulvi
Jun 27 2018 17:39
@danamlewis Ok ! thanks
Martin Haeberli
@mhaeberli
Jun 27 2018 17:46
to be clear, I just figured out the channel name is ‘xdrip-js'
Dana Lewis
@danamlewis
Jun 27 2018 17:46
I think that's in the docs section, but please PR if that vanished
Martin Haeberli
@mhaeberli
Jun 27 2018 17:53
proposed PR #1308 to docs per your suggestion - feel free to edit to improve. (I didn’t find gitter channel ref in docs page)
Dana Lewis
@danamlewis
Jun 27 2018 17:58
fantastic - merged, thanks!
Martin Haeberli
@mhaeberli
Jun 27 2018 18:01
:+1:
Jon Cluck
@cluckj
Jun 27 2018 21:12
Couldn't reproduce the shutdown/reboot issue this afternoon 🙄
Rob Neu
@robpneu
Jun 27 2018 22:49

Who else has had issues with flashing Ubilinux using macOS (possibly just a USB-C Mac like my MacBook Pro with Touch Bar Late-2016 to be specific)? Mine kept blowing right through the "Flashing rootfs, (it can take up to 10 minutes... Please be patient)" in about 10 seconds and not actually flashing it properly. Been going at it for about 3 hours now.

I found that removing the "-R" at the end of line 231 of flashall.sh allowed it to upload properly. I believe the -R is the "reset" signal sent after the upload finishes, per http://dfu-util.sourceforge.net/dfu-util.1.html. I did have to do a ctrl+c to exit at the end of the upload (which it said to do) to trigger the beginning of the series reboots, but it worked at the end :smile: