snapshot: Update mcumgr to commit 12b496e3 from the upstream
The commit applies changes that have appeared between the last snapshot update from the upstream: apache/mynewt-mcumgr 47fdde0c9a2bac821d2a814541e31d734dd78866 and the current top of the upstream: apache/mynewt-mcumgr 12b496e37caf20a45ab5aee4209b06c5d79ef9b1
Signed-off-by: Dominik Ermel dominik.ermel@nordicsemi.no
版权所有:中国计算机学会技术支持:开源发展技术委员会
京ICP备13000930号-9
京公网安备 11010802032778号
mcumgr
This is mcumgr, version 0.2.0
mcumgr is a management library for 32-bit MCUs. The goal of mcumgr is to define a common management infrastructure with pluggable transport and encoding components. In addition, mcumgr provides definitions and handlers for some core commands: image management, file system management, and OS management.
mcumgr is operating system and hardware independent. It relies on hardware porting layers from the operating system it runs on. Currently, mcumgr runs on both the Apache Mynewt and Zephyr operating systems.
Getting started
For tips on using mcumgr with your particular OS, see the appropriate file from the list below:
Dependencies
To use mcumgr’s image management support, your device must be running version 1.1.0 or later of the MCUboot boot loader. The other mcumgr features do not require MCUboot.
Command line tool
The
mcumgrcommand line tool is available at: https://github.com/apache/mynewt-mcumgr-cli. The command line tool requires Go 1.12 or later. Once Go is installed and set up on your system, you can install the mcumgr CLI tool by issuing the followinggo getcommand:The
mcumgrtool allows you to manage devices running an mcumgr server.Architecture
The mcumgr stack has the following layout:
Items enclosed in angled brackets represent generic components that can be plugged into mcumgr. The items in this stack diagram are defined below:
Each transport is configured with a single transfer encoding.
As an example, the sample application
smp_svruses the following components:img_mgmt)fs_mgmt)log_mgmt)os_mgmt)yielding the following stack diagram:
Command definition
An mcumgr request or response consists of the following two components:
How these two components are encoded and parsed depends on the transfer encoding used.
The mcumgr header structure is defined in
mgmt/include/mgmt/mgmt.hasstruct mgmt_hdr.The contents of the CBOR key-value map are specified per command type.
Supported transfer encodings
Mcumgr comes with one built-in transfer encoding: Simple Management Protocol (SMP). SMP requests and responses have a very basic structure. For details, see the comments at the top of
smp/include/smp/smp.h.Supported transports
The mcumgr project defines two transports:
Implementations, being hardware- and OS-specific, are not included.
Browsing
Information and documentation for mcumgr is stored within the source.
For more information in the source, here are some pointers:
mgmtlayer of mcumgr.Joining
Developers welcome!