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.

IWR1642BOOST: Loading config file through program on linux

Part Number: IWR1642BOOST


HI, 

I have tried to implement the python code given in ( link) to load the configuration using the UART port. 

But after i read the data from the data port, i read nothing. When I load it using the mmwave Visualiser, I am able to read the data. 

My code which I am using to load the saved configuration file is 

import time
import serial

CLIport = serial.Serial('/dev/ttyACM0', 115200)

 

for line in open('/home/user/Desktop/profile.cfg'):
	config = line.rstrip('\r\n') 
	for i in config:
		x = i + '\n'
		CLIport.write(x.encode())
		print(x.encode())
		time.sleep(0.01)
		


CLIport.close();
print(" Port Closed");

Where can I be going wrong?

  • Anup,

    I would be happy to assist. There are three aspects that you may need to look at when configuring the device via the Config UART port from Linux.

    One issue that may be occurring is that the code you posted does not wait for the mmWave sensor to return a successful confirmation on the Config UART port from each command sent. Different commands take different amounts of time to complete and the next command should not be issued until the previous command returns a successful confirmation. The confirmation should contain the word "Done" if the command was successful.

    Another issue could be that after booting the mmWave board, the first response from the mmWave device over the Config UART port may contain some invalid characters received during the initial Linux serial port setup. One way to workaround this Linux serial port issue is to check the response from each command and try the command a second time if the response did not include "Done".

    One other behavior we have seen on Linux is that when the mmWave sensor is powered on or connected to the PC, even though the /dev/ttyACM0 Config serial port shows up immediately, it takes about 20 seconds for it to completely initialize and be ready. If accessed too early, the port may show up as busy. Also, after the mmWave sensor configuration is complete, the Data serial port may take 20 seconds to become available before the output data can be read. If accessed earlier, it may show up as busy.

    We do not have any Python examples, but we do have some C-code inside our Robot OS Point Cloud Visualizer lab (dev.ti.com/.../ that you could use as an example for Linux mmWave sensor configuration. After downloading the code package for that lab (see the lab's user guide for more information on downloading), please see the code in the following file as an example.

    ti_mmwave_rospkg_<ver>.zip\ti_mmwave_rospkg\src\mmWaveQuickConfig.cpp -> contains the Config UART port command/response handling

    Please mark the thread as answered if your issue is resolved or reply if more support is required.

    Regards,
    John