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

20th
Mar 2016
Jim Matheson
@jmatheson
Mar 20 2016 00:02
in general i run higher overnight than during the day (not by design). I dont think i have a good way to analyze the historical data. But last night for example i started rising around 1:30am for no apparent reason and then high temp kicked in and things flattened out, but did not get back to my target. I woke up at 5am and corrected myself 2units. this has happened the last 2-3 nights. but prior to that i was pretty much where i wanted to be overnight and borderline low.
it feels like i am constantly ~30 points above my target often when i look openaps is not high or low tempingg
i have been playing with my insulin duration trying to see if i that value is having an impact one way or another.
but generally i am doing corrections the last few days because im’s sitting those 30 points above where i want to be.
and i think doing corrections is probably impacting things whith a snooze, but not sure what else to do since it seems like openaps is not moving me down at a rate of my liking
Scott Leibrand
@scottleibrand
Mar 20 2016 00:06
Sounds like you would benefit from autosens.
If you're consistently running high some days and not coming down, but low other days, it can figure out which state you're in and adjust your normal basal accordingly, and then high/low temp from there.
Jim Matheson
@jmatheson
Mar 20 2016 00:07
yeah.
it was more one way for awhile and now the other way for awhile.
and to be clear i am not really high, just 30-40 points above where i want to be :)
That is an example when running sensitive.
yeah, sorry @sulkaharo I've gotten that complaint a few times
Jim Matheson
@jmatheson
Mar 20 2016 00:11
yeah, hoping to get back to that. it’s funny mine now run fairly flat (except that random rise but could have been carbs still entering system from a late dinner). mine are just flat at 130 instead of 100
Scott Leibrand
@scottleibrand
Mar 20 2016 00:11
Rather than waiting for BG to drop and low-temping in response, it sets basal to 85% of normal when no temp would be required.
Well, if you're flat at 130 with enough IOB to bring you down to 100, but staying high, then it will detect that as a positive deviation, and after enough hours of those will start raising the normal basal, so you end up with higher IOB when flat at 130, and end up riding down closer to 110.
Jim Matheson
@jmatheson
Mar 20 2016 00:16
fassssster insulin please scott :)
Jason Calabrese
@jasoncalabrese
Mar 20 2016 00:28
I wonder in the new git gc --auto that got added to dev will help with the pump.ini 0 size issue, it solved the inode issue I was having
Scott Leibrand
@scottleibrand
Mar 20 2016 01:54
@jmatheson fixed the password prompt on OpenAPS.org
Dana Lewis
@danamlewis
Mar 20 2016 01:59
Lol @jmatheson re: fassssster insulin
Eric Luhrs
@eluhrs
Mar 20 2016 03:04
I just ran the quick-src.sh script to install 0.0.11-dev over top of an existing install of the production version of openaps. My loop still finishes, but I'm getting these two warnings:
...
get-profile://text/shell/settings/profile.json
Warning: could not parse carbratio_data. Meal Assist disabled.
reporting settings/profile.json
...
determine-basal://text/shell/enact/suggested.json
Warning: could not parse meal_input. Meal Assist disabled.
...
ns-status://JSON/shell/monitor/upload-status.json
Could not require: /home/pi/wopr/[ { [Error: Cannot find module '/home/pi/wopr/['] code: 'MODULE_NOT_FOUND' }
reporting monitor/upload-status.json
Scott Leibrand
@scottleibrand
Mar 20 2016 03:06
That is fine. New optional features.
Eric Luhrs
@eluhrs
Mar 20 2016 03:06
...
Scott Leibrand
@scottleibrand
Mar 20 2016 03:06
That last one might be a problem tho.
I usually run aliases manually to narrow down where the issue is.
Eric Luhrs
@eluhrs
Mar 20 2016 03:28
seems that the enact alias is missing temp_basal.json, which is created by the monitor-pump alias. If I run monitory-pump then enact, it completes without an error.
Should I just add the monitor-pump alias to enact?
Scott Leibrand
@scottleibrand
Mar 20 2016 03:29
Your loop alias should be running them in order.
(The one you call from cron)
Eric Luhrs
@eluhrs
Mar 20 2016 03:31
I run loop from cron, which includes the following in openaps.ini:
preflight, gather, enact, status-upload, upload-recent-treatments
Brian Bonner
@itsn0tm3
Mar 20 2016 04:22
hmm question, if I set a rig to start 1 minute later than my other rigs (so that way they would be offset), it should in theory kick one out if one is already communicating, right?
according to the code, there is a timeout in the mmeowlink code
Dana Lewis
@danamlewis
Mar 20 2016 04:30
Which is kicking out? Not start talking, or interrupt existing one? Not sure exactly which code spot you're referring to
Brian Bonner
@itsn0tm3
Mar 20 2016 04:30
Sorry, Scott and I were talking earlier about multiple rigs
and he was saying that he had some modified codes that would shut down when it heard another rig talking
I was looking through his code and noticed mmeowlink already has timeout code in it
so was wondering if one rig if it was already running through the loop when another rig starts trying 1 minute later, would it block out that rig form continuing the loop?
ps2 did say that it could corrupt the communication I think..
sorry.. was just thinking out loud. doesn't help that mmeowlink is in python and scott's code is in ruby ha
Pete Schwamb
@ps2
Mar 20 2016 04:59
Don’t blame Scott for my poor ruby code. ;)
Brian Bonner
@itsn0tm3
Mar 20 2016 04:59
lol!
no blame going around :) was just amused at the differences
Pete Schwamb
@ps2
Mar 20 2016 05:01
The get model command he uses to detect crosstalk and then back-off could cause other comms to fail, but it sounds like it does help in his situation. I was just saying that it’s possible to detect comms in a non-invasive way using existing subg_rfspy firmware, but some mmeowlink code needs to be written to do that.
Brian Bonner
@itsn0tm3
Mar 20 2016 05:02
isn't there a timeout already written into mmeowlink or was that only in the ruby code?
or am I just confused (which is probably normal)
Pete Schwamb
@ps2
Mar 20 2016 05:02
Yes there are timeouts; timeouts don’t prevent crosstalk.
Brian Bonner
@itsn0tm3
Mar 20 2016 05:02
hmm
the scanning wouldn't cause any problems right?
it's only the transmission/receiving part that causes problems?
Pete Schwamb
@ps2
Mar 20 2016 05:08
What do you mean by scanning?
Brian Bonner
@itsn0tm3
Mar 20 2016 05:09
the part where it checks for the best frequency?
Pete Schwamb
@ps2
Mar 20 2016 05:10
Scanning is very invasive. It sends out lots of different packets on different frequencies, and listens on different frequencies, waiting for responses.
The wake/power on is also very invasive
Once the code thinks that the pump is awake, then doing something like get model sends out single packet, or maybe a few if retries are on.
Brian Bonner
@itsn0tm3
Mar 20 2016 05:11
could that be the answer of where to code it in then, listen to see if there is another one broadcasting the scanning portion, and if there is then don't do a scan and fail. If no scanning is happening then go ahead and do the scan?
Pete Schwamb
@ps2
Mar 20 2016 05:12
Right
It should be pretty easy to hear any other active systems. The RL/TI stick would be like someone shouting in the house, while the pump is like someone talking in a normal voice. Even if the system in question is too far away to hear the pump, it should be able to hear the other RL/TI stick and back off and not cause problems.
Brian Bonner
@itsn0tm3
Mar 20 2016 05:15
I guess my other question then would be, is there a specific packet that it could listen for, does the scanning broadcast a specific packet?
Would this be what is being broadcast: "%0.3f" ??
ah no that's not it
Pete Schwamb
@ps2
Mar 20 2016 05:17
You would listen for any packet with a valid crc; you don’t want to interrupt dump history, which is another lengthy series of packets.
Brian Bonner
@itsn0tm3
Mar 20 2016 05:19
basically there's no packets flying as long as nothing is talking right, or does the TI stick/ the pump send out packets during other times?
Dana Lewis
@danamlewis
Mar 20 2016 05:24
This is where preflight checks are useful, not just staggering rig timings
Brian Bonner
@itsn0tm3
Mar 20 2016 05:26
I agree, was just thinking that if NTP was accurate enough on all rigs, they all would send a packet at the same time so I was just pondering how that would work out. I see a line in the code that prints out the packets so I could uncomment that and take a lookie-see
should be fun to play with it, will be nice to contribute if I can get it to work
Brian Bonner
@itsn0tm3
Mar 20 2016 05:37
That doesn't quite answer the question of which rig has the stronger signal does it?
since if listening to a packet with a valid CRC just means that they were talking first
Brian Bonner
@itsn0tm3
Mar 20 2016 05:43
I wonder if it's a combination of the two, @bewest and I were also talking earlier about sending the packets via ethernet, so what if there was code to listen and make sure there were no packets being transmitted and if there were, then be quiet otherwise go ahead and do the scan, however if the signal wasn't strong enough, send a signal to other rigs on the network if any to try a scan and see if they had a better signal?
so basically some "teamwork" in action?
Pete Schwamb
@ps2
Mar 20 2016 05:46
This is just trying to solve the problem of rigs stomping on each other. Going to the level after that, of having some sort of polling and voting procedure would be much more complicated, and probably be a smaller improvement
Brian Bonner
@itsn0tm3
Mar 20 2016 05:47
heh true, I'm getting ahead of myself I suppose
thanks @ps2 for giving me some ideas!
Scott Leibrand
@scottleibrand
Mar 20 2016 06:23
if you aren't familiar with it, read up on the way wifi works. the CSMA/CA algorithm they use is very similar I think to what we want to be doing
basically, it doesn't matter (IMO) which rig has the strongest signal: if it's strong enough to communicate successfully, the other rigs should wait until the channel is clear to transmit, with some sort of backoff each time they detect someone else transmitting, and a backoff each time their own attempt to communicate fails
Brian Bonner
@itsn0tm3
Mar 20 2016 06:25
I've never done any RF stuff so yea, I'll need to read up on it
Scott Leibrand
@scottleibrand
Mar 20 2016 06:25
the latter backoff will give the other rigs time to try, and whichever has the best signal will end up being able to finish their loop
me neither :)
Brian Bonner
@itsn0tm3
Mar 20 2016 06:26
:)
Scott Leibrand
@scottleibrand
Mar 20 2016 06:27
I agree we need to make our "listen for others talking" better, to not transmit first, and listen a bit longer. what I did to modify bin/mmtune was just a quick "80%" solution/hack
(which is why it's still sitting on my branch and hasn't been PR'd)
Brian Bonner
@itsn0tm3
Mar 20 2016 06:27
oh btw I couldn't get your code to run
something about ruby complaining about a coloring thing
Scott Leibrand
@scottleibrand
Mar 20 2016 06:28
gem install colorize or whatever it wants.
And serialport.
Brian Bonner
@itsn0tm3
Mar 20 2016 06:29
ah that would be it
Scott Leibrand
@scottleibrand
Mar 20 2016 06:29
And apt-get install ruby-dev
Brian Bonner
@itsn0tm3
Mar 20 2016 06:29
already did the ruby-dev
Scott Leibrand
@scottleibrand
Mar 20 2016 06:29
k
Brian Bonner
@itsn0tm3
Mar 20 2016 06:29
didn't realize there was a separate installer (gem)
Scott Leibrand
@scottleibrand
Mar 20 2016 06:30
it's not my ruby code btw. Just two or three little tweaks on my fork.
Brian Bonner
@itsn0tm3
Mar 20 2016 06:30
let me clarify then, thanks to both you and @ps2 then :)
Scott Leibrand
@scottleibrand
Mar 20 2016 06:30
:-)
Jason Calabrese
@jasoncalabrese
Mar 20 2016 07:05
with all that talk of interference... https://twitter.com/jasoncalabrese/status/711448385627099136
Matthias
@ceben80
Mar 20 2016 07:25

@danamlewis @scottleibrand

I am so happy about my openAPS, it works so awesome :tada:

I would like to thank for this great project and this relief in my diabetes therapy.

As you can see my last night has made a smooth line, fantastic :star2:

blob
Jason Calabrese
@jasoncalabrese
Mar 20 2016 07:27
so flat, only a robot could do that
what are your targets set to
Matthias
@ceben80
Mar 20 2016 07:28
@jasoncalabrese target is set to 85-90, works great for the last 2 weeks :+1:
thus a precision landing this morning :sparkles:
Jason Calabrese
@jasoncalabrese
Mar 20 2016 07:30
wow, thought it had to be low like that with the high temps in there
Matthias
@ceben80
Mar 20 2016 07:36
For me openAPS is also a great motivation to go to bed at night with good values.
Whether healthy or diabetic it's always a good idea not so late to eat as much.
I am looking forward to the next A1C in 2 weeks.
Scott Leibrand
@scottleibrand
Mar 20 2016 07:39
:-D
How well does it avoid lows with targets set that low?
Matthias
@ceben80
Mar 20 2016 07:43
I know certainly very ambitious, not a xDrip alarm was triggered :+1:
I'm sleeping so relaxed with openAPS - great
Stephan
@MosiGitHub
Mar 20 2016 09:29
by the way I really want to thank all the guys doing the development of OpenAPS - especially @danamlewis and @scottleibrand and @oskarpearson for his work with Mmeowlink. Running Openaps for the last 18 hours on my son and his first overnight as well - after a couple days of daytesting only. And right now it is helping him not to come low after breakfast :+1:
Screenshot_2016-03-20-10-23-03.png
he is presently 92 rising again
Oskar Pearson
@oskarpearson
Mar 20 2016 10:02
@MosiGitHub So glad it's working for you! My part is minimal compared to the others :)
Stephan
@MosiGitHub
Mar 20 2016 10:14
@oskarpearson : for me it was a really helpful part ;-)
Eric Luhrs
@eluhrs
Mar 20 2016 13:53
On the off chance that anyone else is hacking their pancreas on this fine Sunday morning, I could use some help tracking down the root cause of an error that started after I installed the meal-assist version of OpenAPS over top of my working production version.
After working through my aliases, I see that my monitor/upload-status.json is throwing this error: '''
pi@raspberrypi:~/wopr $ openaps report invoke monitor/upload-status.json
ns-status://JSON/shell/monitor/upload-status.json
Could not require: /home/pi/wopr/[ { [Error: Cannot find module '/home/pi/wopr/['] code: 'MODULE_NOT_FOUND' }
reporting monitor/upload-status.json
pi@raspberrypi:~/wopr $ '''
Britta
@Surferin
Mar 20 2016 14:20
Do you have a recommendation for me where I could buy a pump online in good working condition with which I could do OpenAPS? I prefer a Animas Ping because now I have a Animas Vibe. Online because I live in Germany
Tim Howard
@tghoward
Mar 20 2016 14:20
@eluhrs it is a fine Sunday morning isn't it?
just making sure: you do have that report built and in your openaps.ini file?
@Surferin remember there isn't good documentation for looping with the Ping yet.
Britta
@Surferin
Mar 20 2016 14:22
yes, I know
Tim Howard
@tghoward
Mar 20 2016 14:23
there is one or two regular 'go to' websites that folks use. I'm not sure I can remember the specifics but will try to find them.
Britta
@Surferin
Mar 20 2016 14:23
ok, thanks
Tim Howard
@tghoward
Mar 20 2016 14:25
here it is: http://www.medwow.com
folks cite that one a fair amount
Britta
@Surferin
Mar 20 2016 14:25
ok, thanks for that
Tim Howard
@tghoward
Mar 20 2016 14:34
@eluhrs , same problem from @jaylagorio , ^^^ March 12: ```> Maybe! Here's some progress:
Could not require: /home/pi/openaps-jml/[ { [Error: Cannot find module '/home/pi/openaps-jml/['] code: 'MODULE_NOT_FOUND' }
reporting monitor/upload-status.json ````
Eric Luhrs
@eluhrs
Mar 20 2016 15:05
@tghoward Sorry, a friend stopped by for coffee. The best kind of Sunday. :)
@tghoward yes, I am generating the report in openaps.ini. Here's the recipe:
[report "monitor/upload-status.json"]
suggested = enact/suggested.json
status = monitor/status.json
use = shell
reservoir = monitor/reservoir.json
reporter = JSON
battery = monitor/battery.json
clock = monitor/clock-zoned.json
json_default = True
device = ns-status
remainder = []
iob = monitor/iob.json
enacted = enact/enacted.json
And all of those json files exist and have content.
Scott Leibrand
@scottleibrand
Mar 20 2016 15:38
Try running ns-status manually and see if the files it wants have changed.
Most likely it wants something new you're not providing. Will need to redefine the device and report to add the new field, and possibly add a report to collect that as well.
@MosiGitHub don't forget @bewest: without his work none of this would have been possible.
Eric Luhrs
@eluhrs
Mar 20 2016 15:42
@scottleibrand By running ns-status manually, do you mean this?
pi@raspberrypi:~/wopr $ openaps device show ns-status
process://ns-status/ns-status/
pi@raspberrypi:~/wopr $
Scott Leibrand
@scottleibrand
Mar 20 2016 15:42
No, ns-status is a top-level command.
pi@rpi4 ~ $ ns-status
usage: [ 'node', '/usr/local/bin/ns-status' ] <clock.json> <iob.json> <suggested.json> <enacted.json> <battery.json> <reservoir.json> <status.json> [mmtune.json]
pi@rpi4
Looks like you have all the required fields in your report. How is your ns-status device configured?
Eric Luhrs
@eluhrs
Mar 20 2016 15:46
here's the the output of ns-status, which seems to work:
pi@raspberrypi:~/wopr $ ns-status monitor/clock.json monitor/iob.json enact/suggested.json enact/enacted.json monitor/battery.json monitor/reservoir.json monitor/status.json
{"device":"openaps://raspberrypi","openaps":{"iob":{"netbasalinsulin":-0.35,"bolussnooze":0,"basaliob":-0.225,"iob":-0.225,"activity":-0.0009,"timestamp":"2016-03-20T15:44:59.000Z"},"suggested":{"temp":"absolute","bg":64,"tick":-3,"eventualBG":50,"snoozeBG":50,"mealAssist":"Off: Carbs: undefined Boluses: undefined Target: 115 Deviation: -21 BGI: 0.15","reason":"BG 64<70","duration":30,"rate":0,"timestamp":"2016-03-20T15:45:05.000Z"},"enacted":{"bg":64,"temp":"absolute","snoozeBG":50,"recieved":true,"rate":0,"reason":"BG 64<70","eventualBG":50,"timestamp":"2016-03-20T15:45:12.000Z","duration":30,"mealAssist":"Off: Carbs: undefined Boluses: undefined Target: 115 Deviation: -21 BGI: 0.15","tick":-3}},"pump":{"clock":"2016-03-20T11:43:13","battery":{"status":"normal","voltage":1.18},"reservoir":142.4,"status":{"status":"normal","bolusing":false,"suspended":false,"timestamp":"2016-03-20T15:44:49.000Z"}}}
And here's the ns-status device config from openaps.ini:
[device "ns-status"]
vendor = openaps.vendors.process
extra = ns-status.ini
Stephan
@MosiGitHub
Mar 20 2016 15:49
@bewest : thanks for your amazing work as well :clap:
Eric Luhrs
@eluhrs
Mar 20 2016 15:50
And here's the content of ns-status.ini:
[device "ns-status"]
fields = clock iob suggested enacted battery reservoir status
cmd = ns-status
args =
Scott Leibrand
@scottleibrand
Mar 20 2016 15:52
You used clock, not clock-zoned
Also, does openaps report invoke monitor/upload-status.json give you that same error?
Eric Luhrs
@eluhrs
Mar 20 2016 15:56
Yes, running monitor.upload-status.json give me the same error.
just ran ns-status by hand, specifying clock-zoned.json, and the error was gone!
Thanks, @scottleibrand :)
Scott Leibrand
@scottleibrand
Mar 20 2016 15:57
Hmm, I'm confused. Did that fix the report somehow?
or is that just a "failed to reproduce manually"?
Eric Luhrs
@eluhrs
Mar 20 2016 15:58
Not sure I follow. Here's what worked:
pi@raspberrypi:~/wopr $ ns-status monitor/clock-zoned.json monitor/iob.json enact/suggested.json enact/enacted.json monitor/battery.json monitor/reservoir.json monitor/status.json
{"device":"openaps://raspberrypi","openaps":{"iob":{"netbasalinsulin":-0.35,"bolussnooze":0,"basaliob":-0.307,"iob":-0.307,"activity":-0.0016,"timestamp":"2016-03-20T15:58:07.000Z"},"suggested":{"temp":"absolute","bg":61,"tick":-1,"eventualBG":57,"snoozeBG":57,"mealAssist":"Off: Carbs: undefined Boluses: undefined Target: 115 Deviation: -14 BGI: 0.26","reason":"BG 61<70","duration":30,"rate":0,"timestamp":"2016-03-20T15:58:13.000Z"},"enacted":{"bg":61,"temp":"absolute","snoozeBG":57,"recieved":true,"rate":0,"reason":"BG 61<70","eventualBG":57,"timestamp":"2016-03-20T15:58:19.000Z","duration":30,"mealAssist":"Off: Carbs: undefined Boluses: undefined Target: 115 Deviation: -14 BGI: 0.26","tick":-1}},"pump":{"clock":"2016-03-20T11:56:21-04:00","battery":{"status":"normal","voltage":1.18},"reservoir":142.4,"status":{"status":"normal","bolusing":false,"suspended":false,"timestamp":"2016-03-20T15:57:57.000Z"}}}
Scott Leibrand
@scottleibrand
Mar 20 2016 15:59
Ok. But the report still fails?
if so, we haven't figured out what is causing it to fail yet.
Eric Luhrs
@eluhrs
Mar 20 2016 15:59
Hmmm. Sorry. I thought running ns-status manually had given an error with monitor-clock. But I must be wrong.
Scott Leibrand
@scottleibrand
Mar 20 2016 16:02
Rather than a device and report, I have an alias that does both: format-ns-status = ! bash -c "ns-status monitor/clock-zoned.json monitor/iob.json enact/suggested.json enact/enacted.json monitor/battery.json monitor/reservoir.json monitor/status.json > upload/ns-status.json"
not sure why your config doesn't work though
unfortunately @bewest' openaps toolkit was really designed to deal with physical devices, not lots of little scripts, so managing the report config around making sure scripts have all the right inputs is rather convoluted.
Eric Luhrs
@eluhrs
Mar 20 2016 16:09
I seem to have broken something else. Will return shortly.
Eric Luhrs
@eluhrs
Mar 20 2016 16:19
@scottleibrand Sorry for the delay. Okay, so openaps report invoke monitor/upload-status.json still gives the error. And I too have the format-ns-status alias, which completes without error (our any output at all).
Scott Leibrand
@scottleibrand
Mar 20 2016 16:20
Does it properly update the output file?
if so, you could try replacing the thing calling the report with a call to openaps format-ns-status instead for now.
Eric Luhrs
@eluhrs
Mar 20 2016 16:22
Is that suggested.json?
I should mention that even though I'm getting that error, everything seems to be working as expected....
So this looks odd:
pi@raspberrypi:~/wopr/upload $ cat latest-treatments.json
[]
Scott Leibrand
@scottleibrand
Mar 20 2016 16:26
Is the NS OpenAPS status pill getting updated properly?
Eric Luhrs
@eluhrs
Mar 20 2016 16:27
Yes, for the most part. Sometimes it says not found (or something like that) but usually it just says the number of minutes since the last update.
Scott Leibrand
@scottleibrand
Mar 20 2016 16:28
you have an alias that does openaps report invoke monitor/upload-status.json that could run openaps format-ns-status instead, assuming that is defined to write to the same file.
Or maybe you're doing that already then?
that would explain how you're updating NS if the report isn't working.
If you're doing both, you should be able to stop calling the report
Eric Luhrs
@eluhrs
Mar 20 2016 16:30
No, I
I'm not running openaps format-ns-status.
So you think I should remover the report from openaps.ini, and add a call to the toplevel command instead?
Scott Leibrand
@scottleibrand
Mar 20 2016 16:31
Well, only if something isn't working I guess.
Eric Luhrs
@eluhrs
Mar 20 2016 16:32
I can't find anything that doesn't work. Just wasn't sure if I needed to worry about the error.
Scott Leibrand
@scottleibrand
Mar 20 2016 16:33
Might be worth debugging in more detail, but that's not something I can effectively do over gitter apparently.
But if it ain't broke...
Eric Luhrs
@eluhrs
Mar 20 2016 16:35
Ha! Well, as you said, the config is rather convoluted.
Scott Leibrand
@scottleibrand
Mar 20 2016 16:36
Hopefully someone else with a config like yours will know what is going on or how to repro and fix.
Eric Luhrs
@eluhrs
Mar 20 2016 16:37
Is there any documentation for getting started with meal-assist and auto sensitivity? I suspect I need to add some more reports?
Run manually line by line. Script is unlikely to be exactly right for your setup.
Eric Luhrs
@eluhrs
Mar 20 2016 16:38
@scottleibrand Searching gitter for the missing module error showed that @jaylagorio had the same problem. I sent him a private message earlier.
Eric Luhrs
@eluhrs
Mar 20 2016 16:40
Great. Thanks very much. Not sure why I didn't find those....
Scott Leibrand
@scottleibrand
Mar 20 2016 16:40
We probably need someone to write up something in openaps/docs on configuring meal assist (in English)
so if you're interested in translating as you go... :-)
Eric Luhrs
@eluhrs
Mar 20 2016 16:41
Okay, I'll keep some notes as I go through the process. I'm eager to give back in some way.
Scott Leibrand
@scottleibrand
Mar 20 2016 16:41
and I'm sure the autosens one needs some tweaks, so please PR any edits to that too.
Eric Luhrs
@eluhrs
Mar 20 2016 16:42
I do. :) Thanks!
Colin Lennon
@colinlennon
Mar 20 2016 17:08
Thanks @scottleibrand for pointing me to units yesterday. My gather-profile alias now includes the conversion of the bg_targets and insulin_sensitivities reports :smile:
Stephan
@MosiGitHub
Mar 20 2016 17:36
hi ... is expect that doesn't sound good:
raise InvalidGitRepositoryError(epath)
Stephan
@MosiGitHub
Mar 20 2016 17:47
okay: I have run oref-git-reset manually and it seems to be working again.... so I expect the cron for oref0-git-reset that I have is not working :-(
now I got: git.exc.GitCommandError: 'git add settings/settings.json' returned with exit code 128
stderr: 'fatal: Unable to create '/home/edison/XXXXopenaps/.git/index.lock': Permission denied'
Could this be because I have run the oref0-git-reset as su ?
Scott Leibrand
@scottleibrand
Mar 20 2016 18:11
Probably
you'll need to do a chown -R edison.edison XXXXopenaps or similar.
Stephan
@MosiGitHub
Mar 20 2016 18:20
@scottleibrand : sorry for the delay. I was playing with the kids. Thanks a lot it worked.... now testing the system
Ben West
@bewest
Mar 20 2016 18:30
I think convoluted is the wrong word
I tried showing how to use argument to make typing easier, there is also now openaps-import tool which can import json config
using $1 and structuring scripts wisely will go a long long way
Scott Leibrand
@scottleibrand
Mar 20 2016 18:34
I think we have a big gap between capabilities and what people are doing in practice
maybe we need to have someone who actually understands the capabilities help us go through and refactor the recommended setup into something more straightforward.
benhamou
@benhamou
Mar 20 2016 18:36
Hmm i souls also appreciate an offline Meeting face2face
Ben West
@bewest
Mar 20 2016 18:36
with the trigger stuff there are bunch new capabilities, too
just finished the emit and until event tools
Scott Leibrand
@scottleibrand
Mar 20 2016 18:36
Unfortunately most of what we have now is from people (like me) cargo-culting off existing examples with understanding how to do better.
Nice. :-)
*without understanding
Ben West
@bewest
Mar 20 2016 18:37
well, I have been giving recommendations, maybe should be firmer
Scott Leibrand
@scottleibrand
Mar 20 2016 18:37
i see those, but can't mentally translate them into practice without a lot of trial and error
and I haven't focused on refactoring things to use new capabilities.
Ben West
@bewest
Mar 20 2016 18:38
not sure the events stuff is super useful beyond playing around with it for now
but the import stuff could be leveraged pretty well
Scott Leibrand
@scottleibrand
Mar 20 2016 18:39
Yes, we should refactor docs to use import
And the $1 argument stuff I still don't fully understand
Ben West
@bewest
Mar 20 2016 18:43
each binary/script path needs to be registered in openaps
so if you have two related tasks and put them into two tools
by default you'll have to register twice
by contrast, if the tools are in fact related, you can put them in the same script that uses $1 to decide which one to run
then because it's in the same script, only one openaps add thing is needed
I've thought about doing a --help-json feature, so openaps could query a tool for it's help and generate better help/tab complete for external scripts
might be a way to eliminate the shell wart
Ben West
@bewest
Mar 20 2016 18:49
openaps import -l now lists all the high level types
$ openaps import -l
alias
vendor
schedule
device
trigger
report
also, on the exports branch, will probably bump minor rev number this time around
did some things to change some of the apis
it uses a python's own packaging plugin system now
Scott Leibrand
@scottleibrand
Mar 20 2016 18:50
I think one big problem is having to define all the arguments in the device
Ben West
@bewest
Mar 20 2016 18:51
not sure what you mean there
Scott Leibrand
@scottleibrand
Mar 20 2016 18:51
and then trying to pass them by keyword.
Ben West
@bewest
Mar 20 2016 18:51
you can add any additional args after
Scott Leibrand
@scottleibrand
Mar 20 2016 18:51
Can I pass all args as additional?
Ben West
@bewest
Mar 20 2016 18:51
when reports run, it just concats [device args] + [report args]
yeah
Scott Leibrand
@scottleibrand
Mar 20 2016 18:51
ok, that is probably a cargo-cult thing
Ben West
@bewest
Mar 20 2016 18:52
to be fair, there was a patch maybe 4 months ago that fixed a bug there
that might have prevented it from passing args as intended
Scott Leibrand
@scottleibrand
Mar 20 2016 18:52
we did a lot of "not sure why, but you have to do it this way" when setting up the configs that became the docs.
Ben West
@bewest
Mar 20 2016 18:52
yeah...
benhamou
@benhamou
Mar 20 2016 18:53
I like this merhod
Method
This how one progress
Ben West
@bewest
Mar 20 2016 18:55
$ for type in $(openaps import -l); do openaps $type show --json ; done | json -g I've been having lots of fun with this
I usually add ns-upload as it's own device with just the site and api secret
then I can provide the endpoint(type) and payload as usage args
Scott Leibrand
@scottleibrand
Mar 20 2016 18:58
I know you end up dealing with a lot of the crap from people setting things up inefficiently: maybe would be worthwhile to PR "here's how to do this better" into a few places in the docs where we're doing things suboptimally?
or maybe we need to bite the bullet and prioritize scripting up good chunks of the read-only setup
Ben West
@bewest
Mar 20 2016 19:00
hmm
Scott Leibrand
@scottleibrand
Mar 20 2016 19:00
would love to have the thing that newbies use to get set up be the same thing that you and I and @jasoncalabrese all use.
Ben West
@bewest
Mar 20 2016 19:00
yeah, was just trying to muster up and try come up with openaps-ns-upload-tutor or something
Scott Leibrand
@scottleibrand
Mar 20 2016 19:01
Right now there's way too much "oh, I don't do it that way"
so we're not in a good position to help people get set up
in other words we're not dogfooding our setup stuff.
Ben West
@bewest
Mar 20 2016 19:04
with the import thing tweaked this last week to be pluggable, it's pretty solid
probably time to bite bullet and do tutor type scripts to help walk through or automate targeted steps
like setting up ns upload
only few things make sense there, and really just need api_secret and base url
dunno, there's lots of things like this that could use more love, kind of overwhelming
Ben West
@bewest
Mar 20 2016 19:10
pretty sure the docs need some kind of web frontend, too, would really love to see tutorials, walkthroughs, and manuals live as strong neighbors somehow
after some of the pairing/debugging sessions in here, I've got some ideas on easy things to do with people, just to get used to openaps mechanics.. things that can be done on laptop with no medical device
we should maybe consider taking some space on one of the Q&A platforms as well
Scott Leibrand
@scottleibrand
Mar 20 2016 19:13
Yeah. Seems like we should be spending more time automating away FAQs than answering them in person in gitter. I have been on the wrong side of that balance the last few weeks.
Ben West
@bewest
Mar 20 2016 19:14
people rave about SO, but they are so...... frustrating to break into
it's like wikipedia (ever tried to actually make an edit?)
Dana Lewis
@danamlewis
Mar 20 2016 19:15
SO?
Ben West
@bewest
Mar 20 2016 19:15
stackoverflow
Dana Lewis
@danamlewis
Mar 20 2016 19:15
Ah
Scott Leibrand
@scottleibrand
Mar 20 2016 19:15
I've made lots of minor Wikipedia edits without much difficulty.
Ben West
@bewest
Mar 20 2016 19:15
if you go on there and try to do anything...
good luck
from a newbie perspective, it can be difficult, high burden
they have very high high pass filter ;-)
eg, I don't think there's even a way to go create an openaps space on stackoverflow, I think you have to convince people to start tagging questions with #openaps
Dana Lewis
@danamlewis
Mar 20 2016 19:19
TBH, I don't think it's a question of which site, I think it's a question of us circling back and spending more time documenting stuff again.
Ben West
@bewest
Mar 20 2016 19:19
nose -> grindstone?
Dana Lewis
@danamlewis
Mar 20 2016 19:19
Yep
I had stubbed out a new doc flow, but haven't had time to work on it, so talking about myself here too
Scott Leibrand
@scottleibrand
Mar 20 2016 19:20
Yeah, it doesn't seem like switching to a site like SO would help that much. I think focusing in on the setup process (not just docs, but also automatic setup scripts for common stuff) would get us moving in the right direction.
Dana Lewis
@danamlewis
Mar 20 2016 19:20
:+1:
Brian Bonner
@itsn0tm3
Mar 20 2016 19:25
Might help to create a to-do list and then people will know what they should help contribute on?
for example, if there is a page that needs to be revised, most people might not know that or skip over on it, having a to-do list that specifically points it out would encourage people to work on it
Dana Lewis
@danamlewis
Mar 20 2016 19:26
Heh. Ok I will create a list too :)
Brian Bonner
@itsn0tm3
Mar 20 2016 19:27
That's part of the problem I have, some stuff may make sense to me but might not make sense to others and having a to-do list to hep refine certain stuff would make me go "Oh hey, I understood that part so I could clarify that part"
something along the lines of that
I actually was watching @bewest helping someone the other day and he was using the model as an example and I actually learned a few new things from the discussion so that kind of thing could help the documentation
(if I knew where to put it :( )
Ben West
@bewest
Mar 20 2016 19:32
those are some of the tutorial things
Brian Bonner
@itsn0tm3
Mar 20 2016 19:32
(nods)
Dana Lewis
@danamlewis
Mar 20 2016 19:33
@itsn0tm3 :+1: . And that's the kind of thing too where I want to encourage people to ask "hey, I'd like to add that (or something related) to the docs. Where is the best place for that?" And someone can point out the spot for it.
Ben West
@bewest
Mar 20 2016 19:35
yeah, not sure where to put it, if I were to start one
Brian Bonner
@itsn0tm3
Mar 20 2016 19:35
maybe make a new folder under docs called tutorials and then can refer to specific tutorials in specific places in the docs that people get stuck on?
Ben West
@bewest
Mar 20 2016 19:35
do we want a mega docs repo with all guides + tutorials + reference manuals in it, or should tutorials not related to oref0 go somewhere else?
Scott Leibrand
@scottleibrand
Mar 20 2016 19:36
right now the repo is openaps/docs. it's mostly focused on oref0, but there is certainly room for other stuff
Ben West
@bewest
Mar 20 2016 19:36
that's a good idea
@itsn0tm3 so you've got at least +2 on that :-)
Scott Leibrand
@scottleibrand
Mar 20 2016 19:37
actually a lot of the stuff in the early parts of openaps/docs is not oref0 related at all
setting up openaps reports, etc.
Dana Lewis
@danamlewis
Mar 20 2016 19:37
Yep
Brian Bonner
@itsn0tm3
Mar 20 2016 19:37
ok maybe that is where I am partly confused, if oref0 isn't openaps, then what is openaps? :)
Dana Lewis
@danamlewis
Mar 20 2016 19:38
I like folding under openAPS/docs
Brian Bonner
@itsn0tm3
Mar 20 2016 19:38
I know it's a toolkit of different tools in one place
Dana Lewis
@danamlewis
Mar 20 2016 19:38
And we can put the list of stuff to be worked on in that wiki
Ben West
@bewest
Mar 20 2016 19:38
yeah, FAQ should maybe go in wiki, too?
Dana Lewis
@danamlewis
Mar 20 2016 19:39
openaps is the toolkit. Oref0 is the code and the example implementation of the OpenAPS reference design.
Scott Leibrand
@scottleibrand
Mar 20 2016 19:39
OpenAPS (capitalized) is a reference design and high-level conceptual architecture. openaps (lowercase) is a python toolset. oref0 is a set of js tools that do things specific to implementing an OpenAPS closed loop with the openaps tools.
doesn't help that iOS likes to autocorrect the capitalization of openaps to OpenAPS or openAPS or whatever. ;-)
Brian Bonner
@itsn0tm3
Mar 20 2016 19:40
heh, I think I got it.
Ben West
@bewest
Mar 20 2016 19:40
openaps is not opinionated about how to create an AP
oref0 is opinionated
Brian Bonner
@itsn0tm3
Mar 20 2016 19:40
I think everything in one place would make it easier to contribute et al (FAQ, Tutorials, getting started, etc)
Ben West
@bewest
Mar 20 2016 19:41
combine the two and you might have an AP
Scott Leibrand
@scottleibrand
Mar 20 2016 19:41
s/openaps/Ben/ and s/oref0/Scott/ and that is still true. ;-)
Brian Bonner
@itsn0tm3
Mar 20 2016 19:41
:)
Dana Lewis
@danamlewis
Mar 20 2016 19:42
Lol
@itsn0tm3 yes I think keeping everything in openAPS/docs repo makes sense. But we can use the wiki and construct the nav however works best
Ben West
@bewest
Mar 20 2016 19:43
yeah, you have +3 at least
Scott Leibrand
@scottleibrand
Mar 20 2016 19:43
I was thinking the wiki (with its lower barrier to editing) is a good place to have the to-do list
Ben West
@bewest
Mar 20 2016 19:44
or issues even?
issues have the nice checkboxen?
Scott Leibrand
@scottleibrand
Mar 20 2016 19:44
I initially suggested issues, but that will become too fragmented for a list I think
should also do issues for detailed discussion on individual to-do's though
Ben West
@bewest
Mar 20 2016 19:44
ok
Scott Leibrand
@scottleibrand
Mar 20 2016 19:45
and link to them from the wiki when we open them
Ben West
@bewest
Mar 20 2016 19:45
yeah, reasonable
wish it was as easy to make this much progress in other domains, lol
might need to schedule some time to go over new features...
Ben West
@bewest
Mar 20 2016 19:50
the daemon stuff... could potentially be useful, feels like it'll need some feedback and adjustment before people will like using it though
Dana Lewis
@danamlewis
Mar 20 2016 19:50
Yea. And issues seem hard for people to use long term.
@bewest :+1: for wishes and maybe scheduling some time
Ben West
@bewest
Mar 20 2016 19:51
we have some events coming up
doubt that will be a good time for R&D
Dana Lewis
@danamlewis
Mar 20 2016 19:52
I'm thinking even a couple of chunks where we're all online working on stuff, even if we can't do in person
Ben West
@bewest
Mar 20 2016 19:52
yeah, that might be good
Dana Lewis
@danamlewis
Mar 20 2016 19:54
Are you around Mon or Tues evening this week?
Ben West
@bewest
Mar 20 2016 19:54
mon maybe
tuesday I think there's something
maybe it was you though
was it you?
Dana Lewis
@danamlewis
Mar 20 2016 19:55
For Tuesday? Not me
Ben West
@bewest
Mar 20 2016 19:57
well my calendar says it's clear
mon is definitely clear
Tim Howard
@tghoward
Mar 20 2016 20:06
IMG_20160320_154305.jpg
Ben West
@bewest
Mar 20 2016 20:06
here's my loop exported, with some changes to the website name and api secret
@tghoward laser cut?
Dana Lewis
@danamlewis
Mar 20 2016 20:07
Ooh @tghoward neat looking
Tim Howard
@tghoward
Mar 20 2016 20:07
loving the small size of the TI stick and the edison. New case with external battery ^^
Probably needs some ventilation :smile:
Ben West
@bewest
Mar 20 2016 20:10
I haven't refactored my own loop to take advantage of all the features consistently yet, iether
Tim Howard
@tghoward
Mar 20 2016 20:10
@bewest nope, old-school scroll saw (did center section then glued together)
Ben West
@bewest
Mar 20 2016 20:10
nice
that left angle is nice
I have a right angle
err, opposite angle on mine
Tim Howard
@tghoward
Mar 20 2016 20:12
@danamlewis @bewest thanks! External hard batttery is big but still very portable.
Ben West
@bewest
Mar 20 2016 20:12
so had to resort to slightly longer straight veresion
Tim Howard
@tghoward
Mar 20 2016 20:12
With the very mini OTG adapter, note the edison is on the 'bottom' with the TI stick. Seem upside down to me.
*Seems
The angle was dumb luck .. just what I had.
Ben West
@bewest
Mar 20 2016 20:13
am trying to work out some kind of case for mine: http://i.imgur.com/Oz1KCC4.jpg
Tim Howard
@tghoward
Mar 20 2016 20:14
Is that the battery in black case?
Ben West
@bewest
Mar 20 2016 20:14
yeah, that's the battery
it's still running, > 24 hours now
Tim Howard
@tghoward
Mar 20 2016 20:15
nice
Ben West
@bewest
Mar 20 2016 20:16
I can never get mine in a box though
keeps hopping out
Tim Howard
@tghoward
Mar 20 2016 20:18
Like jumping beans? Gotta watch that gear! :smile:
Ben West
@bewest
Mar 20 2016 20:19
if you have openxshareble installed
openaps vendor add openxshareble
openaps device add share openxshareble
Tim Howard
@tghoward
Mar 20 2016 20:19
yes, I've done that.
Ben West
@bewest
Mar 20 2016 20:19
openaps use share configure SM12345678
Tim Howard
@tghoward
Mar 20 2016 20:19
So it should pair on through openxshareble. good.
Ben West
@bewest
Mar 20 2016 20:20
openaps use share scan
depending on what version you installed, try openaps use share DescribeClocks
Tim Howard
@tghoward
Mar 20 2016 20:20
here's output from that command:
edison@bcb-edison2:~/bcb-t$ openaps use share scan
ERROR:dbus.proxies:Introspect error on :1.0:/: dbus.exceptions.DBusException: org.freedesktop.DBus.Error.AccessDenied: Rejected send message, 2 matched rules; type="method_call", sender=":1.5" (uid=1002 pid=2147 comm="/usr/bin/python /usr/local/bin/openaps-use share s") interface="org.freedesktop.DBus.Introspectable" member="Introspect" error name="(unset)" requested_reply="0" destination=":1.0" (uid=0 pid=1924 comm="/usr/local/bin/bluetoothd --experimental ")
Traceback (most recent call last):
  File "/usr/local/bin/openaps-use", line 6, in <module>
    exec(compile(open(__file__).read(), __file__, 'exec'))
  File "/home/edison/src/openaps/bin/openaps-use", line 63, in <module>
    app( )
  File "/home/edison/src/openaps/openaps/cli/__init__.py", line 44, in __call__
    self.run(self.args)
  File "/home/edison/src/openaps/bin/openaps-use", line 57, in run
    output = app(args, self)
  File "/home/edison/src/openaps/openaps/uses/__init__.py", line 92, in __call__
    return self.method.selected(args)(args, app)
  File "/home/edison/src/openaps/openaps/uses/__init__.py", line 31, in __call__
    return self.method(args, app)
  File "/home/edison/src/openxshareble/openxshareble/__init__.py", line 79, in __call__
    self.setup_ble( )
  File "/home/edison/src/openxshareble/openxshareble/app.py", line 29, in setup_ble
    self.adapter = self.ble.get_default_adapter()
  File "/home/edison/src/Adafruit_Python_BluefruitLE/Adafruit_BluefruitLE/interfaces/provider.py", line 94, in get_default_adapter
    adapters = self.list_adapters()
  File "/home/edison/src/Adafruit_Python_BluefruitLE/Adafruit_BluefruitLE/bluez_dbus/provider.py", line 167, in list_adapters
    return map(BluezAdapter, self._get_objects('org.bluez.Adapter1'))
  File "/home/edison/src/Adafruit_Python_BluefruitLE/Adafruit_BluefruitLE/bluez_dbus/provider.py", line 182, in _get_objects
    for opath, interfaces in self._bluez.GetManagedObjects().iteritems():
  File "/usr/lib/python2.7/dist-packages/dbus/proxies.py", line 70, in __call__
    return self._proxy_method(*args, **keywords)
  File "/usr/lib/python2.7/dist-packages/dbus/proxies.py", line 145, in __call__
    **keywords)
  File "/usr/lib/python2.7/dist-packages/dbus/connection.py", line 651, in call_blocking
    message, timeout)
dbus.exceptions.DBusException: org.freedesktop.DBus.Error.AccessDenied: Rejected send message, 2 matched rules; type="method_call", sender=":1.5" (uid=1002 pid=2147 comm="/usr/bin/python /usr/local/bin/openaps-use share s") interface="org.freedesktop.DBus.ObjectManager" member="GetManagedObjects" error name="(unset)" requested_reply="0" destination=":1.0" (uid=0 pid=1924 comm="/usr/local/bin/bluetoothd --experimental ")
Ben West
@bewest
Mar 20 2016 20:21
ah ok
Tim Howard
@tghoward
Mar 20 2016 20:21
DescribeClocks is not an option
this dev branch has some extra stuff that is nice :D
but first
the permission issue is significant
Tim Howard
@tghoward
Mar 20 2016 20:23
I do have dexcom_reader
on master though
Ben West
@bewest
Mar 20 2016 20:24
that branch has DescribeClocks and some other goodies
but not important to problem at hand
cat /etc/dbus-1/system.d/bluetooth.conf
Tim Howard
@tghoward
Mar 20 2016 20:24
Ok, I'll get it. ok -- won't help for access issue
Ben West
@bewest
Mar 20 2016 20:25
yeah, it's optional if you want to play with the new dexcom stuff
Tim Howard
@tghoward
Mar 20 2016 20:25
edison@bcb-edison2:~/src/dexcom_reader$ cat /etc/dbus-1/system.d/bluetooth.conf
<!-- This configuration file specifies the required security policies
     for Bluetooth core daemon to work. -->

<!DOCTYPE busconfig PUBLIC "-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN"
 "http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
<busconfig>

  <!-- ../system.conf have denied everything, so we just punch some holes -->

  <policy user="root">
    <allow own="org.bluez"/>
    <allow send_destination="org.bluez"/>
    <allow send_interface="org.bluez.Agent1"/>
    <allow send_interface="org.bluez.MediaEndpoint1"/>
    <allow send_interface="org.bluez.MediaPlayer1"/>
    <allow send_interface="org.bluez.ThermometerWatcher1"/>
    <allow send_interface="org.bluez.AlertAgent1"/>
    <allow send_interface="org.bluez.Profile1"/>
    <allow send_interface="org.bluez.HeartRateWatcher1"/>
    <allow send_interface="org.bluez.CyclingSpeedWatcher1"/>
    <allow send_interface="org.freedesktop.DBus.ObjectManager"/>
  </policy>

  <!-- allow users of bluetooth group to communicate -->
  <policy group="bluetooth">
    <allow send_destination="org.bluez"/>
  </policy>

  <policy at_console="true">
    <allow send_destination="org.bluez"/>
  </policy>

  <!-- allow users of lp group (printing subsystem) to 
       communicate with bluetoothd -->
  <policy group="lp">
    <allow send_destination="org.bluez"/>
  </policy>

  <policy context="default">
    <deny send_destination="org.bluez"/>
  </policy>

</busconfig>
Ben West
@bewest
Mar 20 2016 20:25
nice
oeat
great
groups
need to figure out which groups you're already in
Tim Howard
@tghoward
Mar 20 2016 20:27
?
Ben West
@bewest
Mar 20 2016 20:27
groups
bewest@bewest-MacBookPro:~/src/openaps/oref0$ groups
bewest adm dialout cdrom sudo dip plugdev lpadmin sambashare
bewest@bewest-MacBookPro:~/src/openaps/oref0$
Tim Howard
@tghoward
Mar 20 2016 20:27
:smile:
so simple you had me stymied
users dialout sudo
Ben West
@bewest
Mar 20 2016 20:28
ah, great
ok
uh, one more, whoami
Tim Howard
@tghoward
Mar 20 2016 20:29
edison
Ben West
@bewest
Mar 20 2016 20:29
sudo usermod -a -G bluetooth edison
oh, err do you have sudo?
get into root
Tim Howard
@tghoward
Mar 20 2016 20:29
yes I have sudo
Ben West
@bewest
Mar 20 2016 20:30
oh, ok
after that, log out and log back in
type groups again
Tim Howard
@tghoward
Mar 20 2016 20:30
nice!
edison@bcb-edison2:~$ groups
users dialout sudo bluetooth
Ben West
@bewest
Mar 20 2016 20:31
ok, so now in theory dbus should know you have permission to use bluetooth
try the scan command again
Tim Howard
@tghoward
Mar 20 2016 20:31
ok, going in
Nope, same error still
edison@bcb-edison2:~/bcb-t$ openaps use share scan
ERROR:dbus.proxies:Introspect error on :1.0:/: dbus.exceptions.DBusException: org.freedesktop.DBus.Error.AccessDenied: Rejected send message, 2 matched rules; type="method_call", sender=":1.7" (uid=1002 pid=2236 comm="/usr/bin/python /usr/local/bin/openaps-use share s") interface="org.freedesktop.DBus.Introspectable" member="Introspect" error name="(unset)" requested_reply="0" destination=":1.0" (uid=0 pid=1924 comm="/usr/local/bin/bluetoothd --experimental ")
Traceback (most recent call last):
  File "/usr/local/bin/openaps-use", line 6, in <module>
    exec(compile(open(__file__).read(), __file__, 'exec'))
  File "/home/edison/src/openaps/bin/openaps-use", line 63, in <module>
    app( )
  File "/home/edison/src/openaps/openaps/cli/__init__.py", line 44, in __call__
    self.run(self.args)
  File "/home/edison/src/openaps/bin/openaps-use", line 57, in run
    output = app(args, self)
  File "/home/edison/src/openaps/openaps/uses/__init__.py", line 92, in __call__
    return self.method.selected(args)(args, app)
  File "/home/edison/src/openaps/openaps/uses/__init__.py", line 31, in __call__
    return self.method(args, app)
  File "/home/edison/src/openxshareble/openxshareble/__init__.py", line 79, in __call__
    self.setup_ble( )
  File "/home/edison/src/openxshareble/openxshareble/app.py", line 29, in setup_ble
    self.adapter = self.ble.get_default_adapter()
  File "/home/edison/src/Adafruit_Python_BluefruitLE/Adafruit_BluefruitLE/interfaces/provider.py", line 94, in get_default_adapter
    adapters = self.list_adapters()
  File "/home/edison/src/Adafruit_Python_BluefruitLE/Adafruit_BluefruitLE/bluez_dbus/provider.py", line 167, in list_adapters
    return map(BluezAdapter, self._get_objects('org.bluez.Adapter1'))
  File "/home/edison/src/Adafruit_Python_BluefruitLE/Adafruit_BluefruitLE/bluez_dbus/provider.py", line 182, in _get_objects
    for opath, interfaces in self._bluez.GetManagedObjects().iteritems():
  File "/usr/lib/python2.7/dist-packages/dbus/proxies.py", line 70, in __call__
    return self._proxy_method(*args, **keywords)
  File "/usr/lib/python2.7/dist-packages/dbus/proxies.py", line 145, in __call__
    **keywords)
  File "/usr/lib/python2.7/dist-packages/dbus/connection.py", line 651, in call_blocking
    message, timeout)
dbus.exceptions.DBusException: org.freedesktop.DBus.Error.AccessDenied: Rejected send message, 2 matched rules; type="method_call", sender=":1.7" (uid=1002 pid=2236 comm="/usr/bin/python /usr/local/bin/openaps-use share s") interface="org.freedesktop.DBus.ObjectManager" member="GetManagedObjects" error name="(unset)" requested_reply="0" destination=":1.0" (uid=0 pid=1924 comm="/usr/local/bin/bluetoothd --experimental ")
Ben West
@bewest
Mar 20 2016 20:33
that's curious
hciconfig
Tim Howard
@tghoward
Mar 20 2016 20:34
edison@bcb-edison2:~/bcb-t$ hciconfig
hci0:    Type: BR/EDR  Bus: UART
    BD Address: 43:34:1B:00:1F:AC  ACL MTU: 1021:8  SCO MTU: 64:1
    UP RUNNING PSCAN 
    RX bytes:675 acl:0 sco:0 events:40 errors:0
    TX bytes:2200 acl:0 sco:0 commands:40 errors:0
Ben West
@bewest
Mar 20 2016 20:36
up....
what the what then?
hcitool lescan
or sudo hcitool lescan
Tim Howard
@tghoward
Mar 20 2016 20:37
hey! promising.
still going but ...
edison@bcb-edison2:~/bcb-t$ sudo hcitool lescan
LE Scan ...
C7:75:E0:46:25:14 DEXCOMRX
C7:75:E0:46:25:14 (unknown)
Ben West
@bewest
Mar 20 2016 20:41
hmmm
ok
Tim Howard
@tghoward
Mar 20 2016 20:42
still going ... should I cancel it?
Ben West
@bewest
Mar 20 2016 20:42
yeah, ctrl-c
you can just watch le devices go by with that
one day I saw tesla show up
Tim Howard
@tghoward
Mar 20 2016 20:43
happy it saw the dex, though
Ben West
@bewest
Mar 20 2016 20:43
looked over the balcony and sure enough there was as tesla down there
Tim Howard
@tghoward
Mar 20 2016 20:43
Did you run to the window to see it glide by?
Ben West
@bewest
Mar 20 2016 20:43
yeah, peeked over the railing
Tim Howard
@tghoward
Mar 20 2016 20:43
lol!
Ben West
@bewest
Mar 20 2016 20:44
followed by quickly rushing to see what I could see/find out before it was gone
Tim Howard
@tghoward
Mar 20 2016 20:44
:smile: Energy secrets of tesla
Our solar panels need some of that
Ben West
@bewest
Mar 20 2016 20:44
which, given the tooling here, was exactly nothing
Tim Howard
@tghoward
Mar 20 2016 20:44
special batteries
Ben West
@bewest
Mar 20 2016 20:45
I'm a little confused... there are a few different mechanisms that control permissions
I'm tempted to try restarting bluetooth and seeing what happens
Tim Howard
@tghoward
Mar 20 2016 20:46
Probably unrelated, but those files you sent I couldn't install
Happy to reboot
Ben West
@bewest
Mar 20 2016 20:46
hmmm
bluetoothd -v
the reply showed bluetooth being run with --experimental though
did you build it from source or something?
oh, this is edison, correct?
Tim Howard
@tghoward
Mar 20 2016 20:47
edison@bcb-edison2:~/bcb-t$ bluetoothd -v
5.33
Ben West
@bewest
Mar 20 2016 20:47
it comes with a bluez 5.28
oh, 5.33 very nice
let's try restarting just blue
hmm
Tim Howard
@tghoward
Mar 20 2016 20:47
Yes, this is edison, which was part of the problem: i386, you sent the other
Ben West
@bewest
Mar 20 2016 20:47
sudo service bluetooth restart ?
Tim Howard
@tghoward
Mar 20 2016 20:48
edison@bcb-edison2:~/bcb-t$ sudo service bluetooth restart
[ ok ] Stopping bluetooth: /usr/local/bin/bluetoothd.
[ ok ] Starting bluetooth: bluetoothd.
edison@bcb-edison2:~/bcb-t$
Ben West
@bewest
Mar 20 2016 20:49
ok, let's double check hciconfig is up before trying openaps use share scan again
Tim Howard
@tghoward
Mar 20 2016 20:49
still getting access denied error with scan
Ben West
@bewest
Mar 20 2016 20:49
curses
Tim Howard
@tghoward
Mar 20 2016 20:49
edison@bcb-edison2:~/bcb-t$ hciconfig
hci0:    Type: BR/EDR  Bus: UART
    BD Address: 43:34:1B:00:1F:AC  ACL MTU: 1021:8  SCO MTU: 64:1
    DOWN 
    RX bytes:764 acl:0 sco:0 events:46 errors:0
    TX bytes:2227 acl:0 sco:0 commands:44 errors:0
For install, I followed the detailed Adafruit instructions, including Scott's additions for Edison.
A couple of missing pieces I figured out, like needing to install python-dbus
then, of course, your instructions for openxshareble
Tim Howard
@tghoward
Mar 20 2016 21:02
this link suggests it may work if started with root account?
https://www.raspberrypi.org/forums/viewtopic.php?t=30076&p=262927
kameamea
@kameamea
Mar 20 2016 21:04

Hi, I'd like to introduce myself: I'm Rolf, a T1D, software developer from Germany with Medtronic
722+Carelink+CGMS. I've been following the chat here for a few days now
and would love to get involved into OpenAPS. My first try to get a
connection with the Carelink stick on my Ubuntu 15.10 desktop failed so far:
openaps use pump model results in serial.serialutil.SerialException: Attempting to use a port that is ot open
lsusb shows:
Bus 001 Device 010: ID 0a21:8001 Medtronic Physio Control Corp. MMT-7305WW [Medtronic Minimed CareLink]

ll /dev/ttyUSB* results in:
crw-rw---- 1 root plugdev 188, 0 Mär 20 21:45 /dev/ttyUSB0 lrwxrwxrwx 1 root root 7 Mär 20 21:45 /dev/ttyUSB.Carelink0 -> ttyUSB0

I've tried being root, using a different computer, verified, that my
Carelink stick is functional, ...

Any idea how to track down what's failing here? I'd also like to write
documentation about those first steps when I know a way how to deal
with the problems.

Ben West
@bewest
Mar 20 2016 21:06
@kameamea that looks like it's working, but you don't have permission to use it
check your groups
actually, add yourself to plugdev
sudo usermod -a -G plugdev $(whoami)
log out, log back in, should work
other option
kameamea
@kameamea
Mar 20 2016 21:07
I'm already member of plugdev:groups rolf adm dialout cdrom sudo dip plugdev lpadmin sambashare docker vmail
Ben West
@bewest
Mar 20 2016 21:07
mm-stick diagnose ?
same?
it's actually looking under /dev/serial/by-id/*
kameamea
@kameamea
Mar 20 2016 21:08
usage: /usr/local/lib/python2.7/dist-packages/decocare-0.0.21-py2.7.egg/decocare/stick.py /dev/ttyUSB0
Ben West
@bewest
Mar 20 2016 21:09
dbus.exceptions.DBusException: org.freedesktop.DBus.Error.AccessDenied: Rejected send message, 2 matched rules; type="method_call", sender=":1.2" (uid=1002 pid=3357 comm="/usr/bin/python /usr/local/bin/openaps-use share s") interface="org.freedesktop.DBus.ObjectManager" member="GetManagedObjects" error name="(unset)" requested_reply="0" destination=":1.1" (uid=0 pid=1986 comm="bluetoothd ")
edison@ubilinux:~/openaps$
kameamea
@kameamea
Mar 20 2016 21:09

`ll /dev/serial/by-id/

lrwxrwxrwx 1 root root 13 Mär 20 21:45 pci-0a21_8001-if00-port0 -> ../../ttyUSB0
`

Ben West
@bewest
Mar 20 2016 21:09
good news for you @tghoward have same issue on my edison
Tim Howard
@tghoward
Mar 20 2016 21:09
:smile:
Ben West
@bewest
Mar 20 2016 21:09
hmmm, very odd for the scanning feature to not work then
Tim Howard
@tghoward
Mar 20 2016 21:10
I guess that's good news!
Ben West
@bewest
Mar 20 2016 21:10
hmmm
that last comment counts double, hah
mm-stick scan ?
kameamea
@kameamea
Mar 20 2016 21:10
I guess the "usage: ..." message to mm-stick diagnose is not expected?
Ben West
@bewest
Mar 20 2016 21:11
it's saying one of the tools can't scan for the stick
kameamea
@kameamea
Mar 20 2016 21:11
mm-stick scan reports an empty line
Ben West
@bewest
Mar 20 2016 21:11
did you run, sudo openaps-install-udev-rules?
kameamea
@kameamea
Mar 20 2016 21:11
yes
Are there any tools to check whether I can access the /dev/ttyUSB0 device at all?
Ben West
@bewest
Mar 20 2016 21:15
yes, mm-stick using mm-stick scan and mm-stick diagnose
kameamea
@kameamea
Mar 20 2016 21:15
I meant independant from openAPS like kind of low level communication with telnet or something similar?
Ben West
@bewest
Mar 20 2016 21:16
and then after doing all that you, unplugged and then replugged the stick?
curious, if you run tail -f /var/log/syslog
what shows up when you plug in the stick
Stephan
@MosiGitHub
Mar 20 2016 21:17
@bewest thanks for the nice loop.json example. I will certainly use that to improve my system. By the way: is it your pump serial in that file? Hopefully not.
Ben West
@bewest
Mar 20 2016 21:17
it is
I'm not too concerned about it
Stephan
@MosiGitHub
Mar 20 2016 21:20
then it is fine for me as well :+1:
kameamea
@kameamea
Mar 20 2016 21:23
Meanwhile I've plugged and unplugged a dozen times I guess. unplugging gives this syslog: Mar 20 22:17:57 heiki kernel: [453950.366325] usb 1-2: USB disconnect, device number 10 Mar 20 22:17:57 heiki kernel: [453950.366680] generic ttyUSB0: generic converter now disconnected from ttyUSB0 Mar 20 22:17:57 heiki kernel: [453950.366711] usbserial_generic 1-2:1.0: device disconnected and plugin in again: Mar 20 22:18:01 heiki colord-sane: io/hpmud/pp.c 627: unable to read device-id ret=-1 Mar 20 22:18:03 heiki kernel: [453956.632424] usb 1-2: new full-speed USB device number 11 using xhci_hcd Mar 20 22:18:04 heiki kernel: [453956.762356] usb 1-2: New USB device found, idVendor=0a21, idProduct=8001 Mar 20 22:18:04 heiki kernel: [453956.762364] usb 1-2: New USB device strings: Mfr=0, Product=0, SerialNumber=0 Mar 20 22:18:04 heiki kernel: [453956.764143] usbserial_generic 1-2:1.0: The "generic" usb-serial driver is only for testing and one-off prototypes. Mar 20 22:18:04 heiki kernel: [453956.764150] usbserial_generic 1-2:1.0: Tell linux-usb@vger.kernel.org to add your device to a proper driver. Mar 20 22:18:04 heiki kernel: [453956.764154] usbserial_generic 1-2:1.0: generic converter detected Mar 20 22:18:04 heiki kernel: [453956.764622] usb 1-2: generic converter now attached to ttyUSB0 Mar 20 22:18:04 heiki org.mate.panel.applet.MultiLoadAppletFactory[2728]: glibtop: statvfs '/run/user/132/gvfs' failed: Keine Berechtigung Mar 20 22:18:04 heiki mtp-probe: checking bus 1, device 11: "/sys/devices/pci0000:00/0000:00:14.0/usb1/1-2" Mar 20 22:18:04 heiki mtp-probe: bus: 1, device: 11 was not an MTP device Mar 20 22:18:08 heiki colord-sane: io/hpmud/pp.c 627: unable to read device-id ret=-1
So maybe the mtp-probe or the colord-sane are interfering?
Ben West
@bewest
Mar 20 2016 21:24
hmmm
hmmmm
ENV{ID_MM_DEVICE_IGNORE}="1"
usually this line or something similar in udev rules is supposed to prevent that from happening
you can fuser /dev/ttyUSB0
fuser prints any processes currently using that thing
kameamea
@kameamea
Mar 20 2016 21:29
no output from fuser
Ben West
@bewest
Mar 20 2016 21:29
mm-stick scan simply prints location of the stick by scanning the system
kameamea
@kameamea
Mar 20 2016 21:30
so this means it doesn't find /dev/ttyUSB0 on my system?
Ben West
@bewest
Mar 20 2016 21:30
mm-stick diagnose runs status checks on the stick
specifically, what it's looking for is ls /dev/serial/by-id/usb-*0a21_8001* vs pci-0a21_8001-if00-port0
that's why
I see
what machine are you using?
oh, this is in vmware?
kameamea
@kameamea
Mar 20 2016 21:32
I searched google for ID_MTP_DEVICE_IGNORE with only two hits, both pointing to OpenAPS: Are you sure that the syntax is correct for that?
Ben West
@bewest
Mar 20 2016 21:32
wonder if that's why
ID_MM_DEVICE_IGNORE
kameamea
@kameamea
Mar 20 2016 21:32
It's not vmware, a normal Linux desktop with Ubuntu 15.10
Ben West
@bewest
Mar 20 2016 21:33
oh
well, that's a change
hold on a sec
Ben West
@bewest
Mar 20 2016 21:41
@kameamea can you try this branch of decocare? bewest/decoding-carelink#180
pretty sure that will fix it
you can do python -m decocare.stick /dev/ttyUSB0 manually to skip the scanning features
kameamea
@kameamea
Mar 20 2016 21:45
I'll try that, thanks
Tim Howard
@tghoward
Mar 20 2016 21:48
Interestingly, for the BLE issue, hitting it with a sledgehammer (aka sudo) gets over that step, at least for that command:
edison@bcb-edison2:~/bcb-t$ sudo openaps use share scan
[ /org/bluez/test ]
    org.bluez.SimAccessTest1
[ /org/bluez/hci0 ]
    org.bluez.ThermometerManager1
    org.bluez.SimAccess1
      Connected = 0
    org.bluez.GattManager1
    org.bluez.Media1
    org.bluez.HeartRateManager1
    org.bluez.CyclingSpeedManager1
    org.bluez.NetworkServer1
    org.bluez.Adapter1
      Name = BlueZ 5.33
      Powered = 1
      Modalias = usb:v1D6Bp0246d0521
      DiscoverableTimeout = 180
      Alias = BlueZ 5.33
      PairableTimeout = 0
      Discoverable = 0
      Address = 43:34:1B:00:1F:AC
      Discovering = 0
      Pairable = 1
      Class = 4194576
      UUIDs = dbus.Array([dbus.String(u'00001801-0000-1000-8000-00805f9b34fb'), dbus.String(u'0000112d-0000-1000-8000-00805f9b34fb'), dbus.String(u'0000110e-0000-1000-8000-00805f9b34fb'), dbus.String(u'00001200-0000-1000-8000-00805f9b34fb'), dbus.String(u'00001800-0000-1000-8000-00805f9b34fb'), dbus.String(u'0000110c-0000-1000-8000-00805f9b34fb')], signature=dbus.Signature('s'), variant_level=1)
[ /org/bluez ]
    org.bluez.ProfileManager1
    org.bluez.HealthManager1
    org.bluez.Alert1
    org.bluez.AgentManager1
[ /org/bluez/hci0/dev_C7_75_E0_46_25_14 ]
    org.bluez.Device1
      Name = DEXCOMRX
      Paired = 0
      Adapter = /org/bluez/hci0
      LegacyPairing = 0
      Alias = DEXCOMRX
      Connected = 1
      UUIDs = dbus.Array([dbus.String(u'f0aca0b1-ebfa-f96f-28da-076c35a521db')], signature=dbus.Signature('s'), variant_level=1)
      Address = C7:75:E0:46:25:14
      Trusted = 0
      Blocked = 0
<Adafruit_BluefruitLE.bluez_dbus.gatt.BluezGattService object at 0xb53c556c>
paired? 0
pairing...
paired
[UUID('00001800-0000-1000-8000-00805f9b34fb'), UUID('00001801-0000-1000-8000-00805f9b34fb'), UUID('00001804-0000-1000-8000-00805f9b34fb'), UUID('0000180a-0000-1000-8000-00805f9b34fb'), UUID('f0aca0b1-ebfa-f96f-28da-076c35a521db')]
finding service
SERVICE <Adafruit_BluefruitLE.bluez_dbus.gatt.BluezGattService object at 0xb655caec>
sending auth code SM54203118
<Adafruit_BluefruitLE.bluez_dbus.gatt.BluezGattCharacteristic object at 0xb655cc0c>

< snip >

DEXCOM <openxshareble.ble.readdata.Device object at 0xb654e74c>
Traceback (most recent call last):
  File "/usr/local/bin/openaps-use", line 6, in <module>
    exec(compile(open(__file__).read(), __file__, 'exec'))
  File "/home/edison/src/openaps/bin/openaps-use", line 63, in <module>
    app( )
  File "/home/edison/src/openaps/openaps/cli/__init__.py", line 44, in __call__
    self.run(self.args)
  File "/home/edison/src/openaps/bin/openaps-use", line 57, in run
    output = app(args, self)
  File "/home/edison/src/openaps/openaps/uses/__init__.py", line 92, in __call__
    return self.method.selected(args)(args, app)
  File "/home/edison/src/openaps/openaps/uses/__init__.py", line 31, in __call__
    return self.method(args, app)
  File "/home/edison/src/openxshareble/openxshareble/__init__.py", line 89, in __call__
    res = self.ble.run_mainloop_with(run, quit_with_loop=False)
  File "/home/edison/src/Adafruit_Python_BluefruitLE/Adafruit_BluefruitLE/bluez_dbus/provider.py", line 121, in _user_thread_main
    self._return_code = target()
  File "/home/edison/src/openxshareble/openxshareble/__init__.py", line 85, in run
    output = self.main(args, app)
  File "/home/edison/src/openaps/openaps/vendors/dexcom.py", line 34, in main
    return self.port or ''
AttributeError: 'scan' object has no attribute 'port'
but, even though it is now paired, all further commands still need sudo.
@bewest (!) a full reboot seems to have fixed the permission denied problem!
Tim Howard
@tghoward
Mar 20 2016 21:58
trying openaps use share iter_glucose 1 gives, in part, this
[ /org/bluez/hci0/dev_C7_75_E0_46_25_14 ]
    org.bluez.ProximityMonitor1
    org.bluez.ProximityReporter1
      ImmediateAlertLevel = none
      LinkLossAlertLevel = none
    org.bluez.Device1
      Name = DEXCOMRX
      Paired = 1
      Adapter = /org/bluez/hci0
      Appearance = 4660
      LegacyPairing = 0
      Alias = DEXCOMRX
      Connected = 1
kameamea
@kameamea
Mar 20 2016 21:58
@bewest I replaced /usr/local/lib/python2.7/dist-packages/decocare-0.0.21-py2.7.egg/decocare/scan.py with the new content and removed scan.pyc.
Now mm-stick scan shows /dev/serial/by-id/pci-0a21_8001-if00-port0 but mm-stick diagnose results in ```
Tim Howard
@tghoward
Mar 20 2016 21:58
but then also gives this:
DEXCOM <openxshareble.ble.readdata.Device object at 0xb6504a6c>
Traceback (most recent call last):
  File "/usr/local/bin/openaps-use", line 6, in <module>
    exec(compile(open(__file__).read(), __file__, 'exec'))
  File "/home/edison/src/openaps/bin/openaps-use", line 63, in <module>
    app( )
  File "/home/edison/src/openaps/openaps/cli/__init__.py", line 44, in __call__
    self.run(self.args)
  File "/home/edison/src/openaps/bin/openaps-use", line 57, in run
    output = app(args, self)
  File "/home/edison/src/openaps/openaps/uses/__init__.py", line 92, in __call__
    return self.method.selected(args)(args, app)
  File "/home/edison/src/openaps/openaps/uses/__init__.py", line 31, in __call__
    return self.method(args, app)
  File "/home/edison/src/openxshareble/openxshareble/__init__.py", line 89, in __call__
    res = self.ble.run_mainloop_with(run, quit_with_loop=False)
  File "/home/edison/src/Adafruit_Python_BluefruitLE/Adafruit_BluefruitLE/bluez_dbus/provider.py", line 121, in _user_thread_main
    self._return_code = target()
  File "/home/edison/src/openxshareble/openxshareble/__init__.py", line 85, in run
    output = self.main(args, app)
  File "/home/edison/src/openaps/openaps/vendors/dexcom.py", line 128, in main
    for item in self.dexcom.iter_records(self.RECORD_TYPE):
  File "/home/edison/src/dexcom_reader/dexcom_reader/readdata.py", line 251, in iter_records
    page_range = self.ReadDatabasePageRange(record_type)
  File "/home/edison/src/dexcom_reader/dexcom_reader/readdata.py", line 203, in ReadDatabasePageRange
    chr(record_type_index))
  File "/home/edison/src/dexcom_reader/dexcom_reader/readdata.py", line 124, in WriteCommand
    self.WritePacket(p.PacketString())
  File "/home/edison/src/dexcom_reader/dexcom_reader/readdata.py", line 119, in WritePacket
    self.write(packet)
  File "/home/edison/src/openxshareble/openxshareble/ble/readdata.py", line 33, in write
    return self.port.write(prefix + data, *args, **kwargs)
  File "/home/edison/src/Adafruit_Python_BluefruitLE/Adafruit_BluefruitLE/services/uart.py", line 68, in write
    self._tx.write_value(data)
  File "/home/edison/src/Adafruit_Python_BluefruitLE/Adafruit_BluefruitLE/bluez_dbus/gatt.py", line 116, in write_value
    self._characteristic.WriteValue(value)
  File "/usr/lib/python2.7/dist-packages/dbus/proxies.py", line 145, in __call__
    **keywords)
  File "/usr/lib/python2.7/dist-packages/dbus/connection.py", line 651, in call_blocking
    message, timeout)
dbus.exceptions.DBusException: org.bluez.Error.Failed: Not connected
kameamea
@kameamea
Mar 20 2016 21:59
File "/usr/local/lib/python2.7/dist-packages/pyserial-3.0.1-py2.7.egg/serial/serialposix.py", line 605, in _update_dtr_state fcntl.ioctl(self.fd, TIOCMBIS, TIOCM_DTR_str) IOError: [Errno 22] Invalid argument
Ben West
@bewest
Mar 20 2016 22:20
@tghoward getting close, check use share configure --serial
@kameamea I think there are some other patches for that
yeah, pyserial 3?
bewest/decoding-carelink#171
as shortcut, you can try downgrading pyserial: sudo easy_install -ZU pyserial'<3.0.0' I think
Tim Howard
@tghoward
Mar 20 2016 22:32
@bewest yeah, I had that, but re-entered the serial and it is still choking.
Ben West
@bewest
Mar 20 2016 22:32
@ehwest ah, you're already in here
oh, hmm
Tim Howard
@tghoward
Mar 20 2016 22:33
Assuming now I've got some install issue?
I did install the dev version of dexcom_reader though. Excited!
Ben West
@bewest
Mar 20 2016 22:34
seems ok
you got my custom-gatt branch of adafruit
Tim Howard
@tghoward
Mar 20 2016 22:35
Yes, correct
Ben West
@bewest
Mar 20 2016 22:35
does it say it's trying to pair and sending authorization?
Tim Howard
@tghoward
Mar 20 2016 22:36
lots of text, but says paired up early:
LinkLossAlertLevel = none
    org.bluez.Device1
      Name = DEXCOMRX
      Paired = 1
but then finishes with
  File "/usr/lib/python2.7/dist-packages/dbus/connection.py", line 651, in call_blocking
    message, timeout)
dbus.exceptions.DBusException: org.bluez.Error.Failed: Not connected
Ben West
@bewest
Mar 20 2016 22:39
@ehwest the commands are much much better here
@ehwest sudo mount -t ext4 edison-image-edison.ext4 mnt/
Tim Howard
@tghoward
Mar 20 2016 22:40
^^ that's for an iter_glucose 1 command
Ben West
@bewest
Mar 20 2016 22:44
oh
hmmm
bluetoothctl, try trusting the device
Tim Howard
@tghoward
Mar 20 2016 22:45
cool! What do I do? go through help?
[DEXCOMRX]#
Ben West
@bewest
Mar 20 2016 22:46
did it trust it?
there's a trust command
Tim Howard
@tghoward
Mar 20 2016 22:47
[DEXCOMRX]# trust [DEXCOMRX]
Device [DEXCOMRX] not available
Ben West
@bewest
Mar 20 2016 22:47
ah, need the mac
Tim Howard
@tghoward
Mar 20 2016 22:47
now that makes not sense to me
Ben West
@bewest
Mar 20 2016 22:47
trust $mac
Tim Howard
@tghoward
Mar 20 2016 22:47
ok found it
nice!
[bluetooth]# trust C7:75:E0:46:25:14
[CHG] Device C7:75:E0:46:25:14 Trusted: yes
Changing C7:75:E0:46:25:14 trust succeeded
[CHG] Device C7:75:E0:46:25:14 Connected: yes
rebooting .. nervously
Tim Howard
@tghoward
Mar 20 2016 22:56
@bewest looks like bluetoothctl didn't do it .... But I've got to stop for now. Thanks for all your invaluable help. I feel like I've made excellent progress. I really, really appreciate it!
Ben West
@bewest
Mar 20 2016 22:57
hmmm
oh, no need to reboot
it was just that one time
dbus is weird
Tim Howard
@tghoward
Mar 20 2016 22:57
yes, I tried before the reboot .. then again after ...
Ben West
@bewest
Mar 20 2016 23:18
I get auth canceled....
one
paired? 0
pairing...
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/dbus/connection.py", line 607, in msg_reply_handler
    *message.get_args_list()))
  File "/home/edison/src/Adafruit_Python_BluefruitLE/Adafruit_BluefruitLE/bluez_dbus/device.py", line 80, in pair_error
    raise RuntimeError('Exceeded timeout waiting to Pair with device! %s', error)
RuntimeError: ('Exceeded timeout waiting to Pair with device! %s', DBusException(dbus.String(u'Authentication Canceled'),))
but my share is not set up to pair
if I go on the share now and do the ble toggle thing....
Earle West
@ehwest
Mar 20 2016 23:22
ok
Ben West
@bewest
Mar 20 2016 23:23
going through forget on share...
ah great, thanks @ehwest doing ticks in here makes things prettier ``
bash commands and things go inside ticks
triple ticks can do multiple lines:
$ cat /etc/network/interfaces
# interfaces(5) file used by ifup(8) and ifdown(8)
auto lo
iface lo inet loopback

auto usb0
iface usb0 inet static
    address 192.168.2.15
    netmask 255.255.255.0

auto wlan0
iface wlan0 inet dhcp
    wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
    # For WPA
    # wpa-ssid Emutex
    # wpa-psk passphrase
    # For WEP
    #wireless-essid Emutex
    #wireless-mode Managed
    #wireless-key s:password
# And the following 4 lines are for when using hostapd...
#auto wlan0
#iface wlan0 inet static
#    address 192.168.42.1
#    netmask 255.255.255.0

edison@ubilinux:~/openaps$
Ben West
@bewest
Mar 20 2016 23:45
oh, ubilinux did a bad thing and starts bluetooth via /etc/rc.local
adding --experimental to that...
works :-D
bingo
@tghoward when you get a chance, add --experimental also list_dexcom is better no-op ble test
Ben West
@bewest
Mar 20 2016 23:57
well, got a bit further