【问题标题】:Identifying the Data transferred from XBee when using Python and python-xbee使用 Python 和 python-xbee 识别从 XBee 传输的数据
【发布时间】:2014-02-22 07:50:37
【问题描述】:

路由器 AT 配置中的 Xbee 系列 2 与连接到 XBee 的引脚 20 AD0 的电位器抽头输出应该每 100 毫秒发送一次模拟数据。它是用ATD02ATIR64 设置的。

Coordinator API 配置中的 Xbee Series 2 已连接到计算机。

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

将 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\x00@\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\x00@\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\x00@\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\x00@\xb1\x92\x13', 'cluster': '\x00\x92', 'id': 'rx_explicit'}

你认为可能发生了什么?我用 Arduino 读取了AD0 的值,确实有​​一个值要读取。

【问题讨论】:

    标签: python arduino xbee zigbee


    【解决方案1】:

    您期望的帧类型是什么? rx_explicit 帧将包含您的 I/O 数据。您可能需要更改 ATAO(API 选项)设置来控制帧是作为 RX Explicit 还是其他一些帧类型进入。

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

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2015-05-25
      • 2018-07-22
      • 1970-01-01
      • 2023-03-20
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多