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

4th
May 2019
Alfredo kachy
@kachytronico
May 04 00:10
root@edison2:~# ifup wlan0 
wpa_supplicant: /sbin/wpa_supplicant daemon failed to start
run-parts: /etc/network/if-pre-up.d/wpasupplicant exited with return code 1
ifup: failed to bring up wlan0
Alfredo kachy
@kachytronico
May 04 00:31
I have also tried what was recommended in
openaps/oref0#648
´apt-get remove --purge dnsmasq´and then ´apt-get install dnsmasq ´
when restarting:
[FAILED] Failed to start Raise network interfaces.ster
See 'systemctl status networking.service' for details.
root@edison2:~# systemctl status networking.service
● networking.service - Raise network interfaces
   Loaded: loaded (/lib/systemd/system/networking.service; enabled; vendor prese
   Active: failed (Result: exit-code) since Sat 2019-05-04 02:23:30 CEST; 9min a
     Docs: man:interfaces(5)
  Process: 249 ExecStart=/sbin/ifup -a --read-environment (code=exited, status=1
  Process: 198 ExecStartPre=/bin/sh -c [ "$CONFIGURE_INTERFACES" != "no" ] && [ 
 Main PID: 249 (code=exited, status=1/FAILURE)

May 04 02:23:30 edison2 wpa_supplicant[343]: Line 13: failed to parse ssid 'MOVI
May 04 02:23:30 edison2 wpa_supplicant[343]: Line 16: failed to parse network bl
May 04 02:23:30 edison2 wpa_supplicant[343]: Failed to read or parse configurati
May 04 02:23:30 edison2 ifup[249]: /etc/network/if-pre-up.d/wpasupplicant: 120: 
May 04 02:23:30 edison2 ifup[249]: run-parts: /etc/network/if-pre-up.d/wpasuppli
May 04 02:23:30 edison2 ifup[249]: ifup: failed to bring up wlan0
May 04 02:23:30 edison2 systemd[1]: networking.service: Main process exited, cod
May 04 02:23:30 edison2 systemd[1]: Failed to start Raise network interfaces.
May 04 02:23:31 edison2 systemd[1]: networking.service: Unit entered failed stat
May 04 02:23:31 edison2 systemd[1]: networking.service: Failed with result 'exit
Alfredo kachy
@kachytronico
May 04 00:48
I got it
running rfkill unblock wifi running rfkill listNow, running ifconfig wlan0 upreturns without error
openaps/oref0#648
Alfredo kachy
@kachytronico
May 04 01:09
@cluckj
I went back to try and hang in the same command when I want to check the BT connection.
iwconfig wlan0 txpower off; sleep 120; iwconfig wlan0 txpower auto
Now I know how to get out of it but it's very weird.
davidvjr
@davidvjr
May 04 14:29
Good morning! So I'm switching pumps, from a WW to a NA. The WW pump will be my backup. I have external antenna for both frequencies for my Edison w/ Explorer board. Should I cut the trace on the explorer board for 915 MHz if the NA pump will be used the majority of the time? Or does the external antenna of the proper length negate the need to cut the trace?
Jon Cluck
@cluckj
May 04 14:39
@davidvjr the latter; you shouldn't need to cut the trace
davidvjr
@davidvjr
May 04 14:40
@cluckj OK, Thanks Jon.
Alfredo kachy
@kachytronico
May 04 14:43

@cluckj
Hello again. After yesterday's long day today my new platform is working with edison jubilinux 0.3 and the master branch. Thank you, it's great how well you work.
The problem is that I'm not good at changing BT to Wifi.
In fact, it is now connected to both at the same time.

what should I do?

Jon Cluck
@cluckj
May 04 14:44
is it okay with you that it's connected to both? (I have mine tethered to my phone all the time)
Alfredo kachy
@kachytronico
May 04 14:47
spend too much battery, sorry
when I went out to the street it was also connected to BT and the personal hotspot
This should not be like this, right?
Jon Cluck
@cluckj
May 04 14:48
the bluetooth tether is much lower battery usage than the wifi hotspot
Alfredo kachy
@kachytronico
May 04 14:49
I already understand it, but how can I change it automatically without being connected to two places?
the other rig does not, I had to be something that was bad yesterday when I configured the BT. You can help?
Did you read what happened to me yesterday?
Jon Cluck
@cluckj
May 04 14:52
there are some preferences about how the bluetooth tether works, do you have any of those set?
Alfredo kachy
@kachytronico
May 04 14:54
I followed the instructions and failed with this: iwconfig wlan0 txpower off; sleep 120; iwconfig wlan0 txpower auto
https://openaps.readthedocs.io/en/latest/docs/Customize-Iterate/bluetooth-tethering-edison.html
this morning I was connected to wifi only. when I went for a walk, he connected BT quickly but when he came back he did not connect to the wifi. I have rebooted and now connects to both at the same time, BT and Wifi
Jon Cluck
@cluckj
May 04 15:00
is "bt_offline" set in your preferences.json?
or bt_with_wifi?
Alfredo kachy
@kachytronico
May 04 15:03
Captura de pantalla 2019-05-04 a las 17.02.49.png
I do not think so
Jon Cluck
@cluckj
May 04 15:05
oh, you're using master, sorry!
Alfredo kachy
@kachytronico
May 04 15:06

Yes.
Before, I added a line to cron.
Edit your root cron crontab -e
Add the following line `/2 * ( (wpa_cli status | grep <YOURWIFINAME> > /dev/null && echo already on <YOURWIFINAME>) || (wpa_cli scan > /dev/null && wpa_cli scan_results | egrep <YOURWIFINAME> > /dev/null && sudo wpa_cli select_network $(wpa_cli list_networks | grep jsqrd | cut -f 1) && echo switched to <YOURWIFINAME> && sleep 15 && (for i in $(wpa_cli list_networks | grep DISABLED | cut -f 1); do wpa_cli enable_network $i > /dev/null; done) && echo and re-enabled other networks) ) 2>&1 | logger -t wifi-select``

https://openaps.readthedocs.io/en/latest/docs/Resources/troubleshooting.html#i-forget-to-switch-back-to-home-wifi-and-it-runs-up-my-data-plan

It may not be a good idea. But I did it because I did not connect to the Wi-Fi when I went home
Jon Cluck
@cluckj
May 04 15:13
hm
Alfredo kachy
@kachytronico
May 04 15:18
?
Sorry, I do not understand.
Jon Cluck
@cluckj
May 04 15:19
I'm a little out of my element troubleshooting bluetooth connectivity, so I'm looking stuff up :)
Alfredo kachy
@kachytronico
May 04 15:24
Take your time, I try to learn not to ask so many things but I have rested a little and I am very confused. sorry.
paulsche
@paulsche
May 04 15:35
@jonny772 , @scottleibrand, @cluckj
I installed oref0 0.7.0 dev, now my edi doesn´t loop , there is no connection to the pump. Are there any issues with CGM MDT known?
Jon Cluck
@cluckj
May 04 15:38
can you paste some logs from the loop?
straykatz
@straykatz
May 04 16:18
Good morning! How can I make "space on my device"? What kinds of files might be plugging it up?
cp: error writing ‘/usr/local/bin/writehistory’: No space left on device cp: failed to extend ‘/usr/local/bin/writehistory’: No space left on device Couldn't copy go/bin
ideally short of a reflash :-) (I still have not had chance to take theMacBook in for a check, and even with new cables, the reflash is not always successful - although better than it was)
Eric
@ecc1
May 04 16:24
@straykatz start by running df -h and find the line that has 100% used -- what does the "Mounted on" field say?
Jon Cluck
@cluckj
May 04 16:25
@straykatz did you just do a re-run of setup on the latest dev?
straykatz
@straykatz
May 04 16:25
Hi, Jon. yes
crontab.txt kernel.config myopenaps src
go Lookout scanStart stateChange:
Jon Cluck
@cluckj
May 04 16:25
I'm still testing the edison disk space fix
straykatz
@straykatz
May 04 16:26
Ahh
Jon Cluck
@cluckj
May 04 16:26
want to do it manually?
straykatz
@straykatz
May 04 16:26
yes
I just deleted the ScanStart and StatusChange files
@ecc1 /dev/mmcblk0p10 1.3G 1.3G 3.0M 100% /home
Jon Cluck
@cluckj
May 04 16:28
cd /usr/local then rm -rf go/, then mkdir go and then mount /dev/mmcblk0p9 /usr/local/go
then do df -h again to make sure it's mounted properly
after that, you can re-run oref0-setup; if you reboot (for whatever reason) before setup finishes, you'll have to re-run the mount command
straykatz
@straykatz
May 04 16:29
Filesystem Size Used Avail Use% Mounted on /dev/root 1.4G 798M 518M 61% / devtmpfs 481M 0 481M 0% /dev tmpfs 481M 0 481M 0% /dev/shm tmpfs 481M 6.7M 474M 2% /run tmpfs 5.0M 0 5.0M 0% /run/lock tmpfs 481M 0 481M 0% /sys/fs/cgroup tmpfs 481M 12K 481M 1% /tmp /dev/mmcblk0p7 32M 4.8M 28M 16% /boot /dev/mmcblk0p10 1.3G 1003M 288M 78% /home tmpfs 97M 0 97M 0% /run/user/0 /dev/mmcblk0p9 767M 864K 766M 1% /home/.rootfs/usr/local/go
that is 'properly mounted' right? 78% ...?
Jon Cluck
@cluckj
May 04 16:31
yep
straykatz
@straykatz
May 04 16:32
can Use bash ~/myopenaps/oref0-runagain.sh to rerun setup?
thank you
Jon Cluck
@cluckj
May 04 16:32
95% sure runagain will work but please check it :laughing:
straykatz
@straykatz
May 04 16:32
ok :)
so here is what happened. (Silly me). Everything was working nicely - Lookout was running fine, 2 rigs, happiness.
then I installed Spike last night, and made the mistake of running it in Master mode.
I realized that that is probably a bad idea (because of Lookout pinging the transmitter) - and set it to Follower,
everything good, until about 4 hours later, when no more BGs were being uploaded and Lookout was not able to get back online (which my skills at least, and following previous troubleshooting steps)
so I tried to get another rig to run it, and re-ran set-up ...
btw - setup is running as expected right now with the "mount" thingy
straykatz
@straykatz
May 04 16:38
but I guess the problem shows later - at the go binaries portion of the show?
@cluckj Schedule openaps in cron? y/[N] :)
Jon Cluck
@cluckj
May 04 16:41
:D
straykatz
@straykatz
May 04 16:53
so I assume I do this again with the second rig after global-install went through @cluckj
`cd /usr/local` then `rm -rf go/`, then `mkdir go` and then `mount /dev/mmcblk0p9 /usr/local/go`
then do `df -h` again to make sure it's mounted properly
Jon Cluck
@cluckj
May 04 16:55
yes
straykatz
@straykatz
May 04 16:55
looking 'proper'
Jon Cluck
@cluckj
May 04 17:03
yay
straykatz
@straykatz
May 04 17:12
setup worked both times with the bash command btw
Thank you!!!
Jon Cluck
@cluckj
May 04 17:12
great!
Max Reichardt
@max_reichardt_twitter
May 04 19:03
Hi everyone - Max here. T1D for 12 years and pump user for almost all that time, CGM user for ~3 yrs. Long story short, I have a few older compatible Medtronic pumps that should go to a better home. I currently am privileged to use the 670G system, have good insurance, etc. and I don't want to exploit/profit from my fellow Type 1 Diabetics. Is this the right chat to get in contact with folks who: a) Are uninsured; b) Cannot afford to buy a pump to get started DIYing? I want to give these away for very cheap to a deserving person trying to control their diabetes better. Would appreciate any direction to a relevant chat room, any other resources, etc. My email is maxwellreichardt@gmail.com. Thank you! One love.
Scott Leibrand
@scottleibrand
May 04 19:22
Generally pump giveaways and sales are coordinated on the Looped group on Facebook.
Max Reichardt
@max_reichardt_twitter
May 04 19:34
Ok, one of the group rules indicated "No selling/promotion" so I wasn't sure. Thanks!
davidvjr
@davidvjr
May 04 19:41
@max_reichardt_twitter Selling/giving pumps is fine on the Looped group, but be careful to follow group rules. State your price in your ad. No best offer or bidding. Sounds like you don't want to charge much any way, which is great! You will be well received.
Max Reichardt
@max_reichardt_twitter
May 04 19:42
@davidvjr Thanks David!
Dana Lewis
@danamlewis
May 04 20:25
@max_reichardt_twitter thanks for being so kind to the community!
Eric
@ecc1
May 04 20:28
@davidvjr if anything, I expect you'll be swamped with interest there. One thing that seems to work well is not to just say "first come first served", but leave it open for some longer period (a day or more) and then pick one of the qualified respondents at random
davidvjr
@davidvjr
May 04 22:20
OK, so I had my Edison + Explorer working with a WW 712 pump. I was just looping it with the pump not hooked up to me, just to test everything out. Now, I was given a really nice NA 722 and I'm trying to rerun setup to get it working, but I keep coming up with:
go/test/uintptrescapes.go
go/test/uintptrescapes2.go
go/test/undef.go
go/test/utf.go
go/test/varerr.go
go/test/varinit.go
go/test/writebarrier.go
go/test/zerodivide.go
PATH=$PATH:/usr/local/go/bin:$GOROOT/bin:$GOPATH/bin
PATH=$PATH:/usr/local/go/bin:$GOROOT/bin:$GOPATH/bin
/root/.bash_profile: line 1: syntax error near unexpected token `('
/root/.bash_profile: line 1: `Binary file (standard input) matches'
/root/src/oref0/bin/oref0-setup.sh: line 1316: go: command not found
Couldn't go get medtronic
Any thoughts?
I previously was running the dev branch because @cluckj suggested it to get my 712 working.
davidvjr
@davidvjr
May 04 22:26
Here is my setup info:
# To run again with these same options, use:
/root/src/oref0/bin/oref0-setup.sh --dir=/root/myopenaps --serial=392071 --cgm=xdrip --ns-host=https://vaniernightscout.herokuapp.com --api-secret=************ --tty=/dev/spidev5.1 --max_iob=3 --radio_locale='US' --hardwaretype='edison-explorer' --radiotags='cc111x'
root@edisonrig:~/myopenaps#
Eric
@ecc1
May 04 22:27
@max_reichardt_twitter sorry, my comment about giving away/selling pumps was meant for you, not @davidvjr
Jon Cluck
@cluckj
May 04 22:40
@davidvjr try the thing that I suggested to straykatz earlier: https://gitter.im/nightscout/intend-to-bolus?at=5ccdbdab8446a6023ec62c89
and make sure you have the latest dev
(it looks like you do)
davidvjr
@davidvjr
May 04 22:44
@cluckj Hi Jon, Thanks I'll try it.
@cluckj Does this look ok?
root@edisonrig:/usr/local# df -h
Filesystem       Size  Used Avail Use% Mounted on
/dev/root        1.4G  610M  706M  47% /
devtmpfs         481M     0  481M   0% /dev
tmpfs            481M     0  481M   0% /dev/shm
tmpfs            481M  6.7M  474M   2% /run
tmpfs            5.0M     0  5.0M   0% /run/lock
tmpfs            481M     0  481M   0% /sys/fs/cgroup
tmpfs            481M  106M  376M  22% /tmp
/dev/mmcblk0p7    32M  4.8M   28M  16% /boot
/dev/mmcblk0p10  1.3G  916M  375M  71% /home
tmpfs             97M     0   97M   0% /run/user/0
/dev/mmcblk0p9   767M  4.0K  767M   1% /home/.rootfs/usr/local/go
Jon Cluck
@cluckj
May 04 22:48
yep, give setup another run
davidvjr
@davidvjr
May 04 22:48
OK, will do
Jon Cluck
@cluckj
May 04 22:49
are you using runagain, or the interactive setup?
davidvjr
@davidvjr
May 04 22:50
I did interactive... that ok?
Jon Cluck
@cluckj
May 04 22:52
yep
davidvjr
@davidvjr
May 04 22:56
Same result:
go/test/uintptrescapes2.go
go/test/undef.go
go/test/utf.go
go/test/varerr.go
go/test/varinit.go
go/test/writebarrier.go
go/test/zerodivide.go
PATH=$PATH:/usr/local/go/bin:$GOROOT/bin:$GOPATH/bin
PATH=$PATH:/usr/local/go/bin:$GOROOT/bin:$GOPATH/bin
/root/.bash_profile: line 1: syntax error near unexpected token `('
/root/.bash_profile: line 1: `Binary file (standard input) matches'
/root/src/oref0/bin/oref0-setup.sh: line 1316: go: command not found
Couldn't go get medtronic
root@edisonrig:~#
Jon Cluck
@cluckj
May 04 23:05
can you look in your ~/.bash_profile to see if there's weird stuff in it?
by weird I mean non-ASCII characters
davidvjr
@davidvjr
May 04 23:07
@cluckj
root@edisonrig:~# cat ~/.bash_profile
Binary file (standard input) matches
source "/home/.rootfs/usr/local/lib/node_modules/oref0/bin/oref0-log-shortcuts.sh"
source /etc/skel/.profile
PATH=$PATH:/usr/local/go/bin:$GOROOT/bin:$GOPATH/bin
export PATH
NIGHTSCOUT_HOST=***
export NIGHTSCOUT_HOST
API_SECRET=***
export API_SECRET
DEXCOM_CGM_RECV_ID=
export DEXCOM_CGM_RECV_ID
root@edisonrig:~#
Jon Cluck
@cluckj
May 04 23:08
you should redact your NS url and api secret
and then delete the first line that says "Binary Input matches....."
err binary file
davidvjr
@davidvjr
May 04 23:12
Duh.
OK, so I can open this file to edit with nano?
Jon Cluck
@cluckj
May 04 23:13
yes
davidvjr
@davidvjr
May 04 23:16

@cluckj

root@edisonrig:~# cat ~/.bash_profile
source "/home/.rootfs/usr/local/lib/node_modules/oref0/bin/oref0-log-shortcuts.sh"
source /etc/skel/.profile
PATH=$PATH:/usr/local/go/bin:$GOROOT/bin:$GOPATH/bin
export PATH
NIGHTSCOUT_HOST=*
export NIGHTSCOUT_HOST
API_SECRET=*
export API_SECRET
DEXCOM_CGM_RECV_ID=
export DEXCOM_CGM_RECV_ID

Now rerun setup? If setup did not complete is it still OK to use runagain?

Jon Cluck
@cluckj
May 04 23:17
runagain should work if it has --radiotags at the end
davidvjr
@davidvjr
May 04 23:21
Sorry, I don't understand. I'm operating over my own head here. Radiotags?
Jon Cluck
@cluckj
May 04 23:22
the runagain you pasted earlier will work :)
davidvjr
@davidvjr
May 04 23:23
OK, thanks.
davidvjr
@davidvjr
May 04 23:29
@cluckj OK its running but what the heck are radiotags? When I google radiotag and python, well you can guess that doesn't get me very far. Ha.
Jon Cluck
@cluckj
May 04 23:35
it's a config variable to tell the installer what kind of radio you're using
Eric
@ecc1
May 04 23:35
radiotags is the variable in the install shell script that holds some compilation flags for building the Go code. They're called "build tags" in Go, kind of like preprocessor ifdefs in C
davidvjr
@davidvjr
May 04 23:38
OK, thanks guys. I'm taking an intro to C++ class now, so I'm interested. But it's still over my head!
OK, setup finished! I'm rebooting now. Thanks @cluckj !
Should have taken linux and python...
Jon Cluck
@cluckj
May 04 23:53
any compsci that teaches you an object-oriented language is going to be pretty portable
davidvjr
@davidvjr
May 04 23:57
Yes I see a lot of similarities...