You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by cc...@apache.org on 2017/07/14 00:47:24 UTC
[mynewt-newtmgr] branch master updated (d7295d8 -> 40b9104)
This is an automated email from the ASF dual-hosted git repository.
ccollins pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-newtmgr.git.
from d7295d8 newtmgr revendor
new 8557eae nmxact - Use reserved secure OMP UUID.
new bcdca3c newtmgr - Fix "log level_list" command.
new 40b9104 newtmgr revendor
The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
newtmgr/Godeps/Godeps.json | 48 +++++++++++-----------
newtmgr/bll/bll_oic_sesn.go | 11 ++---
newtmgr/cli/log.go | 16 ++++----
.../newtmgr/nmxact/bledefs/bledefs.go | 12 ++++--
.../newtmgr/nmxact/nmble/ble_oic_sesn.go | 14 ++-----
.../mynewt.apache.org/newtmgr/nmxact/nmp/log.go | 2 +-
.../mynewt.apache.org/newtmgr/nmxact/scan/scan.go | 4 +-
nmxact/bledefs/bledefs.go | 12 ++++--
nmxact/nmble/ble_oic_sesn.go | 14 ++-----
nmxact/nmp/log.go | 2 +-
nmxact/scan/scan.go | 4 +-
11 files changed, 65 insertions(+), 74 deletions(-)
--
To stop receiving notification emails like this one, please contact
['"commits@mynewt.apache.org" <co...@mynewt.apache.org>'].
[mynewt-newtmgr] 02/03: newtmgr - Fix "log level_list" command.
Posted by cc...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
ccollins pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-newtmgr.git
commit bcdca3ca5d1bad5730437c0c13abda815187170d
Author: Christopher Collins <cc...@apache.org>
AuthorDate: Thu Jul 13 17:43:48 2017 -0700
newtmgr - Fix "log level_list" command.
The response handler was looking for the wrong field name.
Also, sort response by numeric value.
---
newtmgr/cli/log.go | 16 +++++++++-------
nmxact/nmp/log.go | 2 +-
2 files changed, 10 insertions(+), 8 deletions(-)
diff --git a/newtmgr/cli/log.go b/newtmgr/cli/log.go
index e3a2586..f9accc8 100644
--- a/newtmgr/cli/log.go
+++ b/newtmgr/cli/log.go
@@ -26,10 +26,10 @@ import (
"github.com/spf13/cobra"
+ "mynewt.apache.org/newt/util"
"mynewt.apache.org/newtmgr/newtmgr/nmutil"
"mynewt.apache.org/newtmgr/nmxact/nmp"
"mynewt.apache.org/newtmgr/nmxact/xact"
- "mynewt.apache.org/newt/util"
)
func logShowCmd(cmd *cobra.Command, args []string) {
@@ -182,15 +182,17 @@ func logLevelListCmd(cmd *cobra.Command, args []string) {
return
}
- names := make([]string, 0, len(sres.Rsp.Map))
- for k, _ := range sres.Rsp.Map {
- names = append(names, k)
+ vals := make([]int, 0, len(sres.Rsp.Map))
+ revmap := make(map[int]string, len(sres.Rsp.Map))
+ for name, val := range sres.Rsp.Map {
+ vals = append(vals, val)
+ revmap[val] = name
}
- sort.Strings(names)
+ sort.Ints(vals)
fmt.Printf("available levels:\n")
- for _, name := range names {
- fmt.Printf(" %s: %d\n", name, sres.Rsp.Map[name])
+ for _, val := range vals {
+ fmt.Printf(" %d: %s\n", val, revmap[val])
}
}
diff --git a/nmxact/nmp/log.go b/nmxact/nmp/log.go
index e03376f..b2b34a7 100644
--- a/nmxact/nmp/log.go
+++ b/nmxact/nmp/log.go
@@ -215,7 +215,7 @@ type LogLevelListReq struct {
type LogLevelListRsp struct {
NmpBase
Rc int `codec:"rc" codec:",omitempty"`
- Map map[string]int `codec:"module_map"`
+ Map map[string]int `codec:"level_map"`
}
func NewLogLevelListReq() *LogLevelListReq {
--
To stop receiving notification emails like this one, please contact
"commits@mynewt.apache.org" <co...@mynewt.apache.org>.
[mynewt-newtmgr] 01/03: nmxact - Use reserved secure OMP UUID.
Posted by cc...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
ccollins pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-newtmgr.git
commit 8557eae5fc73a1f6408fc7ce96f4400d72656bee
Author: Christopher Collins <cc...@apache.org>
AuthorDate: Wed Jul 12 18:31:40 2017 -0700
nmxact - Use reserved secure OMP UUID.
---
newtmgr/bll/bll_oic_sesn.go | 11 ++++-------
nmxact/bledefs/bledefs.go | 12 ++++++++----
nmxact/nmble/ble_oic_sesn.go | 14 +++-----------
nmxact/scan/scan.go | 4 ++--
4 files changed, 17 insertions(+), 24 deletions(-)
diff --git a/newtmgr/bll/bll_oic_sesn.go b/newtmgr/bll/bll_oic_sesn.go
index f94fdb0..19fd6c3 100644
--- a/newtmgr/bll/bll_oic_sesn.go
+++ b/newtmgr/bll/bll_oic_sesn.go
@@ -75,10 +75,9 @@ func (bos *BllOicSesn) discoverAll() error {
return err
}
- iotivitySvcUuid, _ := bledefs.ParseUuid(bledefs.IotivitySvcUuid)
- ompSvcUuid := bledefs.BleUuid{U16: bledefs.OmpSvcUuid}
- reqChrUuid, _ := bledefs.ParseUuid(bledefs.OmpReqChrUuid)
- rspChrUuid, _ := bledefs.ParseUuid(bledefs.OmpRspChrUuid)
+ ompUnsecSvcUuid, _ := bledefs.ParseUuid(bledefs.OmpUnsecSvcUuid)
+ reqChrUuid, _ := bledefs.ParseUuid(bledefs.OmpUnsecReqChrUuid)
+ rspChrUuid, _ := bledefs.ParseUuid(bledefs.OmpUnsecRspChrUuid)
for _, s := range p.Services {
uuid, err := UuidFromBllUuid(s.UUID)
@@ -86,9 +85,7 @@ func (bos *BllOicSesn) discoverAll() error {
return err
}
- if bledefs.CompareUuids(uuid, iotivitySvcUuid) == 0 ||
- bledefs.CompareUuids(uuid, ompSvcUuid) == 0 {
-
+ if bledefs.CompareUuids(uuid, ompUnsecSvcUuid) == 0 {
for _, c := range s.Characteristics {
uuid, err := UuidFromBllUuid(c.UUID)
if err != nil {
diff --git a/nmxact/bledefs/bledefs.go b/nmxact/bledefs/bledefs.go
index b61ca91..eeb310f 100644
--- a/nmxact/bledefs/bledefs.go
+++ b/nmxact/bledefs/bledefs.go
@@ -33,10 +33,14 @@ const BLE_ATT_MTU_DFLT = 23
const NmpPlainSvcUuid = "8D53DC1D-1DB7-4CD3-868B-8A527460AA84"
const NmpPlainChrUuid = "DA2E7828-FBCE-4E01-AE9E-261174997C48"
-const IotivitySvcUuid = "ADE3D529-C784-4F63-A987-EB69F70EE816"
-const OmpSvcUuid = 0x9923
-const OmpReqChrUuid = "AD7B334F-4637-4B86-90B6-9D787F03D218"
-const OmpRspChrUuid = "E9241982-4580-42C4-8831-95048216B256"
+
+const OmpUnsecSvcUuid = "ADE3D529-C784-4F63-A987-EB69F70EE816"
+const OmpUnsecReqChrUuid = "AD7B334F-4637-4B86-90B6-9D787F03D218"
+const OmpUnsecRspChrUuid = "E9241982-4580-42C4-8831-95048216B256"
+
+const OmpSecSvcUuid = 0xfe18
+const OmpSecReqChrUuid = 0x1000
+const OmpSecRspChrUuid = 0x1001
type BleAddrType int
diff --git a/nmxact/nmble/ble_oic_sesn.go b/nmxact/nmble/ble_oic_sesn.go
index d93ab63..9db1c84 100644
--- a/nmxact/nmble/ble_oic_sesn.go
+++ b/nmxact/nmble/ble_oic_sesn.go
@@ -32,21 +32,13 @@ func NewBleOicSesn(bx *BleXport, cfg sesn.SesnCfg) *BleOicSesn {
onCloseCb: cfg.OnCloseCb,
}
- iotUuid, err := ParseUuid(IotivitySvcUuid)
+ iotUuid, _ := ParseUuid(OmpUnsecSvcUuid)
svcUuids := []BleUuid{
- {U16: OmpSvcUuid},
iotUuid,
}
- reqChrUuid, err := ParseUuid(OmpReqChrUuid)
- if err != nil {
- panic(err.Error())
- }
-
- rspChrUuid, err := ParseUuid(OmpRspChrUuid)
- if err != nil {
- panic(err.Error())
- }
+ reqChrUuid, _ := ParseUuid(OmpUnsecReqChrUuid)
+ rspChrUuid, _ := ParseUuid(OmpUnsecRspChrUuid)
bos.bf = NewBleFsm(BleFsmParams{
Bx: bx,
diff --git a/nmxact/scan/scan.go b/nmxact/scan/scan.go
index 162feb9..318e777 100644
--- a/nmxact/scan/scan.go
+++ b/nmxact/scan/scan.go
@@ -52,12 +52,12 @@ func BleOmpScanCfg(ScanCb ScanFn) Cfg {
Ble: CfgBle{
ScanPred: func(adv bledefs.BleAdvReport) bool {
for _, u := range adv.Fields.Uuids16 {
- if u == bledefs.OmpSvcUuid {
+ if u == bledefs.OmpSecSvcUuid {
return true
}
}
- iotUuid, _ := bledefs.ParseUuid(bledefs.IotivitySvcUuid)
+ iotUuid, _ := bledefs.ParseUuid(bledefs.OmpUnsecSvcUuid)
for _, u128 := range adv.Fields.Uuids128 {
u := bledefs.BleUuid{U128: u128}
if bledefs.CompareUuids(u, iotUuid) == 0 {
--
To stop receiving notification emails like this one, please contact
"commits@mynewt.apache.org" <co...@mynewt.apache.org>.
[mynewt-newtmgr] 03/03: newtmgr revendor
Posted by cc...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
ccollins pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-newtmgr.git
commit 40b9104897e90d1a7e4ac93e423dcb73a4a507c6
Author: Christopher Collins <cc...@apache.org>
AuthorDate: Wed Jul 12 16:12:03 2017 -0700
newtmgr revendor
---
newtmgr/Godeps/Godeps.json | 48 +++++++++++-----------
.../newtmgr/nmxact/bledefs/bledefs.go | 12 ++++--
.../newtmgr/nmxact/nmble/ble_oic_sesn.go | 14 ++-----
.../mynewt.apache.org/newtmgr/nmxact/nmp/log.go | 2 +-
.../mynewt.apache.org/newtmgr/nmxact/scan/scan.go | 4 +-
5 files changed, 38 insertions(+), 42 deletions(-)
diff --git a/newtmgr/Godeps/Godeps.json b/newtmgr/Godeps/Godeps.json
index b550138..a30f60f 100644
--- a/newtmgr/Godeps/Godeps.json
+++ b/newtmgr/Godeps/Godeps.json
@@ -126,63 +126,63 @@
},
{
"ImportPath": "mynewt.apache.org/newtmgr/nmxact/bledefs",
- "Comment": "mynewt_0_9_0_tag-543-g29157f2",
- "Rev": "29157f2faf564233a6fb6922b1f037493ccd7bf4"
+ "Comment": "mynewt_0_9_0_tag-547-gf24b504",
+ "Rev": "f24b504146dabab8247096e523561a21f3330e13"
},
{
"ImportPath": "mynewt.apache.org/newtmgr/nmxact/nmble",
- "Comment": "mynewt_0_9_0_tag-543-g29157f2",
- "Rev": "29157f2faf564233a6fb6922b1f037493ccd7bf4"
+ "Comment": "mynewt_0_9_0_tag-547-gf24b504",
+ "Rev": "f24b504146dabab8247096e523561a21f3330e13"
},
{
"ImportPath": "mynewt.apache.org/newtmgr/nmxact/nmp",
- "Comment": "mynewt_0_9_0_tag-543-g29157f2",
- "Rev": "29157f2faf564233a6fb6922b1f037493ccd7bf4"
+ "Comment": "mynewt_0_9_0_tag-547-gf24b504",
+ "Rev": "f24b504146dabab8247096e523561a21f3330e13"
},
{
"ImportPath": "mynewt.apache.org/newtmgr/nmxact/nmserial",
- "Comment": "mynewt_0_9_0_tag-543-g29157f2",
- "Rev": "29157f2faf564233a6fb6922b1f037493ccd7bf4"
+ "Comment": "mynewt_0_9_0_tag-547-gf24b504",
+ "Rev": "f24b504146dabab8247096e523561a21f3330e13"
},
{
"ImportPath": "mynewt.apache.org/newtmgr/nmxact/nmxutil",
- "Comment": "mynewt_0_9_0_tag-543-g29157f2",
- "Rev": "29157f2faf564233a6fb6922b1f037493ccd7bf4"
+ "Comment": "mynewt_0_9_0_tag-547-gf24b504",
+ "Rev": "f24b504146dabab8247096e523561a21f3330e13"
},
{
"ImportPath": "mynewt.apache.org/newtmgr/nmxact/oic",
- "Comment": "mynewt_0_9_0_tag-543-g29157f2",
- "Rev": "29157f2faf564233a6fb6922b1f037493ccd7bf4"
+ "Comment": "mynewt_0_9_0_tag-547-gf24b504",
+ "Rev": "f24b504146dabab8247096e523561a21f3330e13"
},
{
"ImportPath": "mynewt.apache.org/newtmgr/nmxact/omp",
- "Comment": "mynewt_0_9_0_tag-543-g29157f2",
- "Rev": "29157f2faf564233a6fb6922b1f037493ccd7bf4"
+ "Comment": "mynewt_0_9_0_tag-547-gf24b504",
+ "Rev": "f24b504146dabab8247096e523561a21f3330e13"
},
{
"ImportPath": "mynewt.apache.org/newtmgr/nmxact/scan",
- "Comment": "mynewt_0_9_0_tag-543-g29157f2",
- "Rev": "29157f2faf564233a6fb6922b1f037493ccd7bf4"
+ "Comment": "mynewt_0_9_0_tag-547-gf24b504",
+ "Rev": "f24b504146dabab8247096e523561a21f3330e13"
},
{
"ImportPath": "mynewt.apache.org/newtmgr/nmxact/sesn",
- "Comment": "mynewt_0_9_0_tag-543-g29157f2",
- "Rev": "29157f2faf564233a6fb6922b1f037493ccd7bf4"
+ "Comment": "mynewt_0_9_0_tag-547-gf24b504",
+ "Rev": "f24b504146dabab8247096e523561a21f3330e13"
},
{
"ImportPath": "mynewt.apache.org/newtmgr/nmxact/udp",
- "Comment": "mynewt_0_9_0_tag-543-g29157f2",
- "Rev": "29157f2faf564233a6fb6922b1f037493ccd7bf4"
+ "Comment": "mynewt_0_9_0_tag-547-gf24b504",
+ "Rev": "f24b504146dabab8247096e523561a21f3330e13"
},
{
"ImportPath": "mynewt.apache.org/newtmgr/nmxact/xact",
- "Comment": "mynewt_0_9_0_tag-543-g29157f2",
- "Rev": "29157f2faf564233a6fb6922b1f037493ccd7bf4"
+ "Comment": "mynewt_0_9_0_tag-547-gf24b504",
+ "Rev": "f24b504146dabab8247096e523561a21f3330e13"
},
{
"ImportPath": "mynewt.apache.org/newtmgr/nmxact/xport",
- "Comment": "mynewt_0_9_0_tag-543-g29157f2",
- "Rev": "29157f2faf564233a6fb6922b1f037493ccd7bf4"
+ "Comment": "mynewt_0_9_0_tag-547-gf24b504",
+ "Rev": "f24b504146dabab8247096e523561a21f3330e13"
}
]
}
diff --git a/newtmgr/vendor/mynewt.apache.org/newtmgr/nmxact/bledefs/bledefs.go b/newtmgr/vendor/mynewt.apache.org/newtmgr/nmxact/bledefs/bledefs.go
index b61ca91..eeb310f 100644
--- a/newtmgr/vendor/mynewt.apache.org/newtmgr/nmxact/bledefs/bledefs.go
+++ b/newtmgr/vendor/mynewt.apache.org/newtmgr/nmxact/bledefs/bledefs.go
@@ -33,10 +33,14 @@ const BLE_ATT_MTU_DFLT = 23
const NmpPlainSvcUuid = "8D53DC1D-1DB7-4CD3-868B-8A527460AA84"
const NmpPlainChrUuid = "DA2E7828-FBCE-4E01-AE9E-261174997C48"
-const IotivitySvcUuid = "ADE3D529-C784-4F63-A987-EB69F70EE816"
-const OmpSvcUuid = 0x9923
-const OmpReqChrUuid = "AD7B334F-4637-4B86-90B6-9D787F03D218"
-const OmpRspChrUuid = "E9241982-4580-42C4-8831-95048216B256"
+
+const OmpUnsecSvcUuid = "ADE3D529-C784-4F63-A987-EB69F70EE816"
+const OmpUnsecReqChrUuid = "AD7B334F-4637-4B86-90B6-9D787F03D218"
+const OmpUnsecRspChrUuid = "E9241982-4580-42C4-8831-95048216B256"
+
+const OmpSecSvcUuid = 0xfe18
+const OmpSecReqChrUuid = 0x1000
+const OmpSecRspChrUuid = 0x1001
type BleAddrType int
diff --git a/newtmgr/vendor/mynewt.apache.org/newtmgr/nmxact/nmble/ble_oic_sesn.go b/newtmgr/vendor/mynewt.apache.org/newtmgr/nmxact/nmble/ble_oic_sesn.go
index d93ab63..9db1c84 100644
--- a/newtmgr/vendor/mynewt.apache.org/newtmgr/nmxact/nmble/ble_oic_sesn.go
+++ b/newtmgr/vendor/mynewt.apache.org/newtmgr/nmxact/nmble/ble_oic_sesn.go
@@ -32,21 +32,13 @@ func NewBleOicSesn(bx *BleXport, cfg sesn.SesnCfg) *BleOicSesn {
onCloseCb: cfg.OnCloseCb,
}
- iotUuid, err := ParseUuid(IotivitySvcUuid)
+ iotUuid, _ := ParseUuid(OmpUnsecSvcUuid)
svcUuids := []BleUuid{
- {U16: OmpSvcUuid},
iotUuid,
}
- reqChrUuid, err := ParseUuid(OmpReqChrUuid)
- if err != nil {
- panic(err.Error())
- }
-
- rspChrUuid, err := ParseUuid(OmpRspChrUuid)
- if err != nil {
- panic(err.Error())
- }
+ reqChrUuid, _ := ParseUuid(OmpUnsecReqChrUuid)
+ rspChrUuid, _ := ParseUuid(OmpUnsecRspChrUuid)
bos.bf = NewBleFsm(BleFsmParams{
Bx: bx,
diff --git a/newtmgr/vendor/mynewt.apache.org/newtmgr/nmxact/nmp/log.go b/newtmgr/vendor/mynewt.apache.org/newtmgr/nmxact/nmp/log.go
index e03376f..b2b34a7 100644
--- a/newtmgr/vendor/mynewt.apache.org/newtmgr/nmxact/nmp/log.go
+++ b/newtmgr/vendor/mynewt.apache.org/newtmgr/nmxact/nmp/log.go
@@ -215,7 +215,7 @@ type LogLevelListReq struct {
type LogLevelListRsp struct {
NmpBase
Rc int `codec:"rc" codec:",omitempty"`
- Map map[string]int `codec:"module_map"`
+ Map map[string]int `codec:"level_map"`
}
func NewLogLevelListReq() *LogLevelListReq {
diff --git a/newtmgr/vendor/mynewt.apache.org/newtmgr/nmxact/scan/scan.go b/newtmgr/vendor/mynewt.apache.org/newtmgr/nmxact/scan/scan.go
index 162feb9..318e777 100644
--- a/newtmgr/vendor/mynewt.apache.org/newtmgr/nmxact/scan/scan.go
+++ b/newtmgr/vendor/mynewt.apache.org/newtmgr/nmxact/scan/scan.go
@@ -52,12 +52,12 @@ func BleOmpScanCfg(ScanCb ScanFn) Cfg {
Ble: CfgBle{
ScanPred: func(adv bledefs.BleAdvReport) bool {
for _, u := range adv.Fields.Uuids16 {
- if u == bledefs.OmpSvcUuid {
+ if u == bledefs.OmpSecSvcUuid {
return true
}
}
- iotUuid, _ := bledefs.ParseUuid(bledefs.IotivitySvcUuid)
+ iotUuid, _ := bledefs.ParseUuid(bledefs.OmpUnsecSvcUuid)
for _, u128 := range adv.Fields.Uuids128 {
u := bledefs.BleUuid{U128: u128}
if bledefs.CompareUuids(u, iotUuid) == 0 {
--
To stop receiving notification emails like this one, please contact
"commits@mynewt.apache.org" <co...@mynewt.apache.org>.