使用 python-xbee 向远程 Xbee 发送远程 AT 命令

Sending Remote AT commands to Remote Xbee using python-xbee

我已经将协调器 xbee 连接到 beaglebone 的串行端口,即。 beaglebone 的 tx 和 rx。我的路由器的 D0 引脚连接到中继。我想远程禁用或启用 D0 引脚。为此,我正在使用 python-xbee 库。我所做的是(我的 python 代码片段)

myRouter='\x00\x13\xA2\x00\x40\xE4\x29\xB3'
#For Off
xbee.remote_at(dest_addr_long=myRouter,command='D0',parameter='\x04')
#For switch ON
xbee.remote_at(dest_addr_long=myRouter,command='D0',parameter='\x05')

代码工作正常,没有错误,但我没有得到输出。 我在没有 beaglebone 的情况下尝试使用它,即使用 usb explorer 它可以工作。这是 link of example @ digi.

我正在使用 python-xbee library。会出现什么错误?

在 python-xbee 库中,remote_at 的 "frame-id" 默认为“0x0”。如果 id 为 0,您将不会收到响应。

http://www.digi.com/blog/wp-content/uploads/2013/11/techtip10.png .

在XCTU中,Frame Id为01。您需要将 "id" 更改为零以外的任何值才能收到响应。