Search code examples
pythonremote-accesstrace32lauterbach

lauterbach t32-remote T32_Init() api returns -1[T32_ERR_COM_RECEIVE_FAIL]


Using T32-remote api to automate test. Lauterbach is connected through Ethernet

config.t32:

RCL=NETASSIST
PACKLEN=1024
PORT=20000

; Environment variables
OS=
ID=T32
TMP=<temp_path>
SYS=C:\T32


; i.e. EtherNET
PBI=
NET                     
;TRACE32 HW
NODE=<IP>/<hostname>                ; hostname assigned to the TRACE32 device
CONNECTIONMODE=AUTOCONNECT

; Printer settings 
PRINTER=WINDOWS

Script:

self.t32_api.T32_Config(b"NODE=", b"localhost")
self.t32_api.T32_Config(b"PORT=", b"20000")
self.t32_api.T32_Config(b"PACKLEN=", b"1024")
self.t32_api.T32_Init()

Config returns 0 but T32_Init returns -1[Receiving API response failed].

for ethernet connection to T32, Am I missing some configuration?


Solution

  • After multiple experiments found that If we are executing from demo/python directory, T32_start and its instance need to keep it open. If it is open then script will execute without any error.

    If node is given in config.t32, No need to add again in code "localHost" will work.