https://github.com/apache/mynewt-mcumgr-cli
MCU Manager CLI
https://github.com/apache/mynewt-mcumgr-cli
mynewt
Last synced: 4 months ago
JSON representation
MCU Manager CLI
- Host: GitHub
- URL: https://github.com/apache/mynewt-mcumgr-cli
- Owner: apache
- License: apache-2.0
- Created: 2018-01-11T16:47:19.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2022-10-04T07:30:47.000Z (over 2 years ago)
- Last Synced: 2025-01-30T10:34:37.583Z (4 months ago)
- Topics: mynewt
- Language: Go
- Homepage: https://mynewt.apache.org/
- Size: 21.5 KB
- Stars: 64
- Watchers: 27
- Forks: 39
- Open Issues: 14
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# mcumgr
MCU Manager (`mcumgr`) is the application tool that enables a user to communicate
with and manage remote devices running an
[mcumgr server](https://github.com/apache/mynewt-mcumgr).The `mcumgr` tool is a thin wrapper over the Apache `newtmgr` tool. Thus, the
[`newtmgr` documentation](http://mynewt.apache.org/latest/newtmgr/index.html)
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# 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# 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
```