[英]Get the MAC address of an XBee using Node.js
My Node.js app is using xbee-api
to allow an XBee connected via a serial port to communicate wirelessly with other XBees. 我的Node.js应用程序正在使用
xbee-api
允许通过串行端口连接的XBee与其他XBees无线通信。 The local XBee is in API Coordinator mode. 本地XBee处于API协调器模式。
How can I query the XBee (physically connected via serial port) to get its 64 bit MAC address SH
and SL
? 如何查询XBee(通过串行端口物理连接)以获取其64位MAC地址
SH
和SL
?
I tried writing the following frame to serial, 我尝试将以下框架写入序列号,
var frame_obj = {
type: xbee_api.constants.FRAME_TYPE.AT_COMMAND,
command: 'SH',
commandParameter: []
};
but I receive four bytes [ 0, 19, 162, 0 ]
which makes no sense... 但是我收到了四个字节
[ 0, 19, 162, 0 ]
,这没有任何意义...
frame: { type: 136,
id: 2,
command: 'SH',
commandStatus: 0,
commandData: [ 0, 19, 162, 0 ] }
如果您查看以十六进制表示的字节(0x00、0x13、0xA2、0x00),这确实很有意义。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.