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.

LMX2820EVM: Python Test Automation

Part Number: LMX2820EVM
Other Parts Discussed in Thread: TICSPRO-SW

Hello,

I would like to use python to automate testing of the LMS2820EVM board. I am using a win 64 bit system.

At first, I made sure I was able to connect to the device using the TICS PRO UI (V1.7.6.2), and I was able to observed the RFOUTPUT A using default settings  on a spectrum Analyzer. 

Within the TICs pro package, I attempted connecting to the dev board using TICSPRO_TCP,py python script by passing in default IP address and port to class TICSProTCPClient :

TICSProTCPClient("127.0.0.1","9001") but I could not connect and here is capture of the response I received:
Could not connect on try 1, trying again until count reaches >= 30
Could not connect on try 2, trying again until count reaches >= 30
Could not connect on try 3, trying again until count reaches >= 30
....
Is this the recommended method to automate testing using Python? if so, are there are any steps I need to make on the GUI before I try to make the socket connection? 
Am I using the correct host IP "127.0.0.1" and port "9001"? These were the default values in the python script.
Any tips on how to establish a connection would be greatly appreciated.
  • It occurs to me that there's no obvious module documentation, so the error here is we didn't properly explain what needs to happen to set the server up. I'll correct the documentation for the next release.

    On initialization, TICS Pro looks at a specific INI file (at time of writing, C:\ProgramData\Texas Instruments\TICS Pro\Configurations\TICS Pro.ini; this is likely to change to C:\Program Files (x86)\Texas Instruments\TICS Pro\settings.ini in the near future), and based on the state of the TCP section in the INI, it will start the TCP server. By default we distribute TICS Pro with the TCP server disabled; unless the TCP section in the INI is modified to set TCPCLIENT = true, the TCP server does not start.

    Please take a look at the start_ticspro function within the TICSPro_TCP.py module. This function will modify the INI file settings to properly initialize the server at the port of your choosing, and can also connect to an instance of TICS Pro that has already been started if the server was started manually.

  • Thanks for the prompt response, Derek.

    I downloaded TICSPRO-SW  TICS Pro v1.7.6.2, 10-Oct-2023 and the folder C:\ProgramData\Texas Instruments\TICS Pro\ does not have any .ini files.

    The only files that start with TICS_PRO in that folder are :

    TICSPro_TCP.py

    TICS_Pro_Manifest (HTML)

    TICS_Pro_Release_Notes (HTML)

    TICS PRO.exe.config 

    TIC PRO.exe

    Do I need to install a different version of the SW?

  • Currently, the relevant INI is at C:\ProgramData\Texas Instruments\TICS Pro\Configurations\TICS Pro.ini - you missed the "Configurations" folder.

    The list of files you provided also sounds like the contents of the "Program Files (x86)" TICS Pro directory - the INI is not there yet:

  • I was trying to take a screen shot and attach to the thread but I was not able to figure out why it wouldn't navigate to the folder where I placed the screenshots. Anyways, I forgot to mention earlier that the folder "C:\ProgramData\Texas Instruments\TICS Pro"  does not contain a configurations folder! The only folder within the root directory "Drivers" and that does not contain any configuration files. It seems to me like the folder is missing from release. 

    I just tried downloading the release to a new machine and I don't see the folder "Configurations" 

  • I just uninstalled my local copy of TICS Pro and reinstalled using the 1.7.6.2 binary I downloaded from https://www.ti.com/tool/download/TICSPRO-SW, and it unpacked profiles to my "C:\ProgramData\Texas Instruments\TICS Pro" directory. I'm not sure why you don't have the profiles installed.

    Can you verify that you have the correct installer MD5? It should match 86850df10f1cfab5bdbcb522587fdf37. The Get-FileHash cmdlet in powershell is a quick way to do this.

    Assuming you have a verified correct file, can you try reinstalling, and if a menu option pops up indicating you already have files in some location, click "yes" to overwrite them?

  • I am getting a different Hash number when I used your method to readback MD5:

    Algorithm Hash Path
    --------- ---- ----
    SHA256 A4BC3F2BEFD6F20FB1390DE6AA6349C3B212FD3B872243A468B3F8E361C75703 C:\Users\PULSAR-TEST\Downloads\TICSPro1.7.6.2_10-OCT-2023.exe

    I tried uninstalling and deleting the folder and re-installing and I got the same thing. 

    I tried to go to the older version of the SW,TICSPRO-SW  TICS Pro v1.7.5.15, 30-Jun-2023, and it also gave me a different Hash number than what is listed on TI's Website "af40b20a9ed2303cabe97576554bc49f"

    Algorithm Hash Path
    --------- ---- ----
    SHA256 2B5263FC9E576013BBD54CA3E2463B0127C833BFC510BE6BBF5FE2A2ABF331CA C:\Users\PULSAR-TEST\Downloads\snac072av (1)\TICS Pro Install, Ver 1.7.5.15, 30-JUN-2023.exe

    However, I looked up another method of checking MD5 using CMD and it matched the number you have:

    C:\Users\PULSAR-TEST\Downloads>certutil -hashfile C:\Users\PULSAR-TEST\Downloads\TICSPro1.7.6.2_10-OCT-2023.exe MD5
    MD5 hash of C:\Users\PULSAR-TEST\Downloads\TICSPro1.7.6.2_10-OCT-2023.exe:
    86850df10f1cfab5bdbcb522587fdf37

    One Interesting thing happened is that I created a empty folder called "Configurations" inside destination folder "C:\Program Files (x86)\Texas Instruments\TICS Pro" and when I uninstalled the TICS PRO using control Panel, "Configurations" was not removed while all other components within that folder got deleted.

    FYI, When I install the package, I have a total of 27 items in the TICS Pro folder. 

  • The MD5 hash of the installer will necessarily be different from the SHA256 hash, since the algorithms and their output sizes are different. In any case, it looks like you have the correct MD5, so I don't think anything happened to the installer.

    If you've got TICS Pro installed, and you can open the application and operate device profiles, you must have a configurations folder in C:\ProgramData path. If you didn't have this path, TICS Pro would crash immediately after opening. So unless you are also experiencing application crashes whenever you try to open the application, I think you're looking in the wrong location.

    C:\ProgramData is not C:\Program Files (x86). C:\ProgramData is a separate, typically hidden folder on Windows systems. If you don't have hidden folder visibility enabled, you will need to navigate directly to C:\ProgramData\Texas Instruments\TICS Pro\Configurations via the file explorer address bar. The image below shows the path, as well as the hidden directory (slightly transparent folder color). I have set hidden directories to visible on my machine.

    If you prefer to navigate visually through the folder hierarchy, you can also set hidden directories to visible under the View tab in file explorer:

    I wouldn't worry about the Configurations directory you created in C:\Program Files (x86)\Texas Instruments\TICS Pro not going away - the uninstall process only creates a manifest of files created by the original installer, so anything created after that (whether by the application or the user) is untouched. And since the installed Configurations directory is in the C:\ProgramData path instead of the C:\Program Files (x86) path, adding a directory named "Configurations" to the C:\Program Files (x86) path has no impact on the application one way or another.

    ---

    This is all sort of beside the point... TICSPro_TCP.py has a start_ticspro function at the bottom of the module which already has the INI location specified as a default argument. The start_ticspro function should take care of editing the config file to start up the TCP server automatically if the right arguments are given. So I think the quick way forward is to test the start_ticspro function (which returns a TICSProTCPClient instance on success), and let the module perform manipulation on the INI file.

  • Thanks Derek. I definitely was not looking in the correct folder (Apologies). I found the ini file in C:\ProgramData\Texas Instruments\TICS Pro\Configurations  and I was to change TCP setting and  connect to the LXM2820.