services/device_mgmt/mcumgr.html · services/device_mgmt/mcumgr.rst 공식 원문 ↗

Zephyr 3.7.0 · Device Management

MCUmgr

BLE, UART와 UDP를 통해 image, OS, setting, shell과 device 통계를 원격 관리합니다.

Official pathservices/device_mgmt/mcumgr.html
Source fileservices/device_mgmt/mcumgr.rst
Source versionZephyr 3.7.0
TranslationFull · reviewed

본문 기준: Zephyr 3.7.0 LTS3 · 이후 유지보수 패치는 별도입니다.

Part 1

요약·해설

SMP 기반 관리 group, 외부 client 비교, J-Link virtual MSD 충돌과 MCUboot 연동을 설명합니다.

Protocol

SMP

Transports

BLE · UART · UDP

Groups

7 management groups

Part 2

접을 수 있는 영어 원문 전체

영어 원문 전체 펼치기
원문 SHA-256 69E25C405937B31372E6D446B1F896CB8235E9086D48C2F00C9BD24DFBF54858
.. _mcu_mgr:

MCUmgr
#######

Overview
********

The management subsystem allows remote management of Zephyr-enabled devices.
The following management operations are available:

* Image management
* File System management
* OS management
* Settings (config) management
* Shell management
* Statistic management
* Zephyr management

over the following transports:

* BLE (Bluetooth Low Energy)
* Serial (UART)
* UDP over IP

The management subsystem is based on the Simple Management Protocol (SMP)
provided by `MCUmgr`_, an open source project that provides a
management subsystem that is portable across multiple real-time operating
systems.

The management subsystem is located in :zephyr_file:`subsys/mgmt/` inside of
the Zephyr tree.

Additionally, there is a :zephyr:code-sample:`sample <smp-svr>` server that provides
management functionality over BLE and serial.

.. _mcumgr_tools_libraries:

Tools/libraries
***************

There are various tools and libraries available which enable usage of MCUmgr functionality on a
device which are listed below. Note that these tools are not part of or related to the Zephyr
project.

.. only:: html

    .. table:: Tools and Libraries for MCUmgr
        :align: center

        +--------------------------------------------------------------------------------+-------------------------------------------+--------------------------+--------------------------------------------------+---------------+------------+---------+
        | Name                                                                           | OS support                                | Transports               | Groups                                           | Type          | Language   | License |
        |                                                                                +---------+-------+-----+--------+----------+--------+-----------+-----+----+-----+------+----------+----+-------+--------+               |            |         |
        |                                                                                | Windows | Linux | mac | Mobile | Embedded | Serial | Bluetooth | UDP | OS | IMG | Stat | Settings | FS | Shell | Zephyr |               |            |         |
        +================================================================================+=========+=======+=====+========+==========+========+===========+=====+====+=====+======+==========+====+=======+========+===============+============+=========+
        | `AuTerm <https://github.com/thedjnK/AuTerm/>`_                                 | ✓       | ✓     | ✓   | ✕      | ✕        | ✓      | ✓         | ✓   | ✓  | ✓   | ✓    | ✓        | ✓  | ✓     | ✓      | Application   | C++ (Qt)   | GPLv3   |
        +--------------------------------------------------------------------------------+---------+-------+-----+--------+----------+--------+-----------+-----+----+-----+------+----------+----+-------+--------+---------------+------------+---------+
        | `mcumgr-client <https://github.com/vouch-opensource/mcumgr-client/>`_          | ✓       | ✓     | ✓   | ✕      | ✕        | ✓      | ✕         | ✕   | ✕  | ✓   | ✕    | ✕        | ✕  | ✕     | ✕      | Application   | Rust       | BSD     |
        +--------------------------------------------------------------------------------+---------+-------+-----+--------+----------+--------+-----------+-----+----+-----+------+----------+----+-------+--------+---------------+------------+---------+
        | `mcumgr-web <https://github.com/boogie/mcumgr-web/>`_                          | ✓       | ✓     | ✓   | ✕      | ✕        | ✕      | ✓         | ✕   | ✕  | ✓   | ✕    | ✕        | ✕  | ✕     | ✕      | Web page      | Javascript | MIT     |
        |                                                                                |         |       |     |        |          |        |           |     |    |     |      |          |    |       |        | (chrome only) |            |         |
        +--------------------------------------------------------------------------------+---------+-------+-----+--------+----------+--------+-----------+-----+----+-----+------+----------+----+-------+--------+---------------+------------+---------+
        | nRF Connect Device Manager: |br|                                               |         |       |     |        |          |        |           |     |    |     |      |          |    |       |        |               |            |         |
        | `Android                                                                       | ✕       | ✕     | ✕   | ✓      | ✕        | ✕      | ✓         | ✕   | ✓  | ✓   | ✓    | ✓        | ✓  | ✓     | ✓      | Library and   | Java,      | Apache  |
        | <https://github.com/NordicSemiconductor/Android-nRF-Connect-Device-Manager/>`_ |         |       |     |        |          |        |           |     |    |     |      |          |    |       |        | application   | Kotlin,    |         |
        | and `iOS                                                                       |         |       |     |        |          |        |           |     |    |     |      |          |    |       |        |               | Swift      |         |
        | <https://github.com/NordicSemiconductor/IOS-nRF-Connect-Device-Manager>`_      |         |       |     |        |          |        |           |     |    |     |      |          |    |       |        |               |            |         |
        +--------------------------------------------------------------------------------+---------+-------+-----+--------+----------+--------+-----------+-----+----+-----+------+----------+----+-------+--------+---------------+------------+---------+
        | Zephyr MCUmgr client (in-tree)                                                 | ✕       | ✓     | ✕   | ✕      | ✓        | ✓      | ✓         | ✓   | ✓  | ✓   | ✕    | ✕        | ✕  | ✕     | ✕      | Library       | C          | Apache  |
        +--------------------------------------------------------------------------------+---------+-------+-----+--------+----------+--------+-----------+-----+----+-----+------+----------+----+-------+--------+---------------+------------+---------+

.. only:: latex

    .. raw:: latex

       \begin{landscape}

    .. table:: Tools and Libraries for MCUmgr
        :align: center

        +--------------------------------------------------------------------------------+---------------+-----------------+--------------------------------------------------+---------------+------------+
        | Name                                                                           | OS support    | Transports      | Groups                                           | Type          | Language   |
        |                                                                                |               |                 +----+-----+------+----------+----+-------+--------+               |            |
        |                                                                                |               |                 | OS | IMG | Stat | Settings | FS | Shell | Zephyr |               |            |
        +================================================================================+===============+=================+====+=====+======+==========+====+=======+========+===============+============+
        | `AuTerm <https://github.com/thedjnK/AuTerm/>`_                                 | Windows, |br| | Serial, |br|    | ✓  | ✓   | ✓    | ✓        | ✓  | ✓     | ✓      | App           | C++ (Qt)   |
        |                                                                                | Linux, |br|   | Bluetooth, |br| |    |     |      |          |    |       |        |               |            |
        |                                                                                | macOS         | UDP             |    |     |      |          |    |       |        |               |            |
        +--------------------------------------------------------------------------------+---------------+-----------------+----+-----+------+----------+----+-------+--------+---------------+------------+
        | `mcumgr-client <https://github.com/vouch-opensource/mcumgr-client/>`_          | Windows, |br| | Serial          | ✕  | ✓   | ✕    | ✕        | ✕  | ✕     | ✕      | App           | Rust       |
        |                                                                                | Linux, |br|   |                 |    |     |      |          |    |       |        |               |            |
        |                                                                                | macOS         |                 |    |     |      |          |    |       |        |               |            |
        +--------------------------------------------------------------------------------+---------------+-----------------+----+-----+------+----------+----+-------+--------+---------------+------------+
        | `mcumgr-web <https://github.com/boogie/mcumgr-web/>`_                          | Windows, |br| | Bluetooth       | ✕  | ✓   | ✕    | ✕        | ✕  | ✕     | ✕      | Web (chrome   | Javascript |
        |                                                                                | Linux, |br|   |                 |    |     |      |          |    |       |        | only)         |            |
        |                                                                                | macOS         |                 |    |     |      |          |    |       |        |               |            |
        +--------------------------------------------------------------------------------+---------------+-----------------+----+-----+------+----------+----+-------+--------+---------------+------------+
        | nRF Connect Device Manager: |br|                                               | iOS, |br|     | Bluetooth       | ✓  | ✓   | ✓    | ✓        | ✓  | ✓     | ✓      | Library, App  | Java,      |
        | `Android                                                                       | Android       |                 |    |     |      |          |    |       |        |               | Kotlin,    |
        | <https://github.com/NordicSemiconductor/Android-nRF-Connect-Device-Manager/>`_ |               |                 |    |     |      |          |    |       |        |               | Swift      |
        | and `iOS                                                                       |               |                 |    |     |      |          |    |       |        |               |            |
        | <https://github.com/NordicSemiconductor/IOS-nRF-Connect-Device-Manager>`_      |               |                 |    |     |      |          |    |       |        |               |            |
        +--------------------------------------------------------------------------------+---------------+-----------------+----+-----+------+----------+----+-------+--------+---------------+------------+
        | Zephyr MCUmgr client (in-tree)                                                 | Linux, |br|   | Serial, |br|    | ✓  | ✓   | ✕    | ✕        | ✕  | ✕     | ✕      | Library       | C          |
        |                                                                                | Zephyr        | Bluetooth, |br| |    |     |      |          |    |       |        |               |            |
        |                                                                                |               | UDP             |    |     |      |          |    |       |        |               |            |
        +--------------------------------------------------------------------------------+---------------+-----------------+----+-----+------+----------+----+-------+--------+---------------+------------+

    .. raw:: latex

        \end{landscape}

Note that a tick for a particular group indicates basic support for that group in the code, it is
possible that not all commands/features of a group are supported by the implementation.

.. _mcumgr_jlink_ob_virtual_msd:

J-Link Virtual MSD Interaction Note
***********************************

On boards where a J-Link OB is present which has both CDC and MSC (virtual Mass
Storage Device, also known as drag-and-drop) support, the MSD functionality can
prevent MCUmgr commands over the CDC UART port from working due to how USB
endpoints are configured in the J-Link firmware (for example on the
:ref:`Nordic nrf52840dk/nrf52840 board <nrf52840dk_nrf52840>`) because of
limiting the maximum packet size (most likely to occur when using image
management commands for updating firmware). This issue can be
resolved by disabling MSD functionality on the J-Link device, follow the
instructions on :ref:`nordic_segger_msd` to disable MSD support.

Bootloader Integration
**********************

The :ref:`dfu` subsystem integrates the management subsystem with the
bootloader, providing the ability to send and upgrade a Zephyr image to a
device.

Currently only the MCUboot bootloader is supported. See :ref:`mcuboot` for more
information.

.. _MCUmgr: https://github.com/apache/mynewt-mcumgr
.. _MCUboot design: https://github.com/mcu-tools/mcuboot/blob/main/docs/design.md

Discord channel
***************

Developers welcome!

* Discord mcumgr channel: https://discord.com/invite/Ck7jw53nU2

API Reference
*************

.. doxygengroup:: mcumgr_mgmt_api

Part 3

한국어 전문 번역

개요

Management subsystem은 Zephyr device를 원격으로 관리합니다. 다음 operation을 제공합니다.

  • Image management
  • File-system management
  • OS management
  • Settings(configuration) management
  • Shell management
  • Statistics management
  • Zephyr management

지원 transport는 다음과 같습니다.

  • BLE(Bluetooth Low Energy)
  • Serial(UART)
  • UDP over IP

Management subsystem은 여러 RTOS에서 이식 가능한 management subsystem을 제공하는 open-source MCUmgr project의 Simple Management Protocol(SMP)을 기반으로 합니다.

Zephyr tree의 subsys/mgmt/에 구현되어 있습니다. BLE와 serial을 통한 management 기능을 보여 주는 SMP server sample도 제공합니다.

도구와 library

Device의 MCUmgr 기능을 사용하는 여러 도구와 library가 있습니다. 아래 항목은 Zephyr project의 일부가 아니며 Zephyr와 직접 관련된 project도 아닙니다.

MCUmgr 도구와 library
NameOS supportTransportsGroupsTypeLanguageLicense
WindowsLinuxmacOSMobileEmbeddedSerialBluetoothUDPOSIMGStatSettingsFSShellZephyr
AuTerm✓✓✓✕✕✓✓✓✓✓✓✓✓✓✓ApplicationC++ (Qt)GPLv3
mcumgr-client✓✓✓✕✕✓✕✕✕✓✕✕✕✕✕ApplicationRustBSD
mcumgr-web✓✓✓✕✕✕✓✕✕✓✕✕✕✕✕Web page
(Chrome only)
JavaScriptMIT
nRF Connect Device Manager:
Android와 iOS
✕✕✕✓✕✕✓✕✓✓✓✓✓✓✓Library and applicationJava,
Kotlin,
Swift
Apache
Zephyr MCUmgr client (in-tree)✕✓✕✕✓✓✓✓✓✓✕✕✕✕✕LibraryCApache

J-Link Virtual MSD 상호 작용 주의사항

J-Link OB가 있고 CDC와 MSC(virtual Mass Storage Device, drag-and-drop)를 모두 지원하는 board에서는 J-Link firmware의 USB endpoint 설정 때문에 virtual MSD가 CDC UART port를 통한 MCUmgr command를 막을 수 있습니다. Nordic nRF52840 DK 등이 예이며, maximum packet size 제한 때문에 firmware update용 image management command에서 특히 발생하기 쉽습니다.

J-Link device의 MSD 기능을 disable하면 해결할 수 있습니다. nRF52840 DK와 SEGGER MSD disable 안내를 참고합니다.

Bootloader 연동

DFU subsystem은 management subsystem과 bootloader를 연결해 Zephyr image를 device로 보내고 upgrade할 수 있게 합니다.

현재는 MCUboot bootloader만 지원합니다. 자세한 내용은 Device Firmware Upgrade와 MCUboot를 참고합니다.

Discord channel

Developer의 참여를 환영합니다. Discord MCUmgr channel에서 논의할 수 있습니다.

API Reference

원문의 Doxygen group mcumgr_mgmt_api에 MCUmgr management API가 수록됩니다.

Source

출처

영어 원문에는 문단, 문서 지시문, 표, 코드, 코드 심벌, 경로를 그대로 보존했습니다.