2014-02-22 21 views
2

在电平计抽头输出连接到XBee的引脚20 AD0的Router AT配置中的Xbee系列2应该每隔100 ms发送一次模拟数据。它被设置为ATD02ATIR64识别在使用Python和python-xbee时从XBee传输的数据

协调器API配置中的Xbee Series 2连接到计算机。

使用XCTU终端,我们可以看到协调器不断从路由器接收Explicit RX Indicator帧。但是,在Router XBee上没有包含由AD0读取的模拟数据的帧。

enter image description here

enter image description here

使用Python与XBee模块,我们也注意到了同样的事情,正在接收的只是rx_explicit框架和包含模拟数据样本什么!

{'profile': '\xc1\x05', 'source_addr': '6T', 'dest_endpoint': '\xe8', 'rf_data': '\x01\x00\x00\x01\x02(', 'source_endpoint': '\xe8', 'options': '\x01', 'source_addr_long': '\x00\x13\xa2\[email protected]\xb1\x92\x13', 'cluster': '\x00\x92', 'id': 'rx_explicit'} 

{'profile': '\xc1\x05', 'source_addr': '6T', 'dest_endpoint': '\xe8', 'rf_data': '\x01\x00\x00\x01\x02I', 'source_endpoint': '\xe8', 'options': '\x01', 'source_addr_long': '\x00\x13\xa2\[email protected]\xb1\x92\x13', 'cluster': '\x00\x92', 'id': 'rx_explicit'} 

{'profile': '\xc1\x05', 'source_addr': '6T', 'dest_endpoint': '\xe8', 'rf_data': '\x01\x00\x00\x01\x01\xeb', 'source_endpoint': '\xe8', 'options': '\x01', 'source_addr_long': '\x00\x13\xa2\[email protected]\xb1\x92\x13', 'cluster': '\x00\x92', 'id': 'rx_explicit'} 

{'profile': '\xc1\x05', 'source_addr': '6T', 'dest_endpoint': '\xe8', 'rf_data': '\x01\x00\x00\x01\x01\xce', 'source_endpoint': '\xe8', 'options': '\x01', 'source_addr_long': '\x00\x13\xa2\[email protected]\xb1\x92\x13', 'cluster': '\x00\x92', 'id': 'rx_explicit'} 

您认为可能发生了什么?我通过阅读Arduino来检查AD0处的值,确实有​​值得阅读。

回答

1

你期待什么样的框架类型? rx_explicit帧将有你的I/O数据。您可能需要更改ATAO(API选项)设置,以控制帧是以RX Explicit还是其他某种帧类型进入。

在您接收的帧上提供有效负载的十六进制转储,我们可以计算出数据的格式。我想它会看起来像一个ATIS响应的格式。