nmxact - Use 16-bit CoAP-BLE UUID.
Project: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/commit/5af109bf Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/tree/5af109bf Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/diff/5af109bf Branch: refs/heads/master Commit: 5af109bf9586fff1d442a0043d64b20d2dceae36 Parents: f51c176 Author: Christopher Collins <[email protected]> Authored: Thu May 18 15:57:32 2017 -0700 Committer: Christopher Collins <[email protected]> Committed: Thu May 18 15:57:32 2017 -0700 ---------------------------------------------------------------------- nmxact/bledefs/bledefs.go | 7 ++----- nmxact/nmble/ble_oic_sesn.go | 9 +++------ nmxact/omp/omp.go | 3 ++- 3 files changed, 7 insertions(+), 12 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/5af109bf/nmxact/bledefs/bledefs.go ---------------------------------------------------------------------- diff --git a/nmxact/bledefs/bledefs.go b/nmxact/bledefs/bledefs.go index bf55780..e6f620e 100644 --- a/nmxact/bledefs/bledefs.go +++ b/nmxact/bledefs/bledefs.go @@ -31,12 +31,9 @@ const BLE_ATT_ATTR_MAX_LEN = 512 const NmpPlainSvcUuid = "8D53DC1D-1DB7-4CD3-868B-8A527460AA84" const NmpPlainChrUuid = "DA2E7828-FBCE-4E01-AE9E-261174997C48" -const NmpOicSvcUuid = "ADE3D529-C784-4F63-A987-EB69F70EE816" -const NmpOicReqChrUuid = "AD7B334F-4637-4B86-90B6-9D787F03D218" -const NmpOicRspChrUuid = "E9241982-4580-42C4-8831-95048216B256" - -// This supersedes the 128-bit UUID above. const OmpSvcUuid = 0x9923 +const OmpReqChrUuid = "AD7B334F-4637-4B86-90B6-9D787F03D218" +const OmpRspChrUuid = "E9241982-4580-42C4-8831-95048216B256" type BleAddrType int http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/5af109bf/nmxact/nmble/ble_oic_sesn.go ---------------------------------------------------------------------- diff --git a/nmxact/nmble/ble_oic_sesn.go b/nmxact/nmble/ble_oic_sesn.go index b390738..6cac7cf 100644 --- a/nmxact/nmble/ble_oic_sesn.go +++ b/nmxact/nmble/ble_oic_sesn.go @@ -34,17 +34,14 @@ func NewBleOicSesn(bx *BleXport, cfg sesn.SesnCfg) *BleOicSesn { onCloseCb: cfg.Ble.OnCloseCb, } - svcUuid, err := ParseUuid(NmpOicSvcUuid) - if err != nil { - panic(err.Error()) - } + svcUuid := BleUuid{Uuid16: OmpSvcUuid} - reqChrUuid, err := ParseUuid(NmpOicReqChrUuid) + reqChrUuid, err := ParseUuid(OmpReqChrUuid) if err != nil { panic(err.Error()) } - rspChrUuid, err := ParseUuid(NmpOicRspChrUuid) + rspChrUuid, err := ParseUuid(OmpRspChrUuid) if err != nil { panic(err.Error()) } http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/5af109bf/nmxact/omp/omp.go ---------------------------------------------------------------------- diff --git a/nmxact/omp/omp.go b/nmxact/omp/omp.go index 77dbd1b..ffea241 100644 --- a/nmxact/omp/omp.go +++ b/nmxact/omp/omp.go @@ -31,7 +31,8 @@ import ( "mynewt.apache.org/newtmgr/nmxact/nmp" ) -// OIC wrapping adds this many bytes to an NMP message. +// OIC wrapping adds this many bytes to an NMP message. Calculated by +// comparing an OMP message with its NMP equivalent. const OMP_MSG_OVERHEAD = 13 type OicMsg struct {
