Tcl Tk Serial Port Communication
Tcl Communication Mw41tm
Hi all: i wanna automate a test written in Tcl, but stuck in serial communication. I had 2 PC, one is my local Windows machine, the other one is my test Linux server. The Linux box is connected to the test board via serial port. So I wanna send commands and get output through the serial port. So i wrote a Tcl script, and wanna call the scripts in Windows, remotely connect to the Linux server and talk to the test device via serial port. It failed so far. Command conquer red alert retaliation ps1 iso.
Tcl Tk Serial Port Communication Number
I used 'Open' in tcl to create a serial connection in Linux. Set fh [ open /dev/ttyS0 RDWR] what I learn the reasons why this may not work are that (in my option): first, fh is a file descriptor if one open a file (in linux, all devices represent a file), so u cant monitor a live test, instead read a file line by line after a numbers of seconds. I doubt there is no eof in /dev/ttyS0, which means even u can read from it, if no incoming output, u can still read an empty string without issuing an error. Second, since i remotely connect to linux box from window pc, tcl interpreter is confused by which serial port i was trying to open, (windows? I am using a virtual Linux in Windows to call the script, connect to the Linux sever, trying to communicate the device connected to there.) I hope everyone understand my situation, and my purposes now. I really appreciate all your suggestion regarding how to remotely commnucate serial port in Tcl.