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.

IWR6843AOPEVM: Unable to connect to UART data port using Vital Signs firmware

Part Number: IWR6843AOPEVM
Other Parts Discussed in Thread: UNIFLASH, IWR6843

Tool/software:

Hello,

I have the IWR6843AOPEVM board. I am able to use Uniflash to load the Out of the Box demo just fine, the Visualizer works, and I can see data coming from the UART.

These are my Python commands:

cliCom = serial.Serial(cliCom, 115200, parity=serial.PARITY_NONE, stopbits=serial.STOPBITS_ONE, timeout=0.6)
dataCom = serial.Serial(dataCom, 921600, parity=serial.PARITY_NONE, stopbits=serial.STOPBITS_ONE, timeout=0.6)

PROBLEM:

am able to use the Uniflash to load the Vital Signs demo, but when I use the Visualizer, my port does not connect. I have no data coming from the UART.

I am running the Visualizer with the Python 3.10 dependency, and I am on Ubuntu 24.04 LTS.  

Any ideas as to what could be going wrong with my connection between the two binary demos would be greatly appreciated?

  • Hi

    From device perspective there, there is no difference in booting out of box demo or vital signs. If the OOB is running on the device then I do not see any reason why Vital signs would not work. However, configurations will be different for both of them. But at least I do not see any issue in connection.

    Can you also try to run 3D people tracking demo and see if you are able to connect?

    Regards

  • The actual port connection works as I can see data in Industrial Visualizer, however, I can not retrieve it from the UART.   

    I am able to Flash the 3D_people_track_6843_demo.bin successfully. 

    I then unplugged the board, switched the S3 off, and moved
    SOP2: S2.1 OFF, S2.2 ON, S2,3 On , S2.4 OFF
    SOP1: S1.1 OFF, S1.2 ON, S1,3 OFF , S2.4 OFF

    follow these configuration instructions: move file:///Users/ona/Documents/radar_toolbox_3_20_00_04/source/ti/examples/Industrial_and_Personal_Electronics/People_Tracking/3D_People_Tracking/docs/3d_people_tracking_user_guide.html 

    USING the 3D People Tracker Code and Config:

    Using a Python script:

    I load the config 'AOP_6m_default`, found in the RadarToolbox, onto the board.

    I run the code, and no data from the UART:

    `# Python implementation for IWR6843
    import serial
    from serial.tools import list_ports
    from serial import SerialException
    import logging
    import time
    import json
    log = logging.getLogger(__name__)
    log.setLevel(logging.INFO)
    def connectComPorts(cliCom, dataCom):
        cliCom = serial.Serial(cliCom, 115200, parity=serial.PARITY_NONE, stopbits=serial.STOPBITS_ONE, timeout=0.6)
        dataCom = serial.Serial(dataCom, 921600, parity=serial.PARITY_NONE, stopbits=serial.STOPBITS_ONE, timeout=0.6)
        dataCom.reset_output_buffer()
        log.warning('Connected')
        return cliCom, dataCom
    serialPorts = list(list_ports.comports())
    CLI_XDS_SERIAL_PORT_NAME = 'XDS110 Class Application/User UART'
    DATA_XDS_SERIAL_PORT_NAME = 'XDS110 Class Auxiliary Data Port'
    CLI_SIL_SERIAL_PORT_NAME = 'Enhanced Com Port'
    DATA_SIL_SERIAL_PORT_NAME = 'Standard Com Port'
    # Find default CLI Port and Data Port
    cliCom = ""
    dataCom = ""
    for port in serialPorts:
        print(port.description)
        if (
            CLI_XDS_SERIAL_PORT_NAME in port.description
            or CLI_SIL_SERIAL_PORT_NAME.lower() in port.description.lower()
        ):
            log.warning(f"CLI COM Port found: {port.device}")
            comText = port.device
            # comText = comText.replace("COM", "")
            cliCom = comText
        elif (
            DATA_XDS_SERIAL_PORT_NAME in port.description
            or DATA_SIL_SERIAL_PORT_NAME.lower() in port.description.lower()
        ):
            log.warning(f"Data COM Port found: {port.device}")
            comText = port.device
            # comText = comText.replace("COM", "")
            dataCom = comText
    print("Serial Ports found:")
    print(f"CLI Port: {cliCom}")
    print(f"Data Port: {dataCom}")
    configFilePath = "config_people_AOP_6m_default"
    print(f"Sending Config File::: {configFilePath}")
    mmWaveUARTControl, mmwaveUartData = connectComPorts(cliCom, dataCom)
    # Send config to radar device
    with open(configFilePath, "r") as configFile:
        for configLine in configFile.readlines():
            print(configLine)
            # Send config value to the control port
            mmWaveUARTControl.write(configLine.encode())
            # Wait for response from control port
            echo = mmWaveUARTControl.readline()
            done = mmWaveUARTControl.readline()
            prompt = mmWaveUARTControl.read(11)
            print(f"echo {echo.decode('utf-8')} Done {done.decode('utf-8')} Prompt: {prompt.decode('utf-8')}")
            time.sleep(0.05)
    print("REading Data...")
    MAGIC_NUMBER: bytes = b'\x02\x01\x04\x03\x06\x05\x08\x07'
    while True:
        a = mmwaveUartData.read(48)
        print(f"mmwaveUartData:::{a}")
        if not a:
            print("No data received from mmwaveUartData. Check device and connection.")
            # raise SerialException()
        index = [x for x in range(len(a)) if a[x:x+len(MAGIC_NUMBER)] == MAGIC_NUMBER]
        print(len(a))
        print(index)

    OUTPUT:

    echo sensorStart
    Done Debug: Init Calibration Status = 0xffe
    Error -1

    REading Data...
    mmwaveUartData:::b''
    No data received from mmwaveUartData. Check device and connection.
    0
    []
    mmwaveUartData:::b''
    No data received from mmwaveUartData. Check device and connection.
    0
    []
    mmwaveUartData:::b''
    No data received from mmwaveUartData. Check device and connection.

    `

    Vital Signs with People Detection

    Using the same Python script as above:

    I load the config 'vital_signs_AOP_6m`, found in the RadarToolbox, onto the board.

    I run the same code as above, and no data from the UART:

    `
    # Python implementation for IWR6843

    import serial
    from serial.tools import list_ports
    from serial import SerialException
    import logging
    import time
    import json

    log = logging.getLogger(__name__)
    log.setLevel(logging.INFO)


    def connectComPorts(cliCom, dataCom):
        cliCom = serial.Serial(cliCom, 115200, parity=serial.PARITY_NONE, stopbits=serial.STOPBITS_ONE, timeout=0.6)
        dataCom = serial.Serial(dataCom, 921600, parity=serial.PARITY_NONE, stopbits=serial.STOPBITS_ONE, timeout=0.6)
        dataCom.reset_output_buffer()
        log.warning('Connected')
        return cliCom, dataCom


    serialPorts = list(list_ports.comports())
    CLI_XDS_SERIAL_PORT_NAME = 'XDS110 Class Application/User UART'
    DATA_XDS_SERIAL_PORT_NAME = 'XDS110 Class Auxiliary Data Port'
    CLI_SIL_SERIAL_PORT_NAME = 'Enhanced Com Port'
    DATA_SIL_SERIAL_PORT_NAME = 'Standard Com Port'

    # Find default CLI Port and Data Port
    cliCom = ""
    dataCom = ""
    for port in serialPorts:
        print(port.description)
        if (
            CLI_XDS_SERIAL_PORT_NAME in port.description
            or CLI_SIL_SERIAL_PORT_NAME.lower() in port.description.lower()
        ):
            log.warning(f"CLI COM Port found: {port.device}")
            comText = port.device
            # comText = comText.replace("COM", "")
            cliCom = comText

        elif (
            DATA_XDS_SERIAL_PORT_NAME in port.description
            or DATA_SIL_SERIAL_PORT_NAME.lower() in port.description.lower()
        ):
            log.warning(f"Data COM Port found: {port.device}")
            comText = port.device
            # comText = comText.replace("COM", "")
            dataCom = comText

    print("Serial Ports found:")
    print(f"CLI Port: {cliCom}")
    print(f"Data Port: {dataCom}")

    configFilePath = "config_vital_signs_AOP_6m"
    print(f"Sending Config File::: {configFilePath}")

    mmWaveUARTControl, mmwaveUartData = connectComPorts(cliCom, dataCom)

    # Send config to radar device
    with open(configFilePath, "r") as configFile:
        for configLine in configFile.readlines():
            print(configLine)
            # Send config value to the control port
            mmWaveUARTControl.write(configLine.encode())
            # Wait for response from control port
            echo = mmWaveUARTControl.readline()
            done = mmWaveUARTControl.readline()
            prompt = mmWaveUARTControl.read(11)
            print(f"echo {echo.decode('utf-8')} Done {done.decode('utf-8')} Prompt: {prompt.decode('utf-8')}")
            time.sleep(0.05)

    print("REading Data...")
    MAGIC_NUMBER: bytes = b'\x02\x01\x04\x03\x06\x05\x08\x07'
    while True:
        a = mmwaveUartData.read(48)
        print(f"mmwaveUartData:::{a}")
        if not a:
            print("No data received from mmwaveUartData. Check device and connection.")
            # raise SerialException()
        index = [x for x in range(len(a)) if a[x:x+len(MAGIC_NUMBER)] == MAGIC_NUMBER]
        print(len(a))
        print(index)`

    OUTPUT:

    echo sensorStart
    Done Debug: Init Calibration Status = 0xffe
    Error -1

    REading Data...
    mmwaveUartData:::b''
    No data received from mmwaveUartData. Check device and connection.
    0
    []
    mmwaveUartData:::b''
    No data received from mmwaveUartData. Check device and connection.
    0
    []
    mmwaveUartData:::b''
    No data received from mmwaveUartData. Check device and connection.


    I am able to get data for the out of box demo, but not for 3D_people_track_6843_demo or for the Vital_Signs demo.

    Using the code from the Visualizer: 

    `ERROR: No data detected on COM Port, read timed out
    Be sure that the device is in the proper mode, and that the cfg you are sending is valid
    ERROR: No data detected on COM Port, read timed out
    Be sure that the device is in the proper mode, and that the cfg you are sending is valid
    ERROR: No data detected on COM Port, read timed out

    `

      

  • Hi

    It seems it is not a demo issue but some connection problem. Did you run the Out of box demo using the Industrial visualizer?

    Is it possible to isolate if the problem exists with cfg port or data port? Do you see any prompt on the cfg port when you send the cfg?

    Regards