Open duaneellissd opened 1 year ago
Is Tera Term Macro does not help to do that?
no it does not. teraterm macro does not communicate with our oscilliscopes and powervsupplies.
https://int.rigol.com/Images/VNAProgrammingGuideEN_tcm7-4161.pdf
we have extensive tools written in python that collect data from the device under test and push data into a database engine
i think if we could connect to teraterm via a socket and send commands
Hmm, Tera Term does not have a interface like that.
To be clear a socket based solution for me would be best because I need to control it from different languages (python and c#) and other weird proprietary test tools
an active or comm interface would not work well because some systems are remote (in a server or running in a VM)
Hello, @duaneellissd Modern keysight instruments support a raw socket communication called Scpi-raw (TCP:5025). If your instrument support SCPI-RAW, you can send commands over a simple socket.
understood its not just that…’we have years of development in python. we do not want to re implement the entire (years) worth of development in teraterm script. for example our python test code also logs test data into a database we dont want to re-impliment the sql database code too. and it creates reports we give customers.
what we need is the ability to “type keys” and to see a copy of the raw bytes received
I understand that you have a lot of python source code and want to create only python programs.
But keysight recommends the PyVISA library for python programming. It is a python front end library for communicating with an instrument. Keysight > Python Example Scripts
You can use pyvisa and keysight's instrument SICL/LAN communication (it uses TCP 5025) to receive the raw bytes. I think your problem may be solved easier if you use pyvisa instead of Teraterm.
yea we use exactly that package now to talk to many instruments
let me describe another part of our problem.
we make linux computers. for new boards the flash is blank. so we download uboot via a jtag interface. then tell it to run uboot
uboot starts and prints messages and then there are a number of human steps where we interact with the uboot prompt example: fpga has a device serial number we need to record as part of our manufacturing process. and provisioning the ip address, mac address and other things interactively with teraterm.
one of those provisioning steps causes uboot to tftp the flash image and reprogram the board.
we could script that part with pyserial and pyexpect because python can talk to the sql data base we use.
but later parts of the test involve an application sending escape sequences to paint/draw a text (teraterm) window and that is what we would loose. ie launch teraterm then kill, take over serial port later then launch it again… messy
but if tera term could accept a command via a socket, ie txdata: ‘Hello world\r’ and when teraterm received bytes it could send via the socket a message like txdata: 0x12 0x34 0x56 0x78 0x90 that wold work to script interactions with the target.
if something goes wrong and pyserial has the serial port (not tera term) the display is bad/wrong because pyserial does not display things like teraterm does by interpreting esc[A to move the cursor.
You want a software that is a bridge, sometimes a logger, and sometimes a human-machine interface. That may be challenging software.
No - I just want 4 things: From an external application - ie: Python
1) Ability to launch TERATERM such that it connect to a specified comport, using a fixed setting ie: 115200,8,n,1 2) Ability to close/exit/kill tera term
3) Ability for my python code to see what bytes tera term has received on the serial port 4) Ability for my python code to "press keys" on the keyboard as if a human pressed those keys.
i would like to use tera term in an automation system for testing a device. the device uses a serial ports to control the device
my automation system runs under linux and uses python.
i would like to a) start tera term from the command line (batch file) and tell teraterm the comport and baudrate but the important feature is a (socket) port number to listen for a connection.
i want to send commands to teraterm, for example if i send txbyte(0x0d) to the socket teraterm would transmit the byte to the serial port.
when my device sends data to teraterm i want that data sent to the socket. for example if my devices sends the bytes ABC, teraterm would send to the socket rxbytes(0x41,0x42,0x43)
when i close the socket teraterm would continue to run as normal.
why this? because my python scripts can continue to control my power supplies and oscilloscopes attached to my board. and my python test scripts can also control the applications on the board
tools like pyserial do not decode the byte (vt100) sequence and do not have a “display”
tools like selenium (a web browsertest tool) has this ability with web browsers, i would like this for a serial terminal using teraterm