nodejs xbee没有收到消息

我想让nodejs用xbee发送和接收消息。 我知道xbee设置工作,因为我在x-ctu上testing它。 我尝试了以下,但不能收到消息。 它说它是开放的。

var util = require('util'); var SerialPort = require('serialport').SerialPort; var xbee_api = require('xbee-api'); var C = xbee_api.constants; var xbeeAPI = new xbee_api.XBeeAPI({ api_mode: 1 }); var serialport = new SerialPort("COM7", { baudrate: 9600, parser: xbeeAPI.parseRaw(1000) }); serialport.on("open", function() { console.log("open"); }); // All frames parsed by the XBee will be emitted here //I think this is the problem xbeeAPI.on("frame_object", function(frame) { console.log(">>", frame); }); 

我几天前就知道了 我改变了我可以使用串口库。