Xbee Node Discovery Response

感情迁移 提交于 2019-12-10 11:58:39

问题


I'm trying to discover devices, from a coordinator, in my network. So I sent an ND command to the coordinator and I'm correctly receiving response from other Xbee.

The next step will be to store the information I've received in a web application, in oder to send commands and data.

However, what I'm still missing is some parts in the frame respose. So far I've mapped the frame like this:

1     7E                  start frame    
===== =================== MESSAGE LENGHT
2-3   0x00 0x19           -> 25
===== =================== PACKET TYPE
4     88                  -> response to a remote AT command
5     02                  frame ID
===== =================== AT COMMAND
6-7   0x4E 0x44           "ND"
8     00                  status byte (00 -> OK)

===== =================== MY - Remote Address
9-10  0x17 0x85
===== =================== SH - SERIAL NUMBER HIGH
11-14 0x00 0x13 0xA2 0x00
===== =================== SL - SERIAL NUMBER LOW    
15-18 0x40 0xB4 0x50 0x23
===== =================== SIGNAL     
19    20
= ======== NI - Node Identifier
20 00 
21 FF     
22 FE     
23 01   
24 00          
25 C1     
26 05
27 10     
28 1E     
===== ===== CHECKSUM (25th bytes from MESSAGE LENGHT)
29 19  

So, where I can find in this response the address of the device ? My guess is in the NI part of the message but, I haven't find any example/information of how the data are organised.

Could someone point me in the right direction?


回答1:


As someone told me in the dig.com forum

NI<CR>                 (Variable length)
PARENT_NETWORK ADDRESS (2 Bytes)<CR>
DEVICE_TYPE            (1 Byte: 0=Coord, 1=Router, 2=End Device)
STATUS                 (1 Byte: Reserved)
PROFILE_ID             (2 Bytes)
MANUFACTURER_ID        (2 Bytes

So, loking to my frame response:

00   --- Node Identifier variable, (here 1 byte = 00 because no value is set up).
FFFE --- parent network address (2 bytes)
01   --- device type  
00   --- status
C105 --- profile id
101E --- manufacturing id

This, afaik, means that in this last part of the frame, no information about address of the device are given. Only information are the SL and SH.




回答2:


The 16-bit network address is what you've labeled "MY" (0x1785), and the 64-bit MAC address is the combination of SH/SL (00 13 A2 00 40 B4 50 23).



来源:https://stackoverflow.com/questions/26677590/xbee-node-discovery-response

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!