There are two issues here: 1. newtmgr tool always includes an extraneous rc:0 key-value pair in its outgoing datetime commands. 2. Server-side, the firmware parses the "rc" value and writes the result to null.
This commit addresses the first issue: Remove the rc entry from the datetime request. 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/42047768 Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/tree/42047768 Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/diff/42047768 Branch: refs/heads/mynewt_1_0_0 Commit: 4204776896b09737d2ffbe9199aef9d99088521c Parents: 0c35824 Author: Christopher Collins <[email protected]> Authored: Sat Mar 4 14:27:45 2017 -0800 Committer: Marko Kiiskila <[email protected]> Committed: Mon Mar 6 13:39:29 2017 -0800 ---------------------------------------------------------------------- newtmgr/protocol/datetime.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/blob/42047768/newtmgr/protocol/datetime.go ---------------------------------------------------------------------- diff --git a/newtmgr/protocol/datetime.go b/newtmgr/protocol/datetime.go index 451b84a..3f213f6 100644 --- a/newtmgr/protocol/datetime.go +++ b/newtmgr/protocol/datetime.go @@ -28,7 +28,7 @@ import ( type DateTime struct { DateTime string `codec:"datetime"` - Return uint64 `codec:"rc"` + Return uint64 `codec:"rc,omitempty"` } func NewDateTime() (*DateTime, error) {
