image: Multiple rounds of chunklen reduction

Prior to this commit, newtmgr determined how many bytes of image data to
include in an upload request as follows:

1. Choose a large number to start (512).
2. Encode the upload request into CoAP (+ optional security).
3. Compare the size of request to the transport's MTU. If the request is
too large, subtract the difference from the chunk length.

This commit changes the above procedure such that it runs in a loop.
After reducing the chunk length, a new request is encoded and its length
is compared to the MTU.  The loop executes until the encoded request
fits within the MTU.
1 file changed
tree: c63d01feafbe37629fca7c5f1343508115d21e24
  1. docs/
  2. newtmgr/
  3. nmxact/
  4. vendor/
  5. .gitignore
  6. .rat-excludes
  7. Gopkg.lock
  8. Gopkg.toml
  9. LICENSE
  10. Makefile
  11. NOTICE
  12. README.md
  13. RELEASE_NOTES.md
README.md

Newtmgr

Newt Manager (newtmgr) is the application tool that enables a user to communicate with and manage remote devices running the Mynewt OS. It uses a connection profile to establish a connection with a device and sends command requests to the device. The newtmgr tool documentation can be found under /docs which are published at http://mynewt.apache.org/latest/os/modules/devmgmt/newtmgr.html

Building

Build the newtmgr tool as follows:

  1. Unpack newtmgr source.
  2. Rename resulting apache-mynewt-newtmgr-1.3.0 directory to $GOPATH/src/mynewt.apache.org/newtmgr
  3. cd $GOPATH/src/mynewt.apache.org/newtmgr/newtmgr
  4. go build