1## Building and using mcumgr with Apache Mynewt 2 3NOTE: The *mcumgr* library consists of functionality that is already present in 4the `apache-mynewt-core` repo. There is currently no need to use the external 5*mcumgr* library with Mynewt, as the functionality is already built in to the 6OS. To use this library with a Mynewt application, you will need to remove the 7duplicate functionality from your copy of the `apache-mynewt-core` repo. 8 9### Configuration 10 11To use *mcumgr*, your Mynewt app needs to be configured to use: 121. An mcumgr transfer encoding 132. An mcumgr transport 143. (optional) Command handlers. 15 16This is done by adding the necessary dependencies to your app or target. The following list of dependencies adds support for the SMP transfer encoding, the Bluetooth and shell transports, and all the built-in command handlers: 17 18``` 19 - '@apache-mynewt-core/mgmt/smp/transport/ble' 20 - '@apache-mynewt-core/mgmt/smp/transport/smp_shell' 21 - '@mynewt-mcumgr/cmd/fs_mgmt' 22 - '@mynewt-mcumgr/cmd/img_mgmt' 23 - '@mynewt-mcumgr/cmd/os_mgmt' 24 - '@mynewt-mcumgr/smp' 25``` 26 27For an example of an app that uses mcumgr, see the `smp_svr` sample app in `samples/smp_svr/mynewt`. 28 29### Building 30 31With the necessary dependencies in place, your project can be built using the usual `newt build <target-name>` or `newt run <target-name>` 32