zigbeer / cc-znp Goto Github PK
View Code? Open in Web Editor NEWThe interface for a host to communicate with TI CC253X Zigbee Network Processor(ZNP) over a serial port.
License: MIT License
The interface for a host to communicate with TI CC253X Zigbee Network Processor(ZNP) over a serial port.
License: MIT License
I'm getting this error from something on my ZigBee network:
cc-znp Error: Unrecognized command
cc-znp at new ZpiObject (/opt/zigbee2mqtt/node_modules/cc-znp/lib/zpiObject.js:37:15)
cc-znp at CcZnp._parseMtIncomingData (/opt/zigbee2mqtt/node_modules/cc-znp/lib/ccznp.js:325:18)
cc-znp at Unpi.parseMtIncomingData (/opt/zigbee2mqtt/node_modules/cc-znp/lib/ccznp.js:92:18)
where subsys = ZDO and cmd = 200 (decimal).
Any idea what this command is?
Please check these commands and ensure their arguments and responses again.
I have a CC2531 USB Evaluation Kit connected to the USB port on my BeagleBoneBlack (BBB). I also have two zigbee end-devices within the surroundings of my BBB which are expected to join the network once opened. When the following code
const ccznp = require('cc-znp');
const spCfg = {
path: '/dev/ttyACM0',
options: {
baudrate: 115200,
flowControl: true,
rtscts: true
}
};
ccznp.on('ready', () => {
console.log('Device is ready.');
ccznp.sapiRequest('startRequest', {}, () => {
});
ccznp.sapiRequest('permitJoiningRequest', {destination: 0xFFFC, timeout: 0xAA}, (error, result) => {
if (error) {
throw error;
}
// Verify the results
console.log(result);
});
});
ccznp.on('AREQ', (data) => {
console.dir(data);
});
ccznp.init(spCfg, (error) => {
console.log(error);
});
ccznp.on('close', function() {
console.log('Serial port closed.');
});
is run, I get the following error:
Error: request timeout
at ccznp.sapiRequest (.../test.js:82:23)
at CcZnp.<anonymous> (.../node_modules/cc-znp/lib/ccznp.js:190:13)
at CcZnp.g (events.js:286:16)
at emitOne (events.js:96:13)
at CcZnp.emit (events.js:188:7)
at Timeout.<anonymous> (.../node_modules/cc-znp/lib/ccznp.js:170:18)
at tryOnTimeout (timers.js:224:11)
at Timer.listOnTimeout (timers.js:198:5)
After running the script again several times (at least 6 times), the error suddenly disappears and I get the following results:
{
sof: 254,
len: 1,
type: 'SRSP',
subsys: 'SAPI',
cmd: 'permitJoiningRequest',
payload: { status: 0 },
fcs: 111,
csum: 111
}
After getting the results finally, if I run the same script again it just hangs until I stop it with CRTL+C!
It is worth noting that this procedure happens with all the other commands (e.g. UTIL_GET_DEVICE_INFO etc.) I try to call i.e. I must run the script several times, get the 'Error: request timeout' message above during each run, before it finally runs without any errors and yield the results.
Am I perhaps doing something wrong or is this a bug within the cc-znp package? I would be grateful if you can investigate this issue as soon as possible and let me know your feedback/solution.
Many thanks in advance.
Could be possible to update to new version 6
Thanks.
sorry to write here....
Could you tell me how to use cc-znp with zcl-packet ?
Cause I didn't see any example.....
It seems that cc-znp miss the ZDO_AUTO_FIND_DESTINATION command and ZDO_NEW_DSTADDR_IND indicator.
Am I missing something or is it only the wiki that is out of date ?
The ref doc Z-Stack Monitor and Test API.pdf , check p.100 about the command
Thx
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.