commit | a6d89abeb97759484d823ddd23640e1afe14b8c8 | [log] [tgz] |
---|---|---|
author | Christopher Collins <ccollins@apache.org> | Wed May 29 17:23:10 2019 -0700 |
committer | ccollins476ad <ccollins476ad@gmail.com> | Wed Jul 24 09:50:51 2019 -0700 |
tree | f36908472204932e08e40faba608da8bf7988829 | |
parent | ddaff2c5c5bcc81cfe37014607fa8f8769faa792 [diff] |
res: `-j` option to specify payload as JSON Before this commit, the `res` command accepted a payload in the form of `k=v` pairs, e.g., newtmgr res put /my/res a=start dur=1 This commit adds a new option to the `res` command: `-j`. When this option is specified, the CoAP message body is expressed as a JSON string, e.g., newtmgr res -j put /my/res '{"a":"start","dur":1}' This allows for more complex payloads, and it removes ambiguity about what data types are used.
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
Build the newtmgr tool as follows:
apache-mynewt-newtmgr-1.3.0
directory to $GOPATH/src/mynewt.apache.org/newtmgr
cd $GOPATH/src/mynewt.apache.org/newtmgr/newtmgr
go build