[英]Sending Remote AT commands to Remote Xbee using python-xbee
[英]Identifying the Data transferred from XBee when using Python and python-xbee
路由器AT配置中的Xbee Series 2具有連接到XBee引腳20 AD0
的電位計抽頭輸出,應該每100 ms發送一次模擬數據。 它是使用ATD02
和ATIR64
設置的。
Coordinator API配置中的Xbee Series 2已連接到計算機。
使用XCTU終端,我們可以看到協調器不斷從路由器接收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
的值,確實有一個值需要讀取。
您期望什么框架類型? rx_explicit
幀將包含您的I / O數據。 您可能需要更改ATAO
(API選項)設置,以控制幀以RX Explicit還是其他幀類型輸入。
在接收的幀上提供有效載荷的十六進制轉儲,我們大概可以弄清楚數據的格式。 我想它看起來像是ATIS
響應的格式。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.