This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Unable to use mcumgr cli over serial from windows

Hi,
I have a nRF5340 based target board running SMP server plus MCUmgr.
My ultimate goal is to reproduce on Windows the DFU over serial I already do from Linux.
Tese are the steps I've followed on Windows 10

  1. download mcumgr CLI source from https://github.com/apache/mynewt-mcumgr-cli
  2. unzip and rename resulting directory to $GOPATH/src/mynewt.apache.org/mcumgr
  3. go in the source directory and build

    > cd C:\Users\gabriele\go\src\mynewt.apache.org\mcumgr\mcumgr
    > go build

  4. Check out version

    > mcumgr version
    mcumgr 0.0.0-dev

  5. Test with target

    > mcumgr --conntype serial --connstring=COM2 image list
    Error: NMP timeout

Any idea ?
Thanks

Parents Reply
  • Hi Mohan,
    At this moment this is all I can say you. Time is going to flight..


    Install Go and build MCUmgr CLI on Windows host
    ---------------------------------------------------------------
    1. Download the current binary for Go from https://golang.org/dl/
    2. Open the MSI file you downloaded and follow the prompts to install Go.
    If this gives one of several errors try this
    open the Command Prompt as administrator and write the command
    > msiexec /i "C:\<anyPathTo>\go<x.y.z>.windows-amd64.msi"
    This will run the MSI installer of your program without errors.
    3. Check installation works
    > go version
    4. Download mcumgr source zip from github.com/.../mynewt-mcumgr-cli
    5. Unpack and rename resulting directory to $GOPATH/src/mynewt.apache.org/mcumgr
    You can find GOPATH under the environment variable list

    6. Go in the source directory and build
    > cd C:\Users\gabriele\go\src\mynewt.apache.org\mcumgr\mcumgr
    > go build
    7. Check
    > mcumgr version
    mcumgr 0.0.0-dev
    8. Use it
    > mcumgr -t 20 --conntype serial --connstring=COM2 <cmd>
    To make DFU, copy the new FW release (signed image app_update.bin) into the folder
    C:\Users\<user>\go\src\mynewt.apache.org\mcumgr\mcumgr
    Open a commad shell there and use mcumgr to perform DFU.
    For example
    > mcumgr -t 20 --conntype serial --connstring=COM2 image upload <path to>\app_update.bin

Children
Related