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. I used 'Open' in tcl to create a serial connection in Linux.
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? or Linux? 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.
Unfortunately I don't know TCL well but I have other suggestions... First off make sure that the port is set to the correct baud rate and mode.
should set it to 9600-baud, 8-bit, one stop bit, no parity, raw mode(i.e, ctrl-c doesn't send SIGINT!). This doesn't have to be run inside your program, and it ought to remember once run once unless something else changes it(or your system reboots).
Unfortunately I don't know TCL well but I have other suggestions... First off make sure that the port is set to the correct baud rate and mode.
should set it to 9600-baud, 8-bit, one stop bit, no parity, raw mode(i.e, ctrl-c doesn't send SIGINT!). This doesn't have to be run inside your program, and it ought to remember once run once unless something else changes it(or your system reboots).
Thanks!
I had done both stty configuration and double check with minicom -s
The settings is correct, but what I am interested in is which serial port is going to open, on windows or linux, as there is no specific option in Open command in tcl.
Thus, I doubt the Tcl Open my windows serial port (since i had virtual linux, all ttys are mounted to com) rather than the one in my Linux server.
Thus, I doubt the Tcl Open my windows serial port (since i had virtual linux, all ttys are mounted to com) rather than the one in my Linux server.
I think Windows still has special names for devices lurking around in a DOS-like manner. You might, just might, be able to get away with opening COM9 or something.
Hello,
I have an unloaded T5140 machine and want to access the ILOM for the first time and subsequently the network port after that., and then load Solaris 10 the final January 2011 build.
The first part is what confuses me -the cabling.
I am coming from a Windows machine (w/appropriate... (5 Replies)
I am using ReflectionX on a windows PC to run an application on a Solaris box. The application uses the serial port and expects a definition like: /dev/ttyb
Is there a way to use the PC serial port through ReflectionX?
PC is running Windows-XP
Solaris Box is:
Sun Microsystems sun4u... (1 Reply)
Hi Everyone,
In my environment, I have few T5220. On the iLOM Management Card, I have both Network and Serial port are cabled, I don't have any issues while I try to connect using Network Management port, but when I try to connect the serial port for the same server which is actually connected... (3 Replies)
Hi,
I have a external board connected to my serial port. I need to execute "shutdown -r now" command when system boot up. When system boots up it requires a username ans password. Then I need to run my command. I can use rc script but that is rebooting system before it asks for username and... (0 Replies)
I have a need to determine when a string has been completely sent via a serial port from a standard 'C' application. The code is as follows:
SerialPort_Send = open (pPortString, O_WRONLY | O_NOCTTY | O_NONBLOCK);
write (SerialPort_Send, pCommandString, strlen (pCommandString));
... (2 Replies)
Hello!
Can someone advice me which method I will use if I want to communicate with device via RS232 serial port with this requirements:
1. Serial port is opened in non-canonical mode.
2. All the time I need to check is there something to read.
3. If I have to write something I need to write it... (6 Replies)
Hi,
I am working with solaris 9,SUN-Blade-100 and I want to communicate with the Serial port.To check whether the port is working or not.I write code and when I execute the file,then I got the output--
According to this,serial port is not found.can anyone please tell me how to configure the... (1 Reply)
Hi,
I am working with Sun Solaris 9 Sparc,Sun-Blade-100.In my application,I need to monitor the UPS using Serial port.
When I am using JRE 1.4 in my application,I am able to monitor it but when I am upgrading the JRE version from 1.4 to JRE1.6. I am not able to monitor the UPS.It is showing the... (1 Reply)
Hi,
I'm having a issue on communicating the serial GSM modem in Sun Solaris 5.9
To implement such connectiom, i'm using the "tip -115200 /dev/term/a" command and i successfully get the "connected" status
And then i send a "AT" message and receive "OK" response from the modem :D
Anyhow,... (0 Replies)