### Install mcumgr CLI (Go < 1.18) Source: https://github.com/apache/mynewt-mcumgr/blob/master/README.md Use this command to install the mcumgr CLI tool if you are using Go version less than 1.18. ```bash $ go get github.com/apache/mynewt-mcumgr-cli/mcumgr ``` -------------------------------- ### Install mcumgr CLI (Go >= 1.18) Source: https://github.com/apache/mynewt-mcumgr/blob/master/README.md Use this command to install the mcumgr CLI tool if you are using Go version 1.18 or later. ```bash $ go install github.com/apache/mynewt-mcumgr-cli/mcumgr@latest ``` -------------------------------- ### Run Mynewt Application Source: https://github.com/apache/mynewt-mcumgr/blob/master/samples/smp_svr/README.md Build, upload, and execute the application on the target board. ```bash $ newt run smp_svr-nrf52dk ``` -------------------------------- ### Build Zephyr Application Source: https://github.com/apache/mynewt-mcumgr/blob/master/samples/smp_svr/README.md Compile the smp_svr sample application using CMake and Make. ```bash $ cd samples/smp_svr/zephyr $ mkdir build && cd build $ cmake .. $ make ``` -------------------------------- ### Build smp_svr sample Source: https://github.com/apache/mynewt-mcumgr/blob/master/samples/smp_svr/zephyr/README.rst Build the smp_svr application for the nRF52 DK board. ```zephyr-app-commands :zephyr-app: samples/subsys/mgmt/mcumgr/smp_svr :board: nrf52_pca10040 :build-dir: nrf52_pca10040 :goals: build ``` -------------------------------- ### Flash MCUboot using build tools Source: https://github.com/apache/mynewt-mcumgr/blob/master/samples/smp_svr/zephyr/README.rst Flash the MCUboot image using standard build system commands. ```console make flash # or ninja flash ``` -------------------------------- ### Sign the application image Source: https://github.com/apache/mynewt-mcumgr/blob/master/samples/smp_svr/zephyr/README.rst Use imgtool.py to sign the application binary or hex file for MCUboot. ```console ~/src/mcuboot/scripts/imgtool.py sign \ --key ~/src/mcuboot/root-rsa-2048.pem \ --header-size 0x200 \ --align 8 \ --version 1.0 \ --slot-size \ signed.(bin|hex) ``` -------------------------------- ### Test SMP server with mcumgr Source: https://github.com/apache/mynewt-mcumgr/blob/master/samples/smp_svr/zephyr/README.rst Verify the SMP server is running by sending an echo command via BLE. ```console sudo mcumgr --conntype ble --connstring ctlr_name=hci0,peer_name='Zephyr' echo hello hello ``` -------------------------------- ### Test Application with mcumgr CLI Source: https://github.com/apache/mynewt-mcumgr/blob/master/samples/smp_svr/README.md Verify the application is running by sending an echo command. ```bash $ mcumgr --conntype ble --connstring peer_name=Zephyr echo hello hello ``` -------------------------------- ### Upload MCUboot via GDB Source: https://github.com/apache/mynewt-mcumgr/blob/master/samples/smp_svr/README.md Use GDB to restore the binary to the board memory. ```gdb restore binary 0 ``` -------------------------------- ### Flash signed image using nrfjprog Source: https://github.com/apache/mynewt-mcumgr/blob/master/samples/smp_svr/zephyr/README.rst Program the signed hex file to the board using nrfjprog. ```console nrfjprog --program ``` -------------------------------- ### Test image for swap Source: https://github.com/apache/mynewt-mcumgr/blob/master/samples/smp_svr/zephyr/README.rst Instruct MCUboot to test the image in slot-1, triggering a swap on the next reset. ```console sudo mcumgr --conntype ble --connstring ctlr_name=hci0,peer_name='Zephyr' image test ``` -------------------------------- ### Sign Zephyr Image with imgtool Source: https://github.com/apache/mynewt-mcumgr/blob/master/samples/smp_svr/README.md Convert the binary into an MCUboot-compatible signed image. ```bash ~/repos/mcuboot/scripts/imgtool.py sign \ --header-size 0x200 \ --align 8 \ --version 1.0 \ --included-header \ --key ~/repos/mcuboot/root-rsa-2048.pem \ signed.img ``` -------------------------------- ### List Images on Device Source: https://github.com/apache/mynewt-mcumgr/blob/master/protocol.md Use this command to list images present on the target device. It utilizes commands from the IMAGE group (0x01). ```bash $ mcumgr -l DEBUG -c serial image list 2016/11/11 12:25:51 [DEBUG] Writing newtmgr request &{Op:0 Flags:0 Len:0 Group:1 Seq:0 Id:0 Data:[]} 2016/11/11 12:25:51 [DEBUG] Serializing request &{Op:0 Flags:0 Len:0 Group:1 Seq:0 Id:0 Data:[]} into buffer [0 0 0 0 0 1 0 0] 2016/11/11 12:25:51 [DEBUG] Tx packet dump: 00000000 00 00 00 00 00 01 00 00 |........| 2016/11/11 12:25:51 [DEBUG] Writing [6 9] to data channel 2016/11/11 12:25:51 [DEBUG] Writing [65 65 111 65 65 65 65 65 65 65 69 65 65 68 99 119] to data channel 2016/11/11 12:25:51 [DEBUG] Writing [10] to data channel 2016/11/11 12:25:51 [DEBUG] Reading [6 9 65 65 111 65 65 65 65 65 65 65 69 65 65 68 99 119] from data channel 2016/11/11 12:25:51 [DEBUG] Rx packet dump: 00000000 00 00 00 00 00 01 00 00 |........| 2016/11/11 12:25:51 [DEBUG] Deserialized response &{Op:0 Flags:0 Len:0 Group:1 Seq:0 Id:0 Data:[]} 2016/11/11 12:25:51 [DEBUG] Reading [13] from data channel 2016/11/11 12:25:51 [DEBUG] Reading [6 9 65 73 85 66 65 81 66 55 65 65 69 65 65 76 57 109 97 87 49 104 90 50 86 122 110 55 57 107 99 50 120 118 100 65 66 110 100 109 86 121 99 50 108 118 98 109 85 119 76 106 77 117 77 71 82 111 89 88 78 111 87 67 68 83 84 76 77 70 69 49 81 88 75 55 85 81 110 53 121 48 114 110 104 104 50 87 49 113 47 102 120 71 50 48 103 115 54 121 48 48 113 75 101 79 48 71 104 105 98 50 57 48 89 87 74 115 90 102 86 110 99 71 86 117 90 71 108 117] from data channel 2016/11/11 12:25:51 [DEBUG] Reading [4 20 90 47 82 112 89 50 57 117 90 109 108 121 98 87 86 107 57 87 90 104 89 51 82 112 100 109 88 49 47 47 57 114 99 51 66 115 97 88 82 84 100 71 70 48 100 88 77 65 47 49 78 116] from data channel 2016/11/11 12:25:51 [DEBUG] Rx packet dump: 00000000 01 01 00 7b 00 01 00 00 bf 66 69 6d 61 67 65 73 |...{.....fimages| 00000010 9f bf 64 73 6c 6f 74 00 67 76 65 72 73 69 6f 6e |..dslot.gversion| 00000020 65 30 2e 33 2e 30 64 68 61 73 68 58 20 d2 4c b3 |e0.3.0dhashX .L.| 00000030 05 13 54 17 2b b5 10 9f 9c b4 ae 78 61 d9 6d 6a |..T.+......xa.mj| 00000040 fd fc 46 db 48 2c eb 2d 34 a8 a7 8e d0 68 62 6f |..F.H,.-4....hbo| 00000050 6f 74 61 62 6c 65 f5 67 70 65 6e 64 69 6e 67 f4 |otable.gpending.| 00000060 69 63 6f 6e 66 69 72 6d 65 64 f5 66 61 63 74 69 |iconfirmed.facti| 00000070 76 65 f5 ff ff 6b 73 70 6c 69 74 53 74 61 74 75 |ve...ksplitStatu| 00000080 73 00 ff |s..| 2016/11/11 12:25:51 [DEBUG] Deserialized response &{Op:1 Flags:1 Len:123 Group:1 Seq:0 Id:0 Data:[191 102 105 109 97 103 101 115 159 191 100 115 108 111 116 0 103 118 101 114 115 105 111 110 101 48 46 51 46 48 100 104 97 115 104 88 32 210 76 179 5 19 84 23 43 181 16 159 156 180 174 120 97 217 109 106 253 252 70 219 72 44 235 45 52 168 167 142 208 104 98 111 111 116 97 98 108 101 245 103 112 101 110 100 105 110 103 244 105 99 111 110 102 105 114 109 101 100 245 102 97 99 116 105 118 101 245 255 255 107 115 112 108 105 116 83 116 97 116 117 115 0 255]} Images: slot=0 version: 0.3.0 bootable: true flags: active confirmed hash: d24cb3051354172bb5109f9cb4ae7861d96d6afdfc46db482ceb2d34a8a78ed0 Split status: N/A ``` -------------------------------- ### Enable MCUboot in prj.conf Source: https://github.com/apache/mynewt-mcumgr/blob/master/samples/smp_svr/zephyr/README.rst Add this configuration to the project's prj.conf file to enable MCUboot support. ```console CONFIG_BOOTLOADER_MCUBOOT=y ``` -------------------------------- ### Configure Mynewt Repository Source: https://github.com/apache/mynewt-mcumgr/blob/master/samples/smp_svr/README.md Add the mcumgr repository to your project.yml file. ```yaml repository.mynewt-mcumgr: type: git vers: 0-latest url: 'git@github.com:apache/mynewt-mcumgr.git' ``` -------------------------------- ### Create and Set Mynewt Target Source: https://github.com/apache/mynewt-mcumgr/blob/master/samples/smp_svr/README.md Define a new target for the smp_svr application using the newt tool. ```bash $ newt target create smp_svr-nrf52dk $ newt target set smp_svr-nrf52dk app=@mynewt-mcumgr/samples/smp_svr/apache \ bsp=@apache-mynewt-core/hw/bsp/nrf52dk \ build_profile=debug ``` -------------------------------- ### List images on target Source: https://github.com/apache/mynewt-mcumgr/blob/master/samples/smp_svr/zephyr/README.rst Retrieve the status and hash values of images currently stored in slot-0 and slot-1. ```console sudo mcumgr --conntype ble --connstring ctlr_name=hci0,peer_name='Zephyr' image list ``` -------------------------------- ### Serial Taskstats Command Execution and Packet Dump Source: https://github.com/apache/mynewt-mcumgr/blob/master/protocol.md Demonstrates the execution of the `taskstats` command via serial and shows the transmitted packet dump. This helps in understanding the low-level communication. ```log $ mcumgr -l DEBUG -c serial taskstats 2016/11/11 12:45:44 [DEBUG] Writing newtmgr request &{Op:0 Flags:0 Len:0 Group:0 Seq:0 Id:2 Data:[]} 2016/11/11 12:45:44 [DEBUG] Serializing request &{Op:0 Flags:0 Len:0 Group:0 Seq:0 Id:2 Data:[]} into buffer [0 0 0 0 0 0 0 2] 2016/11/11 12:45:44 [DEBUG] Tx packet dump: 00000000 00 00 00 00 00 00 00 02 |........| 2016/11/11 12:45:44 [DEBUG] Writing [6 9] to data channel 2016/11/11 12:45:44 [DEBUG] Writing [65 65 111 65 65 65 65 65 65 65 65 65 65 105 66 67] to data channel 2016/11/11 12:45:44 [DEBUG] Writing [10] to data channel 2016/11/11 12:45:44 [DEBUG] Reading [6 9 65 65 111 65 65 65 65 65 65 65 65 65 65 105 66 67] from data channel 2016/11/11 12:45:44 [DEBUG] Rx packet dump: 00000000 00 00 00 00 00 00 00 02 |........| 2016/11/11 12:45:44 [DEBUG] Deserialized response &{Op:0 Flags:0 Len:0 Group:0 Seq:0 Id:2 Data:[]} 2016/11/11 12:45:44 [DEBUG] Reading [13] from data channel 2016/11/11 12:45:44 [DEBUG] Reading [6 9 65 90 119 66 65 81 71 83 65 65 65 65 65 114 57 105 99 109 77 65 90 88 82 104 99 50 116 122 118 50 82 112 90 71 120 108 118 50 82 119 99 109 108 118 71 80 57 106 100 71 108 107 65 71 86 122 100 71 70 48 90 81 70 109 99 51 82 114 100 88 78 108 71 66 108 109 99 51 82 114 99 50 108 54 71 69 66 109 89 51 78 51 89 50 53 48 71 103 65 85 102 109 112 110 99 110 86 117 100 71 108 116 90 82 101 65 69 53 120 80 98 71 120 104 99 51 82 102] from data channel 2016/11/11 12:45:44 [DEBUG] Reading [4 20 89 50 104 108 89 50 116 112 98 103 66 115 98 109 86 52 100 70 57 106 97 71 86 106 97 50 108 117 65 80 57 109 89 109 120 108 88 50 120 115 118 50 82 119 99 109 108 118 65 71 78 48 97 87 81 66 90 88 78 48 89 88 82 108 65 109 90 122 100 71 116 49 99 50 85 89 79 109 90 122 100 71 116 122 97 88 111 89 85 71 90 106 99 51 100 106 98 110 81 90 54 112 120 110 99 110 86 117 100 71 108 116 90 82 107 74 82 87 120 115 89 88 78 48 88 50 78 111] from data channel 2016/11/11 12:45:44 [DEBUG] Reading [4 20 90 87 78 114 97 87 52 65 98 71 53 108 101 72 82 102 89 50 104 108 89 50 116 112 98 103 68 47 98 109 74 115 90 88 86 104 99 110 82 102 89 110 74 112 90 71 100 108 118 50 82 119 99 109 108 118 66 87 78 48 97 87 81 67 90 88 78 48 89 88 82 108 65 87 90 122 100 71 116 49 99 50 85 89 72 50 90 122 100 71 116 122 97 88 111 90 65 81 66 109 89 51 78 51 89 50 53 48 71 103 65 84 113 89 78 110 99 110 86 117 100 71 108 116 90 81 66 115] from data channel 2016/11/11 12:45:44 [DEBUG] Reading [4 20 98 71 70 122 100 70 57 106 97 71 86 106 97 50 108 117 65 71 120 117 90 88 104 48 88 50 78 111 90 87 78 114 97 87 52 65 47 50 100 105 98 71 86 119 99 110 66 111 118 50 82 119 99 109 108 118 65 87 78 48 97 87 81 68 90 88 78 48 89 88 82 108 65 87 90 122 100 71 116 49 99 50 85 89 48 50 90 122 100 71 116 122 97 88 111 90 65 86 66 109 89 51 78 51 89 50 53 48 71 81 113 68 90 51 74 49 98 110 82 112 98 87 85 69 98 71 120 104] from data channel 2016/11/11 12:45:44 [DEBUG] Reading [4 20 99 51 82 102 89 50 104 108 89 50 116 112 98 103 66 115 98 109 86 52 100 70 57 106 97 71 86 106 97 50 108 117 65 80 47 47 47 56 85 88] from data channel ``` -------------------------------- ### Visualize SMP Little Endian Frame Source: https://github.com/apache/mynewt-mcumgr/blob/master/protocol.md Bit-level diagram of the SMP frame header in Little Endian format. ```text 0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | OP | Res. | Flags | Length | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Group ID | Sequence | Command ID | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ ``` -------------------------------- ### Confirm image swap Source: https://github.com/apache/mynewt-mcumgr/blob/master/samples/smp_svr/zephyr/README.rst Make the image swap permanent by confirming the new image. ```console sudo mcumgr --conntype ble --connstring ctlr_name=hci0,peer_name='Zephyr' image confirm ``` -------------------------------- ### Flash signed image using GDB Source: https://github.com/apache/mynewt-mcumgr/blob/master/samples/smp_svr/zephyr/README.rst Restore the signed binary file to the specific slot-0 address using GDB. ```console restore binary 0xc000 ``` -------------------------------- ### Define NMP Header Structure Source: https://github.com/apache/mynewt-mcumgr/blob/master/protocol.md Go structure representing the legacy NMP header format used by newtmgr. ```go type NmpHdr struct { Op uint8 /* 3 bits of opcode */ Flags uint8 Len uint16 Group uint16 Seq uint8 Id uint8 } ``` -------------------------------- ### Define Target Include Directories Source: https://github.com/apache/mynewt-mcumgr/blob/master/cmd/fs_mgmt/CMakeLists.txt Specifies the include directories for the MCUMGR target. Use this to add header file paths. ```cmake target_include_directories(MCUMGR INTERFACE include ) ``` -------------------------------- ### Configure Zephyr Environment Variables Source: https://github.com/apache/mynewt-mcumgr/blob/master/samples/smp_svr/README.md Set necessary environment variables for the Zephyr build process. ```bash export ZEPHYR_TOOLCHAIN_VARIANT=gccarmemb export BOARD=nrf52_pca10040 export GCCARMEMB_TOOLCHAIN_PATH=/usr/local/Caskroom/gcc-arm-embedded/6-2017-q2-update/gcc-arm-none-eabi-6-2017-q2-update ``` -------------------------------- ### Configure MCUMGR Include Directories Source: https://github.com/apache/mynewt-mcumgr/blob/master/cmd/stat_mgmt/CMakeLists.txt Sets the interface include directory for the MCUMGR target. ```cmake target_include_directories(MCUMGR INTERFACE include ) ``` -------------------------------- ### Upload Signed Image via GDB Source: https://github.com/apache/mynewt-mcumgr/blob/master/samples/smp_svr/README.md Upload the signed image to the specified memory address. ```gdb restore binary 0xc000 ``` -------------------------------- ### Configure mcumgr dependencies for Mynewt Source: https://github.com/apache/mynewt-mcumgr/blob/master/README-mynewt.md Add these dependencies to your application or target configuration to enable SMP transfer encoding, Bluetooth and shell transports, and built-in command handlers. ```yaml - '@apache-mynewt-core/mgmt/smp/transport/ble' - '@apache-mynewt-core/mgmt/smp/transport/smp_shell' - '@mynewt-mcumgr/cmd/fs_mgmt' - '@mynewt-mcumgr/cmd/img_mgmt' - '@mynewt-mcumgr/cmd/os_mgmt' - '@mynewt-mcumgr/smp' ``` -------------------------------- ### Upload image over BLE Source: https://github.com/apache/mynewt-mcumgr/blob/master/samples/smp_svr/zephyr/README.rst Upload a signed binary image to the target device using BLE connection parameters. ```console sudo mcumgr --conntype ble --connstring ctlr_name=hci0,peer_name='Zephyr' image upload signed.bin ``` -------------------------------- ### Define SMP Opcode Constants Source: https://github.com/apache/mynewt-mcumgr/blob/master/protocol.md C preprocessor definitions for SMP operation codes. ```c /** Opcodes; encoded in first byte of header. */ #define MGMT_OP_READ 0 #define MGMT_OP_READ_RSP 1 #define MGMT_OP_WRITE 2 #define MGMT_OP_WRITE_RSP 3 ``` -------------------------------- ### Specify Zephyr Library Sources Source: https://github.com/apache/mynewt-mcumgr/blob/master/cmd/fs_mgmt/CMakeLists.txt Lists the C source files for the Zephyr-based MCUMgr library. Ensure these files are correctly placed within the project structure. ```cmake zephyr_library_sources( port/zephyr/src/zephyr_fs_mgmt.c src/fs_mgmt.c src/stubs.c ) ``` -------------------------------- ### Configure MCUMGR CMake build Source: https://github.com/apache/mynewt-mcumgr/blob/master/CMakeLists.txt Defines the MCUMGR interface library and includes necessary subdirectories for the build process. ```cmake if(CONFIG_MCUMGR) zephyr_interface_library_named(MCUMGR) zephyr_library() add_subdirectory(cborattr) add_subdirectory(cmd) add_subdirectory(mgmt) add_subdirectory(smp) add_subdirectory(util) zephyr_library_link_libraries(MCUMGR) target_link_libraries(MCUMGR INTERFACE zephyr_interface ) endif() ``` -------------------------------- ### Register MCUMGR Source Files Source: https://github.com/apache/mynewt-mcumgr/blob/master/cmd/stat_mgmt/CMakeLists.txt Adds specific source files to the Zephyr library build process. ```cmake zephyr_library_sources( port/zephyr/src/zephyr_stat_mgmt.c src/stat_mgmt.c src/stubs.c ) ``` -------------------------------- ### Taskstats Command Request Structure Source: https://github.com/apache/mynewt-mcumgr/blob/master/protocol.md Illustrates the structure of a `taskstats` read request before serialization. This format is used internally by mcumgr. ```text Op: 0 # NMGR_OP_READ Flags: 0 Len: 0 # No payload present Group: 0 # 0x00 = NMGR_GROUP_ID_DEFAULT Seq: 0 Id: 2 # 0x02 in group 0x00 = OS_MGMT_ID_TASKSTAT Data: [] # No payload (len = 0 above) ``` -------------------------------- ### Reset device remotely Source: https://github.com/apache/mynewt-mcumgr/blob/master/samples/smp_svr/zephyr/README.rst Trigger a remote reset of the device to initiate the image swap process. ```console sudo mcumgr --conntype ble --connstring ctlr_name=hci0,peer_name='Zephyr' reset ``` -------------------------------- ### Define SMP Management Header Structure Source: https://github.com/apache/mynewt-mcumgr/blob/master/protocol.md C structure representing the SMP frame header with conditional endianness support. ```c struct mgmt_hdr { #if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ uint8_t nh_op:3; /* MGMT_OP_[...] */ uint8_t _res1:5; #endif #if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ uint8_t _res1:5; uint8_t nh_op:3; /* MGMT_OP_[...] */ #endif uint8_t nh_flags; /* Reserved for future flags */ uint16_t nh_len; /* Length of the payload */ uint16_t nh_group; /* MGMT_GROUP_ID_[...] */ uint8_t nh_seq; /* Sequence number */ uint8_t nh_id; /* Message ID within group */ }; ``` -------------------------------- ### Serialized Image List Request Source: https://github.com/apache/mynewt-mcumgr/blob/master/protocol.md This is the raw byte representation of the 'image list' request when serialized for transmission. ```hex 0x00 0x00 0x00 0x00 0x00 0x01 0x00 0x00 ``` -------------------------------- ### Taskstats Command Response Packet Dump Source: https://github.com/apache/mynewt-mcumgr/blob/master/protocol.md Displays the received packet dump for the `taskstats` command, showing the raw data returned by the device. This is useful for debugging and understanding the response format. ```hex 00000000 01 01 01 92 00 00 00 02 bf 62 72 63 00 65 74 61 |.........brc.eta| 00000010 73 6b 73 bf 64 69 64 6c 65 bf 64 70 72 69 6f 18 |sks.didle.dprio.| 00000020 ff 63 74 69 64 00 65 73 74 61 74 65 01 66 73 74 |.ctid.estate.fst| 00000030 6b 75 73 65 18 19 66 73 74 6b 73 69 7a 18 40 66 |kuse..fstksiz.@f| 00000040 63 73 77 63 6e 74 1a 00 14 7e 6a 67 72 75 6e 74 |cswcnt...~jgrunt| 00000050 69 6d 65 1a 00 13 9c 4f 6c 6c 61 73 74 5f 63 68 |ime....Ollast_ch| 00000060 65 63 6b 69 6e 00 6c 6e 65 78 74 5f 63 68 65 63 |eckin.lnext_chec| 00000070 6b 69 6e 00 ff 66 62 6c 65 5f 6c 6c bf 64 70 72 |kin..fble_ll.dpr| 00000080 69 6f 00 63 74 69 64 01 65 73 74 61 74 65 02 66 |io.ctid.estate.f| 00000090 73 74 6b 75 73 65 18 3a 66 73 74 6b 73 69 7a 18 |stkuse.:fstksiz.| 000000a0 50 66 63 73 77 63 6e 74 19 ea 9c 67 72 75 6e 74 |Pfcswcnt...grunt| 000000b0 69 6d 65 19 09 45 6c 6c 61 73 74 5f 63 68 65 63 |ime..Ellast_chec| 000000c0 6b 69 6e 00 6c 6e 65 78 74 5f 63 68 65 63 6b 69 |kin.lnext_checki| 000000d0 6e 00 ff 6e 62 6c 65 75 61 72 74 5f 62 72 69 64 |n..nbleuart_brid| ``` -------------------------------- ### SMP GATT Characteristic Source: https://github.com/apache/mynewt-mcumgr/blob/master/transport/smp-bluetooth.md Details regarding the SMP service UUID and the mandatory GATT characteristic properties for SMP communication. ```APIDOC ## SMP GATT Characteristic ### Description The SMP service uses a single GATT characteristic for both requests and responses. Requests are sent via GATT Write or Write Without Response, while responses are delivered via GATT Notifications. ### Service UUID 8D53DC1D-1DB7-4CD3-868B-8A527460AA84 ### Characteristic Properties - **Write**: Mandatory - **WriteWithoutResponse**: Mandatory - **Notify**: Mandatory ### Fragmentation If a request or response exceeds the MTU, it is fragmented across multiple GATT commands. The SMP header in the first fragment contains the necessary information for reassembly. ``` -------------------------------- ### Serialized Taskstats Request Source: https://github.com/apache/mynewt-mcumgr/blob/master/protocol.md The byte representation of the `taskstats` read request after serialization. This is the actual data sent over the communication channel. ```hex 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x02 ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.