Skip to content
simen edited this page Dec 22, 2016 · 6 revisions

1. Overview

cc-znp allows you to interact with TI's CC253X ZigBee Network Processor(ZNP) on node.js via TI Z-Stack Monitor and Test(MT) APIs upon an UART interface.

This project aims to provide an opportunity for those who like to build IoT applications with zigbee on node.js. With node.js, back-end developers can have RESTful APIs to bring zigbee machines to web world easily, and can push machines to the cloud as well. For front-end developers, they can do more creative things with Javascript, and can build any fascinating GUI they want with many cool UI frameworks.


2. ZigBee Network Processor

The following diagram shows the scenario when CC253X operates as a ZNP. In this case, the ZigBee stack is running on CC253X, and the application (app) is running on an external host, i.e. a microcontroller or an application processor. The app can do its job in a resourceful environment and work with ZNP for network transportation.

Network Processor Configuration


3. Installation

$ npm install cc-znp --save


## 4. Usage

To begin with cc-znp, firstly set up the serial port and call init() to enable the interface:

var znp = require('cc-znp');
var spCfg = {
    path: '/dev/ttyUSB0',
    options: {
        baudrate: 115200,
        rtscts: true
    }
};

znp.on('ready', function () {
    console.log('Initialization completes.');

    // start to run your application

});

znp.init(spCfg, function (err) {
    if (err)
        console.log(err);
});