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

12th
Mar 2017
Terri Lyman
@tatigger
Mar 12 2017 00:04
Hi everyone, I am back. I am going to try again to set up my android with bluetooth tethering. Anything special I should do that maybe I don't know to do? I have followed the steps here http://openaps.readthedocs.io/en/latest/docs/walkthrough/phase-4/bluetooth-tethering-edison.html and the connection seems to exist in my lists on my android phone, but I can't get the connection to confirm.
Scott Leibrand
@scottleibrand
Mar 12 2017 00:11
@gregtcm why is changing IP addresses when you switch networks a problem?
dmdfreak
@dmdfreak
Mar 12 2017 00:17
@tatigger I'm with T-Mobile and I found out my phone was blocked from Bluetooth tethering.
Might be your phone isn't capable no matter how new it is. Mine is an LG v20 and it didn't have it.
jcorbett80
@jcorbett80
Mar 12 2017 00:19
@tatigger are you also on att?
Terri Lyman
@tatigger
Mar 12 2017 00:20
Hmmm, no I am on Ting, but I will check that out. I think I found a step I missed, so I am setting up the tethering again.
dmdfreak
@dmdfreak
Mar 12 2017 00:21
@tatigger what phone are you using?
Terri Lyman
@tatigger
Mar 12 2017 00:21
It's a Moto E. My Nightscout uploader
Eric
@ecc1
Mar 12 2017 00:26
Does the phone have an explicit "Bluetooth tethering" on/off setting, somewhere under the Tethering & Mobile Hotspot settings? If not, your carrier may have disabled it. But if it's there, chances are good it will work. Once it's turned on, there's a command you can run on the Edison (in bluetoothctl, type "info <your phone's BT address>") to see if it really has that capability.
dmdfreak
@dmdfreak
Mar 12 2017 00:30
You explained way better than I did LOL
Dana Lewis
@danamlewis
Mar 12 2017 00:32
@ecc1 +1 for adding to the docs
dmdfreak
@dmdfreak
Mar 12 2017 00:32
Was just thinking that
Would have saved me a full day of pulling my hair out lol
Terri Lyman
@tatigger
Mar 12 2017 00:44
@ecc1 Does have BT tethering as a separate setting...trying that command now.
jcorbett80
@jcorbett80
Mar 12 2017 00:44
@danamlewis that part actually is in the docs pretty good. The issue we are finding is more and more phones are being blocked by provider. Like I said Samsung is looking at the Galaxy for me. Att allows thier other phones so it may be a bloat ware collision issue and of course att's bloat ware gets priority. However att is the one that got Samsung and I working to figure how how to make it work.
Terri Lyman
@tatigger
Mar 12 2017 00:44
Device 88:79:7E:C1:63:04
    Name: XT1526
    Alias: XT1526
    Class: 0x5a020c
    Icon: phone
    Paired: yes
    Trusted: yes
    Blocked: no
    Connected: no
    LegacyPairing: no
    UUID: OBEX Object Push          (00001105-0000-1000-8000-00805f9b34fb)
    UUID: Audio Source              (0000110a-0000-1000-8000-00805f9b34fb)
    UUID: A/V Remote Control Target (0000110c-0000-1000-8000-00805f9b34fb)
    UUID: A/V Remote Control        (0000110e-0000-1000-8000-00805f9b34fb)
    UUID: Headset AG                (00001112-0000-1000-8000-00805f9b34fb)
    UUID: NAP                       (00001116-0000-1000-8000-00805f9b34fb)
    UUID: Handsfree Audio Gateway   (0000111f-0000-1000-8000-00805f9b34fb)
    UUID: Phonebook Access Server   (0000112f-0000-1000-8000-00805f9b34fb)
    UUID: Message Access Server     (00001132-0000-1000-8000-00805f9b34fb)
    UUID: PnP Information           (00001200-0000-1000-8000-00805f9b34fb)
    UUID: Generic Access Profile    (00001800-0000-1000-8000-00805f9b34fb)
    UUID: Generic Attribute Profile (00001801-0000-1000-8000-00805f9b34fb)
    UUID: Vendor specific           (fafbdd20-83f0-4389-addf-917ac9dae5b2)
    Modalias: bluetooth:v001Dp1200d1436
So it is paired and trusted, but not connected. My error was that bnep0 was not found
jcorbett80
@jcorbett80
Mar 12 2017 00:45
@tatigger I will try to find the page in the docs and post. Give me a second. I used it and it was easy until I found no tethering galaxy on mine.
Terri Lyman
@tatigger
Mar 12 2017 00:47
It makes me wonder if there is something commented out in the file /etc/network/interfaces
Terri Lyman
@tatigger
Mar 12 2017 00:49
Yep - that's where I am @jcorbett80 . I skipped the "trust" part, but found that and now am stuck at ```
jcorbett80
@jcorbett80
Mar 12 2017 00:49
My phone pairs with my rig. But the setting in the closed loop section I posted just now requires the tether to have the handshake.
Dana Lewis
@danamlewis
Mar 12 2017 00:49
@jcorbett80 even that kind of note/tip is helpful about phone not always having the capabilities
#PRallthethings
jcorbett80
@jcorbett80
Mar 12 2017 00:50
@danamlewis that is true. I will try to add that tomorrow also
Terri Lyman
@tatigger
Mar 12 2017 00:50
Next, to test your Internet connectivity, you’ll need to get an IP address:
sudo dhclient bnep
Which is where that error came from
root@localhost:~# sudo bt-pan client 88:79:7E:C1:63:04
root@localhost:~# sudo dhclient bnep0
Cannot find device "bnep0"
jcorbett80
@jcorbett80
Mar 12 2017 00:50
@tatigger once you miss something like that it is easiest to do a bash- rerun of the install
Terri Lyman
@tatigger
Mar 12 2017 00:51
:)
jcorbett80
@jcorbett80
Mar 12 2017 00:51
@tatigger it's quick easy and redness it all
Re does
Terri Lyman
@tatigger
Mar 12 2017 00:52
@jcorbett80 I have redone it so many times at this point that I know all the commands, LOL, for now. I just "forgot" the connection on the phone and started over. Also, you seem to need to use all caps i that MAC
jcorbett80
@jcorbett80
Mar 12 2017 00:52
Now if they can fix androids word replace while posting your commit I would be real happy
@tatigger I opened word and copied / paStedman the steps. Put my mac address in it. So now all I do is copy pastep each time and yes a MAC I.D. must always be caps.
Terri Lyman
@tatigger
Mar 12 2017 00:55
Yeah well it is not caps in the phone data screen. Picky specific ........ things
:)
jcorbett80
@jcorbett80
Mar 12 2017 00:55
Lol
Terri Lyman
@tatigger
Mar 12 2017 00:58
So, should that "bnep0" thing that I am not finding be actually part of this file used to setup internet connectivity: /etc/network/interfaces
?
Oh, wait, when I ran the setup script I used lower case for alpha characters in the MAC. Let me redo that first, and see if that changes anything? Or does that not matter?
jcorbett80
@jcorbett80
Mar 12 2017 01:12
@tatigger benp0 is what you type to find the address from command line just like if configuration.
@tatigger and yes it matters
Terri Lyman
@tatigger
Mar 12 2017 01:15
Cool :) will start over there, then. This is how I build vocabulary. LOL. Older learners! thanks @jcorbett80 you are always way helpful
jcorbett80
@jcorbett80
Mar 12 2017 01:19
@tatigger lol I'm building vocabulary also. I wrote code many many many and did I say many years ago. Forgot most. But no matter what I never even looked at Linux. Great thing however is the logic never has nor will it ever change in the future. Learn that and life starts to get easy.
Terri Lyman
@tatigger
Mar 12 2017 01:21
:) Good to know @jcorbett80. This old pharmacist is learning new tricks.
jcorbett80
@jcorbett80
Mar 12 2017 01:24
@tatigger also I never get ifconfig or benp0 to work truly until the right is rebooted and allowed to search, find, and set the address is is connecting to. So allow it to boot. Let it come completely up. Login as root. Then wait for 3-4 minutes. Then do the check.
Just like booting a pc. All system devices load first so that it knows how to find it. Then the add-ons like Internet and so on come up.
If the drivers aren't loaded it can't activate the nic. If the nic is not activated it can't search for addresses. If it can find addresses it can't connect to one. If it can't connect to address then you will not have a network. No network no return of an address.
That's the logic flow.
Scott Leibrand
@scottleibrand
Mar 12 2017 01:35
FWIW, it's bnep0 rather than benp0, if you want to get the vocabulary right. :)
Terri Lyman
@tatigger
Mar 12 2017 01:59
Ha @scottleibrand that is that stupid spell checker!
So for this line, is the hostname capitalized so you substitute something of your own, or do I want to leave it as is?
sudo hciconfig hci0 name $HOSTNAME
Scott Leibrand
@scottleibrand
Mar 12 2017 02:22
$HOSTNAME is a built-in system variable
dmdfreak
@dmdfreak
Mar 12 2017 02:27
I put the wrong carb count into the pump and started it then stopped it and corrected the bolus. Hour can I correct the carbs in nightscout so openAPS didn't try to cover?
Or should I even worried about it?
Lorenzo Conte
@Lofriendzo_twitter
Mar 12 2017 02:29
hi all, I just flashed my edison-- trying to run "myedisonhostname=<edisonhost>" and am receiving -bash: syntax error near unexpected token `newline' ... can anyone help me out?
Aaron Michelson
@Aaybob
Mar 12 2017 02:31
@Lofriendzo_twitter you don't put in the < or > that just means you make up a name, whatever you like, a color, etc....
Lorenzo Conte
@Lofriendzo_twitter
Mar 12 2017 02:32
Thank you!! gosh still figuring out on the fly
Dana Lewis
@danamlewis
Mar 12 2017 02:36
@dmdfreak ignore, set a temp target if you need it, avoid entering next carbs if there are more coming
jcorbett80
@jcorbett80
Mar 12 2017 02:42
@scottleibrand ;)
dmdfreak
@dmdfreak
Mar 12 2017 02:44
Ok ty @danamlewis
Aaron Michelson
@Aaybob
Mar 12 2017 02:46
The docs look great. But where do I find stuff about running without the internet?
Aaron Michelson
@Aaybob
Mar 12 2017 02:49
I've been bending my micro usb connectors on the explorer board....right there in phase-1, doh, thanks..
off to dancing tonight
glenrob1940
@glenrob1940
Mar 12 2017 04:07
PieterGit@PieterGit and Mike@libxmike I am Confused in Colorado. re Pi3 with latest debian and openaps. I could never get logged in quick enough to do things before it hung. So, on a whim, I hooked up a keyboard, mouse, and display. The system is running (full pixel display) and doing a tail -f on the pump log showed that openaps was running, mmtune completed just fine and everything looks good EXCEPT the network is down, you can't ping it or ssh in, or for that matter ssh or git out. So,... NightScout is never getting updated or read and as a result openaps never enacts. I suppose, I could hook up my dexcom G4 usb to update in camping mode. It has been 15 years since I did kernel drivers, but this begs the question. How is debian doing SMP. Is there some network stuff that is tied to a specific processor and we are doing some task with that processor that stalls/hangs, or whatever so that networking is essentially down? I am currently wireless networking, but could try 100BT. though the end use is going to be wireless.
Eric
@ecc1
Mar 12 2017 04:11
It's almost certainly a user-level network configuration error, not a kernel or multiprocessor scheduling issue. Start by looking at the system logs, output of "ifconfig -a", try to bring the network up manually ("ifup -v wlan0"), etc. Not openaps-specific, just Linux-specific.
glenrob1940
@glenrob1940
Mar 12 2017 04:13
Okay, allthough the funny part of this is that if I kill all the openaps stuff in cron, the system works just fine downloading kernels, ssh in, etc.
Eric
@ecc1
Mar 12 2017 04:16
So some step in the openaps loop is breaking your network. I'd try simulating a loop run "by hand" and seeing exactly which step breaks things.
glenrob1940
@glenrob1940
Mar 12 2017 04:18
Okay, will do, I will kill cron and go that route for troubleshooting. Just for info, sudo ifup -v wlan0 brought the network up for about 3 minutes, until something in the running openaps cron stuff killed it.
And it goes without saying, that the only way to successfully do this is from the actual console, if someone else runs into the problem because ssh doesn't work consistently.
glenrob1940
@glenrob1940
Mar 12 2017 04:24
We had actually done the "by hand" stuff last night successfully. I will try it again, but expect that it may be some combination of cron tasks that are colliding, because last night I only got the failure hangs under cron.
Terri Lyman
@tatigger
Mar 12 2017 04:47
I got the blue tooth tethering to work! Now if I want the bluetooth tether to be my rig's first choice for connection, and to only try to switch to available wifi if that is unavailable, how do I set that up? Or isn't there a way to do that?
dan lightner
@danimaniac
Mar 12 2017 04:57
@tatigger Might I ask what you did differently this time? I have been watching you struggle with BT as I have a similar issue. I successfully set up BT (seemingly) and pair the devices, but can not establish the connection and tether. I use a Samsung Galaxy S4 on ATT.
Terri Lyman
@tatigger
Mar 12 2017 04:59
@danimaniac , I had to go through all the steps again, from oref0 setup script. I had used lower case alpha characters with the MAC ID. That blocked connection.
And then I had to turn the tether function on on the phone itself. There is a line to run to check and see if the blue tooth tether option is enabled on your phone. Let me find that. I think there is an issue with ATT
This is what @ecc1 told me earlier, @danimaniac
Does the phone have an explicit "Bluetooth tethering" on/off setting, somewhere under the Tethering & Mobile Hotspot settings? If not, your carrier may have disabled it. But if it's there, chances are good it will work. Once it's turned on, there's a command you can run on the Edison (in bluetoothctl, type "info <your phone's BT address>") to see if it really has that capability.
So when you are in the middle of the blue tooth configuration part of setup after you launch
bluetoothctl
Then you type
info <your phone's BT address>
To verify that your phone can communicate via blue tooth tether and not just as a hotspot
Terri Lyman
@tatigger
Mar 12 2017 05:05
My first issue was I skipped the "Trust" step. My second issue was incorrect MAC due to capitalization error. My third issue, and totally separate from the others, was that I had switched off the blue tooth tether on the phone itself.
dan lightner
@danimaniac
Mar 12 2017 05:05
@ecc1 had me run that yesterday, so I might be out of luck. I also used lower case when originally running the oref0 script so I will run through the script again. I did the trust and list paired devices successfully, so maybe tethering simply is not available on my phone. I will try again tomorrow sometime. Thanks!
Terri Lyman
@tatigger
Mar 12 2017 05:08
Yep. Now when you redo it, don't forget to enable the tether on the phone itself. LOL. Or it still won't connect. But you have to redo the script. Did you save the shortcut script? Looks like this
This message was deleted
oref0-setup --dir=/root/tediloop --serial=xxxxxx --cgm=xdrip --ns-host=https://<yourNightscout> --api-secret=<yourSecret --tty=/dev/spidev5.1 --enable=' autosens  meal ' --radio_locale='US' --btmac='88:79:7E:C1:63:04'
@danimaniac you just backspace into the MAC and fix it.
Or if you didn't save it:
gregtcm
@gregtcm
Mar 12 2017 05:10
@gregtcm why is changing IP addresses when you switch networks a problem?
@scottleibrand For the REST upload in xDrip ... uploading to my edison. It seems I have to go through the process of setting the new IP, force closing xDrip, and restarting every time I switch to a new IP. Here in rural Idaho, the cell coverage can be very spotty or non-existent, thus the xDrip to my rig setup.
Terri Lyman
@tatigger
Mar 12 2017 05:10
re-run oref0-setup with the Bluetooth option, replacing AA:BB:CC:DD:EE:FF with your MAC
@danimaniac
The caps in the AA:BB etc series meant we were to use capital letters. LOL
Terri Lyman
@tatigger
Mar 12 2017 05:21
When it is tethered, the phone lists the host, and underneath, helpfully, "connected". So check there as well to see if it is connecting when you have worked through the steps. Per above, @jcorbett80 told me:
@jcorbett80
@tatigger also I never get ifconfig or benp0 to work truly until the right is rebooted and allowed to search, find, and set the address is is connecting to. So allow it to boot. Let it come completely up. Login as root. Then wait for 3-4 minutes. Then do the check.
Just like booting a pc. All system devices load first so that it knows how to find it. Then the add-ons like Internet and so on come up.
If the drivers aren't loaded it can't activate the nic. If the nic is not activated it can't search for addresses. If it can find addresses it can't connect to one. If it can't connect to address then you will not have a network. No network no return of an address.
@gregtcm if you find a way to set a permanent IP Address for the X-Drip phone problem, please tag me in the answer. I will be traveling across country and anticipate similar issues. I will have to see if a usb OTG cable from Edison to Dexcom will work, will test that tomorrow.....just in case. Or PM me your work-around :) Thanks!
wait - it's not "Permanent IP" it is "Static IP"!
gregtcm
@gregtcm
Mar 12 2017 05:26
@tatigger I'm hoping to always have the BT tether connection. And your comment about all caps made me realize I didn't have all caps in my setup script. I just fixed that and am running that now. I'll let you know how that fairs.
I have two issues: 1. my phone seems to be dropping my BT tether, and 2. my rig doesn't want to automatically reconnect to the BT tether. I'm hoping the all caps issue will solve #2. Then #1 won't be such a big deal.
Terri Lyman
@tatigger
Mar 12 2017 05:31
@gregtcm great, let me know how it goes. LOL. I guess I could drive around tomorrow and see if the Edison drops out or changes IP between areas of connection and no connection...hmmmm. I will have to see if I have time in the next few days. I am cutting it close, I leave on Wednesday. But it will work one way or another. :)
gregtcm
@gregtcm
Mar 12 2017 05:36
@tatigger I think that was it! Thanks for making note of the all caps. I ran the iwconfig wlan0 txpower off; sleep 120; iwconfig wlan0 txpower auto test and now the BT connects after a minute and disconnects when the wifi comes back on.
Now, to see how to tweak it so it never disconnects.
Terri Lyman
@tatigger
Mar 12 2017 05:38
Awesome!
gregtcm
@gregtcm
Mar 12 2017 05:40
I also added an alias btc that runs the 3 connect commands, so if it does disconnect, I can more easily reconnect via my wifi hotspot. And, now that I think of it, I should look into the HotButton app and run it that way.
zachcrystal
@zachcrystal
Mar 12 2017 05:57
Hi hi, I so I ran autotune on my mac per the instructions in phase c from march 5-march 11and everything is working great but the numbers are a little weird. My IC ratio is 8 and and autotune calculated that it should be 12. I thought this was a little weird so I ran each day individually and found that autotune calculated each day's IC to be no more than 8.0 ± 0.5. Is that odd?
Dana Lewis
@danamlewis
Mar 12 2017 06:07
@zachcrystal let's jump into the autotune channel to discuss more (but no, not "odd" - there's designed safety cap to limit the adjustments by default)
zachcrystal
@zachcrystal
Mar 12 2017 06:08
omg these channels will be the death of me hahahah
Dana Lewis
@danamlewis
Mar 12 2017 06:10
Not a big deal
Scott Leibrand
@scottleibrand
Mar 12 2017 06:11
@glenrob1940 try the oref0-online line from cron maybe?
@gregtcm @tatigger which of you is doing the PR to clarify the caps in the MAC address? :smile:
gregtcm
@gregtcm
Mar 12 2017 06:21
@scottleibrand I'll add it to my list of PRs I need to do.
@scottleibrand Also, do you know how to give the Bluetooth tether connection priority over a wifi connection? It would be nice to have it connect via BT soon after I turn on my BT tethering hotspot, even if I'm able to connect to a wifi network.
I don't think I want to remove wpa_cli scan from crontab (I'm guessing that is what is disconnecting my BT tether)
Scott Leibrand
@scottleibrand
Mar 12 2017 07:09
That logic is in oref0-online. Sounds like you want to do a full rewrite of that.
PieterGit
@PieterGit
Mar 12 2017 07:41
@glenrob1940 i'm assuming your hitting a network problem with wifi. i guess that if you use a wired ethernet connection, you can still log into the pi3. i have had the same problem, but for me a complete reinstall of the raspbian os fixed the problem. you might fix this by disabling power saving on the wifi (don't have the commands for you, but google it). it might also be a network problem with ipv6 and/or your router. what router do you have? I have a fritzbox and the wifi dhcp will always uses ipv6 by default.
peterfulvi
@peterfulvi
Mar 12 2017 07:51
I have a problem. My rig is stuck in December 31, 1999. It seems to happen when i chaneg the network settings in my wpa_supplicant.conf. I dont know why it does that i checked and rechecked to make sure there were no typos. Its frustrating beacause now i have two rigs that wont loop now or connect online. Here is my sup file withou my ssid or keys. Im pretty much sunk until i can figureout why this keeps happening.
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev



network={
    ssid=""
    psk=""
}

network={
    ssid=""
    psk=""
}
peterfulvi
@peterfulvi
Mar 12 2017 08:01
I manage to get my rig going. But my other one is stuck in time pretty much in December 1999,
PieterGit
@PieterGit
Mar 12 2017 08:03
@scottleibrand thanks for oref0 release 0.4.2! What 's next for the dev branche? 0.4.3 or 0.5.0? Are you planning on merging smb branch to dev soon? I'll resolve the conflicts on my devww branch on monday evening and will try to go further with trying to fix the problems some ww pump users / ti usb users now encounter.
Dana Lewis
@danamlewis
Mar 12 2017 08:08
@PieterGit 0.5.0
Scott Leibrand
@scottleibrand
Mar 12 2017 08:10
assuming openaps/oref0#423 gets merged, then that'll make the next release 0.5.0
if we need to do a 0.4.3 before that, we could, but I think it's time to start getting all our new features tested. :)
diabeticgonewild
@diabeticgonewild
Mar 12 2017 08:27
@scottleibrand was the IOB curve ever adjusted to reflect the pharmacodynamics graph instead of the pharmacokinetics graph?
Scott Leibrand
@scottleibrand
Mar 12 2017 08:37
It primarily reflects the IOB curve used by the Medtronic pumps, and secondarily, its derivative fits within the error bars of the insulin activity graph I had handy at the time. It hasn't been updated since then, as it seems to match real world insulin activity pretty well.
It might be possible to use our deviation data to fit a better insulin activity curve, and use the integral of that for the IOB curve, but that doesn't seem to be very high up on anyone's priority list.
gregtcm
@gregtcm
Mar 12 2017 08:43
@Bender1061 @ecc1 Looking at your crontab for the DST switch. Shouldn't the last * be a 0 so it only runs on a Sunday? I'm a complete noob, but was reading here ( http://www.nncron.ru/help/EN/working/cron-format.htm ) and that seems to indicate a 0 for Sunday in the 5th position. I guess a 7 would work for Sunday as well.
peterfulvi
@peterfulvi
Mar 12 2017 08:46
Does anyone know why my rig would be stuck in 1999. I posted this problem several times on this forum and haven't gotten a response. I would like to know what the potential solution could be. I have a rig that will that cannot connect online regardless of what I do. I posted my configuration online multiple times. If yo
Dana Lewis
@danamlewis
Mar 12 2017 08:46
@peterfulvi your rig is probably offline so it can't do ntp
gregtcm
@gregtcm
Mar 12 2017 08:49
@scottleibrand I'll look at oref0-online. Not sure if I'm up to a "full rewrite" but maybe that's what it would take. :) I also found if I turn off the wifi with the iwconfig wlan0 txpower off command, my BT tether stays active. I'm hoping a reboot will bring the wifi back in case the BT tether fails and I need another way to reconnect to my rig.
diabeticgonewild
@diabeticgonewild
Mar 12 2017 08:57
@scottleibrand That would certainly be nice.
Has anyone encountered where you couldn't log in via edison.local via SSH but you could SSH in via IP address?
diabeticgonewild
@diabeticgonewild
Mar 12 2017 09:17
I also pinged edison.local which returned values. It's weird
diabeticgonewild
@diabeticgonewild
Mar 12 2017 09:37
OK I tried the new setup script. Does G4-upload option allow for install of shareble
Oh, i think I need to do G4-local
diabeticgonewild
@diabeticgonewild
Mar 12 2017 09:42
no it's shareble
diabeticgonewild
@diabeticgonewild
Mar 12 2017 10:04
Anyone get this error?
```
Do you have to manually set up openxshareble in lieu of using the setup script? Because I am having problems with it. Should I use this guide? See:https://github.com/TC2013/aps-scripts/blob/master/openxshareble_instructions.md
Anyway, I'm about to reflash, and do Openxshareble manually along with the script....
leighkdavis
@leighkdavis
Mar 12 2017 12:21
hi. I am wondering if someone might be able to offer some quick help. I am not sure if I am opens looping or not. I have a yellow exclamation mark on my ns page. Is there a way to determine the error?
Lorenzo Sandini
@lsandini
Mar 12 2017 12:56
Hello, I set up a test rig to test a few things, and I am puzzled by the openaps use pump bolus syntax ? what does it take to have it deliver a bolus ? The -h option tellls me it requires a json input with "units defined". Can anyone help ?
jcorbett80
@jcorbett80
Mar 12 2017 13:10
@lsandini the json file is built when you install software. The overall meaning is it has a lot of variables that control the settings. When you want a bus you simply either use the pump and do the wizard or you use the care portal or calculator wizard in nightscout to say you are taking one. How many carbs and soon. Once you manually tell pump how much insulin you are taking based on ns then it will show within 5 minutes in ns.
glenrob1940
@glenrob1940
Mar 12 2017 13:13
@scottleibrand oref0-online ?? my crontab is as follows:
NIGHTSCOUT_HOST=https://XXXXXX.herokuapp.com
API_SECRET=XXXXXXXX
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/games:/usr/games
          • sudo wpa_cli scan
          • killall -g --older-than 15m openaps
          • cd /home/pi/myopenaps && oref0-reset-git
          • cd /home/pi/myopenaps && oref0-truncate-git-history
          • cd /home/pi/myopenaps && ps aux | grep -v grep | grep -q 'openaps get-bg' || ( date; openaps get-bg ; cat cgm/glucose.json | json -a sgv dateString | head -1 ) | tee -a /var/log/openaps/cgm-loop.log
          • cd /home/pi/myopenaps && ps aux | grep -v grep | grep -q 'openaps ns-loop' || openaps ns-loop | tee -a /var/log/openaps/ns-loop.log
          • cd /home/pi/myopenaps && ps aux | grep -v grep | grep -q 'openaps autosens' || openaps autosens | tee -a /var/log/openaps/autosens-loop.log
          • cd /home/pi/myopenaps && ( ps aux | grep -v grep | grep -q 'openaps pump-loop' || openaps pump-loop ) 2>&1 | tee -a /var/log/openaps/pump-loop.log
Lorenzo Sandini
@lsandini
Mar 12 2017 13:17
@jcorbett80 thank you I got that, but since the command "openaps use pump bolus" exists but needs some attributes, I would like to see that in action. Any suggestion ?

pi@rasp-openaps:~/myopenaps $ openaps use pump bolus -h
usage: openaps-use pump bolus [-h] input

Send bolus command. [#warning!!!]

positional arguments:
input

optional arguments:
-h, --help show this help message and exit

Beware! This is a powerful command because it can give a lot of
insulin. Please be careful!

Not a part of oref0.

Requires json input with the following keys defined:

* `units` - Number of units to bolus.

Zero point one units:
{ "units": 0.1 }
Two units:
{ "units": 2 }

Matthias
@ceben80
Mar 12 2017 13:20
@lsandini it is not really recommend to give a bolus via openaps, what's your plan?
Tim Street
@tim2000s
Mar 12 2017 13:25

Has anyone encountered where you couldn't log in via edison.local via SSH but you could SSH in via IP address?

Yes, I find that if I'm using Mac or Linux I can use Edison.local, but it doesn't work from windows.

@lsandini - You need to consider how you check whether a bolus has been delivered safely, and whether any kind of repeat bolus loop has been created when you've sent that command. Basically, if you are going to bolus, make sure you implement alongside safety checks.
Matthias
@ceben80
Mar 12 2017 13:28
Same experience to me @tim2000s doesn't work from android, a proper hostname resolution in xdrip API....
Lorenzo Sandini
@lsandini
Mar 12 2017 13:36
@ceben80 , no worries, no plans here, just curiosity. I have a test rig using glucose data from NS and a pump sitting on my table, not planning to bolus with commands for real. Just a test, to understand the command syntax
glenrob1940
@glenrob1940
Mar 12 2017 13:38
@PieterGit Yes, wired works okay - loop enacts, etc. My router/dhcp is one of the ports off of a cable modem. Most of my (non openaps) systems (including the wired) are getting dhcp from pfsense running on a celeron-based SBC hooked off of another port of the cabel modem.
Clearly time to rearrange/modify my networks.
kws1969
@kws1969
Mar 12 2017 14:00
Anyone ever have trouble getting iPhone to Bluetooth to edison? I've re-ran it at least 10 times. It connected last night for 2 hours and now it won't connect at all. Any ideas?
Lorenzo Sandini
@lsandini
Mar 12 2017 14:13

second question if I may... the loop runs fine for hours, then stops with the following log. What's happening ? Starting pump-loop at Sun 12 Mar 16:11:53 EET 2017:
monitor/temp_basal.json raised ACK is 0 bytes:

pump://JSON/read_temp_basal/monitor/temp_basal.json
Traceback (most recent call last):
File "/usr/local/bin/openaps-report", line 82, in <module>
app( )
File "/usr/local/lib/python2.7/dist-packages/openaps/cli/init.py", line 51, in call
self.run(self.args)
File "/usr/local/bin/openaps-report", line 75, in run
output = app(args, self)
File "/usr/local/lib/python2.7/dist-packages/openaps/cli/subcommand.py", line 52, in call
return self.method.main(args, app)
File "/usr/local/lib/python2.7/dist-packages/openaps/reports/invoke.py", line 40, in main
output = task.method(args, app)
File "/usr/local/lib/python2.7/dist-packages/openaps/uses/use.py", line 44, in call
self.before_main(args, app)
File "/usr/local/lib/python2.7/dist-packages/openaps/vendors/medtronic.py", line 62, in before_main
self.setup_medtronic( )
File "/usr/local/lib/python2.7/dist-packages/openaps/vendors/medtronic.py", line 161, in setup_medtronic
self.uart.open( )
File "/usr/local/lib/python2.7/dist-packages/decocare/stick.py", line 874, in open
log.info('%s' % self.product_info( ))
File "/usr/local/lib/python2.7/dist-packages/decocare/stick.py", line 515, in product_info
return self.query(ProductInfo)
File "/usr/local/lib/python2.7/dist-packages/decocare/stick.py", line 509, in query
return self.process( )
File "/usr/local/lib/python2.7/dist-packages/decocare/stick.py", line 496, in process
ack, response = self.command.respond(raw)
File "/usr/local/lib/python2.7/dist-packages/decocare/stick.py", line 71, in respond
raise AckError("ACK is 0 bytes:\n%s" % lib.hexdump(raw))
decocare.errors.AckError: ACK is 0 bytes:

peterfulvi
@peterfulvi
Mar 12 2017 14:14
Can you use your phone as a hotspot and do offline looping as you would if you tethered your phone Bluetooth. Could you send it commands using hot buttons and HTTP widget. You would have a local network established between your rig and phone you Wu
Would just need rigs IP address
I set up to
I set a 2nd rig to do some learning on doing an offline rig.
jcorbett80
@jcorbett80
Mar 12 2017 14:54
@peterfulvi I am doing the offline now with phone as Hotspot. Works well.
@peterfulvi also I have it set to share my wifi. That way anytime I hit a wifi all can upload to ns automatically. That way I have both worlds.
Terri Lyman
@tatigger
Mar 12 2017 14:58
@jcorbett80 how do you get temp targets to the rig offline?
Lorenzo Sandini
@lsandini
Mar 12 2017 15:00
y
Terri Lyman
@tatigger
Mar 12 2017 15:35
Is anyone using Hot Button?
Matthias
@ceben80
Mar 12 2017 16:02
@tatigger Terri, as u know (twitter) I am running temp target via https://play.google.com/store/apps/details?id=ch.rmy.android.http_shortcuts, but this is an Android App, more details you'll find here https://github.com/lukas-ondriga/openaps-share
Eric
@ecc1
Mar 12 2017 16:06
@gregtcm The crontab format actually does the logical-OR of the day-of-month and day-of-week fields, so that's why there has to be a test for the day of the week in the command itself, rather than specifying it in 5th field. It's buried in the crontab(5) man page.
Eric
@ecc1
Mar 12 2017 16:13
@glenrob1940 Assuming those crontab fields are all asterisks (can't tell for sure since you didn't put ``` around it), you're running all those commands, pretty much simultaneously, every minute. Aren't there some you'd rather do less frequently?
John Benjamin
@Bender1061
Mar 12 2017 16:17
@ecc1 yeah my trying to change the pump time did not work last night, I'll have to dig into it later.
Terri Lyman
@tatigger
Mar 12 2017 16:20
@ceben80 That's right, I had forgotten! Will take a look at that, I am on Android for the rig, iPhone for personal phone (NS since the cable days, used to 2 phones)
Matthias
@ceben80
Mar 12 2017 16:21
that's great Terri, if you have any q give me a shout :wink:
Terri Lyman
@tatigger
Mar 12 2017 16:21
Thanks!
Matthias
@ceben80
Mar 12 2017 16:22
btw keep in mind when it's active you must "disable" temp target download from ns in your openaps.ini
openaps ns-temptargets must be delete in ns-loop for that purpose
Terri Lyman
@tatigger
Mar 12 2017 16:25
OK, added to my work-in-progress Document, LOL thanks @ceben80
Matthias
@ceben80
Mar 12 2017 16:25
:+1:
@tatigger are you using xdrip (I'm asking due to the xdripoffline feature), the BGs are uploaded to the rig directly from the xdrip App, no need of internet and/or NS
Terri Lyman
@tatigger
Mar 12 2017 16:30
@ceben80 I am, and I believe I have that working, just have to do some final testing to make sure. :) Once I got the bluetooth tethering to work, (that was kinda funny) the Xdrip offline was not bad to implement.
Matthias
@ceben80
Mar 12 2017 16:31
great, my setup includes, bt tehering only (have disabled wlan0), xdrip-offline, http-widget for offline monitoring and the temp target stuff, perfect.
I have set this here, thanks to @ecc1 mentioned that :wink:
allow-hotplug bnep0
iface bnep0 inet dhcp
jcorbett80
@jcorbett80
Mar 12 2017 17:25
@tatigger did your phone have BT tethering or did you find a work around?
KS615
@KS615
Mar 12 2017 17:29
Hi all, I'm building my rig and am stuck at entering the wifi network. I keep getting the following error:"/etc/wpa_supplicant/wpa_supplicant.conf" 5L, 108C written
root@ubilinux:~# 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
Failed to bring up wlan0.
root@ubilinux:~#
Any advice is greatly appreciated!
Dana Lewis
@danamlewis
Mar 12 2017 17:50
@lsandini that ACK error is a carelink error. Unplug replug.
Terri Lyman
@tatigger
Mar 12 2017 17:51
@jcorbett80 I got the BT tethering to work. Yeah, mostly operator error :) all better now.
Dana Lewis
@danamlewis
Mar 12 2017 17:52
@kws1969 is your hotspot on? (Make sure it's toggled on and back out of the screen before anything connects)
Scott Leibrand
@scottleibrand
Mar 12 2017 18:01
@ecc1 that crontab comes straight from oref0-setup. We do everything every minute, and then have each command check whether it needs to do anything at that point. It's kind of like a stateless daemon.
@glenrob1940 if you don't have oref0-online on your cron, perhaps you don't have Bluetooth tethering installed?
Lorenzo Sandini
@lsandini
Mar 12 2017 18:03
@danamlewis oh boy, no other solution ? I do a sudo reboot with Termius, but it would be nice if this would happen automatically everytime such an error happens :(
jcorbett80
@jcorbett80
Mar 12 2017 18:03
@KS615 are you connecting to wifi or mobile Hotspot? Either way try this after commenting out all the network settings you just put in.

@KS615 nano /etc/network/interfaces

- Uncomment 'auto wlan0'
- Set wpa-ssid to your wifi network name
- Set wpa-psk to the password for your wifi network

sed -i '/^deb http...ubilinux.*$/d' /etc/apt/sources.list

Reboot

Scott Leibrand
@scottleibrand
Mar 12 2017 18:06
@lsandini there is oref0-reset-usb if this is on a Pi. But the better solution is to get an Edison and Explorer board, or a TI stick. The range on the Carelink makes it almost unusable except for testing.
With regards to the bolus command, there is an example json in the -h output I believe, but I wouldn't worry about the bolus command at all at this point, as it's not used by the OpenAPS algorithm (oref0).
Dana Lewis
@danamlewis
Mar 12 2017 18:09
@lsandini you can add a reset to your cron to do it automatically
Lorenzo Sandini
@lsandini
Mar 12 2017 18:13
Thank you both, I agree about the carelink and I use my loop only at home a few hours at a time, still learning 😁. Waiting for my explorer board, the edison is already here !
@danamlewis do you mean an automatic reset say, every hour ? Or how do I add a reset to my cron ? I know how to edit it, but what should I add ?
Dana Lewis
@danamlewis
Mar 12 2017 18:30
Yes, or however often you want to run it. Carelink's a deprecated option, so we don't have any docs explaining what should go in cron for that - it's been discussed here though so might be worth searching back for oref-reset-usb and see if there's anything useful to you from previous discussions
Matthias
@ceben80
Mar 12 2017 18:40
A friend of mine was doing an houtly cron reboot as workaround till the EB was delivered, quick and dirty solution but it's been working :smile:
KS615
@KS615
Mar 12 2017 18:54
@jcorbett80 I've tried both wifi and hotspot. So, I should go back and delete my network/wifi settings. I'm not sure I understand the part about "set wpa-ssid..."
KS615
@KS615
Mar 12 2017 19:06
@jcorbett80 , to clarify, I deleted the "auto wlano", but am unsure how to "set wpa-ssid to network and wpa-psk to password" Should I just free-text that in? like, "wpa-ssi=9DKR5" (this is my network name). Sorry, coding is so foreign to me!
Scott Leibrand
@scottleibrand
Mar 12 2017 19:09
That is all covered in the docs.
KS615
@KS615
Mar 12 2017 19:09
oh ok, let me go back to them and look again.

hmm, I'm sure this is basic, but I'm lost...I followed the instructions in the docs that said, "vi /etc/network/interfaces

Type ‘i’ to get into INSERT mode

Uncomment ‘auto wlan0’
Edit the next two lines to read:
auto wlan0
iface wlan0 inet dhcp
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
Comment out or delete the wpa-ssid and wpa-psk lines.

And, then I followed those instructions, but kept getting the error: wpa_supplicant: /sbin/wpa_supplicant daemon failed to start
run-parts: /etc/network/if-pre-up.d/wpasupplicant exited with return code 1
Failed to bring up wlan0.
jcorbett80
@jcorbett80
Mar 12 2017 19:14
That command I gave you takes you to a txt editor. You use the arrow keys to move around. Goto the end of the line and backspace upto the words wpa-ssid and then enter network name. Do the same with wpa-psk. Should look like: wpa-ssid <network name> the next line will read wpa-psk <your password>
KS615
@KS615
Mar 12 2017 19:14
So, then James suggested that comment out all of the network settings I put in the following: nano /etc/network/interfaces
  • Uncomment 'auto wlan0'
  • Set wpa-ssid to your wifi network name
  • Set wpa-psk to the password for your wifi network
jcorbett80
@jcorbett80
Mar 12 2017 19:14
I am close to being home. I will start updating the docs when I get there.
KS615
@KS615
Mar 12 2017 19:16
Ok, I think I commented out the "wpa-psk" etc on the first go, I'm going to retype them in and reboot to see what happens. Thank you!
KS615
@KS615
Mar 12 2017 19:26
@jcorbett80 I think it worked! After I entered per your instructions and rebooted, I got: root@kris-open-aps:~# ifup wlan0
ifup: interface wlan0 already configured
thank you! I'm going to venture to moving forward in the instructions.
jcorbett80
@jcorbett80
Mar 12 2017 19:29
@KS615 sounds good.
Terri Lyman
@tatigger
Mar 12 2017 19:34
@lsandini this is what I have in my notes for the carelink fix

Original file:
wait-for-silence report invoke monitor/temp_basal.json

Replace with this to reset Carelink when it fails.

openaps alias add wait-for-silence '! bash -c "mm-stick warmup || sudo oref0-reset-usb; openaps report invoke monitor/temp_basal.json"'

although this was some time ago
Terri Lyman
@tatigger
Mar 12 2017 19:41
Is there a current explorer board order building?
peterfulvi
@peterfulvi
Mar 12 2017 19:43
@tatigger How did you get BT tether to work. That seems to me my problem ,operator error. Ive tried it on 2 phones and have the same problem, it just doesnt tether when im out of range to my rig, there is something im missing, ive done what the docs said to the tee and it does the same thin, i,ve done it serial connection, i have a rig built just for offline use, which once i can get over the tethering issue i can go foward. It initially stays tethered when i first establish the connection, i can tunnel into it, but as soon as i turn the wifi off it doe not connect BT, it says in my wifi log that its trying to connect to that mac adreess but there is an error. So im just going around in circles with this issue. I have concluded that there is something im probably missing. It seems you went around a bit before you got it to finally work. any advice would be greaty appreciated.
Dana Lewis
@danamlewis
Mar 12 2017 19:45
@tatigger link in the docs is always most current place to buy explorer boards
Scott Leibrand
@scottleibrand
Mar 12 2017 19:45
@tatigger check the Hamshield site, but I believe ERD is shipping them immediately right now from inventory. We just got one within a couple days of ordering. :)
(helps that the postal service only had to carry it across town) :)
Terri Lyman
@tatigger
Mar 12 2017 19:46
LOL @scottleibrand thanks
@peterfulvi hang on while I pull up my list....
yohanagarwaal
@yohanagarwaal
Mar 12 2017 19:46
Hi Guys, brand new to Open APS. Setting it up for my 5 year old. We got a Medtronics MMT-722NAS, and I am having trouble accessing the Utilities menu where I can turn on remote access. When I press ACT on the pump it starts the rewind and prime process. But since we don't have a reservoir in it at the moment it is unable to complete the process, and I keep going back and forth. We dont Should I insert a reservoir and complete the rewind, prime process first? and then the pump will allow me to access the menu? or is there another way to do it without wasting a resorvoir (We are not ready to use the pump yet, I am just trying to set up Open APS at the moment) . My apologies if this is basic stuff, but we are using Animas and are not familiar with Medtronics.
Scott Leibrand
@scottleibrand
Mar 12 2017 19:47
@yohanagarwaal you can stick your pinky or a pen/pencil end in the reservoir chamber to apply just enough pressure to the plunger to make the pump "detect a reservoir" while rewinding...
Lorenzo Sandini
@lsandini
Mar 12 2017 19:48
@tatigger Thanks Terry
@tatigger Terri sorry... not sure where to put that unfortunately... do I just need to add the new alias ?
Terri Lyman
@tatigger
Mar 12 2017 19:53
@lsandini the first thing I did after someone's suggestion was to make a document and type all the commands there the way you will use them. For example, where you would add the phone MAC, go ahead and copy and paste the line from the docs, then update the line with your Mac and save the document. Go through the whole doc and set that up. Then, which phone and carrier are you using?
RedCyclist1
@RedCyclist1
Mar 12 2017 19:55
@peterfulvi having same issue, twice we have had it up and running, tested and all good . then I get in car and it stops working...
Mike
@libxmike
Mar 12 2017 19:59

@scottleibrand the latest dev branch does not work well with WW pumps, installation throws errors, hardware: Rpi 3 and Ti USB

Attempting to communicate with pump:
subg-ww-radio-parameters:running /usr/local/bin/oref0-subg-ww-radio-parameters for max 30 seconds
Your TI-stick is located at /dev/ttyACM0
+ cd /home/pi/src/subg_rfspy/tools
+ ./reset.py /dev/ttyACM0
retry 1 aa
RileyLink OK
retry 2 4f4b
Version: subg_rfspy 0.9
OK
+ sleep 2
+ ./change_setting.py /dev/ttyACM0 0x06 0x00
retry 1 39
RileyLink OK
retry 2 4f4b
Version: subg_rfspy 0.9
Traceback (most recent call last):
  File "./change_setting.py", line 22, in <module>
    if ord(resp) == 1:
TypeError: ord() expected a character, but string of length 14 found
/usr/local/bin/oref0-subg-ww-radio-parameters-timeout: 8: kill: No such process

mmtune: pump://JSON/mmtune/monitor/mmtune.json
monitor/mmtune.json  raised  /dev/ttyACM0 already in use
Traceback (most recent call last):
  File "/usr/local/bin/openaps-report", line 6, in <module>
    exec(compile(open(__file__).read(), __file__, 'exec'))
  File "/home/pi/src/openaps/bin/openaps-report", line 82, in <module>
    app( )
  File "/home/pi/src/openaps/openaps/cli/__init__.py", line 51, in __call__
    self.run(self.args)
  File "/home/pi/src/openaps/bin/openaps-report", line 75, in run
    output = app(args, self)
  File "/home/pi/src/openaps/openaps/cli/subcommand.py", line 52, in __call__
    return self.method.main(args, app)
  File "/home/pi/src/openaps/openaps/reports/invoke.py", line 40, in main
    output = task.method(args, app)
  File "/home/pi/src/openaps/openaps/uses/use.py", line 44, in __call__
    self.before_main(args, app)
  File "/home/pi/src/openaps/openaps/vendors/medtronic.py", line 62, in before_main
    self.setup_medtronic( )
  File "/usr/local/lib/python2.7/dist-packages/mmeowlink/vendors/mmeowlink.py", line 92, in setup_medtronic
    setup_medtronic_link(self)
  File "/usr/local/lib/python2.7/dist-packages/mmeowlink/vendors/mmeowlink.py", line 75, in setup_medtronic_link
    link = builder.build(radio_type, port)
  File "/usr/local/lib/python2.7/dist-packages/mmeowlink/link_builder.py", line 16, in build
    return SubgRfspyLink(port)
  File "/usr/local/lib/python2.7/dist-packages/mmeowlink/vendors/subg_rfspy_link.py", line 55, in __init__
    self.open()
  File "/usr/local/lib/python2.7/dist-packages/mmeowlink/vendors/serial_interface.py", line 23, in open
    raise AlreadyInUseException("%s already in use" % self.device)
mmeowlink.vendors.serial_interface.AlreadyInUseException: /dev/ttyACM0 already in use
Usage: grep [OPTION]... PATTERN [FILE]...
Try 'grep --help' for more information.

now and then I get

Starting pump-loop at Sun Mar 12 20:57:10 CET 2017:
subg-ww-radio-parameters:running /usr/local/bin/oref0-subg-ww-radio-parameters for max 30 seconds
/usr/local/bin/oref0-find-ti: 35: [: /dev/[: unexpected operator
Your TI-stick is located at /dev/[ 7033.130453] cdc_acm 1-1.3:1.0: failed to set dtr/rts
+ cd /home/pi/src/subg_rfspy/tools
+ ./reset.py '/dev/[' '7033.130453]' cdc_acm 1-1.3:1.0: failed to set dtr/rts
Traceback (most recent call last):
  File "./reset.py", line 13, in <module>
    rl = SerialRfSpy(sys.argv[1])
  File "/home/pi/src/subg_rfspy/tools/serial_rf_spy.py", line 24, in __init__
    self.ser = serial.Serial(serial_port, 19200, rtscts=rtscts, timeout=1)
  File "/usr/local/lib/python2.7/dist-packages/serial/serialutil.py", line 240, in __init__
    self.open()
  File "/usr/local/lib/python2.7/dist-packages/serial/serialposix.py", line 268, in open
    raise SerialException(msg.errno, "could not open port {}: {}".format(self._port, msg))
serial.serialutil.SerialException: [Errno 2] could not open port /dev/[: [Errno 2] No such file or directory: '/dev/['
mmtune: pump://JSON/mmtune/monitor/mmtune.json
reporting monitor/mmtune.json
"868.534", 5, -56  Listening: .No pump comms detected from other rigs

it recovers but it comms few times in a hour

Dana Lewis
@danamlewis
Mar 12 2017 20:00
@libxmike we need some help from WW users - I don't have a WW pump so can't troubleshoot/resolve ww setup errors easily
Terri Lyman
@tatigger
Mar 12 2017 20:00
@danamlewis well we just need to find you one of those, LOL :)
Mike
@libxmike
Mar 12 2017 20:00
yeah am testing the new stuff
Dana Lewis
@danamlewis
Mar 12 2017 20:01
@tatigger the problem is also I don't have an identical setup for everyone's possible combination of hardware, too, so if someone spots a problem for their config, we need others to help resolve.
Mike
@libxmike
Mar 12 2017 20:02
@danamlewis I dont have same problem with openaps 0.1.5 , I have few different rigs with different hardware (I guess all of possible hardware combinations)
Lorenzo Sandini
@lsandini
Mar 12 2017 20:03
two 715 WW pumps here
Dana Lewis
@danamlewis
Mar 12 2017 20:03
Are they all erroring out the same way, or just TI?
Mike
@libxmike
Mar 12 2017 20:04
just USB Ti on latest dev
did not try on Edison and Ti over serial as I need one working rig :)
Dana Lewis
@danamlewis
Mar 12 2017 20:06
Wonder if port provided in setup script is getting overwritten by the auto detect in WW scripts in dev..maybe look at some of @PieterGit 's PRs to see if ya'll can figure out if that would resolve it most easily?
Mike
@libxmike
Mar 12 2017 20:07
I'm in contact with Pieter
Dana Lewis
@danamlewis
Mar 12 2017 20:08
:+1:
Mike
@libxmike
Mar 12 2017 20:08
yeah , that [: /dev/[: unexpected operatoris new to me
Terri Lyman
@tatigger
Mar 12 2017 20:11
@lsandini let me know when you catch up to me. Phones and carrier?
RedCyclist1
@RedCyclist1
Mar 12 2017 20:11
I am trying to log in to putty and I get access denied, yet my husband can log in the same criteria on his computer and get in.. Any ideas where I should look to fix this on my laptop?
Terri Lyman
@tatigger
Mar 12 2017 20:12
What is the error @RedCyclist1
Mike
@libxmike
Mar 12 2017 20:12
@RedCyclist1 you have to post the command you use
RedCyclist1
@RedCyclist1
Mar 12 2017 20:12
'Access denied' is the error I get
Mike
@libxmike
Mar 12 2017 20:13
password wrong?
RedCyclist1
@RedCyclist1
Mar 12 2017 20:13
hubby uses it on his and gets in
Mike
@libxmike
Mar 12 2017 20:13
putty settings?
port?
22 for ssh
RedCyclist1
@RedCyclist1
Mar 12 2017 20:14
Now I am getting Putty fatal error, server unexpectedly closed network connection
22 for ssh is correct
could my work laptop be restricting me here?
Terri Lyman
@tatigger
Mar 12 2017 20:15
Is it this error? " WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!"
RedCyclist1
@RedCyclist1
Mar 12 2017 20:16
no that is not the error
Terri Lyman
@tatigger
Mar 12 2017 20:16
:) ok @RedCyclist1 that is the extent of my knowledge
Mike
@libxmike
Mar 12 2017 20:16
delete the connection in putty and set it new
RedCyclist1
@RedCyclist1
Mar 12 2017 20:16
You won't believe what it was
Mike
@libxmike
Mar 12 2017 20:17
user error ? :)
RedCyclist1
@RedCyclist1
Mar 12 2017 20:17
root was capitalized!
when I made it all lower case it worked
Mike
@libxmike
Mar 12 2017 20:17
told you user
RedCyclist1
@RedCyclist1
Mar 12 2017 20:17
LOL
Dana Lewis
@danamlewis
Mar 12 2017 20:17
@RedCyclist1 might be worth PRing a warning about that into the docs
yohanagarwaal
@yohanagarwaal
Mar 12 2017 20:17
@scottleibrand Thank you. That didn't work. I guess I was too afraid to apply too much pressure. In any case I used a reservoir and now I am good. Thank you for the help!
RedCyclist1
@RedCyclist1
Mar 12 2017 20:18
@danamlewis Yup will do
Dana Lewis
@danamlewis
Mar 12 2017 20:19
thx
Scott Leibrand
@scottleibrand
Mar 12 2017 20:19
@yohanagarwaal if you just hold it in one place, the pump will ratchet up the pressure until it's sure there's something solid there.
glenrob1940
@glenrob1940
Mar 12 2017 20:21
re - problems with pi3 and wireless. With the current openAPS master release and the latest debian release(3 March 2017) some (unknown) setting in an xfinity cable modem drops dhcp when a pump loop is running wireless. This results in ssh access and ping access to the pi3 over wireless failing within a couple of minutes of openAPS pump loop starting. Earlier release debian (November 2016) works without problem. I moved the openAPS wireless systems to a Belkin n600db router connected to a pfs router/firewall (which got it's internet access wired from the xfinity cable modem) everything worked fine. I don't know the firmware rev on the xfinity, but could get it if needed logging into it's admin port.
In the above system the pfs router/firewall is providing dhcp
Scott Leibrand
@scottleibrand
Mar 12 2017 20:23
If you add oref0-online to cron it can restart networking when that happens.
Not a fix, but might be an acceptable workaround
glenrob1940
@glenrob1940
Mar 12 2017 20:44
Okay, I'll give it a try.
gregtcm
@gregtcm
Mar 12 2017 21:27
@ecc1 Thanks for the crontab explaination. I'll dig deeper.
PieterGit
@PieterGit
Mar 12 2017 21:47
@glenrob1940 if you find the cause of the wireless network problems, please document them in the openaps docs. i couldn't get my fingers on the problem, and the problem disappeared
PieterGit
@PieterGit
Mar 12 2017 22:12

@libxmike @danamlewis @scottleibrand (and all WW / TI USB users)
/dev/ttyACM0 already in use indicates that a pump loop or other openaps process is already running during the mmtune process.
Solution is to find out which, and use killall to kill it. Should not happen if you don't manually invoke commands afaict.

Short term solution for WW-pump users if they get serial.serialutil.SerialException: [Errno 2] could not open port /dev/[: [Errno 2] No such file or directory: '/dev/[' or failed to set dtr/rts is to
handfix line 5 and 6 of /usr/local/bin/oref0-find-ti to bypass automatically detection of USB pump device via dmesg.
Uncomment it, so that it will echo the same pump device as you use in pump.ini. For example if your pump device is at /dev/ttyACM0 use:

# bypass automatically detection
echo /dev/ttyACM0
exit 0

The problem is that the /usr/local/bin/oref0-find-ti has several problems:

  • doesn't work for all users, only works for TI USB and spidev (Edison) users
  • doesn't work if the TI USB is having problems (USB disconnect and/or failed to set dtr/rts). It's still unkown why this happens. Temporary workaround: Reboot or oref0-reset-usb or unplug TI USB stick.

Long term solution is automatically get pump device from pump.ini as implemented with openaps/oref0#357
Unfortuately that branch has merge conflicts and I want to see it work for myself before asking @scottleibrand to merge it to dev, because it
will add some code for all oref0 users.

I'll have little time this next week, but I'll try to make some progress with this issue.

Dana Lewis
@danamlewis
Mar 12 2017 22:21
thx @PieterGit , and double thanks for noting that in the issue
@gregtcm thanks for your ongoing PRs :)
feraridurango
@feraridurango
Mar 12 2017 22:22
hello @scottleibrand do you know what my problem might be ?, in open raise SerialException(msg.errno, "could not open port {}: {}".format(self._port, msg)) serial.serialutil.SerialException: [Errno 2] could not open port dev/ttyACM0: [Errno 2] No such file or directory: 'dev/ttyACM0'
gregtcm
@gregtcm
Mar 12 2017 22:22
Probably a silly question, but what is a WW insulin pump?
Dana Lewis
@danamlewis
Mar 12 2017 22:22
non-US pump, aka worldwide
NA = North American, so you’ll see SN12345NAP, for example
gregtcm
@gregtcm
Mar 12 2017 22:24
Ah, thanks. :)
And your welcome for the PRs.
PieterGit
@PieterGit
Mar 12 2017 22:26
@danamlewis : i put part of the explanation in the previous issue, but @libxmike probably did not see that . I tried searching it on i-to-b, but the search of i-to-b sucks, and in this case it wasn't in i-to-b , but in a (already closed) PR. So I will always add comments like this somewhere in the corresponding PR or Issue, because otherwise we won't find it.
Dana Lewis
@danamlewis
Mar 12 2017 22:26
exactly, thank you :+1:
PieterGit
@PieterGit
Mar 12 2017 22:29
@feraridurango : serial.serialutil.SerialException: [Errno 2] could not open port dev/ttyACM0: [Errno 2] No such file or directory: 'dev/ttyACM0' is a third one. See the answer at openaps/oref0#357 ( https://github.com/openaps/oref0/pull/357#issuecomment-285981290 direct link to comment). Let me guess.. Do you use a world wide pump?
WW / TI USB users: I got a theory / assumption: of what might be causing the USB disconnect problems! Because we do more computation on the loops now than previously, the rig will ask more power/current. If the USB subsystems gets too little power/current (because it's on a battery), then the lighting symbol occurs and might cause teh USB TI USB stick to disconnect. Does anybody how we can log if the PI has too less power? (similar as what is causing the lighting symbol to appear in pixel)
jcorbett80
@jcorbett80
Mar 12 2017 22:34
@danamlewis ok I've updated a lot on a PR will do more later. Let me know if I am on the right track and doing a PR properly please. Time for supper. Fried egg sandwitch with lettuce, tomatoe, cheese, and mayo. my 1x a week treat away from my whole food plant based diet. Would love to stay and do more right now but... ya know; we are talking food here
Dana Lewis
@danamlewis
Mar 12 2017 22:34
food (and sleep) always come first in my book ;) :D
PieterGit
@PieterGit
Mar 12 2017 22:36
im going to sleep as well. hope somebody fixes all the TI USB and WW problems while I'm asleep :smile:
jcorbett80
@jcorbett80
Mar 12 2017 22:36
@danamlewis with my breathing issue sleep isnt much fun anymore. Mine are food and watching the walking dead. Everything else in life can just step aside
Dana Lewis
@danamlewis
Mar 12 2017 22:37
@PieterGit that’s quite a dream ;) (and big thank you for all your work on this to help WW users!)
feraridurango
@feraridurango
Mar 12 2017 22:37
@PieterGit it is not a ww pump and it plugged into the wall
could I be getting that prolem because of the dex has ??? ?
PieterGit
@PieterGit
Mar 12 2017 22:41
@feraridurango : thank you. and I assume find-ti-usb also returns dev/ttyACM0. That's interesting:
  • it means part of it is not a WW pump issue, but it's a TI USB issue
  • there's a missing / there. Are you sure the porttype is correct in pump.ini. Did you hardcode it in find-ti-usb?
and off course thank you for blowing my theory of too little power for the USB subsystems
hayleyml
@hayleyml
Mar 12 2017 22:45
Hi everyone - I'm brand new to all this fun stuff. I am not entirely sure I'm in the right place. I"m trying to flash my Edison to get started with OpenAPS. It wouldn't actually flash from my Mac so I had to use the Intel program to do that. I changed some sort of password/host name and then accidentally closed the window. Now I can't seem to get back to my Edison. Dana mentioned something about getting back to my "console." How do I do that? also what is this exactly? Is there a way to tell if I actually flashed my Edison appropriately?
PieterGit
@PieterGit
Mar 12 2017 22:46
@feraridurango : can you also confirm that your using a 2.4A+ power supply for the PI? what PI do you use? Pi3?
Scott Leibrand
@scottleibrand
Mar 12 2017 22:46
@hayleyml she's referring to the screen serial console window that you opened when doing the initial flash process, to log into the Edison
feraridurango
@feraridurango
Mar 12 2017 22:46

@PieterGit I added the / now I get ```Starting pump-loop at Sun 12 Mar 22:45:04 UTC 2017:
pump://JSON/read_temp_basal/monitor/temp_basal.json
reporting monitor/temp_basal.json
Profile less than 60m old
temp_basal.json less than 5m old
Pumphistory less than 5m old
Settings less than 10m old
Pumphistory-24 less than 20m old
Completed pump-loop at Sun 12 Mar 22:45:07 UTC 2017

```

Scott Leibrand
@scottleibrand
Mar 12 2017 22:47
@hayleyml you can open a new terminal and run the screen command again to re-connect to the console and pick up where you left off there
PieterGit
@PieterGit
Mar 12 2017 22:47
@feraridurango : ok so the missing / was just a typo. and what Pi and power supply do you use?
hayleyml
@hayleyml
Mar 12 2017 22:47
Yes I closed that window. I am not using any battery because I'm using an Edison and the light turns on when I plug it in. Do I need to plug it in to?
Scott Leibrand
@scottleibrand
Mar 12 2017 22:47
@feraridurango that's normal: it should try to do a full loop after 5 minutes or when you get new BG data
hayleyml
@hayleyml
Mar 12 2017 22:48
do I just say screen?
feraridurango
@feraridurango
Mar 12 2017 22:48
pi 3 @PieterGit and the cord that came with the pi straight into the wall
Scott Leibrand
@scottleibrand
Mar 12 2017 22:48
@hayleyml you'll eventually want to get a lipo battery connected to the off-white JST connector, but until you do that, plugging in via USB will power it fine
@hayleyml no, follow the directions in the docs
feraridurango
@feraridurango
Mar 12 2017 22:50
ohh sweet baby jesus !!!! we have been down for a week or so because I haven't been able to get time to get back on here!! thank you so much!!!! @scottleibrand
PieterGit
@PieterGit
Mar 12 2017 22:54
@feraridurango: do you use a TI USB to communicate to the pump or something else? Did you have problems with disconnects, or was the problem with the missing / in the pump.ini
hayleyml
@hayleyml
Mar 12 2017 22:54
Yes I've done that about a dozen times. However, rather than going to my Edison it goes to localhost. Is that the same thing? I've gone through the set up repeatedly but there aren't instructions to determine if I actually flashed it appropriately.

Debian GNU/Linux 8 localhost ttyMFD2

localhost login:

I'm really sorry - this is very new to me.
Terri Lyman
@tatigger
Mar 12 2017 23:00
Stick with it @hayleyml no dumb questions. They will refer you back so you continue to learn :) If I can do it, and I did...then you got this
That is your Edison, I never was able to get the name to change. Anybody?
hayleyml
@hayleyml
Mar 12 2017 23:01
Okay. phew. Can I make sure I flashed it appropriately somehow?
Terri Lyman
@tatigger
Mar 12 2017 23:04
I think I just continued through the steps....
It can take a little bit to find an answer sometimes. Just keep googling and reading. It will all help. I will check back, tag me if you get stuck...I am working on something else, but will touch base @hayleyml
Dana Lewis
@danamlewis
Mar 12 2017 23:10
If you can login as root with pword edison, that's a good sign , and if you see it with ubilinux at the top that's also good.
hayleyml
@hayleyml
Mar 12 2017 23:10
okay thanks so much. Medicine is easy - tech is not!!
It says Linux, not ubilinux - is that okay?
When I login with root and the password I set before I closed the window and it says:

Last login: Sat Jan 1 00:03:50 UTC 2000 on ttyMFD2
Linux localhost 3.10.17-poky-edison+ #6 SMP PREEMPT Wed Mar 23 21:47:59 EDT 2016 i686

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
root@localhost:~#

Dana Lewis
@danamlewis
Mar 12 2017 23:12
Did you end up doing the reboot step?
Terri Lyman
@tatigger
Mar 12 2017 23:12
@hayleyml ubilinux is a flavor of Linux
you use your root login
feraridurango
@feraridurango
Mar 12 2017 23:12
It is a TI stick on my pi3 ....... I have our second rig that I would love to get up and running but I have not been able to figure out how to ssh in to it and get it hooked up to wifi @PieterGit
hayleyml
@hayleyml
Mar 12 2017 23:13
After I flashed it. @danamlewis
Dana Lewis
@danamlewis
Mar 12 2017 23:15
@hayleyml k. So probably fine, and I'd just keep moving forward (set up wifi next). Just make sure you don't see "Yocto" anywhere because that's a sign the flash didn't work.
hayleyml
@hayleyml
Mar 12 2017 23:17
I tried to set up wifi but after I finished I couldn't write anymore in it. It was just like a piece of paper with information but couldn't write anymore.
Dana Lewis
@danamlewis
Mar 12 2017 23:18
Couldn't write anymore - did you try scrolling? Or did it give you an error?
hayleyml
@hayleyml
Mar 12 2017 23:18
No it was after the insert and then qw. Is there a way to get it to where I could write again? I opened a new terminal
Terri Lyman
@tatigger
Mar 12 2017 23:19
@danamlewis I used Nano instead of vi....
Dana Lewis
@danamlewis
Mar 12 2017 23:19
You'll have to hit i again when you open it next to get back into insert mode to edit
hayleyml
@hayleyml
Mar 12 2017 23:20
But if I insert mode I can't seem to make anything happen. Theres no like active code lines after I hit the insert.
Dana Lewis
@danamlewis
Mar 12 2017 23:21
You may want to use the Mac guide (a few more pictures) for the wifi portion http://openaps.readthedocs.io/en/latest/docs/walkthrough/phase-0/edison-explorer-board-Mac.html#multiple-wifi-networks
feraridurango
@feraridurango
Mar 12 2017 23:21
@PieterGit my next rig that is only missing the wifi is our Edison
Dana Lewis
@danamlewis
Mar 12 2017 23:22
@hayleyml maybe take a screenshot? (And drag and drop here into Gitter window to paste it)
hayleyml
@hayleyml
Mar 12 2017 23:26
I'll be honest, I don't know how to do a screen shot! Ugh. But I did something to test to see if the connection I set up for wifi - it says:
Listening on LPF/wlan0/98:f1:70:64:3d:ed
Sending on LPF/wlan0/98:f1:70:64:3d:ed
Sending on Socket/fallback
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 7
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 13
No DHCPOFFERS received.
No working leases in persistent database - sleeping.
root@localhost:~#
Dana Lewis
@danamlewis
Mar 12 2017 23:39
I just merged a PR with some tweaks and explanations around the Windows-based flash process, which should help
@hayleyml are you still stuck on the wifi step?
hayleyml
@hayleyml
Mar 12 2017 23:39
yep
Dana Lewis
@danamlewis
Mar 12 2017 23:41
k - refresh your docs page, it has some fresh edits that may help
peterfulvi
@peterfulvi
Mar 12 2017 23:43
when doing the tetrherin when you run sudo hciconfig hci0 name $HOSTNAME do you enter your hostname in place of$HOSTNAME. Or do you run the command as is. I know in some code you replace whats beside the $ sign. Im just trying to trace what im not doing right with the tethering process
Scott Leibrand
@scottleibrand
Mar 12 2017 23:44
@peterfulvi you leave that one as-is
peterfulvi
@peterfulvi
Mar 12 2017 23:44
Thanks
Scott Leibrand
@scottleibrand
Mar 12 2017 23:45
if you want to see what that does, you can run echo sudo hciconfig hci0 name $HOSTNAME to see what it is actually running after replacing $HOSTNAME
David
@dakago
Mar 12 2017 23:45
hello all, I just updated to the latest version of oref0 but I was looking through the aliases and I noticed that two of the aliases I previously created were still there... but when I looked at some of the aliases I had adjusted for the 512 they seem to be back to normal. But not sure. everything says that I am on the latest. is the update supposed to overwrite everything?
Scott Leibrand
@scottleibrand
Mar 12 2017 23:47
running oref0-setup again will overwrite anything that is defined in the standard setup, but won't touch aliases or reports that don't exist there.
if you want to improve oref0-setup's support for 512 pumps, you could probably make a special option for it and have it import a copy of what you had to change...
and if you're not sure how to do that, there are a lot of people who've made edits to oref0-setup over the last few months that could help out
David
@dakago
Mar 12 2017 23:54
all the changes I made I actually added to the docs ... but although it worked there were still issues with reception I never figured out. It was a backup pump i was working with so we just went back to the 515. the aliases were just to help my wife access the logs easily .... liking new addition of l for logs.
Dana Lewis
@danamlewis
Mar 12 2017 23:54
:+1:
there’s also new instructions for adding additional aliases for anyone wh wants to add others: http://openaps.readthedocs.io/en/latest/docs/walkthrough/phase-1/add-alias.html
hayleyml
@hayleyml
Mar 12 2017 23:58
Sorry again - is there any way to start from scratch or to see what all I've done? I keep getting frustrated and closing the windows and then I can't get back to where I was. :worried:
Dana Lewis
@danamlewis
Mar 12 2017 23:59
@hayleyml what errors were you getting with your Mac setup attempt? That might be easiest to start over and troubleshoot with?