This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

IWR6843AOP: The TLV header and frame definitions are mismatch in SDK document, Vital Sign, and People Counting example codes.

Part Number: IWR6843AOP

Hi TI expert,

 While doing the labs of `vital_signs_with_people_tracking` and `3D_people_counting_demo`, we find some mismatch in TLV definition. We have two questions below:

=============================================

  1. Header Frame Structure Issue:

When I used `vital_signs_tracking_6843AOP_demo.bin` in `radar_toolbox_1_00_01_07\source\ti\examples\Medical\Vital_Signs_With_People_Tracking\prebuilt_binaries`, read the serial output data from COM6, which is the data port,
and I got a byte array as below: 

b'\x02\x01\x04\x03\x06\x05\x08\x07\x04\x00\x05\x03\x98\x00\x00\x00Ch\n\x00\x1b\x00\x00\x00\x00\x00\x00\x00\t\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\xfc\x03\x00\x00\\\x00\x00\x00\n\xd7#<\n\xd7#<\xf7\xcc\x929o\x12\x839\n\xd7#=\x02\xa0\xf0`\xdd\n\x80\x00\xff\xa0\xd0\x08\xd9\x0b\x80\x00\x04\xa2\xf0`\xdd\n\x86\x00\xff\xa2\xd0\x08\xd9\x0b\x86\x00\x04\xa3\xf0`\xdd\n\x8d\x00\xff\xa3\xd0\x08\xd9\x0b\x8d\x00\x04\xa5\xf0`\xdd\n\x90\x00\x02\xa5\xd0\x08\xd9\x0b\x90\x00\x02\xa7\xd0\x08\xd9\x0b\x93\x00\xfd\x03\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00'

 According to the definition of header frame structure in below demo projects: `vital_signs_with_people_tracking` and `3D_people_counting_demo`:

  • Because the length of header frame defined in vital signs with people tracking user guide is 48 bytes, the first tlv type will locate in 49 ~ 52th byte,
    then, the tlv type data should be `\n\xd7#<` (convert to int is 1008981770)
  • Because the length of header frame defined in 3d people counting demo implementation user guide is 40 bytes, the first tlv type will locate in 41 ~ 44th byte,
    then, the tlv type data should be `\xfc\x03\x00\x00` (convert to int is 1020)

So, the first question is, why my first result does not match to any type described in user guide? (% TlV Type: 06 = Point cloud, 07 = Target object list, 08 = Target index )

=============================================

  1. GUI Tool Issue: Visualizer with demo code:

By following the step of Quickstart Section 4. in vital_signs_with_people_tracking_user_guide (see below captured picture),

  > 

I find the function, `parseStandardFrame()`, which is in charge of processing UART output data,

 

   def parseStandardFrame(frameData):

        headerStruct = 'Q8I'

        frameHeaderLen = struct.calcsize(headerStruct)

 

header frame is regarded as 40 bytes length for all cases.

 

So, the second question is, why is the header struct 'Q8I' instead of 'Q9I2H`?

=============================================

  • Hi Jesse, 

    Can you please share the script that you are using to read in the byte stream?

    The sync/magic work pattern of 8 bytes seems to be coming in correctly, but it looks like there are some unusual artifacts in the byte stream as well like "\\\". Also, there is a strange presence of escape characters in your byte stream: "\n\xd7#<\n\xd7#". 

    Please refer to the source code of the python-based Industrial Visualizer. If you can run an visualize the vitals lab, then you know this application is properly parsing the incoming data, so you can just copy this section of the code that is doing the reading and parsing.

    Regards,
    Luke

  • Luke,

     1. Customer ran gui_main.py with VSCode and add a print function, `print(frameDate)`, at gui_parser.py Line 145 to get the byte data.
    2. As mention above, why the visualizer using 'Q8I' to unpack the header frame data from this demo, the description of header frame structure in vital_signs_with_people_tracking_user_guide.html tells the length is 48 bytes, that is, the structure should be 'Q9I2H`.

  • As you can see in this document, Understanding UART Data Output Format, the standard header is 40bytes ('Q8I'). The document stating 48 bytes may be incorrect, allow me to investigate and get back to you by next Monday.

    Regards,
    Luke

  • Hello,

    Yes, I have confirmed that 48 bytes is a typo. This lab is built upon the People Tracking Demo, so you can reference its description for the frame header to see the frame header is for Vitals. This document's description of the frame header is also correct: Understanding UART Data Output Format.

    Tthe parsing inside of the Industrial Visualizer is exactly what is used for parsing Vitals, so use that as the rule-of-thumb.

    Regards,
    Luke