Re: newtmgr OTA error: slice bounds out of range [:-62]

2022-12-07 Thread Szymon Janc
Hi,

We are able to reproduce this on newtmgr master (1.11-dev), will try to fix
this before next release

On Fri, 16 Sept 2022 at 03:22, Mo Chen  wrote:

> Hi there,
>
> I encountered errors when using mynewt to DFU OTA.
>
> Environment:
> Intel Macbook pro
> MacOS: Monterey 12.5.1
>
> newt version: 1.10.0
> newtmgr version: tried with v1.10.0 and v1.9.0. Neither works with the same
> error.
>
> Any clues or help are highly appreciated!
>
>
> error message:
>
> mndrive@Mos-MBP-MnDRIVE ~ % newtmgr image upload -c testbrd
>
> /Users/xxx/Documents/Mynewt/test/bin/targets/testbrd/app/apps/testbrd/testbrd.img
>
>  0 / 163232 [--]
>   0.00%panic:
> runtime error: slice bounds out of range [:-62]
>
>
> goroutine 1 [running]:
>
> mynewt.apache.org/newtmgr/nmxact/xact.encodeUploadReq({0x451a240
> <http://mynewt.apache.org/newtmgr/nmxact/xact.encodeUploadReq(%7B0x451a240>
> ?,
> 0xc000304320?}, {0xc2e140?, 0x42bd8c6?, 0x5ba48ab08a0c882f?}, 0x98?,
> {0xc00038?, 0x0?, 0x421300?}, 0x0, ...)
>
>
> /Users/mndrive/Downloads/apache-mynewt-newtmgr-1.10.0/nmxact/xact/image.go:120
> +0x146
>
> mynewt.apache.org/newtmgr/nmxact/xact.findChunkLen({0x451a240
> <http://mynewt.apache.org/newtmgr/nmxact/xact.findChunkLen(%7B0x451a240>,
> 0xc000304320}, {0xc2e140, 0x20, 0x20}, 0x0?, {0xc00038, 0x27da0,
> 0x27da1}, 0x0, ...)
>
>
> /Users/mndrive/Downloads/apache-mynewt-newtmgr-1.10.0/nmxact/xact/image.go:139
> +0x131
>
> mynewt.apache.org/newtmgr/nmxact/xact.nextImageUploadReq({0x451a240
> <http://mynewt.apache.org/newtmgr/nmxact/xact.nextImageUploadReq(%7B0x451a240>
> ,
> 0xc000304320}, 0x0?, {0xc00038, 0x27da0, 0x27da1}, 0x0, 0x0?)
>
>
> /Users/mndrive/Downloads/apache-mynewt-newtmgr-1.10.0/nmxact/xact/image.go:177
> +0x1eb
>
> mynewt.apache.org/newtmgr/nmxact/xact.(*ImageUploadCmd).Run(0xc32200,
> {0x451a240, 0xc000304320})
>
>
> /Users/mndrive/Downloads/apache-mynewt-newtmgr-1.10.0/nmxact/xact/image.go:353
> +0x24e
>
>
> mynewt.apache.org/newtmgr/nmxact/xact.(*ImageUpgradeCmd).runUpload(0xc32100
> ,
> {0x451a240, 0xc000304320})
>
>
> /Users/mndrive/Downloads/apache-mynewt-newtmgr-1.10.0/nmxact/xact/image.go:510
> +0x1cb
>
> mynewt.apache.org/newtmgr/nmxact/xact.(*ImageUpgradeCmd).Run(0x7ff7bfeffbe5
> ?,
> {0x451a240?, 0xc000304320?})
>
>
> /Users/mndrive/Downloads/apache-mynewt-newtmgr-1.10.0/nmxact/xact/image.go:536
> +0x6a
>
> mynewt.apache.org/newtmgr/newtmgr/cli.imageUploadCmd(0xc0001f4c80?,
> {0xc0001ad920?, 0x3?, 0x3?})
>
>
> /Users/mndrive/Downloads/apache-mynewt-newtmgr-1.10.0/newtmgr/cli/image.go:212
> +0x30b
>
> github.com/spf13/cobra.(*Command).execute(0xc0001f4c80, {0xc0001ad830,
> 0x3,
> 0x3})
>
> /Users/mndrive/go/pkg/mod/github.com/spf13/cobra@v0.0.5/command.go:830
> +0x663 <http://github.com/spf13/cobra@v0.0.5/command.go:830+0x663>
>
> github.com/spf13/cobra.(*Command).ExecuteC(0xccaf00)
>
> /Users/mndrive/go/pkg/mod/github.com/spf13/cobra@v0.0.5/command.go:914
> +0x2ee <http://github.com/spf13/cobra@v0.0.5/command.go:914+0x2ee>
>
> github.com/spf13/cobra.(*Command).Execute(...)
>
> /Users/mndrive/go/pkg/mod/github.com/spf13/cobra@v0.0.5/command.go:864
>
> main.main()
>
>
> /Users/mndrive/Downloads/apache-mynewt-newtmgr-1.10.0/newtmgr/newtmgr.go:111
> +0x16f
>
>
>
> --
> Mo Chen
>


-- 
pozdrawiam
Szymon K. Janc


newtmgr OTA error: slice bounds out of range [:-62]

2022-09-15 Thread Mo Chen
Hi there,

I encountered errors when using mynewt to DFU OTA.

Environment:
Intel Macbook pro
MacOS: Monterey 12.5.1

newt version: 1.10.0
newtmgr version: tried with v1.10.0 and v1.9.0. Neither works with the same
error.

Any clues or help are highly appreciated!


error message:

mndrive@Mos-MBP-MnDRIVE ~ % newtmgr image upload -c testbrd
/Users/xxx/Documents/Mynewt/test/bin/targets/testbrd/app/apps/testbrd/testbrd.img

 0 / 163232 [--]
  0.00%panic:
runtime error: slice bounds out of range [:-62]


goroutine 1 [running]:

mynewt.apache.org/newtmgr/nmxact/xact.encodeUploadReq({0x451a240?,
0xc000304320?}, {0xc2e140?, 0x42bd8c6?, 0x5ba48ab08a0c882f?}, 0x98?,
{0xc00038?, 0x0?, 0x421300?}, 0x0, ...)

/Users/mndrive/Downloads/apache-mynewt-newtmgr-1.10.0/nmxact/xact/image.go:120
+0x146

mynewt.apache.org/newtmgr/nmxact/xact.findChunkLen({0x451a240,
0xc000304320}, {0xc2e140, 0x20, 0x20}, 0x0?, {0xc00038, 0x27da0,
0x27da1}, 0x0, ...)

/Users/mndrive/Downloads/apache-mynewt-newtmgr-1.10.0/nmxact/xact/image.go:139
+0x131

mynewt.apache.org/newtmgr/nmxact/xact.nextImageUploadReq({0x451a240,
0xc000304320}, 0x0?, {0xc00038, 0x27da0, 0x27da1}, 0x0, 0x0?)

/Users/mndrive/Downloads/apache-mynewt-newtmgr-1.10.0/nmxact/xact/image.go:177
+0x1eb

mynewt.apache.org/newtmgr/nmxact/xact.(*ImageUploadCmd).Run(0xc32200,
{0x451a240, 0xc000304320})

/Users/mndrive/Downloads/apache-mynewt-newtmgr-1.10.0/nmxact/xact/image.go:353
+0x24e

mynewt.apache.org/newtmgr/nmxact/xact.(*ImageUpgradeCmd).runUpload(0xc32100,
{0x451a240, 0xc000304320})

/Users/mndrive/Downloads/apache-mynewt-newtmgr-1.10.0/nmxact/xact/image.go:510
+0x1cb

mynewt.apache.org/newtmgr/nmxact/xact.(*ImageUpgradeCmd).Run(0x7ff7bfeffbe5?,
{0x451a240?, 0xc000304320?})

/Users/mndrive/Downloads/apache-mynewt-newtmgr-1.10.0/nmxact/xact/image.go:536
+0x6a

mynewt.apache.org/newtmgr/newtmgr/cli.imageUploadCmd(0xc0001f4c80?,
{0xc0001ad920?, 0x3?, 0x3?})

/Users/mndrive/Downloads/apache-mynewt-newtmgr-1.10.0/newtmgr/cli/image.go:212
+0x30b

github.com/spf13/cobra.(*Command).execute(0xc0001f4c80, {0xc0001ad830, 0x3,
0x3})

/Users/mndrive/go/pkg/mod/github.com/spf13/cobra@v0.0.5/command.go:830
+0x663

github.com/spf13/cobra.(*Command).ExecuteC(0xccaf00)

/Users/mndrive/go/pkg/mod/github.com/spf13/cobra@v0.0.5/command.go:914
+0x2ee

github.com/spf13/cobra.(*Command).Execute(...)

/Users/mndrive/go/pkg/mod/github.com/spf13/cobra@v0.0.5/command.go:864

main.main()

/Users/mndrive/Downloads/apache-mynewt-newtmgr-1.10.0/newtmgr/newtmgr.go:111
+0x16f



-- 
Mo Chen


Re: missing "newtmgr/newtmgr.h"

2020-08-14 Thread Łukasz Rymanowski
Hi Ondrej,

I think you should look into apache-mynewt-core/mgmt/smp
I think it is now smp_transport_init() but I'm not sure.

Best
Łukasz

On Fri, 14 Aug 2020 at 10:48, Ondrej Pilat  wrote:

> Hi Łukasz,
>
> Is there a porting manual from newtmgr API to mcumgr?
>
> We are using nmgr_transport_init and newtmgr_process what are mcumgr
> equivalents?
>
> Regards
>
> Ondrej
> Dne 8/14/2020 v 9:46 AM Łukasz Rymanowski napsal(a):
>
> Hi Ondrej,
>
> Newtmgr has been removed as we moved to mcumgr (
> https://github.com/apache/mynewt-mcumgr) , which is basically an
> extracted version of newtmgr.
> It is in release notes:
> https://cwiki.apache.org/confluence/display/MYNEWT/RN-1.8.0
>
> Best
> Łukasz
>
>
> On Fri, 14 Aug 2020 at 09:32, Ondrej Pilat 
> wrote:
>
>> Hi all,
>>
>> we used newtmgr in application for image update and its management. When
>> we upgrade apache-mynewt-core to the latest version 1.8.0 newtmgr.h and
>> newtmgr.c is missing. What we should use instead or why newtmgr support was
>> removed from the 1.8.0?
>>
>> We need to upgrade apache-mynewt-core because 1.7.0 isn't compatible with
>> the latest changes in the tinyusb repo (nrf52 USB API changed).
>>
>> Best regards
>>
>> Ondrej Pilat
>> --
>>
> --
>


Re: missing "newtmgr/newtmgr.h"

2020-08-14 Thread Ondrej Pilat
Hi Łukasz,

Is there a porting manual from newtmgr API to mcumgr?

We are using nmgr_transport_init and newtmgr_process what are mcumgr
equivalents?

Regards

Ondrej

Dne 8/14/2020 v 9:46 AM Łukasz Rymanowski napsal(a):
> Hi Ondrej,
>
> Newtmgr has been removed as we moved to mcumgr
> (https://github.com/apache/mynewt-mcumgr) , which is basically an
> extracted version of newtmgr.
> It is in release notes:
> https://cwiki.apache.org/confluence/display/MYNEWT/RN-1.8.0
>
> Best
> Łukasz
>
>
> On Fri, 14 Aug 2020 at 09:32, Ondrej Pilat  <mailto:ondrej.pi...@ozobot.com>> wrote:
>
> Hi all,
>
> we used newtmgr in application for image update and its
> management. When we upgrade apache-mynewt-core to the latest
> version 1.8.0 newtmgr.h and newtmgr.c is missing. What we should
> use instead or why newtmgr support was removed from the 1.8.0?
>
> We need to upgrade apache-mynewt-core because 1.7.0 isn't
> compatible with the latest changes in the tinyusb repo (nrf52 USB
> API changed).
>
> Best regards
>
> Ondrej Pilat
>
> -- 
>
-- 


signature.asc
Description: OpenPGP digital signature


Re: missing "newtmgr/newtmgr.h"

2020-08-14 Thread Ondrej Pilat
Hi Łukasz,

thank you for explanation.

Is there a documentation describing  the NMP (plain newtmgr protocol)? I
know that CBOR is well defined RFC standard but what about 8B header? I
can only find mcumgr source code.

Best regards

Ondrej

Dne 8/14/2020 v 9:46 AM Łukasz Rymanowski napsal(a):
> Hi Ondrej,
>
> Newtmgr has been removed as we moved to mcumgr
> (https://github.com/apache/mynewt-mcumgr) , which is basically an
> extracted version of newtmgr.
> It is in release notes:
> https://cwiki.apache.org/confluence/display/MYNEWT/RN-1.8.0
>
> Best
> Łukasz
>
>
> On Fri, 14 Aug 2020 at 09:32, Ondrej Pilat  <mailto:ondrej.pi...@ozobot.com>> wrote:
>
> Hi all,
>
> we used newtmgr in application for image update and its
> management. When we upgrade apache-mynewt-core to the latest
> version 1.8.0 newtmgr.h and newtmgr.c is missing. What we should
> use instead or why newtmgr support was removed from the 1.8.0?
>
> We need to upgrade apache-mynewt-core because 1.7.0 isn't
> compatible with the latest changes in the tinyusb repo (nrf52 USB
> API changed).
>
> Best regards
>
> Ondrej Pilat
>
> -- 
>
-- 


signature.asc
Description: OpenPGP digital signature


Re: missing "newtmgr/newtmgr.h"

2020-08-14 Thread Łukasz Rymanowski
Hi Ondrej,

Newtmgr has been removed as we moved to mcumgr (
https://github.com/apache/mynewt-mcumgr) , which is basically an
extracted version of newtmgr.
It is in release notes:
https://cwiki.apache.org/confluence/display/MYNEWT/RN-1.8.0

Best
Łukasz


On Fri, 14 Aug 2020 at 09:32, Ondrej Pilat  wrote:

> Hi all,
>
> we used newtmgr in application for image update and its management. When
> we upgrade apache-mynewt-core to the latest version 1.8.0 newtmgr.h and
> newtmgr.c is missing. What we should use instead or why newtmgr support was
> removed from the 1.8.0?
>
> We need to upgrade apache-mynewt-core because 1.7.0 isn't compatible with
> the latest changes in the tinyusb repo (nrf52 USB API changed).
>
> Best regards
>
> Ondrej Pilat
> --
>


missing "newtmgr/newtmgr.h"

2020-08-14 Thread Ondrej Pilat
Hi all,

we used newtmgr in application for image update and its management. When
we upgrade apache-mynewt-core to the latest version 1.8.0 newtmgr.h and
newtmgr.c is missing. What we should use instead or why newtmgr support
was removed from the 1.8.0?

We need to upgrade apache-mynewt-core because 1.7.0 isn't compatible
with the latest changes in the tinyusb repo (nrf52 USB API changed).

Best regards

Ondrej Pilat

-- 
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements.  See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership.  The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License.  You may obtain a copy of the License at
# 
#  http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied.  See the License for the
# specific language governing permissions and limitations
# under the License.
#

project.name: "my_project"

project.repositories:
- apache-mynewt-core
- tinyusb

# Use github's distribution mechanism for core ASF libraries.
# This provides mirroring automatically for us.
#
repository.apache-mynewt-core:
type: github
vers: 1.8.0
user: apache
repo: mynewt-core

repository.tinyusb:
type: github
vers: c39dc03331683167be3c2a6ca59a4ee8e6e6620d-commit
user: hathach
repo: tinyusb

# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements.  See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership.  The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License.  You may obtain a copy of the License at
#
#  http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied.  See the License for the
# specific language governing permissions and limitations
# under the License.
#
pkg.name: apps/blecent
pkg.type: app
pkg.description: Simple BLE central application.
pkg.author: "Apache Mynewt "
pkg.homepage: "http://mynewt.apache.org/;
pkg.keywords:
- usb

pkg.deps:
- "@apache-mynewt-core/kernel/os"
- "@apache-mynewt-core/sys/console/stub"
- "@apache-mynewt-nimble/nimble/controller"
- "@apache-mynewt-nimble/nimble/host"
- "@apache-mynewt-nimble/nimble/host/util"
- "@apache-mynewt-nimble/nimble/host/services/gap"
- "@apache-mynewt-nimble/nimble/host/services/gatt"
- "@apache-mynewt-nimble/nimble/host/store/ram"
- "@apache-mynewt-nimble/nimble/transport/ram"

- "@apache-mynewt-core/fs/fs" # include the file operations 
interfaces
- "@apache-mynewt-core/fs/nffs"   # include the NFFS filesystem 
implementation

- "@apache-mynewt-core/mgmt/smp"
- "@apache-mynewt-core/mgmt/imgmgr"
#- "@apache-mynewt-core/mgmt/newtmgr/transport/ble"
 
- "@apache-mynewt-core/sys/log/full"
- "@apache-mynewt-core/sys/stats/full"
- "@apache-mynewt-core/sys/reboot"
- "@apache-mynewt-core/sys/config"
- "@apache-mynewt-core/sys/id"
   # - "@apache-mynewt-core/test/crash_test"
   # - "@apache-mynewt-core/test/runtest"
- "@mcuboot/boot/bootutil"

- "@apache-mynewt-core/hw/hal"
- "@tinyusb/tinyusb"

pkg.cflags: 
- "-I@tinyusb/src"


pkg.lflags:
- "-lm"


signature.asc
Description: OpenPGP digital signature


Re: How to upgrade to 1.8.0 for both newt and newtmgr?

2020-05-17 Thread Mo Chen
hi all,

I managed to install 1.8.0. On Linux and the BLE OTA seems working fine.
Just one thing, the bluetooth can be randomly turned off right after the
OTA or the Confirm of the image.

Also, be careful, the nrfx saadc drivers has been changed in version 1.8.0.
Previously working adc drivers is not working. Needs to be modified. I am
working on it now.

Thanks,



On Sat, May 16, 2020 at 12:03 PM Mo Chen  wrote:

> Great.
>
> Two more questions:
>
> Version 1.8.0 has already been released, why when we try to install the
> latest version, it still installs 1.7.0? Can we fix that?
>
>
> On Ubuntu Linux, under version 1.7.0, with Nordic-pca10040, the IRS works
> fine. However, with the adafruit feather nrf52, the OTA disconnects at
> 99.92% and shows error: disconnected. Any clue?
>
> I was trying to get rid of it by upgrading to a newer version. But on
> Linux, it doesn't seem there is such an instruction on how to install 1.9.0
> dev. Would you please guide me on this?
>
>
> Many thanks!
>
>
>
>
> Mo Chen
>
> On Sat, May 16, 2020, 10:43 Christopher Collins 
> wrote:
>
>> Thanks Mo.  Someone else reported the same issue with Catalina.  Their
>> `-ldebug` log looked identical to yours.  I'll upgrade to catalina and
>> let you know what I find out.
>>
>> Chris
>>
>> On Sat, May 16, 2020 at 10:10:34AM -0500, Mo Chen wrote:
>> > Hi Chris,
>> >
>> > thanks for the clarification.
>> >
>> > I tried with the following debug info returned:
>> >
>> > newtmgr image upload -c mybleprph -ldebug
>> >
>> /Users/NNL/dev/myproj/bin/targets/myperiph/app/@apache-mynewt-nimble/apps/bleprph/bleprph.img
>> >
>> > DEBU[2020-05-16 10:03:28.615] Using connection profile: name=mybleprph
>> > type=ble connstring=peer_name=nimble-bleprph
>> > DEBU[2020-05-16 10:03:28.621] CentralManagerDidUpdateState:
>> cmgr=0x5804b50
>> >
>> > No further responses shown. No signs of connection. Under this status, I
>> > checked the BLE advertise using my phone, the device is still
>> advertising,
>> > meaning the connection is not established.
>> >
>> > Would you please help interpret what the message code means?
>> >
>> > other details:
>> >
>> > newt version: 1.9.0
>> > newtmgr version: 1.9.0
>> > Device: nordic pca10040
>> >
>> > The same method works under version 1.7.0 on Ubuntu Linux. So we can
>> > confirm the device works.
>> >
>> > Thanks,
>> >
>> >
>> > On Fri, May 15, 2020 at 9:15 PM Christopher Collins <
>> ccollins47...@gmail.com>
>> > wrote:
>> >
>> > > On Fri, May 15, 2020 at 07:47:22PM -0500, Mo Chen wrote:
>> > > > Hi Chris,
>> > > >
>> > > > Thank you for your timely response.
>> > > >
>> > > > Under v1.7.0, the error message is:
>> > > > *Unhandled event: xpc.Dict{"kCBMsgId":4,
>> > > > "kCBMsgArgs":xpc.Dict{"kCBMsgArgState":5}}*
>> > > >
>> > > > Under v1.9.0 dev, without '--ldebug':
>> > > > Nothing happens. No message, no response.
>> > > >
>> > > > Under v1.9.0 with '--ldebug':
>> > > > I guess I did not get what you meant by "with the '--ldebug'
>> switch". I
>> > > > tried the following but with an error telling me unknown flag.
>> > > >
>> > > > newtmgr image upload -c mybleprph '--ldebug'
>> > > >
>> > >
>> /Users/NNL/dev/myproj/bin/targets/myperiph/app/@apache-mynewt-nimble/apps/bleprph/bleprph.img
>> > > > Error: unknown flag: --ldebug
>> > > >
>> > > > Would you please guide me on how to implement the --ldebug switch?
>> > >
>> > > Ah, sorry,  I meant `-ldebug` (one dash only)!
>> > >
>> > > Thanks,
>> > > Chris
>> > >
>> >
>> >
>> > --
>> > Mo Chen
>>
>

-- 
Mo Chen


Re: How to upgrade to 1.8.0 for both newt and newtmgr?

2020-05-16 Thread Christopher Collins
I believe I have fixed the Catalina hang.  You can try out the fix at
https://github.com/apache/mynewt-newtmgr/pull/164, or you can wait for
it to be merged.

On Sat, May 16, 2020 at 12:03:41PM -0500, Mo Chen wrote:
> Great.
> 
> Two more questions:
> 
> Version 1.8.0 has already been released, why when we try to install the
> latest version, it still installs 1.7.0? Can we fix that?

It looks like we forgot to upload deb packages for 1.8.0.  I will try to
get to this soon.

> On Ubuntu Linux, under version 1.7.0, with Nordic-pca10040, the IRS works
> fine. However, with the adafruit feather nrf52, the OTA disconnects at
> 99.92% and shows error: disconnected. Any clue?

I recall seeing issues like this in the past.  The problem occurred when
the device performed a slow flash operation (usually an erase).  Since
the code is executing from flash, flash operations cause the MCU to
momentarily stall.  If the stall takes too long or occurs at the wrong
time, the BLE controller misses too many consecutive transmissions and
the connection terminates.

I would expect this to happen on the first upload request though, not
the last one.  The device erases the image slot when it receives the
first request and this erase can be quite slow.  I don't see anything
special in the code that happens while processing the final upload
request, so I'm afraid I'm at a loss here.

> I was trying to get rid of it by upgrading to a newer version. But on
> Linux, it doesn't seem there is such an instruction on how to install 1.9.0
> dev. Would you please guide me on this?

I don't think upgrading will solve this problem (of course I could be
wrong).  Do you want to upgrade the firmware (Mynewt itself) or the
tools (newt and newtmgr)?  If you want to upgrade Mynewt, running `newt
upgrade` from your project directory should do that.

> Many thanks!


Re: How to upgrade to 1.8.0 for both newt and newtmgr?

2020-05-16 Thread Mo Chen
Great.

Two more questions:

Version 1.8.0 has already been released, why when we try to install the
latest version, it still installs 1.7.0? Can we fix that?


On Ubuntu Linux, under version 1.7.0, with Nordic-pca10040, the IRS works
fine. However, with the adafruit feather nrf52, the OTA disconnects at
99.92% and shows error: disconnected. Any clue?

I was trying to get rid of it by upgrading to a newer version. But on
Linux, it doesn't seem there is such an instruction on how to install 1.9.0
dev. Would you please guide me on this?


Many thanks!




Mo Chen

On Sat, May 16, 2020, 10:43 Christopher Collins 
wrote:

> Thanks Mo.  Someone else reported the same issue with Catalina.  Their
> `-ldebug` log looked identical to yours.  I'll upgrade to catalina and
> let you know what I find out.
>
> Chris
>
> On Sat, May 16, 2020 at 10:10:34AM -0500, Mo Chen wrote:
> > Hi Chris,
> >
> > thanks for the clarification.
> >
> > I tried with the following debug info returned:
> >
> > newtmgr image upload -c mybleprph -ldebug
> >
> /Users/NNL/dev/myproj/bin/targets/myperiph/app/@apache-mynewt-nimble/apps/bleprph/bleprph.img
> >
> > DEBU[2020-05-16 10:03:28.615] Using connection profile: name=mybleprph
> > type=ble connstring=peer_name=nimble-bleprph
> > DEBU[2020-05-16 10:03:28.621] CentralManagerDidUpdateState:
> cmgr=0x5804b50
> >
> > No further responses shown. No signs of connection. Under this status, I
> > checked the BLE advertise using my phone, the device is still
> advertising,
> > meaning the connection is not established.
> >
> > Would you please help interpret what the message code means?
> >
> > other details:
> >
> > newt version: 1.9.0
> > newtmgr version: 1.9.0
> > Device: nordic pca10040
> >
> > The same method works under version 1.7.0 on Ubuntu Linux. So we can
> > confirm the device works.
> >
> > Thanks,
> >
> >
> > On Fri, May 15, 2020 at 9:15 PM Christopher Collins <
> ccollins47...@gmail.com>
> > wrote:
> >
> > > On Fri, May 15, 2020 at 07:47:22PM -0500, Mo Chen wrote:
> > > > Hi Chris,
> > > >
> > > > Thank you for your timely response.
> > > >
> > > > Under v1.7.0, the error message is:
> > > > *Unhandled event: xpc.Dict{"kCBMsgId":4,
> > > > "kCBMsgArgs":xpc.Dict{"kCBMsgArgState":5}}*
> > > >
> > > > Under v1.9.0 dev, without '--ldebug':
> > > > Nothing happens. No message, no response.
> > > >
> > > > Under v1.9.0 with '--ldebug':
> > > > I guess I did not get what you meant by "with the '--ldebug'
> switch". I
> > > > tried the following but with an error telling me unknown flag.
> > > >
> > > > newtmgr image upload -c mybleprph '--ldebug'
> > > >
> > >
> /Users/NNL/dev/myproj/bin/targets/myperiph/app/@apache-mynewt-nimble/apps/bleprph/bleprph.img
> > > > Error: unknown flag: --ldebug
> > > >
> > > > Would you please guide me on how to implement the --ldebug switch?
> > >
> > > Ah, sorry,  I meant `-ldebug` (one dash only)!
> > >
> > > Thanks,
> > > Chris
> > >
> >
> >
> > --
> > Mo Chen
>


Re: How to upgrade to 1.8.0 for both newt and newtmgr?

2020-05-16 Thread Christopher Collins
Thanks Mo.  Someone else reported the same issue with Catalina.  Their
`-ldebug` log looked identical to yours.  I'll upgrade to catalina and
let you know what I find out.

Chris

On Sat, May 16, 2020 at 10:10:34AM -0500, Mo Chen wrote:
> Hi Chris,
> 
> thanks for the clarification.
> 
> I tried with the following debug info returned:
> 
> newtmgr image upload -c mybleprph -ldebug
> /Users/NNL/dev/myproj/bin/targets/myperiph/app/@apache-mynewt-nimble/apps/bleprph/bleprph.img
> 
> DEBU[2020-05-16 10:03:28.615] Using connection profile: name=mybleprph
> type=ble connstring=peer_name=nimble-bleprph
> DEBU[2020-05-16 10:03:28.621] CentralManagerDidUpdateState: cmgr=0x5804b50
> 
> No further responses shown. No signs of connection. Under this status, I
> checked the BLE advertise using my phone, the device is still advertising,
> meaning the connection is not established.
> 
> Would you please help interpret what the message code means?
> 
> other details:
> 
> newt version: 1.9.0
> newtmgr version: 1.9.0
> Device: nordic pca10040
> 
> The same method works under version 1.7.0 on Ubuntu Linux. So we can
> confirm the device works.
> 
> Thanks,
> 
> 
> On Fri, May 15, 2020 at 9:15 PM Christopher Collins 
> wrote:
> 
> > On Fri, May 15, 2020 at 07:47:22PM -0500, Mo Chen wrote:
> > > Hi Chris,
> > >
> > > Thank you for your timely response.
> > >
> > > Under v1.7.0, the error message is:
> > > *Unhandled event: xpc.Dict{"kCBMsgId":4,
> > > "kCBMsgArgs":xpc.Dict{"kCBMsgArgState":5}}*
> > >
> > > Under v1.9.0 dev, without '--ldebug':
> > > Nothing happens. No message, no response.
> > >
> > > Under v1.9.0 with '--ldebug':
> > > I guess I did not get what you meant by "with the '--ldebug' switch". I
> > > tried the following but with an error telling me unknown flag.
> > >
> > > newtmgr image upload -c mybleprph '--ldebug'
> > >
> > /Users/NNL/dev/myproj/bin/targets/myperiph/app/@apache-mynewt-nimble/apps/bleprph/bleprph.img
> > > Error: unknown flag: --ldebug
> > >
> > > Would you please guide me on how to implement the --ldebug switch?
> >
> > Ah, sorry,  I meant `-ldebug` (one dash only)!
> >
> > Thanks,
> > Chris
> >
> 
> 
> -- 
> Mo Chen


Re: How to upgrade to 1.8.0 for both newt and newtmgr?

2020-05-16 Thread Mo Chen
Hi Chris,

thanks for the clarification.

I tried with the following debug info returned:

newtmgr image upload -c mybleprph -ldebug
/Users/NNL/dev/myproj/bin/targets/myperiph/app/@apache-mynewt-nimble/apps/bleprph/bleprph.img

DEBU[2020-05-16 10:03:28.615] Using connection profile: name=mybleprph
type=ble connstring=peer_name=nimble-bleprph
DEBU[2020-05-16 10:03:28.621] CentralManagerDidUpdateState: cmgr=0x5804b50

No further responses shown. No signs of connection. Under this status, I
checked the BLE advertise using my phone, the device is still advertising,
meaning the connection is not established.

Would you please help interpret what the message code means?

other details:

newt version: 1.9.0
newtmgr version: 1.9.0
Device: nordic pca10040

The same method works under version 1.7.0 on Ubuntu Linux. So we can
confirm the device works.

Thanks,


On Fri, May 15, 2020 at 9:15 PM Christopher Collins 
wrote:

> On Fri, May 15, 2020 at 07:47:22PM -0500, Mo Chen wrote:
> > Hi Chris,
> >
> > Thank you for your timely response.
> >
> > Under v1.7.0, the error message is:
> > *Unhandled event: xpc.Dict{"kCBMsgId":4,
> > "kCBMsgArgs":xpc.Dict{"kCBMsgArgState":5}}*
> >
> > Under v1.9.0 dev, without '--ldebug':
> > Nothing happens. No message, no response.
> >
> > Under v1.9.0 with '--ldebug':
> > I guess I did not get what you meant by "with the '--ldebug' switch". I
> > tried the following but with an error telling me unknown flag.
> >
> > newtmgr image upload -c mybleprph '--ldebug'
> >
> /Users/NNL/dev/myproj/bin/targets/myperiph/app/@apache-mynewt-nimble/apps/bleprph/bleprph.img
> > Error: unknown flag: --ldebug
> >
> > Would you please guide me on how to implement the --ldebug switch?
>
> Ah, sorry,  I meant `-ldebug` (one dash only)!
>
> Thanks,
> Chris
>


-- 
Mo Chen


Re: How to upgrade to 1.8.0 for both newt and newtmgr?

2020-05-15 Thread Christopher Collins
On Fri, May 15, 2020 at 07:47:22PM -0500, Mo Chen wrote:
> Hi Chris,
> 
> Thank you for your timely response.
> 
> Under v1.7.0, the error message is:
> *Unhandled event: xpc.Dict{"kCBMsgId":4,
> "kCBMsgArgs":xpc.Dict{"kCBMsgArgState":5}}*
> 
> Under v1.9.0 dev, without '--ldebug':
> Nothing happens. No message, no response.
> 
> Under v1.9.0 with '--ldebug':
> I guess I did not get what you meant by "with the '--ldebug' switch". I
> tried the following but with an error telling me unknown flag.
> 
> newtmgr image upload -c mybleprph '--ldebug'
> /Users/NNL/dev/myproj/bin/targets/myperiph/app/@apache-mynewt-nimble/apps/bleprph/bleprph.img
> Error: unknown flag: --ldebug
> 
> Would you please guide me on how to implement the --ldebug switch?

Ah, sorry,  I meant `-ldebug` (one dash only)!

Thanks,
Chris


Re: How to upgrade to 1.8.0 for both newt and newtmgr?

2020-05-15 Thread Mo Chen
Hi Chris,

Thank you for your timely response.

Under v1.7.0, the error message is:
*Unhandled event: xpc.Dict{"kCBMsgId":4,
"kCBMsgArgs":xpc.Dict{"kCBMsgArgState":5}}*

Under v1.9.0 dev, without '--ldebug':
Nothing happens. No message, no response.

Under v1.9.0 with '--ldebug':
I guess I did not get what you meant by "with the '--ldebug' switch". I
tried the following but with an error telling me unknown flag.

newtmgr image upload -c mybleprph '--ldebug'
/Users/NNL/dev/myproj/bin/targets/myperiph/app/@apache-mynewt-nimble/apps/bleprph/bleprph.img
Error: unknown flag: --ldebug

Would you please guide me on how to implement the --ldebug switch?

Thanks,

On Fri, May 15, 2020 at 5:45 PM Christopher Collins 
wrote:

> Hi Mo,
>
> On Fri, May 15, 2020 at 05:11:36PM -0500, Mo Chen wrote:
> > I am currently using 1.7.0 on MacOS Catalina.
> >
> > There is a BLE connection issue. I cannot upload img via OTA.
> >
> > I searched online, it seems in verison 1.8.0, this problem has been
> solved?
> >
> > I tried to use install mynewt-newtmgr --HEAD. The 1.9.0 dev version did
> not
> > solve the BLE connection issue.
> >
> > Any clue?
>
> The 1.9.0 dev version of newtmgr should work with Catalina.  Can you
> please try the upload again with the `--ldebug` switch?  Then please
> paste the output in a response.
>
> Chris
>


-- 
Mo Chen


Re: How to upgrade to 1.8.0 for both newt and newtmgr?

2020-05-15 Thread Christopher Collins
Hi Mo,

On Fri, May 15, 2020 at 05:11:36PM -0500, Mo Chen wrote:
> I am currently using 1.7.0 on MacOS Catalina.
> 
> There is a BLE connection issue. I cannot upload img via OTA.
> 
> I searched online, it seems in verison 1.8.0, this problem has been solved?
> 
> I tried to use install mynewt-newtmgr --HEAD. The 1.9.0 dev version did not
> solve the BLE connection issue.
> 
> Any clue?

The 1.9.0 dev version of newtmgr should work with Catalina.  Can you
please try the upload again with the `--ldebug` switch?  Then please
paste the output in a response.

Chris


How to upgrade to 1.8.0 for both newt and newtmgr?

2020-05-15 Thread Mo Chen
I am currently using 1.7.0 on MacOS Catalina.

There is a BLE connection issue. I cannot upload img via OTA.

I searched online, it seems in verison 1.8.0, this problem has been solved?

I tried to use install mynewt-newtmgr --HEAD. The 1.9.0 dev version did not
solve the BLE connection issue.

Any clue?

many thanks.

-- 
Mo


Re: Unifying Newtmgr (NMP) protocol and MCUmgr (SMP) into the MCUmgr repo

2019-10-10 Thread Vipul Rahane
Hi Marko,

Not a problem. I re-added smp_uart and fixed the build. Thanks.

On Thu, Oct 10, 2019 at 1:30 AM marko kiiskila  wrote:

> Sorry for being difficult here, but..
>
> To be exact nmgr_uart came after newtmgr-over-shell. The reason
> it came to be was smaller memory footprint platforms, and assumption
> was that folks might still want option to newtmgr-over-uart after their
> dev was done.
> It got picked up for serial bootloader initially as it was small in size,
> and easy to integrate.
>
> I’m going to vote -1 for removing it. I believe the use cases justifying
> it’s initial existence are still valid.
>
> > On 10 Oct 2019, at 0.18, Vipul Rahane  wrote:
> >
> > Thanks Will and Chris for your response, removing it and transitioning it
> > to smp_shell. This will be part of the MCUmgr changes to mynewt-core.
> >
> >
> >
> > On Wed, Oct 9, 2019 at 1:45 PM will sanfilippo  wrote:
> >
> >> +1 on my part but not sure I am in the best position to vote :-)
> >>
> >>> On Oct 9, 2019, at 12:42 PM, Vipul Rahane  wrote:
> >>>
> >>> Hello,
> >>>
> >>> While making the changes for MCUmgr, we came across nmgr_uart which is
> a
> >>> predecessor of nmgr_shell. So far, from what I gather, the
> functionality
> >> is
> >>> the same except for the fact that shell can bring in other code which
> can
> >>> increase the code size a bit.
> >>>
> >>> As a solution I was suggesting removing nmgr_uart and transitioning to
> >>> smp_shell as part of the MCUmgr changes.
> >>>
> >>> What does the community think about it and does anybody have issues
> with
> >> it.
> >>>
> >>> This question was raised as the CI did not catch errors with smp_uart
> and
> >>> nothing really uses it in the mynewt ecosystem. I am looking for .a
> quick
> >>> turn around on this question, so, any input would be fine. Thanks.
> >>>
> >>> Regards,
> >>> Vipul Rahane
> >>>
> >>> On Fri, Sep 27, 2019 at 11:38 AM Vipul Rahane 
> wrote:
> >>>
> >>>> Hello fellow developers :-)
> >>>>
> >>>> So, Miguel and I have been working on unifying Newtmgr into the MCUmgr
> >>>> repo (https://github.com/apache/mynewt-mcumgr). There are no protocol
> >>>> level changes, since MCUmgr(SMP) and Newtmgr(NMP) were the same and
> so,
> >>>> everything should work off the bat for everybody.
> >>>>
> >>>> The PRs related to this change are:
> >>>> 1. https://github.com/apache/mynewt-core/pull/1917
> >>>> 2. https://github.com/apache/mynewt-mcumgr/pull/27
> >>>> 3. https://github.com/apache/mynewt-nimble/pull/577
> >>>>
> >>>> We have also added a transient package for backwards compatibility.
> So,
> >>>> this should be a fairly smooth transition for everybody.
> >>>>
> >>>> Details about the change:
> >>>>
> >>>>  - Replace newtmgr with SMP and MCUmgr
> >>>>  - The change addresses issue #1871
> >>>>  <https://github.com/apache/mynewt-core/issues/1871>
> >>>>  - Make stats, logs and img_mgmt work with MCUmgr
> >>>>  - Make default group commands work with MCUmgr
> >>>>  - Add transient packages for backwards compatibility
> >>>>  - Update apps to have the updated dependencies
> >>>>  - Add syscfgs for MGMT commands Eg: CONFIG_MGMT, STATS_MGMT,
> LOG_MGMT,
> >>>>  etc
> >>>>  - Make OICMGR use OMP from MCUmgr
> >>>>  - Transition from Newtmgr -> SMP
> >>>>  - Remove cborattr and update cborattr in MCUmgr
> >>>>  - Fix builds for log version 2
> >>>>  - We are also removing support for log_fcb_slot1 since it is not
> >>>>  really used by the community or any modules in the core repo.
> >>>>  - Updating mynewt port of MCUmgr
> >>>>  - Adding Stats, Logs, datetime and other default commands support to
> >>>>  MCUmgr
> >>>>  - Changing mgmt_group_register() in MCUmgr so that it allows
> >>>>  re-registration of command groups
> >>>>  - Fix dependency and build issues in MCUmgr for mynewt port and apps
> >>>>  - Adding support for log version 3 and image hash changes
> >>>>  - Adding support for image management lazy erase
> >>>>  - Adding support for config mgmt
> >>>>  - Updating cborattr in MCUmgr to have similar support as mynewt-core
> >>>>  - Fix unit tests and add some more for cborattr just like in
> >>>>  mynewt-core
> >>>>  - Change log_mgmt to use fragmenting so that an entry can be divided
> >>>>  into smaller chunks while reading.
> >>>>  - Fix mynewt port of os_mgmt
> >>>>  - Add changes for backwards compatibility
> >>>>  - Add sample app: omp_svr for trying out OICMGR over BLE/Serial
> >>>>  - Fix reboot_log for soft resets
> >>>>
> >>>>
> >>>> Some more stuff that would follow after this change would be:
> >>>> 1. Release version for MCUmgr
> >>>> 2. Unifying MCUmgr tool
> >>>>
> >>>> Also, there were a lot of fixes that got in as part of this effort in
> >> the
> >>>> MCUmgr repo. I do encourage everybody to try it out.
> >>>>
> >>>> --
> >>>>
> >>>> Regards,
> >>>> Vipul Rahane
> >>>>
> >>>
> >>>
> >>> --
> >>>
> >>> Regards,
> >>> Vipul Rahane
> >>
> >>
> >
> > --
> >
> > Regards,
> > Vipul Rahane
>
>

-- 

Regards,
Vipul Rahane


Re: Unifying Newtmgr (NMP) protocol and MCUmgr (SMP) into the MCUmgr repo

2019-10-10 Thread marko kiiskila
Sorry for being difficult here, but..

To be exact nmgr_uart came after newtmgr-over-shell. The reason
it came to be was smaller memory footprint platforms, and assumption
was that folks might still want option to newtmgr-over-uart after their
dev was done.
It got picked up for serial bootloader initially as it was small in size,
and easy to integrate.

I’m going to vote -1 for removing it. I believe the use cases justifying
it’s initial existence are still valid.

> On 10 Oct 2019, at 0.18, Vipul Rahane  wrote:
> 
> Thanks Will and Chris for your response, removing it and transitioning it
> to smp_shell. This will be part of the MCUmgr changes to mynewt-core.
> 
> 
> 
> On Wed, Oct 9, 2019 at 1:45 PM will sanfilippo  wrote:
> 
>> +1 on my part but not sure I am in the best position to vote :-)
>> 
>>> On Oct 9, 2019, at 12:42 PM, Vipul Rahane  wrote:
>>> 
>>> Hello,
>>> 
>>> While making the changes for MCUmgr, we came across nmgr_uart which is a
>>> predecessor of nmgr_shell. So far, from what I gather, the functionality
>> is
>>> the same except for the fact that shell can bring in other code which can
>>> increase the code size a bit.
>>> 
>>> As a solution I was suggesting removing nmgr_uart and transitioning to
>>> smp_shell as part of the MCUmgr changes.
>>> 
>>> What does the community think about it and does anybody have issues with
>> it.
>>> 
>>> This question was raised as the CI did not catch errors with smp_uart and
>>> nothing really uses it in the mynewt ecosystem. I am looking for .a quick
>>> turn around on this question, so, any input would be fine. Thanks.
>>> 
>>> Regards,
>>> Vipul Rahane
>>> 
>>> On Fri, Sep 27, 2019 at 11:38 AM Vipul Rahane  wrote:
>>> 
>>>> Hello fellow developers :-)
>>>> 
>>>> So, Miguel and I have been working on unifying Newtmgr into the MCUmgr
>>>> repo (https://github.com/apache/mynewt-mcumgr). There are no protocol
>>>> level changes, since MCUmgr(SMP) and Newtmgr(NMP) were the same and so,
>>>> everything should work off the bat for everybody.
>>>> 
>>>> The PRs related to this change are:
>>>> 1. https://github.com/apache/mynewt-core/pull/1917
>>>> 2. https://github.com/apache/mynewt-mcumgr/pull/27
>>>> 3. https://github.com/apache/mynewt-nimble/pull/577
>>>> 
>>>> We have also added a transient package for backwards compatibility. So,
>>>> this should be a fairly smooth transition for everybody.
>>>> 
>>>> Details about the change:
>>>> 
>>>>  - Replace newtmgr with SMP and MCUmgr
>>>>  - The change addresses issue #1871
>>>>  <https://github.com/apache/mynewt-core/issues/1871>
>>>>  - Make stats, logs and img_mgmt work with MCUmgr
>>>>  - Make default group commands work with MCUmgr
>>>>  - Add transient packages for backwards compatibility
>>>>  - Update apps to have the updated dependencies
>>>>  - Add syscfgs for MGMT commands Eg: CONFIG_MGMT, STATS_MGMT, LOG_MGMT,
>>>>  etc
>>>>  - Make OICMGR use OMP from MCUmgr
>>>>  - Transition from Newtmgr -> SMP
>>>>  - Remove cborattr and update cborattr in MCUmgr
>>>>  - Fix builds for log version 2
>>>>  - We are also removing support for log_fcb_slot1 since it is not
>>>>  really used by the community or any modules in the core repo.
>>>>  - Updating mynewt port of MCUmgr
>>>>  - Adding Stats, Logs, datetime and other default commands support to
>>>>  MCUmgr
>>>>  - Changing mgmt_group_register() in MCUmgr so that it allows
>>>>  re-registration of command groups
>>>>  - Fix dependency and build issues in MCUmgr for mynewt port and apps
>>>>  - Adding support for log version 3 and image hash changes
>>>>  - Adding support for image management lazy erase
>>>>  - Adding support for config mgmt
>>>>  - Updating cborattr in MCUmgr to have similar support as mynewt-core
>>>>  - Fix unit tests and add some more for cborattr just like in
>>>>  mynewt-core
>>>>  - Change log_mgmt to use fragmenting so that an entry can be divided
>>>>  into smaller chunks while reading.
>>>>  - Fix mynewt port of os_mgmt
>>>>  - Add changes for backwards compatibility
>>>>  - Add sample app: omp_svr for trying out OICMGR over BLE/Serial
>>>>  - Fix reboot_log for soft resets
>>>> 
>>>> 
>>>> Some more stuff that would follow after this change would be:
>>>> 1. Release version for MCUmgr
>>>> 2. Unifying MCUmgr tool
>>>> 
>>>> Also, there were a lot of fixes that got in as part of this effort in
>> the
>>>> MCUmgr repo. I do encourage everybody to try it out.
>>>> 
>>>> --
>>>> 
>>>> Regards,
>>>> Vipul Rahane
>>>> 
>>> 
>>> 
>>> --
>>> 
>>> Regards,
>>> Vipul Rahane
>> 
>> 
> 
> -- 
> 
> Regards,
> Vipul Rahane



Re: Unifying Newtmgr (NMP) protocol and MCUmgr (SMP) into the MCUmgr repo

2019-10-09 Thread Vipul Rahane
Thanks Will and Chris for your response, removing it and transitioning it
to smp_shell. This will be part of the MCUmgr changes to mynewt-core.



On Wed, Oct 9, 2019 at 1:45 PM will sanfilippo  wrote:

> +1 on my part but not sure I am in the best position to vote :-)
>
> > On Oct 9, 2019, at 12:42 PM, Vipul Rahane  wrote:
> >
> > Hello,
> >
> > While making the changes for MCUmgr, we came across nmgr_uart which is a
> > predecessor of nmgr_shell. So far, from what I gather, the functionality
> is
> > the same except for the fact that shell can bring in other code which can
> > increase the code size a bit.
> >
> > As a solution I was suggesting removing nmgr_uart and transitioning to
> > smp_shell as part of the MCUmgr changes.
> >
> > What does the community think about it and does anybody have issues with
> it.
> >
> > This question was raised as the CI did not catch errors with smp_uart and
> > nothing really uses it in the mynewt ecosystem. I am looking for .a quick
> > turn around on this question, so, any input would be fine. Thanks.
> >
> > Regards,
> > Vipul Rahane
> >
> > On Fri, Sep 27, 2019 at 11:38 AM Vipul Rahane  wrote:
> >
> >> Hello fellow developers :-)
> >>
> >> So, Miguel and I have been working on unifying Newtmgr into the MCUmgr
> >> repo (https://github.com/apache/mynewt-mcumgr). There are no protocol
> >> level changes, since MCUmgr(SMP) and Newtmgr(NMP) were the same and so,
> >> everything should work off the bat for everybody.
> >>
> >> The PRs related to this change are:
> >> 1. https://github.com/apache/mynewt-core/pull/1917
> >> 2. https://github.com/apache/mynewt-mcumgr/pull/27
> >> 3. https://github.com/apache/mynewt-nimble/pull/577
> >>
> >> We have also added a transient package for backwards compatibility. So,
> >> this should be a fairly smooth transition for everybody.
> >>
> >> Details about the change:
> >>
> >>   - Replace newtmgr with SMP and MCUmgr
> >>   - The change addresses issue #1871
> >>   <https://github.com/apache/mynewt-core/issues/1871>
> >>   - Make stats, logs and img_mgmt work with MCUmgr
> >>   - Make default group commands work with MCUmgr
> >>   - Add transient packages for backwards compatibility
> >>   - Update apps to have the updated dependencies
> >>   - Add syscfgs for MGMT commands Eg: CONFIG_MGMT, STATS_MGMT, LOG_MGMT,
> >>   etc
> >>   - Make OICMGR use OMP from MCUmgr
> >>   - Transition from Newtmgr -> SMP
> >>   - Remove cborattr and update cborattr in MCUmgr
> >>   - Fix builds for log version 2
> >>   - We are also removing support for log_fcb_slot1 since it is not
> >>   really used by the community or any modules in the core repo.
> >>   - Updating mynewt port of MCUmgr
> >>   - Adding Stats, Logs, datetime and other default commands support to
> >>   MCUmgr
> >>   - Changing mgmt_group_register() in MCUmgr so that it allows
> >>   re-registration of command groups
> >>   - Fix dependency and build issues in MCUmgr for mynewt port and apps
> >>   - Adding support for log version 3 and image hash changes
> >>   - Adding support for image management lazy erase
> >>   - Adding support for config mgmt
> >>   - Updating cborattr in MCUmgr to have similar support as mynewt-core
> >>   - Fix unit tests and add some more for cborattr just like in
> >>   mynewt-core
> >>   - Change log_mgmt to use fragmenting so that an entry can be divided
> >>   into smaller chunks while reading.
> >>   - Fix mynewt port of os_mgmt
> >>   - Add changes for backwards compatibility
> >>   - Add sample app: omp_svr for trying out OICMGR over BLE/Serial
> >>   - Fix reboot_log for soft resets
> >>
> >>
> >> Some more stuff that would follow after this change would be:
> >> 1. Release version for MCUmgr
> >> 2. Unifying MCUmgr tool
> >>
> >> Also, there were a lot of fixes that got in as part of this effort in
> the
> >> MCUmgr repo. I do encourage everybody to try it out.
> >>
> >> --
> >>
> >> Regards,
> >> Vipul Rahane
> >>
> >
> >
> > --
> >
> > Regards,
> > Vipul Rahane
>
>

-- 

Regards,
Vipul Rahane


Re: Unifying Newtmgr (NMP) protocol and MCUmgr (SMP) into the MCUmgr repo

2019-10-09 Thread will sanfilippo
+1 on my part but not sure I am in the best position to vote :-)

> On Oct 9, 2019, at 12:42 PM, Vipul Rahane  wrote:
> 
> Hello,
> 
> While making the changes for MCUmgr, we came across nmgr_uart which is a
> predecessor of nmgr_shell. So far, from what I gather, the functionality is
> the same except for the fact that shell can bring in other code which can
> increase the code size a bit.
> 
> As a solution I was suggesting removing nmgr_uart and transitioning to
> smp_shell as part of the MCUmgr changes.
> 
> What does the community think about it and does anybody have issues with it.
> 
> This question was raised as the CI did not catch errors with smp_uart and
> nothing really uses it in the mynewt ecosystem. I am looking for .a quick
> turn around on this question, so, any input would be fine. Thanks.
> 
> Regards,
> Vipul Rahane
> 
> On Fri, Sep 27, 2019 at 11:38 AM Vipul Rahane  wrote:
> 
>> Hello fellow developers :-)
>> 
>> So, Miguel and I have been working on unifying Newtmgr into the MCUmgr
>> repo (https://github.com/apache/mynewt-mcumgr). There are no protocol
>> level changes, since MCUmgr(SMP) and Newtmgr(NMP) were the same and so,
>> everything should work off the bat for everybody.
>> 
>> The PRs related to this change are:
>> 1. https://github.com/apache/mynewt-core/pull/1917
>> 2. https://github.com/apache/mynewt-mcumgr/pull/27
>> 3. https://github.com/apache/mynewt-nimble/pull/577
>> 
>> We have also added a transient package for backwards compatibility. So,
>> this should be a fairly smooth transition for everybody.
>> 
>> Details about the change:
>> 
>>   - Replace newtmgr with SMP and MCUmgr
>>   - The change addresses issue #1871
>>   <https://github.com/apache/mynewt-core/issues/1871>
>>   - Make stats, logs and img_mgmt work with MCUmgr
>>   - Make default group commands work with MCUmgr
>>   - Add transient packages for backwards compatibility
>>   - Update apps to have the updated dependencies
>>   - Add syscfgs for MGMT commands Eg: CONFIG_MGMT, STATS_MGMT, LOG_MGMT,
>>   etc
>>   - Make OICMGR use OMP from MCUmgr
>>   - Transition from Newtmgr -> SMP
>>   - Remove cborattr and update cborattr in MCUmgr
>>   - Fix builds for log version 2
>>   - We are also removing support for log_fcb_slot1 since it is not
>>   really used by the community or any modules in the core repo.
>>   - Updating mynewt port of MCUmgr
>>   - Adding Stats, Logs, datetime and other default commands support to
>>   MCUmgr
>>   - Changing mgmt_group_register() in MCUmgr so that it allows
>>   re-registration of command groups
>>   - Fix dependency and build issues in MCUmgr for mynewt port and apps
>>   - Adding support for log version 3 and image hash changes
>>   - Adding support for image management lazy erase
>>   - Adding support for config mgmt
>>   - Updating cborattr in MCUmgr to have similar support as mynewt-core
>>   - Fix unit tests and add some more for cborattr just like in
>>   mynewt-core
>>   - Change log_mgmt to use fragmenting so that an entry can be divided
>>   into smaller chunks while reading.
>>   - Fix mynewt port of os_mgmt
>>   - Add changes for backwards compatibility
>>   - Add sample app: omp_svr for trying out OICMGR over BLE/Serial
>>   - Fix reboot_log for soft resets
>> 
>> 
>> Some more stuff that would follow after this change would be:
>> 1. Release version for MCUmgr
>> 2. Unifying MCUmgr tool
>> 
>> Also, there were a lot of fixes that got in as part of this effort in the
>> MCUmgr repo. I do encourage everybody to try it out.
>> 
>> --
>> 
>> Regards,
>> Vipul Rahane
>> 
> 
> 
> -- 
> 
> Regards,
> Vipul Rahane



Re: Unifying Newtmgr (NMP) protocol and MCUmgr (SMP) into the MCUmgr repo

2019-10-09 Thread Christopher Collins
Hi Vipul,

On Wed, Oct 09, 2019 at 12:42:51PM -0700, Vipul Rahane wrote:
> Hello,
> 
> While making the changes for MCUmgr, we came across nmgr_uart which is a
> predecessor of nmgr_shell. So far, from what I gather, the functionality is
> the same except for the fact that shell can bring in other code which can
> increase the code size a bit.
> 
> As a solution I was suggesting removing nmgr_uart and transitioning to
> smp_shell as part of the MCUmgr changes.
> 
> What does the community think about it and does anybody have issues with it.
> 
> This question was raised as the CI did not catch errors with smp_uart and
> nothing really uses it in the mynewt ecosystem. I am looking for .a quick
> turn around on this question, so, any input would be fine. Thanks.

If it isn't being used anymore, then I see no problem with removing it.

I think the old serial boot loader used to use this package.  Now that
we have switched to mcuboot, there is nothing that depends on it.

It looks like mcuboot's serial boot loader just implements its own
minimal newtmgr server and UART transport.

So I say go ahead and remove it :).

Chris


Re: Unifying Newtmgr (NMP) protocol and MCUmgr (SMP) into the MCUmgr repo

2019-10-09 Thread Vipul Rahane
Hello,

While making the changes for MCUmgr, we came across nmgr_uart which is a
predecessor of nmgr_shell. So far, from what I gather, the functionality is
the same except for the fact that shell can bring in other code which can
increase the code size a bit.

As a solution I was suggesting removing nmgr_uart and transitioning to
smp_shell as part of the MCUmgr changes.

What does the community think about it and does anybody have issues with it.

This question was raised as the CI did not catch errors with smp_uart and
nothing really uses it in the mynewt ecosystem. I am looking for .a quick
turn around on this question, so, any input would be fine. Thanks.

Regards,
Vipul Rahane

On Fri, Sep 27, 2019 at 11:38 AM Vipul Rahane  wrote:

> Hello fellow developers :-)
>
> So, Miguel and I have been working on unifying Newtmgr into the MCUmgr
> repo (https://github.com/apache/mynewt-mcumgr). There are no protocol
> level changes, since MCUmgr(SMP) and Newtmgr(NMP) were the same and so,
> everything should work off the bat for everybody.
>
> The PRs related to this change are:
> 1. https://github.com/apache/mynewt-core/pull/1917
> 2. https://github.com/apache/mynewt-mcumgr/pull/27
> 3. https://github.com/apache/mynewt-nimble/pull/577
>
> We have also added a transient package for backwards compatibility. So,
> this should be a fairly smooth transition for everybody.
>
> Details about the change:
>
>- Replace newtmgr with SMP and MCUmgr
>- The change addresses issue #1871
><https://github.com/apache/mynewt-core/issues/1871>
>- Make stats, logs and img_mgmt work with MCUmgr
>- Make default group commands work with MCUmgr
>- Add transient packages for backwards compatibility
>- Update apps to have the updated dependencies
>- Add syscfgs for MGMT commands Eg: CONFIG_MGMT, STATS_MGMT, LOG_MGMT,
>etc
>- Make OICMGR use OMP from MCUmgr
>- Transition from Newtmgr -> SMP
>- Remove cborattr and update cborattr in MCUmgr
>- Fix builds for log version 2
>- We are also removing support for log_fcb_slot1 since it is not
>really used by the community or any modules in the core repo.
>- Updating mynewt port of MCUmgr
>- Adding Stats, Logs, datetime and other default commands support to
>MCUmgr
>- Changing mgmt_group_register() in MCUmgr so that it allows
>re-registration of command groups
>- Fix dependency and build issues in MCUmgr for mynewt port and apps
>- Adding support for log version 3 and image hash changes
>- Adding support for image management lazy erase
>- Adding support for config mgmt
>- Updating cborattr in MCUmgr to have similar support as mynewt-core
>- Fix unit tests and add some more for cborattr just like in
>mynewt-core
>- Change log_mgmt to use fragmenting so that an entry can be divided
>into smaller chunks while reading.
>- Fix mynewt port of os_mgmt
>- Add changes for backwards compatibility
>- Add sample app: omp_svr for trying out OICMGR over BLE/Serial
>- Fix reboot_log for soft resets
>
>
> Some more stuff that would follow after this change would be:
> 1. Release version for MCUmgr
> 2. Unifying MCUmgr tool
>
> Also, there were a lot of fixes that got in as part of this effort in the
> MCUmgr repo. I do encourage everybody to try it out.
>
> --
>
> Regards,
> Vipul Rahane
>


-- 

Regards,
Vipul Rahane


Unifying Newtmgr (NMP) protocol and MCUmgr (SMP) into the MCUmgr repo

2019-09-27 Thread Vipul Rahane
Hello fellow developers :-)

So, Miguel and I have been working on unifying Newtmgr into the MCUmgr repo
(https://github.com/apache/mynewt-mcumgr). There are no protocol level
changes, since MCUmgr(SMP) and Newtmgr(NMP) were the same and so,
everything should work off the bat for everybody.

The PRs related to this change are:
1. https://github.com/apache/mynewt-core/pull/1917
2. https://github.com/apache/mynewt-mcumgr/pull/27
3. https://github.com/apache/mynewt-nimble/pull/577

We have also added a transient package for backwards compatibility. So,
this should be a fairly smooth transition for everybody.

Details about the change:

   - Replace newtmgr with SMP and MCUmgr
   - The change addresses issue #1871
   <https://github.com/apache/mynewt-core/issues/1871>
   - Make stats, logs and img_mgmt work with MCUmgr
   - Make default group commands work with MCUmgr
   - Add transient packages for backwards compatibility
   - Update apps to have the updated dependencies
   - Add syscfgs for MGMT commands Eg: CONFIG_MGMT, STATS_MGMT, LOG_MGMT,
   etc
   - Make OICMGR use OMP from MCUmgr
   - Transition from Newtmgr -> SMP
   - Remove cborattr and update cborattr in MCUmgr
   - Fix builds for log version 2
   - We are also removing support for log_fcb_slot1 since it is not really
   used by the community or any modules in the core repo.
   - Updating mynewt port of MCUmgr
   - Adding Stats, Logs, datetime and other default commands support to
   MCUmgr
   - Changing mgmt_group_register() in MCUmgr so that it allows
   re-registration of command groups
   - Fix dependency and build issues in MCUmgr for mynewt port and apps
   - Adding support for log version 3 and image hash changes
   - Adding support for image management lazy erase
   - Adding support for config mgmt
   - Updating cborattr in MCUmgr to have similar support as mynewt-core
   - Fix unit tests and add some more for cborattr just like in mynewt-core
   - Change log_mgmt to use fragmenting so that an entry can be divided
   into smaller chunks while reading.
   - Fix mynewt port of os_mgmt
   - Add changes for backwards compatibility
   - Add sample app: omp_svr for trying out OICMGR over BLE/Serial
   - Fix reboot_log for soft resets


Some more stuff that would follow after this change would be:
1. Release version for MCUmgr
2. Unifying MCUmgr tool

Also, there were a lot of fixes that got in as part of this effort in the
MCUmgr repo. I do encourage everybody to try it out.

-- 

Regards,
Vipul Rahane


newtmgr connect to BLE device using static random address

2018-08-28 Thread Daniele Biagetti

Hello everyone,

I'm trying to connect to a Bluetooth mesh node running the Zephyr OS 
using the newtmgr.


I'm able to correctly connect to the device while it is advertising with 
a given name, for example BLEDimmer01, with the command:


sudo newtmgr --conntype ble --connstring 'peer_name=BLEDimmerf01' echo test

but I have not found a way to connect with the same node using the 
static random MAC address, I tried several command line option like the 
following, without success


sudo newtmgr --conntype ble --connstring 
'own_addr_type=rpa_rnd,peer_id=C9:48:0B:8B:8A:9F' echo test



Can anyone help me?


Thank you very much

Daniele



Re: newtmgr

2018-08-08 Thread Timo Kolthoff
Thx,
Do you have any input on my next question in the previous mail?

/BR

Den 8 aug. 2018 19:37 skrev aditi hilbert :
Hi Timo,

That is correct - currently, newtmgr is only point to point capable. It is 
possible to extend it to work over mesh and that would be useful ... but such 
functionality is not planned for a release yet.

thanks,
aditi

> On Aug 7, 2018, at 4:55 AM, Timo Kolthoff  wrote:
>
> Hi,
>
> Is it correct that newtmgr is only ble point to point capable, so no
> ble mesh support? Is it something that has been concidered or possible
> to be implemented?
>
> This implies that there will not be support for log fetching,
> statistics or software upgrading in a ble mesh network? Is this
> something that will be solved in the mesh networking specifications?
>
> If so, does anybody know when one could expect a release of this
> functionality?
>
> /BR



Re: newtmgr

2018-08-08 Thread aditi hilbert
Hi Timo,

That is correct - currently, newtmgr is only point to point capable. It is 
possible to extend it to work over mesh and that would be useful ... but such 
functionality is not planned for a release yet.

thanks,
aditi

> On Aug 7, 2018, at 4:55 AM, Timo Kolthoff  wrote:
> 
> Hi,
> 
> Is it correct that newtmgr is only ble point to point capable, so no
> ble mesh support? Is it something that has been concidered or possible
> to be implemented?
> 
> This implies that there will not be support for log fetching,
> statistics or software upgrading in a ble mesh network? Is this
> something that will be solved in the mesh networking specifications?
> 
> If so, does anybody know when one could expect a release of this
> functionality?
> 
> /BR



newtmgr

2018-08-07 Thread Timo Kolthoff
Hi,

Is it correct that newtmgr is only ble point to point capable, so no
ble mesh support? Is it something that has been concidered or possible
to be implemented?

This implies that there will not be support for log fetching,
statistics or software upgrading in a ble mesh network? Is this
something that will be solved in the mesh networking specifications?

If so, does anybody know when one could expect a release of this
functionality?

/BR

Re: newtmgr fs command fails in sim

2018-07-10 Thread Kevin Townsend

Hi Jacob,

But Kevins code snippet brings up something im thinking about. In his
comments he has

CONFIG_NFFS: 1# Initialize and configure NFFS into the
 system


I dont agree with that comment, whats thats actually doing is turning on
the config subsystem and telling it to create its own nffs. Then hes
coattail riding on config's nffs partition.

Came back to this again today writing some internal documentation.

I do agree this leads to some potentially false conclusions, especially to
someone new to Mynewt since 'CONFIG_NFFS' sounds like it may well do
what the comment is saying, and it's part of the official FS documentation
here: https://mynewt.apache.org/latest/os/modules/fs/fs.html#description

I missed that myself, but appreciate you pointing it out since it may have
cause a problem in the future that might not have been obvious at first
glance.

K.


Re: newtmgr fs command fails in sim

2018-07-07 Thread Kevin Townsend

Hi Jacob,

Excellent point about the flash usage, and figuring out how to perhaps
make it easier for packages to play well together in a single filesystem
without hijacking the config system out of necessity.

I dont agree with that comment, whats thats actually doing is turning on
the config subsystem and telling it to create its own nffs. Then hes
coattail riding on config's nffs partition.

the 'way' to create your own nffs seems to be to disable config entirely,
because in the bsp config fcb and nffs both want to use FLASH_AREA_NFFS,
and then add
 - "@apache-mynewt-core/fs/nffs"

But obviously it seems like youd be well within you're rights to share a
disk resource between a bunch of packages.

However the way config and most packages work is to take a whole flash area
for themselves and pass it to nffs or fcb or whatever, so they actually
dont seem to share very well? Maybe config should be less opinionated and
take a premade fs, which the user (or bsp) preconfigured as an fcb or fat
or nffs or whatever. Then it wouldnt feel like im using configs disk (and
if I turn config off, the disk I was using wouldnt go away)

Kevin


Re: newtmgr fs command fails in sim

2018-07-06 Thread Jacob Rosenthal
Maybe Im misunderstanding, as Im personally digging into a bunch of fs
stuff right now myself..

But Kevins code snippet brings up something im thinking about. In his
comments he has
>
> CONFIG_NFFS: 1# Initialize and configure NFFS into the
> system
>
I dont agree with that comment, whats thats actually doing is turning on
the config subsystem and telling it to create its own nffs. Then hes
coattail riding on config's nffs partition.

the 'way' to create your own nffs seems to be to disable config entirely,
because in the bsp config fcb and nffs both want to use FLASH_AREA_NFFS,
and then add
- "@apache-mynewt-core/fs/nffs"

But obviously it seems like youd be well within you're rights to share a
disk resource between a bunch of packages.

However the way config and most packages work is to take a whole flash area
for themselves and pass it to nffs or fcb or whatever, so they actually
dont seem to share very well? Maybe config should be less opinionated and
take a premade fs, which the user (or bsp) preconfigured as an fcb or fat
or nffs or whatever. Then it wouldnt feel like im using configs disk (and
if I turn config off, the disk I was using wouldnt go away)

I also think this fits into something else Im trying to figure out which is
multiple nffs partitions and external flash. The flash area concept doesnt
work at all for that currently.






On Fri, Jul 6, 2018 at 12:12 PM Andrzej Kaczmarek <
andrzej.kaczma...@codecoup.pl> wrote:

> Hi,
>
> On Fri, Jul 6, 2018 at 6:24 PM marko kiiskila  wrote:
> >
> >
> >
> > > On Jul 6, 2018, at 5:49 PM, Kevin Townsend 
> wrote:
> > >
> > > Hi Chris,
> > >> The error codes that come back in newtmgr responses are always (or at
> > >> least should be) MGMT_ERR codes:
> > >>
> https://github.com/apache/mynewt-core/blob/42bb5acc2f049d346c81f25e8c354bc3c6afefd4/mgmt/mgmt/include/mgmt/mgmt.h#L65
> > >>
> > >> `MGMT_ERR_ENOENT` is indicated when the newtmgr command isn't
> recognized
> > >> (it is also used for other conditions; seems like we should have a
> > >> dedicated error code for "command not supported).
> > > Thanks for the point, and the quick reply!
> > >
> > > Command not supported would be more helpful, yes, but not a major
> problem.
> > >> Did you enable the `FS_NMGR` syscfg setting?
> > > That was indeed the problem. I did dig through the various packages
> looking at the CFG values, but didn't notice that one. Works great in the
> sim now with:
> > >
> > > # Enable newtmgr commands.
> > > STATS_NEWTMGR: 1  # Enable stats over newtmgr
> > > LOG_NEWTMGR: 1# Enable log over newtmgr
> > > CONFIG_NEWTMGR: 1 # Enable config over newtmgr
> > > FS_NMGR: 1# Enable 'fs' access from newtmgr
> > >
> > > It's a shame the naming is sort of inconsistent (inner OCD self
> speaking), but that's a minor detail. :P
> > >
> >
> > I know what you mean. There’s other examples of the same. But then
> renaming these would
> > break people’s build targets. Which is not nice :)
> >
> > Although I guess we could do this if we gave people enough warning.
>
> We can introduce new setting and set its default value to old setting,
> i.e.:
>
> syscfg.defs:
> FS_NEWTMGR:
> value: 'MYNEWT_VAL_FS_NMGR'
>
> This way people can continue using old settings for now and then
> transition to new settings. Would be good if old value can be marked
> as deprecated and newt would emit warning if deprecated setting is
> overriden in other package.
>
> I did similar change in RTT already:
>
> https://github.com/apache/mynewt-core/commit/67c430c5ecc8ac06af256e5d1bd487d3b6efdedc
>
> Best,
> Andrzej
>


Re: newtmgr fs command fails in sim

2018-07-06 Thread Andrzej Kaczmarek
Hi,

On Fri, Jul 6, 2018 at 6:24 PM marko kiiskila  wrote:
>
>
>
> > On Jul 6, 2018, at 5:49 PM, Kevin Townsend  
> > wrote:
> >
> > Hi Chris,
> >> The error codes that come back in newtmgr responses are always (or at
> >> least should be) MGMT_ERR codes:
> >> https://github.com/apache/mynewt-core/blob/42bb5acc2f049d346c81f25e8c354bc3c6afefd4/mgmt/mgmt/include/mgmt/mgmt.h#L65
> >>
> >> `MGMT_ERR_ENOENT` is indicated when the newtmgr command isn't recognized
> >> (it is also used for other conditions; seems like we should have a
> >> dedicated error code for "command not supported).
> > Thanks for the point, and the quick reply!
> >
> > Command not supported would be more helpful, yes, but not a major problem.
> >> Did you enable the `FS_NMGR` syscfg setting?
> > That was indeed the problem. I did dig through the various packages looking 
> > at the CFG values, but didn't notice that one. Works great in the sim now 
> > with:
> >
> > # Enable newtmgr commands.
> > STATS_NEWTMGR: 1  # Enable stats over newtmgr
> > LOG_NEWTMGR: 1# Enable log over newtmgr
> > CONFIG_NEWTMGR: 1 # Enable config over newtmgr
> > FS_NMGR: 1# Enable 'fs' access from newtmgr
> >
> > It's a shame the naming is sort of inconsistent (inner OCD self speaking), 
> > but that's a minor detail. :P
> >
>
> I know what you mean. There’s other examples of the same. But then renaming 
> these would
> break people’s build targets. Which is not nice :)
>
> Although I guess we could do this if we gave people enough warning.

We can introduce new setting and set its default value to old setting, i.e.:

syscfg.defs:
FS_NEWTMGR:
value: 'MYNEWT_VAL_FS_NMGR'

This way people can continue using old settings for now and then
transition to new settings. Would be good if old value can be marked
as deprecated and newt would emit warning if deprecated setting is
overriden in other package.

I did similar change in RTT already:
https://github.com/apache/mynewt-core/commit/67c430c5ecc8ac06af256e5d1bd487d3b6efdedc

Best,
Andrzej


Re: newtmgr fs command fails in sim

2018-07-06 Thread marko kiiskila



> On Jul 6, 2018, at 5:49 PM, Kevin Townsend  wrote:
> 
> Hi Chris,
>> The error codes that come back in newtmgr responses are always (or at
>> least should be) MGMT_ERR codes:
>> https://github.com/apache/mynewt-core/blob/42bb5acc2f049d346c81f25e8c354bc3c6afefd4/mgmt/mgmt/include/mgmt/mgmt.h#L65
>> 
>> `MGMT_ERR_ENOENT` is indicated when the newtmgr command isn't recognized
>> (it is also used for other conditions; seems like we should have a
>> dedicated error code for "command not supported).
> Thanks for the point, and the quick reply!
> 
> Command not supported would be more helpful, yes, but not a major problem.
>> Did you enable the `FS_NMGR` syscfg setting?
> That was indeed the problem. I did dig through the various packages looking 
> at the CFG values, but didn't notice that one. Works great in the sim now 
> with:
> 
> # Enable newtmgr commands.
> STATS_NEWTMGR: 1  # Enable stats over newtmgr
> LOG_NEWTMGR: 1# Enable log over newtmgr
> CONFIG_NEWTMGR: 1 # Enable config over newtmgr
> FS_NMGR: 1# Enable 'fs' access from newtmgr
> 
> It's a shame the naming is sort of inconsistent (inner OCD self speaking), 
> but that's a minor detail. :P
> 

I know what you mean. There’s other examples of the same. But then renaming 
these would
break people’s build targets. Which is not nice :)

Although I guess we could do this if we gave people enough warning.

Re: newtmgr fs command fails in sim

2018-07-06 Thread Kevin Townsend

Hi Chris,

The error codes that come back in newtmgr responses are always (or at
least should be) MGMT_ERR codes:
https://github.com/apache/mynewt-core/blob/42bb5acc2f049d346c81f25e8c354bc3c6afefd4/mgmt/mgmt/include/mgmt/mgmt.h#L65

`MGMT_ERR_ENOENT` is indicated when the newtmgr command isn't recognized
(it is also used for other conditions; seems like we should have a
dedicated error code for "command not supported).

Thanks for the point, and the quick reply!

Command not supported would be more helpful, yes, but not a major problem.

Did you enable the `FS_NMGR` syscfg setting?
That was indeed the problem. I did dig through the various packages 
looking at the CFG values, but didn't notice that one. Works great in 
the sim now with:


    # Enable newtmgr commands.
    STATS_NEWTMGR: 1  # Enable stats over newtmgr
    LOG_NEWTMGR: 1    # Enable log over newtmgr
    CONFIG_NEWTMGR: 1 # Enable config over newtmgr
    FS_NMGR: 1    # Enable 'fs' access from newtmgr

It's a shame the naming is sort of inconsistent (inner OCD self 
speaking), but that's a minor detail. :P


Kevin


Re: newtmgr fs command fails in sim

2018-07-06 Thread Christopher Collins
Hi Kevin,

On Fri, Jul 06, 2018 at 02:41:17PM +0200, Kevin Townsend wrote:
> I'm doing some initial development using only the simulator (for 
> convenience sake), and was testing out 'newtmgr fs' support to quickly 
> get data to and from the simulator.
> 
> My sim target is setup to use NFFS using mostly default values:
> 
>      # NFFS filesystem
>      FS_CLI: 1 # Include shell FS commands
>      CONFIG_NFFS: 1    # Initialize and configure NFFS into the
> system
>      NFFS_DETECT_FAIL: 2   # Format a new NFFS file system on
> failure to detect
> 
> Everything works fine from shell when I start the .elf file and create 
> an NFFS file in code, and I can see the file and contents via cat:
> 
> ls /cfg
> 604693   5 /cfg/id.txt
> 604693 1 files
> 604900 compat> cat /cfg/id.txt
> 5678
> 
> But when I try to do anything with 'newtmgr fs' (up or down) I always 
> get *error 5*, which I assume corresponds to 
> https://github.com/apache/mynewt-core/blob/master/fs/fs/include/fs/fs.h#L72: 

The error codes that come back in newtmgr responses are always (or at
least should be) MGMT_ERR codes:
https://github.com/apache/mynewt-core/blob/42bb5acc2f049d346c81f25e8c354bc3c6afefd4/mgmt/mgmt/include/mgmt/mgmt.h#L65

`MGMT_ERR_ENOENT` is indicated when the newtmgr command isn't recognized
(it is also used for other conditions; seems like we should have a
dedicated error code for "command not supported).

Did you enable the `FS_NMGR` syscfg setting?

Chris


newtmgr fs command fails in sim

2018-07-06 Thread Kevin Townsend
I'm doing some initial development using only the simulator (for 
convenience sake), and was testing out 'newtmgr fs' support to quickly 
get data to and from the simulator.


My sim target is setup to use NFFS using mostly default values:

    # NFFS filesystem
    FS_CLI: 1 # Include shell FS commands
    CONFIG_NFFS: 1    # Initialize and configure NFFS into the
   system
    NFFS_DETECT_FAIL: 2   # Format a new NFFS file system on
   failure to detect

Everything works fine from shell when I start the .elf file and create 
an NFFS file in code, and I can see the file and contents via cat:


   ls /cfg
   604693   5 /cfg/id.txt
   604693 1 files
   604900 compat> cat /cfg/id.txt
   5678

But when I try to do anything with 'newtmgr fs' (up or down) I always 
get *error 5*, which I assume corresponds to 
https://github.com/apache/mynewt-core/blob/master/fs/fs/include/fs/fs.h#L72: 



   $ newtmgr -c serialsim fs download /cfg/id.txt id.txt
   Error: 5

The newtmgr connection is fine and of course the app is running:

   $ newtmgr conn show
   Connection profiles:
  serialsim: type=serial, connstring='/dev/ttys002'

And here is a proof that newtmgr is behaving properly and is properly 
configured:


   $ newtmgr -c serialsim stat nffs_stats
   stat group: nffs_stats
 0 nffs_gccnt
 5 nffs_hashcnt_ins
 0 nffs_hashcnt_rm
    52 nffs_iocnt_read
    13 nffs_iocnt_write
 0 nffs_object_count
 1 nffs_readcnt_block
 0 nffs_readcnt_copy
 0 nffs_readcnt_crc
 1 nffs_readcnt_data
 2 nffs_readcnt_detect
 6 nffs_readcnt_filename
 0 nffs_readcnt_format
 0 nffs_readcnt_gccollate
    22 nffs_readcnt_inode
    21 nffs_readcnt_inodeent
 0 nffs_readcnt_object
 0 nffs_readcnt_rename
 1 nffs_readcnt_update

Is it normal that the fs support doesn't work in the simulator? Perhaps 
the commands only work with FatFS, although I'd prefer to use the 
smaller NFFS for now.


K.


Re: newtmgr on Android

2018-06-27 Thread Brian Giori
Hi Andrey,

I have built Android and iOS NewtMgr implementations which are
currently in a "private beta" (if you will) and are still under active
development. The plan is to release these libraries (Apache 2.0) when
they have stabilized, which for Android should be soon.

If you'd like access to the Android repo, I can get you a maven artifact
which you can use in your app to perform firmware upgrades (among
other things). I am using jitpack to host the artifact since the code is
hosted in a private repository on github. In order to get you access to the
jitpack artifacts, I will need the github username for anyone that wants
access.

Brian



On Wed, Jun 27, 2018 at 9:19 AM, Jacob Rosenthal 
wrote:

> I dont know if that runtime sensors app has firmware update, but it has oic
> which would get you close
> https://github.com/runtimeco/android_sensor
>
> Also I have a web bluetooth solution that would work on a lot of android
> phones
> https://github.com/jacobrosenthal/web-newtmgr
>
>
>
> On Wed, Jun 27, 2018 at 8:37 AM andrey.serdt...@yotadevices.com <
> andrey.serdt...@yotadevices.com> wrote:
>
> > Hi all,
> >
> > Does anybody knows if newtmgr is available under Android?
> > The task is to update mynewt device firmware from Android phone.
> >
> > Thank you.
> >
> > BR,
> > Andrey
> >
> >
>


Re: newtmgr on Android

2018-06-27 Thread Jacob Rosenthal
I dont know if that runtime sensors app has firmware update, but it has oic
which would get you close
https://github.com/runtimeco/android_sensor

Also I have a web bluetooth solution that would work on a lot of android
phones
https://github.com/jacobrosenthal/web-newtmgr



On Wed, Jun 27, 2018 at 8:37 AM andrey.serdt...@yotadevices.com <
andrey.serdt...@yotadevices.com> wrote:

> Hi all,
>
> Does anybody knows if newtmgr is available under Android?
> The task is to update mynewt device firmware from Android phone.
>
> Thank you.
>
> BR,
> Andrey
>
>


Re: [mynewt-newtmgr] 01/01: Merge pull request #46 from mkiiskila/lora

2017-10-27 Thread marko kiiskila
Probably should’ve mentioned: this code does do fragmentation/reassembly to fit
into lora frames (which might be quite limited).

> On Oct 27, 2017, at 1:40 PM, marko kiiskila <ma...@runtime.io> wrote:
> 
> Hi,
> 
> added CoAP over LoRa option when running on Multitech gateway.
> 
> root@mtcdt:~# ./newtmgr conn show mt
> Connection profiles: 
>   mt: type=oic_mtech, connstring=''
> root@mtcdt:~# ./newtmgr -c mt -t 120 --name 00-13-50-04-04-50-13-00 taskstat  
>  
>   task pri tid  runtime  cswstksz   stkuse last_checkin 
> next_checkin
>   idle 255   0   481470 4337   64   3100
>loramac   0   2  551 3699  256   8700
>   main 127   1   58 1386 1024  46900
> root@mtcdt:~# ./newtmgr -c mt -t 120 --name 00-13-50-04-04-50-13-00 res get 
> public /oic/res
> ^Croot@mtcdt:~# ./newtmgr -c mt -t 120 --name 00-13-50-04-04-50-13-00 res get 
> puic /oic/d  
> ^Croot@mtcdt:~# ./newtmgr -c mt -t 120 --name 00-13-50-04-04-50-13-00 res get 
> puic d 
> Error: NotFound (132)
> root@mtcdt:~# ./newtmgr -c mt -t 120 --name 00-13-50-04-04-50-13-00 res get 
> public /oic/p
> /oic/p
> map[mnos:MyNewt rt:[oic.wk.p] if:[oic.if.r oic.if.baseline] p:5 
> pi:fd0edd1a-5de2-44d2-400f-74b9369db40d mnmn:MyNewt]
> root@mtcdt:~# ./newtmgr -c mt -t 120 --name 00-13-50-04-04-50-13-00 
> --connextra="segsz=33,confirmedtx=true" image list
> Images:
>  slot=0
> version: 3.0.0
> bootable: true
> flags: active confirmed
> hash: 2fb91d83abd0ea3c3a76c78462ccc287de60d83300a66c153af4a666adce6862
> Split status: N/A (0)
> root@mtcdt:~# lora-query --node-list 
> Net Addr Dev EUI  Class  JoinedSeq Num
>Up Down  1st  2nd  Dropped  RSSI min   max   avg  SNR min   
> max   avg
> 00:00:00:01  00-13-50-00-00-50-13-00  A  2017-06-23T00:20:40Z1
> 00000 0 0 00 
> 0 0
> 00:00:00:02  00-13-50-02-02-50-13-00  A  2017-10-10T20:06:51Z   10
> 00000 0 0 00 
> 0 0
> 00:00:00:03  00-13-50-03-03-50-13-00  C  2017-10-26T23:33:21Z   28
>   483  520  426   940   -96   -40   -60 -1.8
> 13  10.6
> 00:00:00:04  00-13-50-04-04-50-13-00  C  2017-10-27T19:28:39Z  603
>  4995 6856 4986 18700   -83   -36   -545  
> 14.5  10.5
> 
> connection parameter segsz controls the size of the frame sent out by the 
> app, and
> confirmedtx=true|false controls whether gw uses lora confirmed vs unconfirmed 
> frames.
> 
> —name option is the deveui.
> 
> 
> 
>> Begin forwarded message:
>> 
>> From: ma...@apache.org <mailto:ma...@apache.org>
>> Subject: [mynewt-newtmgr] 01/01: Merge pull request #46 from mkiiskila/lora
>> Date: October 27, 2017 at 1:18:53 PM PDT
>> To: "comm...@mynewt.apache.org <mailto:comm...@mynewt.apache.org>" 
>> <comm...@mynewt.apache.org <mailto:comm...@mynewt.apache.org>>
>> Reply-To: dev@mynewt.apache.org <mailto:dev@mynewt.apache.org>
>> 
>> This is an automated email from the ASF dual-hosted git repository.
>> 
>> marko pushed a commit to branch master
>> in repository https://gitbox.apache.org/repos/asf/mynewt-newtmgr.git 
>> <https://gitbox.apache.org/repos/asf/mynewt-newtmgr.git>
>> 
>> commit 8039e8cf1c823e894a0ae8f4a439774165cbb27c
>> Merge: bb86eb9 1d9bba8
>> Author: mkiiskila <ma...@runtime.io <mailto:ma...@runtime.io>>
>> AuthorDate: Fri Oct 27 13:18:51 2017 -0700
>> 
>>Merge pull request #46 from mkiiskila/lora
>> 
>>OIC over Lora
>> 
>> newtmgr/cli/common.go |  14 ++
>> newtmgr/config/connprofile.go |  20 +--
>> newtmgr/config/mtech_lora_config.go   |  87 +++
>> nmxact/lora/lora_coap.go  |  31 
>> nmxact/mtech_lora/listen.go   | 201 
>> nmxact/mtech_lora/mtech_lora_sesn.go  | 257 +++
>> nmxact/mtech_lora/mtech_lora_xport.go | 277 
>> ++
>> nmxact/sesn/sesn_cfg.go   |  12 +-
>> 8 files changed, 889 insertions(+), 10 deletions(-)
>> 
>> -- 
>> To stop receiving notification emails like this one, please contact
>> "comm...@mynewt.apache.org <mailto:comm...@mynewt.apache.org>" 
>> <comm...@mynewt.apache.org <mailto:comm...@mynewt.apache.org>>.
> 



Fwd: [mynewt-newtmgr] 01/01: Merge pull request #46 from mkiiskila/lora

2017-10-27 Thread marko kiiskila
Hi,

added CoAP over LoRa option when running on Multitech gateway.

root@mtcdt:~# ./newtmgr conn show mt
Connection profiles: 
  mt: type=oic_mtech, connstring=''
root@mtcdt:~# ./newtmgr -c mt -t 120 --name 00-13-50-04-04-50-13-00 taskstat   
  task pri tid  runtime  cswstksz   stkuse last_checkin next_checkin
  idle 255   0   481470 4337   64   3100
   loramac   0   2  551 3699  256   8700
  main 127   1   58 1386 1024  46900
root@mtcdt:~# ./newtmgr -c mt -t 120 --name 00-13-50-04-04-50-13-00 res get 
public /oic/res
^Croot@mtcdt:~# ./newtmgr -c mt -t 120 --name 00-13-50-04-04-50-13-00 res get 
puic /oic/d  
^Croot@mtcdt:~# ./newtmgr -c mt -t 120 --name 00-13-50-04-04-50-13-00 res get 
puic d 
Error: NotFound (132)
root@mtcdt:~# ./newtmgr -c mt -t 120 --name 00-13-50-04-04-50-13-00 res get 
public /oic/p
/oic/p
map[mnos:MyNewt rt:[oic.wk.p] if:[oic.if.r oic.if.baseline] p:5 
pi:fd0edd1a-5de2-44d2-400f-74b9369db40d mnmn:MyNewt]
root@mtcdt:~# ./newtmgr -c mt -t 120 --name 00-13-50-04-04-50-13-00 
--connextra="segsz=33,confirmedtx=true" image list
Images:
 slot=0
version: 3.0.0
bootable: true
flags: active confirmed
hash: 2fb91d83abd0ea3c3a76c78462ccc287de60d83300a66c153af4a666adce6862
Split status: N/A (0)
root@mtcdt:~# lora-query --node-list 
Net Addr Dev EUI  Class  JoinedSeq Num  
 Up Down  1st  2nd  Dropped  RSSI min   max   avg  SNR min   max   
avg
00:00:00:01  00-13-50-00-00-50-13-00  A  2017-06-23T00:20:40Z1  
  00000 0 0 00 0
 0
00:00:00:02  00-13-50-02-02-50-13-00  A  2017-10-10T20:06:51Z   10  
  00000 0 0 00 0
 0
00:00:00:03  00-13-50-03-03-50-13-00  C  2017-10-26T23:33:21Z   28  
483  520  426   940   -96   -40   -60 -1.813  
10.6
00:00:00:04  00-13-50-04-04-50-13-00  C  2017-10-27T19:28:39Z  603 
4995 6856 4986 18700   -83   -36   -545  14.5  
10.5

connection parameter segsz controls the size of the frame sent out by the app, 
and
confirmedtx=true|false controls whether gw uses lora confirmed vs unconfirmed 
frames.

—name option is the deveui.



> Begin forwarded message:
> 
> From: ma...@apache.org
> Subject: [mynewt-newtmgr] 01/01: Merge pull request #46 from mkiiskila/lora
> Date: October 27, 2017 at 1:18:53 PM PDT
> To: "comm...@mynewt.apache.org" <comm...@mynewt.apache.org>
> Reply-To: dev@mynewt.apache.org
> 
> This is an automated email from the ASF dual-hosted git repository.
> 
> marko pushed a commit to branch master
> in repository https://gitbox.apache.org/repos/asf/mynewt-newtmgr.git
> 
> commit 8039e8cf1c823e894a0ae8f4a439774165cbb27c
> Merge: bb86eb9 1d9bba8
> Author: mkiiskila <ma...@runtime.io>
> AuthorDate: Fri Oct 27 13:18:51 2017 -0700
> 
>Merge pull request #46 from mkiiskila/lora
> 
>OIC over Lora
> 
> newtmgr/cli/common.go |  14 ++
> newtmgr/config/connprofile.go |  20 +--
> newtmgr/config/mtech_lora_config.go   |  87 +++
> nmxact/lora/lora_coap.go  |  31 
> nmxact/mtech_lora/listen.go   | 201 
> nmxact/mtech_lora/mtech_lora_sesn.go  | 257 +++
> nmxact/mtech_lora/mtech_lora_xport.go | 277 ++
> nmxact/sesn/sesn_cfg.go   |  12 +-
> 8 files changed, 889 insertions(+), 10 deletions(-)
> 
> -- 
> To stop receiving notification emails like this one, please contact
> "comm...@mynewt.apache.org" <comm...@mynewt.apache.org>.



Re: newtmgr 'image confirm' returns 'Error: 1'

2017-08-22 Thread Kevin Townsend

Hi Christopher,

Thanks for the explanation between the test/basic-confirm and 
confirm-hash differences. I didn't realize the distinction, but it 
clarifies a number of things for me for the mobile app (visible in the 
store now: 
https://itunes.apple.com/app/adafruit-mynewt-manager/id1272085812?mt=8)


I'll try with the newtmgr commands again on a clean machine. It may well 
be that the error message is an artifact of some previous system or tool 
configuration.


Kevin


On 22/08/17 20:00, Christopher Collins wrote:

Hi Kevin,

On Wed, Aug 16, 2017 at 11:45:52PM +0200, Kevin Townsend wrote:

I'm doing some tests with newtmgr over serial since this is the lowest
cost mechanism for many users (no J-Link required), and the update
process as I understand it is as follows:

- $ newtmgr -c serial1 image upload mysignedimage.img
^ This will write the new image in slot=1 with no flags set
- $ newtmgr -c serial1 image test
4d0ff81e083f8cc9d428e8bb70ed86ae98f237ce8dd59bfd33f7493874addd1d
^ This will set the flags to 'pending' and when you reset, the image
will be moved into slot 0 and the old image will be switched to slot 1
- $ newtmgr -c serial1 reset
^ Wait for the flash switch to finish ...
  The new image is now marked as 'active' but the old image has the
'confirmed' flag set so resetting again will cause the device to revert
to the old image if no action is taken,

All correct.


so first we need to ...
- $ newtmgr -c serial1 image confirm
4d0ff81e083f8cc9d428e8bb70ed86ae98f237ce8dd59bfd33f7493874addd1d
^ This will 'confirm' the new image (I don't think the hash is
necessary though), and then the old image will no longer be marked as
'confirmed' and resetting will maintain the new image. Notice no more
'confirmed' flag on slot 1 here, and slot 0 is now 'confirmed'
  $ newtmgr -c serial1 image list
  Images:
   slot=0
  version: 0.7.0
  bootable: true
  flags: active confirmed
  hash:
4d0ff81e083f8cc9d428e8bb70ed86ae98f237ce8dd59bfd33f7493874addd1d
   slot=1
  version: 0.6.0
  bootable: true
  flags:
  hash:
9a8fce478019c5e806253c307d32ddeab559ff6dc2577670ff6e0b1cb72f929b
  Split status: N/A (0)

What confused me is that no matter if I use the has or not with 'image
confirm' I always get 'Error: 1' in the output, which is confusing.

$ newtmgr -c serial1 image confirm
4d0ff81e083f8cc9d428e8bb70ed86ae98f237ce8dd59bfd33f7493874addd1d
Error: 1

$ newtmgr -c serial1 image confirm
Error: 1

Is there a logical explanation for this? I'm running the 1.1 binaries
installed via brew on OS X 10.11.6.

The "image confirm" command behaves differently if you specify the hash
argument:

* Confirm-without-hash: This is the "safe" version of the command.  It
confirms the currently-running image.  This can only be used when you
are "testing out" an image (i.e., slot 0 is active but not confirmed,
slot 1 is confirmed but not active).

* Confirm : This is the unsafe version.  It allows you to bypass
the "image test" step.  Say you have the following image state:

 slot 0: active confirmed, hash=xxx
 slot 1: , hash=yyy

If you issue an "image confirm " command and reset the device,
the image state will look like this:

 slot 0: active confirmed, hash=yyy
 slot 1: , hash=xxx

In other words, this version of "image confirm" permanently swaps to an
untested image.  This might be useful for upgrading lots of devices
to a known-good image.

Regarding the "Error: 1" message - I'm afraid I don't have an
explanation.  Are you sending the confirms immediately after the "image
list" commands?  That is, is the board in the (slot0: active confirmed,
slot1: ) state when you get the error?  If so, I am not able
to reproduce that behavior:

 [ccollins@ccollins-mac:~/repos/mynewt/core]$ newtmgr -c bhd-oic --name c5 
image list
 Images:
  slot=0
 version: 5.5.5.5
 bootable: true
 flags: active confirmed
 hash: ec4044b698f06f9d3128b2b900c4da0d15a500b77f0378a2bad5f87b43c1bd42
  slot=1
 version: 0.0.0
 bootable: true
 flags:
 hash: 59477eca25d3deb4edc0b1ef80f1f517f37b90d127ef33597d21ba171446d693
 Split status: N/A (0)

 [ccollins@ccollins-mac:~/repos/mynewt/core]$ newtmgr -c bhd-oic --name c5 
image confirm
 Images:
  slot=0
 version: 5.5.5.5
 bootable: true
 flags: active confirmed
 hash: ec4044b698f06f9d3128b2b900c4da0d15a500b77f0378a2bad5f87b43c1bd42
  slot=1
 version: 0.0.0
 bootable: true
 flags:
 hash: 59477eca25d3deb4edc0b1ef80f1f517f37b90d127ef33597d21ba171446d693
 Split status: N/A (0)

 [ccollins@ccollins-mac:~/repos/mynewt/core]$ newtmgr -c bhd-oic --name c5 
image confirm ec4044b698f06f9d3128b2b900c4da0d15a500b77f0378a2bad5f87b43c1bd42
 Images:
  slot=0
  

Re: Newtmgr moved to new repo

2017-07-10 Thread Paul LaCrosse
Tried option #2, which worked.  Thanks Chris!

On Mon, Jul 10, 2017 at 4:23 PM, Christopher Collins <ch...@runtime.io>
wrote:

> Hi Paul,
>
> On Mon, Jul 10, 2017 at 04:13:30PM -0400, Paul LaCrosse wrote:
> > Pauls-MacBook-Pro-2:testgoget paul$  go get mynewt.apache.org/newtmgr/.
> ..
> >
> > # cd /Users/paul/dev/go/src/mynewt.apache.org/newt; git pull --ff-only
> >
> > fatal: repository '
> > https://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt.git/' not
> > found
> >
> > package mynewt.apache.org/newtmgr/nmxact/example/ble_loop
> >
> > imports mynewt.apache.org/newt/util/unixchild: exit status 1
> >
> > Download of latest newtmgr, produces error.
>
> It appears your version of the newt repo was cloned from the old apache
> git server (before Mynewt moved to github).  Using "go get" with the
> mynewt.apache.org vanity domain helps to avoid problems like this.  To
> solve this, I would either:
>
> 1. Change the newt repo remote to the github URL:
>
> cd $GOPATH/src/mynewt.apache.org/newt &&
> git remote set-url origin https://github.com/apache/
> incubator-mynewt-newt.git
>
> Or,
>
> 2. Completely remove $GOPATH/src/mynewt.apache.org and reinstall it with
> `go get mynewt.apache.org/newt/...`
>
> Thanks,
> Chris
>


Re: Newtmgr moved to new repo

2017-07-10 Thread Christopher Collins
Hi Paul,

On Mon, Jul 10, 2017 at 04:13:30PM -0400, Paul LaCrosse wrote:
> Pauls-MacBook-Pro-2:testgoget paul$  go get mynewt.apache.org/newtmgr/...
> 
> # cd /Users/paul/dev/go/src/mynewt.apache.org/newt; git pull --ff-only
> 
> fatal: repository '
> https://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt.git/' not
> found
> 
> package mynewt.apache.org/newtmgr/nmxact/example/ble_loop
> 
> imports mynewt.apache.org/newt/util/unixchild: exit status 1
> 
> Download of latest newtmgr, produces error.

It appears your version of the newt repo was cloned from the old apache
git server (before Mynewt moved to github).  Using "go get" with the
mynewt.apache.org vanity domain helps to avoid problems like this.  To
solve this, I would either:

1. Change the newt repo remote to the github URL:

cd $GOPATH/src/mynewt.apache.org/newt &&
git remote set-url origin 
https://github.com/apache/incubator-mynewt-newt.git

Or,

2. Completely remove $GOPATH/src/mynewt.apache.org and reinstall it with
`go get mynewt.apache.org/newt/...`

Thanks,
Chris


Re: Newtmgr moved to new repo

2017-07-10 Thread Paul LaCrosse
Pauls-MacBook-Pro-2:testgoget paul$  go get mynewt.apache.org/newtmgr/...

# cd /Users/paul/dev/go/src/mynewt.apache.org/newt; git pull --ff-only

fatal: repository '
https://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt.git/' not
found

package mynewt.apache.org/newtmgr/nmxact/example/ble_loop

imports mynewt.apache.org/newt/util/unixchild: exit status 1

Download of latest newtmgr, produces error.


On Mon, Jul 10, 2017 at 1:44 PM, Christopher Collins <ch...@runtime.io>
wrote:

> Hello all,
>
> The newtmgr tool location has changed:
>
> From: https://github.com/apache/mynewt-newt/tree/master/newtmgr
>   To: https://github.com/apache/mynewt-newtmgr/tree/master/newtmgr
>
> To download the latest newtmgr, use the following command:
>
> go get mynewt.apache.org/newtmgr/...
>
> The plan is to remove the "old" newtmgr from the newt repo when Mynewt
> 1.1 is released.
>
> The "new" newtmgr has improved BLE support.  BLE should now work more
> reliably on Linux and macOS.  The particulars are documented here:
> http://mynewt.apache.org/latest/newtmgr/command_list/newtmgr_conn/
>
> My preferred way to use BLE is to create a "ble" connection profile with
> an empty connstring:
>
> newtmgr conn add ble type=ble connstring=' '
>
> Then, specify the target device name on the command line each time you
> send a command:
>
> newtmgr -c ble --name nimble-bleprph echo hello
>
> Rationale:
> The reason for the move is to simplify downloading and
> building of newt and newtmgr.  The "go get" command works better with
> the "mynewt.apache.org" vanity domain when there is one application per
> repo.  Since the vanity domain requires the use of the "..." syntax in
> the `go get` command, the entire repo gets downloaded, including
> applications that weren't requested.
>
> Thanks,
> Chris
>


Newtmgr moved to new repo

2017-07-10 Thread Christopher Collins
Hello all,

The newtmgr tool location has changed:

From: https://github.com/apache/mynewt-newt/tree/master/newtmgr
  To: https://github.com/apache/mynewt-newtmgr/tree/master/newtmgr

To download the latest newtmgr, use the following command:

go get mynewt.apache.org/newtmgr/...

The plan is to remove the "old" newtmgr from the newt repo when Mynewt
1.1 is released.

The "new" newtmgr has improved BLE support.  BLE should now work more
reliably on Linux and macOS.  The particulars are documented here:
http://mynewt.apache.org/latest/newtmgr/command_list/newtmgr_conn/

My preferred way to use BLE is to create a "ble" connection profile with
an empty connstring:

newtmgr conn add ble type=ble connstring=' '

Then, specify the target device name on the command line each time you
send a command:

newtmgr -c ble --name nimble-bleprph echo hello

Rationale:
The reason for the move is to simplify downloading and
building of newt and newtmgr.  The "go get" command works better with
the "mynewt.apache.org" vanity domain when there is one application per
repo.  Since the vanity domain requires the use of the "..." syntax in
the `go get` command, the entire repo gets downloaded, including
applications that weren't requested.

Thanks,
Chris


newtmgr with onboard bluetooth chip of raspberry zero W

2017-06-28 Thread Alfred Schilken
Has anybody the newtmgr working with the onboard bluetooth chip of the 
raspberry pi zero W?

If yes: what are the settings for the blehostd and what is to configure with 
the hci on the linux side?

I think this tiny zero-W-board could be a good gateway for IP to BLE.

Regards
Alf