Code Monkey home page Code Monkey logo

mynewt-mcumgr-cli's Introduction

mcumgr

MCU Manager (mcumgr) is the application tool that enables a user to communicate with and manage remote devices running an mcumgr server.

The mcumgr tool is a thin wrapper over the Apache newtmgr tool. Thus, the newtmgr documentation provides some useful help with using the mcumgr tool.

Building

Build the mcumgr tool as follows:

  1. Unpack mcumgr source.
  2. Rename resulting apache-mynewt-mcumgr-1.3.0 directory to $GOPATH/src/mynewt.apache.org/mcumgr
  3. cd $GOPATH/src/mynewt.apache.org/mcumgr/mcumgr
  4. go build

Examples

Here are some example mcumgr invocations.

Send an echo command over Bluetooth

The following sends an echo command to a Bluetooth device advertising the name "Zephyr":

mcumgr --conntype ble --connstring peer_name=Zephyr echo hello

Upgrade firmware over Bluetooth

This series of commands performs an image upgrade over Bluetooth. The device is assumed to be advertising the name "Zephyr".

# 1. Query device for its current image list.
mcumgr --conntype ble --connstring 'peer_name=Zephyr' image list

# 2. Upload new image to device.
mcumgr --conntype ble --connstring 'peer_name=Zephyr' image upload <filename>

# 3. Tell the device to run the new image on its next boot ("test" the new
#    image).
mcumgr --conntype ble --connstring 'peer_name=Zephyr' image test <image-hash>

# 4. Reboot the device.
mcumgr --conntype ble --connstring 'peer_name=Zephyr' reset

# 5. Query device for its current image list; ensure new image is running.
mcumgr --conntype ble --connstring 'peer_name=Zephyr' image list

# 6. Make the image swap permanent.
mcumgr --conntype ble --connstring 'peer_name=Zephyr' image confirm

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.