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: OS_EINVAL vs. OS_INVALID_PARM

2016-06-18 Thread Vipul Rahane
I agree. Keeping OS_EINVAL makes sense. Regards, Vipul Rahane > On Jun 18, 2016, at 12:51 PM, Christopher Collins wrote: > > Hello all, > > I noticed libs/os/include/os/os.h defines the following two error codes: > >OS_EINVAL = 2, >OS_INVALID_PARM = 3, > > Do

OS_EINVAL vs. OS_INVALID_PARM

2016-06-18 Thread Christopher Collins
Hello all, I noticed libs/os/include/os/os.h defines the following two error codes: OS_EINVAL = 2, OS_INVALID_PARM = 3, Do these error codes convey different results? After a brief look through the code, my impression is that they mean the same thing. If that is the case, I think one

Re: [2/2] incubator-mynewt-core git commit: boot; conditionally check whether to expect image download commands over serial. Whether code gets built in depends on target features.

2016-06-18 Thread Wayne Keenan
Hi Kevin, Coming at it from another angle... When my app took up too much space that optimising was not going to fix I simply changed the application FLASH ORIGIN in Newt's nrf51 linker script hw/bsp/nrf51dk/*nrf51dk.ld* That was fine for my testing as I didn't really have to worry about the

Re: boot_serial support

2016-06-18 Thread Christopher Collins
On Sat, Jun 18, 2016 at 11:38:02AM +0200, Kevin Townsend wrote: > Hi Marko, > > Thanks for getting this into the development branch! ... I was just > setting things up to test it out, and I had a look at the code directly > on github in the 'develop' branch, but despite my project being on >

Re: [2/2] incubator-mynewt-core git commit: boot; conditionally check whether to expect image download commands over serial. Whether code gets built in depends on target features.

2016-06-18 Thread Kevin Townsend
I was able to build manually pulling via git, and adding the following macros in my custom BSP: /* BOOT_SERIAL pins */ /* DFU pin is set to 0.07 on the BLEFRIEND32 */ #define BOOT_SERIAL_DETECT_PIN (7) /* 0 = No pullup, 1 = Pull Up, 2 = Pull Down */ #define