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.

TICSPRO-SW: application won't communicate on loopback address

Part Number: TICSPRO-SW


Hello,

I'm running TicsPro on my Windows 10 laptop and I'm automating it with a Python script which uses the functions provided in the TICSPro_TCP.py library.

It all works good: when TicsPro is launched, setting are loaded, the application start to listen on 127.0.0.1:11000 and it can now receive instructions from the TICSProTCPClient object just created.

When I try to do the same on another machine, which runs Windows 11, the TicsPro process doesn't open any port and therefore I cannot establish any communication.

This is verifiable with the cmd command

netstat -aon

as none of the active connections listed is associated with the open TicsPro application.

I tried deactivating the firewall and reinstalling TicsPro multiple times, but without success.

Can you help me troubleshoot this issue please? Could it be related to the operative system?

Thanks in advance,

Francesco

  • I just tested this on my Windows 11 test machine, and observed no issues.

    In the interpreter, I issued the following instructions:

    import os
    os.chdir("C:\\Program Files (x86)\\Texas Instruments\\TICS Pro")
    
    import TICSPro_TCP
    
    tp = TICSPro_TCP.connect_to_ticspro(enable_server=True, port=11000, start_new_process=True)
    # at this point I am fully connected
    

    Part of the process for enabling TICS Pro TCP server is writing some instructions into the settings.ini file colocated with the binary. If you're just starting the TICSProTCPClient without enabling the TCP server in settings.ini, the client won't be able to connect.

    You may want to take a look at some of the additional methods located at the bottom of TICSPro_TCP.py, such as update_ticspro_ini which is called from within connect_to_ticspro to update the settings.ini file before TICS Pro is started, or GetTICSProInstances which uses the same netstat -aon command to find TICS Pro instances with active TCP servers.

  • Hello Derek,

    thanks for your help. With your code, TicsPro was launched and it connected to the desired port.

    I noticed that the file settings.ini has been modified by then and now, each time I open (with a standard double click) or I call TicsPro, it automatically connects to 127.0.0.1:11000.

    For completeness, I just mention that I was using the start_ticspro function in my python script like this:

    from TICSPro_TCP import *
    
    t = start_ticspro(enable_server=True)

    After uninstalling, deleting all the left files and a fresh installation the settings.ini file looks like this:

    [PATHS]
    CONFIG_DIR=C:\ProgramData\Texas Instruments\TICS Pro\Configurations
    
    [API]
    TCPCLIENT=false
    TCPLOCAL=true
    TCPPORT=11000
    DISABLECLOSEBUTTON=false

    After your code it looks like this:

    [PATHS]
    CONFIG_DIR = C:\ProgramData\Texas Instruments\TICS Pro\Configurations
    
    [API]
    TCPCLIENT = true
    TCPLOCAL = true
    TCPPORT = 11000
    DISABLECLOSEBUTTON = false