Re: Tutorial problem with the Docker Container

2017-01-20 Thread Jacob Rosenthal
Whats the easy way to get 'develop' in the docker? On Fri, Jan 20, 2017 at 9:34 AM, Christopher Collins wrote: > On Fri, Jan 20, 2017 at 11:55:59PM +0800, Li-Chun Ko wrote: > > As an update, the Docker Container works well with the "./newt test all" > > commend. > > Great

Re: Using Eclipse for Mynewt development

2017-01-20 Thread aditi hilbert
Hi Andrzej, > On Jan 20, 2017, at 2:19 PM, Andrzej Kaczmarek > wrote: > > Hi all, > > I managed to find some time to write down a short tutorial (with pictures! > ;-) ) on how to use Eclipse as IDE for Mynewt. This is based on my own Thanks! This is a huge

Re: MBUF sizing for the bluetooth stack

2017-01-20 Thread Simon Ratner
I am talking about GATT reads, where the mbuf is pre-allocated for the app to fill in: - static int - gatt_svr_chr_access_gap( - uint16_t conn_handle, - uint16_t attr_handle, - struct ble_gatt_access_ctxt *ctxt, void *arg) - { - ... - os_mbuf_append(ctxt->om, data, len); - ... - } - -

Re: Using Eclipse for Mynewt development

2017-01-20 Thread Andrzej Kaczmarek
Hi all, I managed to find some time to write down a short tutorial (with pictures! ;-) ) on how to use Eclipse as IDE for Mynewt. This is based on my own experience and on what we use in our company with some "upgrades" after reading through Chris' and Chew's posts. You can find tutorial here:

Re: MBUF sizing for the bluetooth stack

2017-01-20 Thread Christopher Collins
On Fri, Jan 20, 2017 at 01:21:20PM -0800, Simon Ratner wrote: > On Fri, Jan 20, 2017 at 9:01 AM, Christopher Collins > wrote: > > On Thu, Jan 19, 2017 at 11:57:01PM -0800, Simon Ratner wrote: > > > When allocating mbufs for the payload, is there something I should do to > > >

Re: [RFC] Reducing size of BLE Security Manager

2017-01-20 Thread Szymon Janc
Hi, On 20 January 2017 at 21:42, will sanfilippo wrote: > Hopefully I am not going to drag this discussion on too long, but I like this > stuff so… > > The cortex-M processors have byte, half-word and word instructions. It will > use the appropriate instruction when you

Re: MBUF sizing for the bluetooth stack

2017-01-20 Thread Simon Ratner
On Fri, Jan 20, 2017 at 9:01 AM, Christopher Collins 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 than the largest L2CAP fragment size

Re: [RFC] Reducing size of BLE Security Manager

2017-01-20 Thread Szymon Janc
Hi, On 20 January 2017 at 19:14, Christopher Collins wrote: > On Fri, Jan 20, 2017 at 09:45:07AM -0800, will sanfilippo wrote: >> I was referring to C code that accesses a packed structure, not necessarily >> the construction part of it. For example: (and in this example I

Re: [RFC] Reducing size of BLE Security Manager

2017-01-20 Thread Christopher Collins
On Fri, Jan 20, 2017 at 09:45:07AM -0800, will sanfilippo wrote: > I was referring to C code that accesses a packed structure, not necessarily > the construction part of it. For example: (and in this example I am assuming > the processor can access bytes anywhere, 16-bit values on 16-bit

Re: [RFC] Reducing size of BLE Security Manager

2017-01-20 Thread Szymon Janc
Hi Will, On 20 January 2017 at 17:56, will sanfilippo wrote: > I have mixed feelings about packed structures. For processors that cannot > handle unaligned accesses I have always found that they increased code size. > Every access of an element in that structure needs code to

Re: MBUF sizing for the bluetooth stack

2017-01-20 Thread Christopher Collins
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 than the largest L2CAP fragment size (plus overhead), i.e. the 80 > bytes that Will mentioned. Is that a reasonable statement, or am

Re: [RFC] Reducing size of BLE Security Manager

2017-01-20 Thread will sanfilippo
I have mixed feelings about packed structures. For processors that cannot handle unaligned accesses I have always found that they increased code size. Every access of an element in that structure needs code to determine the alignment of that element. Sure, they save RAM, so if that is what you

Re: MBUF sizing for the bluetooth stack

2017-01-20 Thread will sanfilippo
Simon: I think you are pretty much correct; generally you are better off with smaller size mbufs. However, there are cases where larger mbufs are better (for example, a very large portion of your data packets are large). > On Jan 19, 2017, at 11:57 PM, Simon Ratner wrote: > >

Re: Tutorial problem with the Docker Container

2017-01-20 Thread Christopher Collins
On Fri, Jan 20, 2017 at 11:55:59PM +0800, Li-Chun Ko wrote: > As an update, the Docker Container works well with the "./newt test all" > commend. Great to hear. Thanks for following up! Chris

Re: bleuart example causes crash

2017-01-20 Thread Christopher Collins
On Fri, Jan 20, 2017 at 09:41:24AM +, Lm Chew wrote: > Hi, > > > Does any one have problem running the bleuart example? > > When I run it, it crashes in the end with Unhandled interrupt error. (I am > using bmd300eval) > I got the following debug output: It has been quite a while since I

Re: [RFC] Reducing size of BLE Security Manager

2017-01-20 Thread Christopher Collins
On Fri, Jan 20, 2017 at 10:21:16AM +0100, Szymon Janc wrote: > Code is available at [1]. I'm not making it a pull request yet since > I'd like to get some feedback about this approach from others. Also I > still need to get tests passing since SM keys related tests fail now > (and I'm not yet sure

Re: [RFC] Reducing size of BLE Security Manager

2017-01-20 Thread Christopher Collins
Hi Szymon, On Fri, Jan 20, 2017 at 10:21:16AM +0100, Szymon Janc wrote: > Hi, > > I was recently looking on how we could reduce size of SM code. > So my proposal is to change the way PDUs are parsed and constructed. > > Instead of having ble_sm_foo_parse(), ble_sm_foo_write() and

Re: Tutorial problem with the Docker Container

2017-01-20 Thread Li-Chun Ko
Hi folks, As an update, the Docker Container works well with the "./newt test all" commend. Br, Lichun 2017-01-20 9:40 GMT+08:00 Li-Chun Ko : > Hi Chris, > > I switched to Linux by installing Ubuntu on the same virtual box and am > not using the Docker Container any more.

Re: Firmware update with MyNewt

2017-01-20 Thread Jacob Rosenthal
Im just working through this myself, so Im no authority here. But no as written newtmgr is where ota update lives currently On Fri, Jan 20, 2017 at 3:25 AM, then yon wrote: > Dear Jacob, > > I working on OTA firmware upgrade, is there any method i can do without > going

Re: Firmware update with MyNewt

2017-01-20 Thread then yon
Dear Jacob, I working on OTA firmware upgrade, is there any method i can do without going through newtmgr command? Thank you. Regards, Then Yoong Ze On 18/1/2017 2:22 PM, Jacob Rosenthal wrote: Youll find another thread (now poorly) titled "Single Bank firmware update (ie nordic vendor

bleuart example causes crash

2017-01-20 Thread Lm Chew
Hi, Does any one have problem running the bleuart example? When I run it, it crashes in the end with Unhandled interrupt error. (I am using bmd300eval) I got the following debug output: 0:[ts=0ssb, mod=4 level=0] ble_hs_hci_cmd_send: ogf=0x03 ocf=0x03 len=0 2:[ts=15624ssb, mod=4 level=0]

[RFC] Reducing size of BLE Security Manager

2017-01-20 Thread Szymon Janc
Hi, I was recently looking on how we could reduce size of SM code. So my proposal is to change the way PDUs are parsed and constructed. Instead of having ble_sm_foo_parse(), ble_sm_foo_write() and ble_sm_foo_tx() for parsing and constructing PDU byte by byte we could use packed structures for