08-12-2013 03:36 AM
I have extracted these data from USB-UART cable before entering to the z-location software ( zigbee location engine).
0C 80 E0 90 6E 9C 80 72 1E 82 72 00 1C 00 1E 00 10 FC 0C 82 00 00 00 60 0C FE
Now i am looking for a method to extract X and Y by myself.
The real X and Y for the above data are x= 1.5 and Y= 1.75
According to different experiments I found that it should be from " 1C 00 1E 00 10 FC 0C 82 00 00 00 60 0C FE "
but how can I get the X and Y values?
08-12-2013 03:40 AM
Do you have any information about..
--> Header/Footer pattern
--> Data length
Otherwise, I can help, but after watching this movie...!!
08-12-2013 03:56 AM
@mehdi343 wrote:
I have extracted these data from USB-UART cable before entering to the z-location software ( zigbee location engine).
0C 80 E0 90 6E 9C 80 72 1E 82 72 00 1C 00 1E 00 10 FC 0C 82 00 00 00 60 0C FE
Now i am looking for a method to extract X and Y by myself.
The real X and Y for the above data are x= 1.5 and Y= 1.75
According to different experiments I found that it should be from " 1C 00 1E 00 10 FC 0C 82 00 00 00 60 0C FE "
but how can I get the X and Y values?
I can't see '1E' byte in the data/message...!!
Understanding the message pattern (must be documented somewhere) is mandate...!!
08-12-2013 04:14 AM
Here is the frame of packets
08-13-2013 01:08 AM
Sorry but not getting any clue...!!
You need to really tell us, how to form/parse data from RAW packets...!! I think once you get this information, even you'll be able to do it at your own... but getting this information is required...!!
08-13-2013 11:13 PM
Would you please take a look at this link?
This may be the structure of packets.
Thanks
08-14-2013 02:25 AM
Here is the information that company gave me:
Command: SOP CMD LEN Data FCS
' SOP= 1byte 0x02
' CMD= 2bytes MSB LSB
' LEN= 1byte LEN of bytes in Data field else 0
' FCS= 1byte (Frame check sequence) This field is computed as an XOR of all the bytes in the message starting with CMD
' and through the last byte of data. The receive XORs all the received data bytes as indicated above and the XORs the received FCS field.
' If the sum is not equal to zero, the received packet is in error.
' CMD: Bit 15-12 =Cmd Type, Bit 11-0 = Cmd Number.
' Cmd Type: Bit 0 - Response bit - if set, this bit indicates a response message.
' Cmd Type: Bit 1 - Subscription bit - if set, this bit indicates that this message was the result of a subscription to a callback service.
' Cmd Type: Bit 2 - Debug/Trace bit - if set, this bit indicates that this message is either a Debug or Trace message.
' Cmd Type: Bit 3 - Reserved
' Command Number is the least significant 12 bits of the CMD field.
' 0x000-0x07F System Commands (RAM R/W, Debug,Trace,etc)
' 0x080-0x0FF MAC Interface
' 0x100-0x3FF NWK Interface
' 0x400-0x4FF PHY Interface
' 0x500-0x5FF SPI
' 0x600-0x6FF Sequence Interface
' 0x800-0x8FF APS Interface
' 0x900-0x9FF AF Interface
' 0xA00-0xAFF ZDO Interface
' 0xB00-0xBFF Device Interface
And the Cluster ID 0x0014
Case Z_SYS_APP_MSG '02 10 18 Len then data in d as below
'1 bytes-Application Endpoint CB=203 fot this app
'2-Source address-low byte first - of the received message
'1-Source endpoint of the received message
'2-Cluster ID - low byte first - of the received message
'1-Length of the received message
'xx- received (over-the-air) message. Section 3 message formats by Cluster ID.
'Cluster ID:0x0014
'1-Status 0=Success 1=Not enough reference node responding.
'2-Blind node's calculated X Postion Bits 15-2 meters bits 1-0 0.25 meters.
'2-Blind node's calculated Y Postion Bits 15-2 meters bits 1-0 0.25 meters.
'1-Number of reference nodes used in calculation 0-8
'2-Closest (based on RSSI) reference node's short address 0x0000-0xFFFA,0xFFFE is invalid
'2-Closest reference node's X postion. Bits 15-2 meters bits 1-0 0.25 meters.
'2-Closest reference node's Y postion. Bits 15-2 meters bits 1-0 0.25 meters.
'1-Closest reference node's RSSI
08-14-2013 06:24 AM
08-15-2013 01:08 AM
Ok. Thanks, I got it!!!!!!!