diff --git a/lib/ccznp.js b/lib/ccznp.js index e641990..55bf3b9 100755 --- a/lib/ccznp.js +++ b/lib/ccznp.js @@ -24,7 +24,7 @@ var MT = { UTIL: zmeta.UTIL, DBG: zmeta.DBG, APP: zmeta.APP, - DEBUG: zmeta.DEBUG + APP_CNF: zmeta.APP_CNF }; /*************************************************************************************************/ @@ -217,7 +217,7 @@ CcZnp.prototype.sendCmd = function (type, subsys, cmdId, payload) { /*** Create Request Shorthands ***/ /*********************************/ // example: ccznp.sysRequest(), ccznp.zdoRequest() -var namespaces = [ 'SYS', 'MAC', 'NWK', 'AF', 'ZDO', 'SAPI', 'UTIL', 'DBG', 'APP', 'DEBUG' ]; +var namespaces = [ 'SYS', 'MAC', 'NWK', 'AF', 'ZDO', 'SAPI', 'UTIL', 'DBG', 'APP', 'APP_CNF' ]; namespaces.forEach(function (subsys) { var reqMethod = subsys.toLowerCase() + 'Request'; diff --git a/lib/defs/zmt_defs.json b/lib/defs/zmt_defs.json index af8cea4..71ea81a 100755 --- a/lib/defs/zmt_defs.json +++ b/lib/defs/zmt_defs.json @@ -16,7 +16,7 @@ "UTIL": 7, "DBG": 8, "APP": 9, - "DEBUG": 15 + "APP_CNF": 15 }, "ParamType": { "uint8": 0, @@ -287,7 +287,9 @@ "userTest": 1, "zllTlInd": 129 }, - "DEBUG": { - "bdbStartCommissioning": 5 + "APP_CNF": { + "bdbStartCommissioning": 5, + "bdbSetChannel": 8, + "bdbComissioningNotifcation": 128 } } diff --git a/lib/defs/zpi_meta.json b/lib/defs/zpi_meta.json index 417868a..abb41d7 100755 --- a/lib/defs/zpi_meta.json +++ b/lib/defs/zpi_meta.json @@ -5073,7 +5073,7 @@ } } }, - "DEBUG": { + "APP_CNF": { "bdbStartCommissioning": { "type": 1, "cmdId": 5, @@ -5089,6 +5089,39 @@ } ] } + }, + "bdbSetChannel": { + "type": 1, + "cmdId": 8, + "params": { + "req": [ + { + "isPrimary": 0, + "channel": 2 + } + ], + "rsp": [ + { + "status": 0 + } + ] + } + }, + "bdbComissioningNotifcation": { + "type": 2, + "cmdId": 128, + "params": { + "req": [ + { + "status": 0 + } + ], + "rsp": [ + { + "status": 0 + } + ] + } } } } diff --git a/lib/zmeta.js b/lib/zmeta.js index cfb325b..236abda 100755 --- a/lib/zmeta.js +++ b/lib/zmeta.js @@ -19,7 +19,7 @@ var zmeta = { UTIL: new Enum(zmtDefs.UTIL), DBG: new Enum(zmtDefs.DBG), APP: new Enum(zmtDefs.APP), - DEBUG: new Enum(zmtDefs.DEBUG) + APP_CNF: new Enum(zmtDefs.APP_CNF) }; zmtDefs.CmdType = null; @@ -33,7 +33,7 @@ zmtDefs.SAPI = null; zmtDefs.UTIL = null; zmtDefs.DBG = null; zmtDefs.APP = null; -zmtDefs.DEBUG = null; +zmtDefs.APP_CNF = null; zmtDefs = null; zmeta.get = function (subsys, cmd) { diff --git a/package.json b/package.json index 64638d6..dc070fd 100644 --- a/package.json +++ b/package.json @@ -37,7 +37,7 @@ "debug": "^4.1.1", "enum": "^2.5.0", "serialport": "^7.1.4", - "unpi": "^1.1.0" + "unpi": "git+https://github.com/Koenkk/unpi.git#326cff30c2abea444b807b69f4bc367567aae966" }, "devDependencies": { "chai": "^4.2.0",