commit | 982b276df3a27ea9ad2e1e90f85efbf3909a3f6e | [log] [tgz] |
---|---|---|
author | Fabio Utzig <utzig@apache.org> | Thu Aug 01 13:59:22 2019 -0300 |
committer | Fabio Utzig <utzig@utzig.org> | Thu Aug 01 14:21:16 2019 -0300 |
tree | 620c0db87688a2fff4626374faefcdb2e28546a1 | |
parent | 23bb47cf765ea2522e0a008bf63af39c70f6e59a [diff] |
Update newtmgr dependency apache/mynewt-newtmgr was recently updated to use a newer version of tarm/serial module, which fixes and issue doing serial flush on ARM. This should fix: https://github.com/apache/mynewt-mcumgr-cli/issues/1
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.
Build the mcumgr tool as follows:
apache-mynewt-mcumgr-1.3.0
directory to $GOPATH/src/mynewt.apache.org/mcumgr
cd $GOPATH/src/mynewt.apache.org/mcumgr/mcumgr
go build
Here are some example mcumgr
invocations.
The following sends an echo command to a Bluetooth device advertising the name “Zephyr”:
mcumgr --conntype ble --connstring peer_name=Zephyr echo hello
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