Re: nRF52 without J-Link?

2017-05-26 Thread Simon Ratner
Marko, Do you happen to have a link to the patches you applied to openocd? I am building my own, and would like to incorporate them. Cheers, simon On Thu, May 25, 2017 at 3:39 PM, marko kiiskila wrote: > Peter, > > What’s missing from stock 0.10.0 for nrf52 is the

Re: Problems with erasing flash on nordic devices

2017-05-26 Thread Simon Ratner
At a glance, you are confusing bytes with ints (data is declared as unsigned int), so for the most part you are comparing uninitialised stack memory. Hth, simon On Thu, May 25, 2017 at 11:04 PM, Jacob Rosenthal wrote: > Pushed something like you described, new

Re: Distinguish WRITE and WRITE_NO_RSP in gatt access cb

2017-05-24 Thread Simon Ratner
of an optimisation.) simon On Wed, May 24, 2017 at 4:06 PM, Christopher Collins <ch...@runtime.io> wrote: > Hi Simon, > > On Wed, May 24, 2017 at 10:38:06AM -0700, Simon Ratner wrote: > > Hi devs, > > > > For a characteristic that is both WRITE and WRITE_NO_RSP, is there

Distinguish WRITE and WRITE_NO_RSP in gatt access cb

2017-05-24 Thread Simon Ratner
Hi devs, For a characteristic that is both WRITE and WRITE_NO_RSP, is there a way to distinguish which operation was received from within the gatt access callback? Nimble will automatically send the response if requested, but app may have different behaviour based on whether it expects the

Subscribing to peer notifications

2017-05-10 Thread Simon Ratner
Hi dev list, I may be completely missing this, but is there a gattc API for subscribing to notifications on a NOTIFY characteristic exposed by a peer peripheral? Cheers, simon

Re: newtmgr image upload nrf51dk disconnects with reason=8

2017-04-21 Thread Simon Ratner
> itvl_min and itvl_max specify the range of connection interval values that > you're willing to accept. The controller chooses the value in that range > that it likes best. If you want an exact interval, then specify the same > number for both fields. Note that iOS will reject such a request,

Re: newtmgr image upload nrf51dk disconnects with reason=8

2017-04-20 Thread Simon Ratner
I believe the setting to tweak is the slave latency, and have some empirical evidence to back that up. Increasing supervision timeout doesn't help if the timeout is at the link manager level (because of a blocking call, say), while increasing slave latency allows the peripheral to take more than

Docker latest is still on newt version 1.0.0-b2

2017-03-20 Thread Simon Ratner
Hi devs, Just did `docker pull mynewt/newt:latest` and looks like newt is still at 1.0.0-b2. Any plans to switch that over to rc1? Are there changes since b2 that may be incompatible with the rc1 core tree? Cheers, simon

Re: slinky with REBOOT_LOG_FCB, inside log_reboot_pkg_init error

2017-03-16 Thread Simon Ratner
On Thu, Mar 16, 2017 at 10:23 AM, Alan Graves wrote: > > Perhaps there is already a mechanism in MyNewt to persist system > parameters other than a full blown Flash File System? > Config package (in sys/config) can use FCB as its data store (in fs/fcb), which is

Re: building newt using go

2017-03-07 Thread Simon Ratner
Note to devs: docs still say "The Newt tool requires Go version 1.5 or later." http://mynewt.apache.org/latest/newt/install/newt_linux/ On Tue, Mar 7, 2017 at 6:35 PM, Simon Ratner <si...@proxy.co> wrote: > Hey Bill, > > I ran into that recently, grab a newer versi

Re: building newt using go

2017-03-07 Thread Simon Ratner
Hey Bill, I ran into that recently, grab a newer version of go. This constant was added in 1.7: https://golang.org/doc/go1.7#io On Tue, Mar 7, 2017 at 6:10 PM, Bill Rees wrote: > I'm in a virtual box environment with Ubuntu yakkety and have installed go > 1.6. When I build

Re: newt size improvements

2017-02-28 Thread Simon Ratner
e can reproduce the > problem? I don't think Mynewt supports Windows. > > Michał > > 2017-02-27 21:12 GMT+01:00 Szymon Janc <szymon.j...@codecoup.pl>: > > > Hi Simon, > > > > On 27 February 2017 at 19:04, Simon Ratner <si...@proxy.co> wrote: > > >

Re: newt size improvements

2017-02-27 Thread Simon Ratner
; > Sterling > > > > > > On 27 Feb 2017, at 2:36, Szymon Janc wrote: > > > >> Hi Simon, > >> > >> On 26 February 2017 at 23:53, Simon Ratner <si...@proxy.co> wrote: > >>> > >>> Looks neat, but when I run it, I don't ge

Re: Package custom build steps

2017-02-26 Thread Simon Ratner
, there is yet another step I could eliminate from my makefile. simon On 26 Feb. 2017 11:34 pm, "Simon Ratner" <si...@proxy.co> wrote: > Hi Chris, > > Something like that will work; I have two immediate comments: > > - I would like this to be encapsulated in the package

Re: newt size improvements

2017-02-26 Thread Simon Ratner
Also, any chance output could be limited to 80 columns? On Sun, Feb 26, 2017 at 2:53 PM, Simon Ratner <si...@proxy.co> wrote: > Looks neat, but when I run it, I don't get the tree -- everything is > lumped under "(other)". Any ideas? > > On Sun, Feb 26, 2017

Package custom build steps

2017-02-26 Thread Simon Ratner
Hi devs, I have a package that requires a custom build step (generating intermediate files). Any recommendations on how to best handle this? Currently I am doing the custom step from my top-level makefile, before invoking `newt build`, but that doesn't seem ideal. Cheers, simon

Re: about cannot executable newt.exe

2017-02-10 Thread Simon Ratner
sues.apache.org/jira/browse/MYNEWT-527> > > > On Feb 10, 2017, at 12:49 PM, Simon Ratner <si...@proxy.co> wrote: > > > > I run mynewt natively on Win10, with msys2-x64 and native arm-gcc > > toolchain. The develop branch of both the newt tool and newt-core i

Re: about cannot executable newt.exe

2017-02-10 Thread Simon Ratner
I run mynewt natively on Win10, with msys2-x64 and native arm-gcc toolchain. The develop branch of both the newt tool and newt-core is in pretty good state now, wrt Windows support, as long as you have some form of binutils available. The only outstanding change is for the bsp scripts, I believe.

Re: git for all next directories

2017-02-01 Thread Simon Ratner
> In project.yml you specify what git tag to use when you’re pulling in from those Related request, being able to specify a commit hash, rather than just tags, in project.yml. Useful for the mynewt-core repo when test bleeding edge on develop, but would also come in very handy for my own repos.

Re: MBUF sizing for the bluetooth stack

2017-01-20 Thread Simon Ratner
len); - ... - } - - Similarly, GATT read ops triggered by ble_gatt_chr_updated for sending out notifications. - On 20 Jan. 2017 1:48 pm, "Christopher Collins" <ccoll...@apache.org> wrote: > On Fri, Jan 20, 2017 at 01:21:20PM -0800, Simon Ratner wrote: > > On Fri, Jan 20, 2017 at

Re: MBUF sizing for the bluetooth stack

2017-01-20 Thread Simon Ratner
On Fri, Jan 20, 2017 at 9:01 AM, Christopher Collins <ccoll...@apache.org> wrote: > On Thu, Jan 19, 2017 at 11:57:01PM -0800, Simon Ratner wrote: > > Thanks Chris, > > > > It appears to me that there is questionable benefit to having mbufs sized > > larger tha

Re: MBUF sizing for the bluetooth stack

2017-01-19 Thread Simon Ratner
oll...@apache.org> wrote: > On Thu, Jan 19, 2017 at 10:57:58AM -0800, Christopher Collins wrote: > > On Thu, Jan 19, 2017 at 03:46:49AM -0800, Simon Ratner wrote: > > > A related question: how does this map to large ATT_MTU and fragmented > > > packets at the L2C

Re: MBUF sizing for the bluetooth stack

2017-01-19 Thread Simon Ratner
? On Wed, Jan 11, 2017 at 4:57 PM, will sanfilippo <wi...@runtime.io> wrote: > Yes; 76 or 80. Note that I have not actually tested with 80 byte mbuf > blocks. That is the theory though :-) > > > On Jan 11, 2017, at 4:31 PM, Simon Ratner <si...@proxy.co> wrote: > > >

Re: MBUF sizing for the bluetooth stack

2017-01-11 Thread Simon Ratner
yscfg variable is > the actual memory block size. > > Another thing I should mention: you should never add a buffer pool to msys > smaller than the minimum size I mentioned if you are using the controller. > This is something we will address in the future but for now it would be >

Re: MBUF sizing for the bluetooth stack

2017-01-11 Thread Simon Ratner
Thanks for the detailed write-up, Will - very useful. Are there defines for these things? Ideally, if I want a payload size of N, I'd like to specify in syscfg.yml: MSYS_1_BLOCK_SIZE: '(N + MBUF_HEADER + PKT_HEADER + LL_OVERHEAD + ...)' And magically have optimally-sized buffers. On Wed,

State of 1.0.0 beta/rc, develop branch

2017-01-10 Thread Simon Ratner
Hi devs, Just wanted to ask for a quick summary of where the code is going. I see that 1.0.0-b1 was tagged at Nov 29th; is that basically frozen for the 1.0.0 release in terms of compatibility, or will the code currently on develop make it into subsequent 1.0.0 beta/rc releases? If not, is it

Overriding bsp.downloadscript for a target

2016-12-28 Thread Simon Ratner
Hi devs, Is it possible to override part of the bsp config (specifically, bsp.downloadscript) for one target? I tried adding bsp.yml at target level but that didn't seem to do it. Cheers, simon

Re: Explicitly disabling a feature

2016-08-01 Thread Simon Ratner
y and whitelist per package; blacklisting individual packages doesn't scale with the number of dependencies. Cheers, simon On 1 Aug 2016, at 11:53, Simon Ratner wrote: > > Hi devs, >> >> Is there a way for a project to exclude a feature provided by a >> dependency? >> For

Re: Bootutil robustness

2016-08-01 Thread Simon Ratner
On Mon, Aug 1, 2016 at 12:03 PM, marko kiiskila <ma...@runtime.io> wrote: > Hi Simon, > > thanks for taking a peek. > > > On Jul 30, 2016, at 3:01 PM, Simon Ratner <si...@proxy.co> wrote: > > > > Hi devs, > > > > I started poking at libs/bo

Explicitly disabling a feature

2016-08-01 Thread Simon Ratner
Hi devs, Is there a way for a project to exclude a feature provided by a dependency? For example, I want to include libs/shell to reuse its code, but do not want other packages (say, libs/config) compiling in shell-dependent code. I could always skip declaring it as a dep and supply the right

Re: Rationale for json as newtmgr protocol

2016-07-31 Thread Simon Ratner
ssion on the JSON data. > > we also may have to revisit the image upgrade commands with newtmgr. I > think we may want to add an option to stream the image contents binary as > well as JSON, to avoid having to base64 encode the image contents. having > a chunked binary transfer mode wou

Bootutil robustness

2016-07-30 Thread Simon Ratner
Hi devs, I started poking at libs/bootutil, and have two questions: 1. https://github.com/apache/incubator-mynewt-core/blob/develop/libs/bootutil/src/bootutil_misc.c#L258 It looks like state and length are not saved atomically when using sys/config. If power is lost in the middle of the very

Rationale for json as newtmgr protocol

2016-07-30 Thread Simon Ratner
Hi devs, Wondering if there was a specific rationale for picking json as payload serialization protocol for newtmgr? Cheers, simon

Re: Assert failed in ble_ll_hci.c:999

2016-07-07 Thread Simon Ratner
t; > NOTE: the “true block size” is based on the value of OS_ALIGNMENT. > Currently this is 4 for our architectures but if you change it the block > size may change as all memory blocks are padded to “OS_ALIGNMENT” > boundaries (for example, you allocate a 21 byte block, you get a 24 byte > b

Re: Read rssi of established connection

2016-07-03 Thread Simon Ratner
Perfect, that works. Thanks, Chris! On Sat, Jul 2, 2016 at 7:33 PM, Christopher Collins <ccoll...@apache.org> wrote: > On Sat, Jul 02, 2016 at 10:18:03AM -0700, Simon Ratner wrote: > [ble_hci_util_read_rssi()] > > Correct, the return value is 4, and the out param remains unc

Re: Read rssi of established connection

2016-07-02 Thread Simon Ratner
, 2016 at 8:31 AM, Christopher Collins <ccoll...@apache.org> wrote: > On Sat, Jul 02, 2016 at 03:40:25AM -0700, Simon Ratner wrote: > > Hi devs, > > > > Any plans to expose a way to read last-seen rssi of a connection? > > I found ble_hci_util_read_rssi(), but it see

Read rssi of established connection

2016-07-02 Thread Simon Ratner
Hi devs, Any plans to expose a way to read last-seen rssi of a connection? I found ble_hci_util_read_rssi(), but it seems to always return rc=4 for me. Cheers, simon

Re: Disconnect reason wrong on local termination

2016-06-30 Thread Simon Ratner
> Based on the timestamps, I would say the first two are expected > ... > 896096:[ts=875093696ssb, mod=4 level=1] GATT procedure initiated: read by > uuid; start_handle=40 end_handle=65535 uuid=0304 > 906398:[ts=885154208ssb, mod=64 level=2] gatt_cli: failed to read chr; > conn_handle=1

Re: Disconnect reason wrong on local termination

2016-06-30 Thread Simon Ratner
in some situations? Or do you think this rc is coming from someplace deeper in the stack? On Thu, Jun 30, 2016 at 1:31 PM, Simon Ratner <si...@proxy.co> wrote: > It is sometimes hard to tell if they are "expected", but below are a > couple of sample traces. > > Based on

Re: Disconnect reason wrong on local termination

2016-06-30 Thread Simon Ratner
ning the “connection failed to be established” error; it is returning > a supervision timeout. > > I would be interested to know if the devices are connecting, staying > connected for a while, then timing out… > > > > On Jun 30, 2016, at 12:39 PM, Simon Ratner <si...@p

Disconnect reason wrong on local termination

2016-06-30 Thread Simon Ratner
Hi devs, I've been looking at the reasons I get in BLE_GAP_EVENT_DISCONNECT to make sure I cover all edge cases, and this is what I see (on an nrf51-based board): switch (ctxt->disconnect.reason) { case BLE_HS_ENOTCONN: /* I see this when the local host has terminated the

Re: Can't connect while in discovery mode

2016-06-21 Thread Simon Ratner
command in a timely manner. My > guess > > is that the controller is unable to allocate an HCI buffer due to the > > shortage. From looking at the code, it appears we don't have any > > statistics indicating the number of times an HCI buffer failed to > > allocate

Re: Can't connect while in discovery mode

2016-06-20 Thread Simon Ratner
implemented in the develop branch tomorrow. This will allow the app cancel > the scan and initiate a connect procedure from within the advertising event > callback. > > Chris > > > On Sat, Jun 18, 2016 at 7:38 PM, Simon Ratner <si...@proxy.co> wrote: >

Re: Clarification on ble_gattc_*_by_uuid calls

2016-06-20 Thread Simon Ratner
Actually I think I just realised that might be what the mystery second callback in https://issues.apache.org/jira/browse/MYNEWT-326 is. Is that actually the "done" callback that just fails to set the error param correctly? On Mon, Jun 20, 2016 at 2:32 PM, Simon Ratner <si...@pr

Clarification on ble_gattc_*_by_uuid calls

2016-06-20 Thread Simon Ratner
Hi devs, It appear that when I call ble_gattc_disc_svc_by_uuid with a service id that the device does not implement, I don't get any indication that is the case. No callback, no error, just sits there holding up the connection resources. Same deal with ble_gattc_read_by_uuid. I would've

Can't connect while in discovery mode

2016-06-18 Thread Simon Ratner
Hi devs, Having initiated an undirected scan with ble_gap_disc(), I would like to connect to my peripheral as soon as I spot it in the scan callback. However, calling ble_gap_conn_initiate() at this point fails with BLE_HS_EALREADY, as ble_gap_master is still in discovery mode. I need to stash

Re: Trouble with config + nffs

2016-06-09 Thread Simon Ratner
> The issue was that config save was blowing away all of the previous stuff. > I.e. I imagined that all modules would every time ‘save’ gets called would > store the configuration they want to keep around. > > But after using it like that for a bit decided that this is not a good > model. > And

Re: Trouble with config + nffs

2016-06-09 Thread Simon Ratner
dependencies between config values that must be applied together. On Jun 9, 2016 5:20 PM, "marko kiiskila" <ma...@runtime.io> wrote: Hi Simon, > On Jun 9, 2016, at 4:59 PM, Simon Ratner <si...@proxy.co> wrote: > ... > > At this point, only the new value is saved, and

Tx power is always advertised as 0dBm on nrf51

2016-06-09 Thread Simon Ratner
Here's some code to get started: /* Set tx power level. */ rc = ble_phy_txpwr_set(tx_pwr_lvl); // tx_pwr_lvl == 4 if (rc != 0) { BLEPRPH_LOG(ERROR, "error setting tx power level; rc=%d\n", rc); return; } else { BLEPRPH_LOG(DEBUG, "tx_pwr_lvl=%d\n", ble_phy_txpwr_get()); //

Re: Base a custom bsp on an existing one

2016-06-09 Thread Simon Ratner
variable (pkg.features), or at the > target level by doing > > $ newt target set your_target features=“feature1 feature2” > > Features are global to the build system, and everything will respect them. > > sterling > > > On 8 Jun 2016, at 12:43, Simon Ratner wrote: > >