newtmgr cli; first image upload chunk smaller, so overall message size stays under 120 characters when sent over serial.
Project: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/commit/c6606bb8 Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/tree/c6606bb8 Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/diff/c6606bb8 Branch: refs/heads/develop Commit: c6606bb80cc7da471d9056d2229490480c521775 Parents: 264a3dd Author: Marko Kiiskila <[email protected]> Authored: Tue May 24 14:43:37 2016 -0700 Committer: Marko Kiiskila <[email protected]> Committed: Tue May 24 14:43:37 2016 -0700 ---------------------------------------------------------------------- newtmgr/cli/image.go | 4 ++++ 1 file changed, 4 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/blob/c6606bb8/newtmgr/cli/image.go ---------------------------------------------------------------------- diff --git a/newtmgr/cli/image.go b/newtmgr/cli/image.go index c85ff4c..51c59f0 100644 --- a/newtmgr/cli/image.go +++ b/newtmgr/cli/image.go @@ -182,6 +182,10 @@ func imageUploadCmd(cmd *cobra.Command, args []string) { if blockSz > 36 { blockSz = 36 } + if currOff == 0 { + blockSz = 33 + } + imageUpload.Offset = currOff imageUpload.Size = imageSz imageUpload.Data = imageFile[currOff : currOff+blockSz]
