Socket
Book a DemoInstallSign in
Socket

github.com/bgrid/mynewt-mcumgr-cli

Package Overview
Dependencies
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github.com/bgrid/mynewt-mcumgr-cli

Source
Go Modules
Version
v0.0.0-20191001141923-62a813605b2a
Version published
Created
Source

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:

  • Unpack mcumgr source.
  • Rename resulting apache-mynewt-mcumgr-1.3.0 directory to $GOPATH/src/mynewt.apache.org/mcumgr
  • cd $GOPATH/src/mynewt.apache.org/mcumgr/mcumgr
  • 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

FAQs

Package last updated on 01 Oct 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts