Re: newtmgr over Serial

2016-06-07 Thread Kevin Townsend
IMHO, image upgrade over serial with bootloader only is handy during manufacturing. Not so much during development (JTAG instead), or when devices are in the field. Users would much rather not deal with cables during update process :) Therefore, I think making update process as fault proof

Re: newtmgr over Serial

2016-06-07 Thread Kevin Townsend
on their own. K. On 07/06/16 19:12, Kevin Townsend wrote: Hi Sterling, If a faulty image is uploaded, the boot loader will fall back to the previous image. So the process typically works, upgrade the new image, ensure stability, then confirm it as the default image. In my experience

Re: newtmgr over Serial

2016-06-07 Thread Kevin Townsend
Hi Sterling, If a faulty image is uploaded, the boot loader will fall back to the previous image. So the process typically works, upgrade the new image, ensure stability, then confirm it as the default image. In my experience, if the flash is corrupted you generally want a RMA, as these

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

Re: More Serial Issues

2016-06-27 Thread Kevin Townsend
On 27/06/16 19:05, David G. Simmons wrote: Will, Thanks! One issue was certainly that I was using the PDK instead of the DK, I’ll add that to the documentation as there was no mention of this. And while I have been known, in the past, to get TX and RX backwards, that is not the case here.

Re: [VOTE] Release Apache Mynewt 0.9.0-incubating-rc1

2016-05-20 Thread Kevin Townsend
ble build. Basically had to add a bunch of stubs to the phy and also include the xcvr.h header file. If there are any other issues please let me know. Will On May 19, 2016, at 7:38 AM, Kevin Townsend <ke...@adafruit.com> wrote: Hi Chris, Sorry this may be an old issue then so fee

Re: [DISCUSS] Release Apache Mynewt 0.9.0-incubating-rc1

2016-05-19 Thread Kevin Townsend
I'm running in 'develop' which may not be the right branch, but switching a bare bones BLE project to 'native' as a BSP generates this error: $ newt build bleuart Building target targets/bleuart Compiling ble_ll_adv.c Error: ble_ll_adv.c:24:22: fatal error: ble/xcvr.h: No such file or

Re: [VOTE] Release Apache Mynewt 0.9.0-incubating-rc1

2016-05-19 Thread Kevin Townsend
Hi Chris, Sorry this may be an old issue then so feel free to ignore. I understand that native emulation of the BLE stack doesn't currently work and there are other priorities, but copying that one file at least allows me to build a basic project to test some custom shell commands and make sure

Re: Procedure for changing power level

2016-05-19 Thread Kevin Townsend
A single signed 8-bit integer will cover most radios I'm familiar with, yes. On 19/05/16 20:12, James Howarth wrote: Hi Chris, I think it needs to be a signed int right, as txpwer can be negative, does that sound right? Cheers James On Thu, May 19, 2016 at 11:10 AM, Christopher Collins

Mynewt Local BSP Instance Location

2016-05-11 Thread Kevin Townsend
I'm trying to document the process of creating a custom BSP based on an existing model from apache-newt-core, and copied the model into the local `projectroot/hw/bsp/boardname` folder, updated the `pkg.yml` file, and modified the filenames/content accordingly. I then referenced this BSP in the

Migrate clock source or PLL setup to the BSP level

2016-05-11 Thread Kevin Townsend
While working on a BSP based on the nRF51 SoC, I noticed what may be an issue with the current division of config data between the 'bsp' and the 'mcu' code. For the nRF51 (and likely the nRF52, I haven't looked yet) the LF clock source is defined in 'mcu/nordic/nrf51xxx/src/hal_os_tick.c':

Re: Mynewt Local BSP Instance Location

2016-05-11 Thread Kevin Townsend
Hi Sterling, Thanks for the quick reply and solution. You're correct, the compiler was missing the reference to the repo and I can build local BSPs with the following changes from the source BSP: pkg.compiler: "@apache-mynewt-core/compiler/arm-none-eabi-m0" pkg.deps: -

Re: 3rd party SDKs, and Interrupt vectors on NRF52

2016-07-27 Thread Kevin Townsend
as well just register the interrupt vector. > > > > On Jul 26, 2016, at 7:45 PM, Kevin Townsend <ke...@adafruit.com > <javascript:;>> wrote: > > > > > >> Bonsoir, > > Bilingual, impressive! :P > >> I’m OK with NVIC_SetVector(), and indeed

Re: Scan Response and Timing

2016-07-17 Thread Kevin Townsend
Hi Chris, None of the example apps configure the scan response data (we should change this). It is relatively simple to configure response data: call ble_gap_adv_rsp_set_fields() (http://mynewt.apache.org/develop/network/ble/ble_hs/ble_gap/functions/ble_gap_adv_rsp_set_fields/). This function

Re: Handling Notify/Indicate and CCCD Changes

2016-07-17 Thread Kevin Townsend
Hi Chris, This looks great and I think adequately addresses the issues brought up earlier. Sorry we haven't been able to provide some code in a pull request on our end yet, we're still coming to terms with the stack and codebase, but thanks for making these useful changes. We're hoping to

Re: NimBLE host - flat bufs vs. mbufs

2016-07-19 Thread Kevin Townsend
We were actually discussing some buffer problems internally this weekend, debating mbuf versus other solutions, etc. We needed a simple FIFO to store data from Nordic's BLE UART service until the end user wants to access it, and we recycled some existing FIFO code we implemented for Nordic's

Re: Handling Notify/Indicate and CCCD Changes

2016-07-15 Thread Kevin Townsend
Hi Chris, Thanks for the quick response. I think CCCD events are quite important from a power management perspective and worth clearly exposing. 2. How is a failed 'indicate' message handled? Indicate generates an ACK, but are there any examples or documentation around how to properly

Scan Response and Timing

2016-07-17 Thread Kevin Townsend
Are there any examples of how to setup a Scan Response while advertising? Apple, for example, recommends putting the Local Name and TX Power in the scan response to free up space. See section 3.4 of https://developer.apple.com/hardwaredrivers/BluetoothDesignGuidelines.pdf The big benefit

Re: Mynewt BLEuart app

2016-07-22 Thread Kevin Townsend
Hi Vipul, This is a helpful addition I think. We actually implemented some helper code around this and we were going to send in a pull request, but you beat us to it. We have a number of apps available to work with the Nordic UART service since it's the easiest way we've found to get data

Re: OS_TICKS_PER_SEC

2016-07-02 Thread Kevin Townsend
BSP isn't perfect either but this is still more of a board or project level decision in my mind than the more generic MCU level so my vote would be moving it to the BSP. It's much easier to spin a new BSP than it is modify the MCU level code. Also breaking the clock source out to the MCU code

Re: [SensorAPI] Few Questions wrt Sensors

2017-02-03 Thread Kevin Townsend
Hi Vipul, On 04/02/17 01:08, Vipul Rahane wrote: Hello All, I will be taking over SensorAPI stuff from Sterling. Kevin: TSL2561 Driver and LSM303 Driver that you have implemented are pretty good and I used both of them. I saw the values coming in using the SensorAPI. I would also like to

Re: NimBLE host advertising data API

2017-01-24 Thread Kevin Townsend
+1 ... raw buffer plus helpers offers the best of both worlds imho. Le mar. 24 janv. 2017 à 21:40, will sanfilippo a écrit : > I am not sure I have any intelligent comments on this, but that has never > stopped me from commenting in the past, so… > > > > I think a byte buffer

Re: Newtmgr over BLE

2017-01-24 Thread Kevin Townsend
I'm not sure what the implications would be here on the iOS app we wrote that is based on the newtmgr protocol and makes use of the current BLE service and characteristics, although we could rewrite it if necessary. We use the currently defined newtmgr protocol and GATT services/chars to get

Re: Graduation-ready?

2017-02-14 Thread Kevin Townsend
+1 on my part for graduation On 14/02/17 20:50, P. Taylor Goetz wrote: +1 I think Mynewt has been one of the easiest podlings I’ve been involved with as a mentor. If they’d like me to stay on I’d be willing to do so as well. -Taylor On Feb 13, 2017, at 11:37 PM, Niclas Hedhman

Re: SPI/I2C on Arduino Primo

2017-01-17 Thread Kevin Townsend
in 'sensors_branch' though. K. On 17/01/17 17:32, David G. Simmons wrote: Devs, Has anyone used the SPI or I2C on Arduino Primo? Anyone have any sample code? Kevin Townsend wrote the Adafruit_BME280_Library in C++ and this is the part I'm working with right now, so I do have a starting point

Re: sys/stats and sys/log

2017-01-17 Thread Kevin Townsend
I don't have any issues with the stub approach myself, and it's easy to switch back and forth (no more work than changing syscfg.yml) On 17/01/17 22:07, marko kiiskila wrote: Hi, at the moment it is not very easy to get rid of all code related to logging and/or statistics. I ran across this

Re: Low power design

2016-09-08 Thread Kevin Townsend
Hi Sterling, I'm sure it's in the planning, but there should definately be some sort of callback at the BSP level before going into a lower sleep state (deep sleep or halt), as well as after wakeup. This will allow you to configure pins accordingly to disable external pullups, avoid as much

newtmgr stat command error

2016-09-25 Thread Kevin Townsend
Should the `stat` command in newtmgr be behaving similarly to the console command where it returns a list of all stat entries available? That was the behaviour I was expecting, though I also tried `stat list`, `stat show` and `stat all` or just `stat` before looking at the documentation

Re: Improve Unit Tests and Test Suite Output

2016-10-05 Thread Kevin Townsend
tion test is completely out of control :( On 03/10/2016 22:42, Christopher Collins wrote: Hi Kevin, On Mon, Oct 03, 2016 at 03:08:32PM +0200, Kevin Townsend wrote: I was wondering if there were any suggestions on how it might be possible to improve the output of the unit tests to be a bit more ver

Unsolicited Notify with newtmgr over BLE

2016-10-05 Thread Kevin Townsend
I'm working with newtmgr over BLE based on the newtmgr lib in the master branch of apache-mynewt-core, which currently has the following structure: Service UUID: 8D53DC1D-1DB7-4CD3-868B-8A527460AA84 Characteristic UUID: DA2E7828-FBCE-4E01-AE9E-261174997C48 The source code has this explanatory

Re: Unsolicited Notify with newtmgr over BLE

2016-10-05 Thread Kevin Townsend
bit range at the start? This is a minor detail and might be a nuisance to change, and more of a cosmetic issue, but I figured it was worth tossing out there. On 06/10/16 02:00, Kevin Townsend wrote: I'm working with newtmgr over BLE based on the newtmgr lib in the master branch of apache

Re: Improve Unit Tests and Test Suite Output

2016-10-05 Thread Kevin Townsend
Sorry, to answer my own question the 'test' app in apache-mynewt-core show how tests can be run on native HW. On 06/10/16 00:16, Kevin Townsend wrote: Hi Sterling, Are you able to run the unit tests on real HW via newt to pipe the results back to the console? That would probably remove

Re: Unsolicited Notify with newtmgr over BLE

2016-10-05 Thread Kevin Townsend
I think you're right about that - a CCCD should not be set to one unless the peer writes to it. What I'm not so sure about is whether it is prohibited to send a notification to an unsubscribed peer. I didn't see any language in the spec indicating that this is illegal. The ability to send

SystemView with Mynewt

2016-10-06 Thread Kevin Townsend
Has anyone tried to get Segger's SystemView working with Mynewt? https://www.segger.com/systemview.html I suspect most nRF52 devs are using a JLink, and live task tracking would be a nice compliment to the stats modules. I've been meaning to try it out, I just wanted to see if any attempts

Re: Version on statistics structures

2016-10-04 Thread Kevin Townsend
On 04/10/16 21:01, Sterling Hughes wrote: Also, unless people object I’m going to make the stats_name_map a const structure (so it can be located in .text), pack it, as the name map is rarely referenced, and it should save a bunch of space given the id is only 16-bits. +1

Re: Version on statistics structures

2016-10-04 Thread Kevin Townsend
Generating a map file during 'create-image' makes a lot of sense. I haven't tried without names enabled, but a .json file would make life easier compared to digging around in an .elf file or something similar. On 04/10/16 20:06, Sterling Hughes wrote: As I’m going through the statistics

Re: Updating newt

2016-10-07 Thread Kevin Townsend
On Oct 7, 2016, at 10:10 AM, Kevin Townsend <ke...@adafruit.com> wrote: Hi David, These are the notes I made for myself on updating newt and newtmgr: # Updating `newt` and `newtmgr` To update the `newt` and `newtmgr` tools: - Go to `$GOPATH/src/mynewt.apache.org/newt/` - Run `git pull`

Re: Updating newt

2016-10-07 Thread Kevin Townsend
Hi David, These are the notes I made for myself on updating newt and newtmgr: # Updating `newt` and `newtmgr` To update the `newt` and `newtmgr` tools: - Go to `$GOPATH/src/mynewt.apache.org/newt/` - Run `git pull` to get the latest source code for the tools - Switch branches if necessary

Re: Switching to Master

2016-09-21 Thread Kevin Townsend
No, you aren't missing anything - we should have added a new pointer for master. Thanks for catching this! For reference, here is the current apache-mynewt-core repository.yml file: repo.name: apache-mynewt-core repo.versions: "0.0.0": "develop" "0.7.9":

Re: Is anyone out there still using a nrf52 Preview (stress on the word Preview!) Dev kit?

2016-09-22 Thread Kevin Townsend
My vote would be to remove it to push people to production parts and kits. Le vendredi 23 septembre 2016, will sanfilippo a écrit : > Hello: > > The first dev kits produced by nordic which used the nrf52 were called > Preview Development Kits. They have a PCA of 10036 on them

Re: newtmgr over Serial

2016-09-23 Thread Kevin Townsend
Hi Sterling, Thanks for the heads up. I added the cflag via '$ newt target set bootloader cflags=-DBOOT_SERIAL' and I can see that it exists in '/repos/apache-mynewt-core/libs/boot_serial', though when I try to build I'm getting: $ newt build bootloader Building target

Re: newtmgr over Serial

2016-09-23 Thread Kevin Townsend
IAL.OVERWRITE: - libs/console/full - libs/boot_serial pkg.cflags.BOOT_SERIAL: - -DBOOT_SERIAL It’s (unfortunately) been awhile since I’ve tested this, but we’ll take a look today and make sure it’s still functioning (it should be.) Sterling On 23 Sep 2016, at 2:46, Kevin Townsend wrot

Re: newtmgr over Serial

2016-09-23 Thread Kevin Townsend
se then you could have the bootloader smaller than 16k (looks like it’s really close for your BSP). On Sep 23, 2016, at 11:22 AM, Kevin Townsend <ke...@adafruit.com> wrote: Hi Sterling, I saw the note on the dependency, but is the target the right place to be adding the dep entry as fo

Re: HAL & I2C redux

2016-08-25 Thread Kevin Townsend
that require it. K. On 25/08/16 19:36, Sterling Hughes wrote: Hi Kevin, On 25 Aug 2016, at 9:49, Kevin Townsend wrote: Although, this will also depend on how things are implemented in the .c code ... I only see the header at present. But from experience some sensors require the stop

Re: HAL & I2C redux

2016-08-25 Thread Kevin Townsend
and under user control since there isn't a one size fits all approach for every I2C sensor out there. On 25/08/16 18:46, Kevin Townsend wrote: You might want to consider how to handle the STOP condition ... some sensors have different behaviour about when the stop condition should or shouldn't

Re: HAL & I2C redux

2016-08-25 Thread Kevin Townsend
the data clocking speed. At the moment I read the API such that the MCU would try to clock out data as fast as it can? On Aug 25, 2016, at 10:45 AM, Kevin Townsend <ke...@adafruit.com> wrote: Hi Sterling (et al), start() and stop() and probably clearer to anyone familiar wi

Re: HAL SPI

2016-08-23 Thread Kevin Townsend
Regarding slaves: I thought that I mentioned which interfaces would be used by a slave? The slave interfaces are fairly basic, admittedly, and there might be other interfaces that one might want to have, but they should be usable by a slave. I will give my mail another read through to see if

Re: HAL SPI

2016-08-23 Thread Kevin Townsend
Hi Will, You've probably already included this in the spi_config struct, but just in case I wanted to make sure you can dynamically change the SPI speed even after the spi bus has been initialized once? The use case I have in mind is SD cards communicating over the SPI bus where you need to

Re: HAL & I2C redux

2016-08-25 Thread Kevin Townsend
You might want to consider how to handle the STOP condition ... some sensors have different behaviour about when the stop condition should or shouldn't be set. See the Arduino Wire library for example, who make the stop condition optional when you end the transaction:

Re: newtmgr stat command error

2016-09-26 Thread Kevin Townsend
the newtmgr does not check for required arguments/length. The stat command requires arguments, but newtmgr does not check that arguments are present, and then 'index out of range' exception. dg On Sep 25, 2016, at 5:11 PM, Kevin Townsend <ke...@adafruit.com> wrote: Should the `stat` command in n

Re: newt and newtmgr versions

2016-11-07 Thread Kevin Townsend
Hi Sterling, I'm just migrating over to develop for mynewt-core and the newt tools repos, and noticed the following after updating the command line tools from develop: - 'newt version' -> returns 0.9.0 in develop, this should probably be 0.10.0 to verify that you are using something

Re: Nordic SDK license not Apache-compatible?

2016-11-09 Thread Kevin Townsend
We have a similar problem with Nordic code where due to older restrictive license terms we can't release the source for some projects. The terms have gotten friendlier with time, but the earliest stuff was quite restrictive. I'd suggest getting in touch with Nordic, though. They're probably

Sensor Drivers and File Location

2016-11-09 Thread Kevin Townsend
There are no sensor drivers in the system at present, but now that the HAL rework is complete I wanted to port a few drivers over to Mynewt just to properly test the HW and HAL out. Existing sensor drivers is one of the key factors to draw people into any embedded RTOS/system, so I think it's

ISO8601 Timestamps

2016-11-08 Thread Kevin Townsend
Would it make sense to add support to datetime.c/h to convert to and from ISO8601 timestamps, which are much more convenient to display since you can use a struct like this to print the values directly in the shell, etc.: typedef struct ATTR_PACKED { char year[4];/**<

Re: How to link the thirdparty library such as .a file into myproject?

2016-11-07 Thread Kevin Townsend
Hi, I don’t think that is possible at the moment. That needs to be added, as the unfortunate reality is that too often we end up getting binary drops of libraries :( A big +1 for this ... sadly, most graphics libraries, complex protocol stacks and a lot of security code is delivered in binary

Re: Sensor Drivers and File Location

2016-11-10 Thread Kevin Townsend
a bno055 driver in both the > /hw/drivers/SPI and /hw/drivers/I2C areas. > > Hope that makes sense. > > dg > > > On Nov 9, 2016, at 8:59 PM, Kevin Townsend <ke...@adafruit.com > <javascript:;>> wrote: > > > > There are no sensor drivers in the system at pre

Re: Sensor Drivers and File Location

2016-11-10 Thread Kevin Townsend
This avoids the problem of a sensor that is has an accelerometer AND a magnetometer as they will typically both use the same bus. In the case of sensors that can use, say, I2C or SPI, you'd need 2 drivers anyway, so rather than having /hw/drivers/sensors/bno055/spi/ and

Re: [incubator-mynewt-blinky] Git Push Summary

2016-11-10 Thread Kevin Townsend
On 10/11/16 13:23, Sterling Hughes wrote: Is the idea to merge these from develop or master? I think we should probably merge develop->master now, prior to branching anything. We should only be branching releases off of master (which I’m assuming is the intention.) +1 for this. :) It's

Re: Sensor Drivers and File Location

2016-11-10 Thread Kevin Townsend
make sure that “newt pkg search”: a) works, and b) provides useful information about each of the drivers when there are matches. There is going to be no _perfect_ way to organize this for ease of discovery, but I think newt can help a lot. On 10 Nov 2016, at 1:59, Kevin Townsend wrote

Re: Sensor Drivers and File Location

2016-11-10 Thread Kevin Townsend
. We should also make sure that “newt pkg search”: a) works, and b) provides useful information about each of the drivers when there are matches. There is going to be no _perfect_ way to organize this for ease of discovery, but I think newt can help a lot. On 10 Nov 2016, at 1:59, Kevin

Re: i2c hal API issues and possible modifications

2016-10-18 Thread Kevin Townsend
Hi Will, Having control over when the STOP happens is important since different devices will behave differently, especially if you are performing a series of events like read/write/read or something similar. Some devices expect the STOP to happen in different places in a command sequence.

Re: Smoke testing latest release

2016-11-11 Thread Kevin Townsend
You'll need to change the chip ID (there is a list available on Segger's website), but if you are using a JLink you can also try this and then send the '*erase*' command once you're connected, just as a FYI: $ jlinkexe -device nrf52832_xxaa -if swd -speed auto -autoconnect 1 On 11/11/16

Re: [VOTE] Release Apache Mynewt 1.0.0-b1-incubating-rc1

2016-11-23 Thread Kevin Townsend
+1 from me, though I've mostly only been kicking the tires in on the HAL. But no glaring blocking issues there on my part so far, and things have been running reliable so far. On 23/11/16 16:05, Jim Jagielski wrote: +1 (binding) On Nov 22, 2016, at 8:58 PM, Christopher Collins

Re: Halting Mynewt

2016-11-22 Thread Kevin Townsend
The nRF51 also (strangely!) has a non standard SWD interface. It's the first time I've come across that, and I'm not sure what the thinking behind multiplexing RST with the SWD pins was (extremely low pin count devices?), but it breaks the normal behaviour of SWD on ARM Cortex M and you need

Re: Halting Mynewt

2016-11-22 Thread Kevin Townsend
I generally put a factory reset pin in projects that I check very early on, which has saved my butt more than once, though it isn't fool proof. It's just nice to have an early stage option to go back to a known state when devices are in the field or even during development (and you can

Re: nRF52DK BSP SPI Conflict?

2016-11-18 Thread Kevin Townsend
cense issues with the nordic SDK. I will commit changes to the > syscfg.yml files when I do this. > > Will > > On Nov 18, 2016, at 4:09 AM, Kevin Townsend <ke...@adafruit.com> wrote: > > > > On 17/11/16 05:15, will sanfilippo wrote: > >> There is an

Re: Shell Tutorial

2016-11-17 Thread Kevin Townsend
These are the notes I made on shell commands (attached). They should be up to date with master. K. On 17/11/16 19:45, Christopher Collins wrote: Hi David, On Thu, Nov 17, 2016 at 01:32:17PM -0500, David G. Simmons wrote: I'm thinking of writing up a Tutorial on how to enable the Console

Re: nRF52DK BSP SPI Conflict?

2016-11-18 Thread Kevin Townsend
On 17/11/16 05:15, will sanfilippo wrote: There is an easy way to prevent this as well which should be added to syscfg.yml. The following works: SPI_0_MASTER: description: 'SPI 0 master' value: 1 restrictions: - "!SPI_0_SLAVE" SPI_0_SLAVE:

Re: WIP: sensor API

2016-12-12 Thread Kevin Townsend
Hi Sterling, One other important question is what happens when we don't respect the read request intervals between data samples? In the accel sim (really nice to see sim examples, BTW ... that's extremely useful to test sensor algorithms), you just check the number of missing samples from

Re: WIP: sensor API

2016-12-12 Thread Kevin Townsend
There are probably instances where 1kHz isn't fast enough for certain sensor types: https://github.com/apache/incubator-mynewt-core/compare/develop...sensors_branch#diff-ec052d973c26072d9ac2e198f16e764aR226 /** * Poll rate in MS for this sensor. */ uint32_t s_poll_rate;

Re: air_quality app

2017-01-09 Thread Kevin Townsend
I think it should be '/include/pkgname/pgkname.h' for the include files. Here's an example I have locally with 'tsl2561' as the root folder where this command was run: $ tree -L 3 . ├── include │ └── tsl2561 │ └── tsl2561.h ├── pkg.yml ├── src │ ├── tsl2561.c │ ├── tsl2561_priv.h │

Re: HEX DEBUG output in newtmgr

2016-11-30 Thread Kevin Townsend
08:26:13 [DEBUG] Writing [10] to data channel ^C Thanks, Chris On Wed, Nov 30, 2016 at 08:40:39AM -0800, Christopher Collins wrote: Hi Kevin, On Wed, Nov 30, 2016 at 01:37:38PM +0100, Kevin Townsend wrote: We're currently working on a mobile version of newtmgr, and the DEBUG output is very useful

Re: HEX DEBUG output in newtmgr

2016-11-30 Thread Kevin Townsend
should be hex. On 30 Nov 2016, at 8:52, Kevin Townsend wrote: Hi Christopher, The latest version has improved debug output with the combined HEX and DEC which I don't remember in earlier versions, so thanks for that. We've been using the -t trace option but it's good to point out to anyone

Re: OIC support

2016-12-01 Thread Kevin Townsend
Hi, me and Paul brought in constrained iotivity stack few months back to Mynewt, and I probably should send an update what’s going on. I’ve been working on getting it more fully integrated. My first goal is to get the code size/RAM usage down. To cut down code size I’m converting it to use

Re: Mynewt iOS App

2016-12-01 Thread Kevin Townsend
On 01/12/16 21:35, David G. Simmons wrote: Rather than go through every Bluetooth device within range, connect to it, and see if it's offering the right service, I simply check the name of the device and, if it's not a mynewt device, move on. This is faster than connecting to each device.

Re: OIC support

2016-12-01 Thread Kevin Townsend
me and Paul brought in constrained iotivity stack few months back to Mynewt, and I probably should send an update what’s going on. I’ve been working on getting it more fully integrated. My first goal is to get the code size/RAM usage down. Just as a FYI for anyone else interested in

[newtmgr] Delete/overwrite image in slot 1

2016-12-02 Thread Kevin Townsend
Is there a means with newtmgr today to delete an image in bank 1, for example if you uploaded an image there incorrectly? Assuming the following situation: Images: slot=0 version: 0.3.0 bootable: true flags: active hash: 7494da56ead5fe83a0e26ad72fdf1bc8a4d1d6b01b1712e4e1bf4437218f4d8b

HEX DEBUG output in newtmgr

2016-11-30 Thread Kevin Townsend
We're currently working on a mobile version of newtmgr, and the DEBUG output is very useful to sanity check commands and responses, but the output in DEC is kind of a pain when most SW engineering on embedded devices is done in HEX. Is there an option I'm missing to output HEX instead of DEC,

Re: MBEDTLS Error after 'newt install -v'

2016-12-05 Thread Kevin Townsend
the problem is. Chris On Mon, Dec 05, 2016 at 06:11:24PM +0100, Kevin Townsend wrote: I was updating some local dev systems, and with a clean install and then running 'newt install -v' we now get the following error when we try to build the bootloader: /LOCAL_FOLDER/repos/apache-mynewt-core/crypto

Re: MBEDTLS Error after 'newt install -v'

2016-12-05 Thread Kevin Townsend
expected (could be a local issue on my end!) * git checkout master * cd ../.. * newt build bootloader On 05/12/16 18:11, Kevin Townsend wrote: I was updating some local dev systems, and with a clean install and then running 'newt install -v' we now get the following error when we try

Re: MBEDTLS Error after 'newt install -v'

2016-12-05 Thread Kevin Townsend
what the problem is. Chris On Mon, Dec 05, 2016 at 06:11:24PM +0100, Kevin Townsend wrote: I was updating some local dev systems, and with a clean install and then running 'newt install -v' we now get the following error when we try to build the bootloader: /LOCAL_FOLDER/repos/apache-mynewt

Re: OIC support

2016-12-01 Thread Kevin Townsend
That is a good point. There are data models for different type of sensors/controls over there. I’m see these are at http://oneiota.org . Acceleration, humidity, temperature etc. This is very useful, and it should be easy to add another layer on top of the base driver to

Re: MyNewt Mqueue not working

2017-01-02 Thread Kevin Townsend
I had a similar problem last week trying to understand the callbacks with events queues, but perhaps the following sample code I put together will clarify something. It uses the second approach mentioned by Chris, which is a dedicated processing task for the event queues so that I know the

Re: Sensor API Helper Functions

2017-01-04 Thread Kevin Townsend
Hi Sterling, All of the above can probably be fit into a package based on sensor 'orientation', which might be a natural organizational unit? I think this belongs in the core sensor package itself, or as a sub-directory of hw/sensor (i.e. hw/sensor/orientation). Orientation is a very common

Re: [SensorAPI] Default Sensor Config

2017-01-03 Thread Kevin Townsend
all config(data), if they want to reconfigure defaults. On 29 Dec 2016, at 2:29, Kevin Townsend wrote: One issues I saw working on some sensor drivers (based on the simulated accel as a starting point) is that no 'default' config settings are currently being set, and it seems possible that a sen

Monochrome Display OS Device

2016-12-31 Thread Kevin Townsend
tl;dr: Is there bandwidth and interest to collaborate on stubs for an os_dev based mono display driver, monogfx drawing package, and basic simulator/test-code, if I'm willing to fill some of the stubs and driver details in since I've written a lot of display drivers over the years? Bloated

Re: BLE certification of the Nimble stack

2017-01-04 Thread Kevin Townsend
This is something I've been curious about myself as well. Nimble is still a work in progress, but I've wondered if there were any plans once the final 1.0 release is done and initial development is considered closed. The SD from Nordic has some significant trade-offs in terms of losing real

Re: WIP: sensor API

2016-12-18 Thread Kevin Townsend
- 1. Read multiple values (default behaviour?) - 2. Raise a missing sample alert What is the failure condition when a sample is missed look like? My assumption was that this would be, for example, a FIFO overrun on a connected sensor that you are polling for data. The main failure I had

Re: WIP: sensor API

2016-12-18 Thread Kevin Townsend
On 18/12/16 23:50, Sterling Hughes wrote: I will correct this, thanks. I frequently forget that shell commands are not const. I was too lazy to make them a linker section and const them, which I really should have done. I've just started playing with this seriously tonight, and some of the

Sensor API Helper Functions

2016-12-23 Thread Kevin Townsend
I'm probably getting ahead of myself diving into this before the sensor API is nailed down, but if we wanted to add some generic helper functions that make use of the sensor API, what would be a good location or what to organize them as a package? It isn't always easy to organize things like

Re: Fwd: Fwd: BLE quickly disconnects after connect on iPhone (LightBlue)

2016-12-23 Thread Kevin Townsend
Hi Chris, For option 2, you should modify your target's system configuration. You can increase the mbuf count to 16 as follows: newt target syscfg set syscfg=MSYS_1_BLOCK_COUNT=16 Was the 'target syscfg set' support recently added? I don't see this in the help menu for newt based on

Re: Schedule task with strict fixed timing and variable workload

2016-12-28 Thread Kevin Townsend
I think you're right that this should follow the ADC model since the constraints are similar. On 28/12/16 19:19, Sterling Hughes wrote: +1 for PWM support, but as a driver, not HAL. https://issues.apache.org/jira/browse/MYNEWT-525 Sterling

Re: [nRF52 HAL I2C] Possible 'probe' issue?

2016-12-26 Thread Kevin Townsend
BTW, an easy workaround for this would just be rejecting any requests that aren't in the 0x8..0x77 range on the nRF52. That's valid on any chip, to be honest, though only an issue on the nRF52. I'll see if I spot anything on the logic analyzer tomorrow, though, but I think this is internal to

Re: [nRF52 HAL I2C] Possible 'probe' issue?

2016-12-26 Thread Kevin Townsend
And just to highlight the point, here is the results using 0x03 at the starting point on an identical setup: i2cscan 9116:Scanning I2C bus 0 0 1 2 3 4 5 6 7 8 9 a b c d e f 00: -- -- -- -- -- -- -- -- -- -- -- -- -- 10: -- -- -- -- -- -- -- -- -- --

Re: [nRF52 HAL I2C] Possible 'probe' issue?

2016-12-26 Thread Kevin Townsend
I'll hook a logic analyzer up again tommorow with and without the invalid address range and see what the difference is, but it seems like a single incorrect address usage is sending the I2C block into the weeds for some reason. Nordic's SDK has the same behaviour with the SD and their drivers.

Re: [nRF52 HAL I2C] Possible 'probe' issue?

2016-12-26 Thread Kevin Townsend
ntroller on the original RPi cannot do repeated starts. So masters *do* have bugs. Hooking up that scope would be great, to see if your master is properly obeying the I2C protocol. Particularly given the double-bit ghost appearance of new nodes. Cheers, -g On Thu, Dec 22, 2016 at 4:54 PM, Kevin

Re: [nRF52 HAL I2C] Possible 'probe' issue?

2016-12-27 Thread Kevin Townsend
Hi Greg, /* Scan all valid I2C addresses (0x03..0x77) */ for (addr = 0x08; addr < 0x78; addr++) { fix the comment :-P I fixed that locally, yes ... caught it after copying and pasting :) Well, the address isn't necessarily "invalid", it just isn't defined by the I2C

LSM303DLHC Sensor Driver

2016-12-22 Thread Kevin Townsend
I made a first pass at a driver for the LSM303DLHC using the new sensor API. This sensor was chosen since it has multiple sensors in a single IC so it can be used to test the multiple data type functionality in the sensor API. The magnetometer and accelerometer can also be combined later to

Re: [nRF52 HAL I2C] Possible 'probe' issue?

2016-12-22 Thread Kevin Townsend
. *Consequences** *STOPPED event occurs twice: When the STOP task is fired and when the master issues a stop condition on the bus. This could provoke an extra interrupt or a failure in the TWIS driver. *Workaround** *The last STOPPED event must be accounted for in software. On 19/12/16 14:37, Kevin

[nRF52 HAL I2C] Possible 'probe' issue?

2016-12-19 Thread Kevin Townsend
While adding a test driver for the new sensor API, we've been trying to debug an issue where a specific sensor (the LSM303DLHC) doesn't show up in an I2C bus scan (using the 'probe' command in the I2C HAL), using the following shell command on the nRF52, but it DOES work on other targets:

  1   2   >