We're running SCO Unix Openserver 5.05 and I'm having trouble with serial communication between the com2 serial port and a handheld device. Downloading data from Unix to the handheld works perfectly, but the other way around creates a major problem. I don't know whether it's a buffer overflow or... (1 Reply)
I am having trouble with a device connected through a serial port on my sun workstation ( I am running solaris 7).
The seriel device works on an identical workstation running the same o/s version but when I move it to the initial workstation it doesn't work. I am using an rs232 serial cable and... (1 Reply)
Hi
I have just re-installed Compaq ML350 G2 Server with Unix SCO 5.0.5 and
informix DBMS .
on this server we have 2 serial ports , unfortunately its not working.
Can anyone help me to check the serial ports working or not OR guide me
to reconfigure it.
I have attached a device with... (1 Reply)
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,
How can i configure my modem in AIX thru serial port (sa0-->tty0)
I have two port serial card configured as sa0
I created tty1 which port is tty0 and which port is tty1 how can i know?? (1 Reply)
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)
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)
i am running solaris 10 in my vmware workstation. How to setup a console for my solaris box. in Vmware i could see a serial port option. can some one help me on how i can setup a console . (0 Replies)
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)
Discussion started by: joboy
5 Replies
LEARN ABOUT MINIX
termios
TERMIOS(3) Library Functions Manual TERMIOS(3)NAME
termios, tcgetattr, tcsetattr, cfgetispeed, cfgetospeed, cfsetispeed, cfsetospeed, tcsendbreak, tcdrain, tcflush, tcflow - change terminal
attributes
SYNOPSIS
#include <termios.h>
int tcgetattr(int fd, struct termios *tp)
int tcsetattr(int fd, int action, const struct termios *tp)
speed_t cfgetispeed(const struct termios *tp)
speed_t cfgetospeed(const struct termios *tp)
int cfsetispeed(struct termios *tp, speed_t speed)
int cfsetospeed(struct termios *tp, speed_t speed)
int tcsendbreak(int fd, int duration)
int tcdrain(int fd)
int tcflush(int fd, int queue_selector)
int tcflow(int fd, int action)
DESCRIPTION
These are the user functions that modify the tty attributes mentioned in tty(4). In the following, fd refers to an open terminal device
file, tp is the address of a struct termios, and speed and values of type speed_t are equal to one of the B0, B50, etc. baud rate symbols.
All functions, symbols, and types are declared in <termios.h>.
The effects of the tty functions are:
tcgetattr(fd, tp)
Get the current settings of the tty attributes.
tcsetattr(fd, TCSANOW, tp)
Set the terminal attributes. The change occurs immediately.
tcsetattr(fd, TCSADRAIN, tp)
Set the terminal attributes. The change occurs once all the output waiting in the output queues has been transmitted. This should
be used when options affecting output are changed.
tcsetattr(fd, TCSAFLUSH, tp)
Set the terminal attributes. But first wait until all the output waiting in the output queues has been transmitted. All input
waiting in the input queues is then discarded and the change is made. This should be used when switching from canonical to non-
canonical mode or vice-versa. (Oddly enough, this is seldom what you want, because it discards typeahead. An editing shell does
the Right Thing if it uses TCSANOW instead. POSIX may not guarantee good results, but in practice most systems make the canonical
input available in raw mode.)
cfgetispeed(tp)
Return the input baud rate encoded in the termios structure.
cfgetospeed(tp)
Return the output baud rate encoded in the termios structure.
cfsetispeed(tp, speed)
Encode the new input baud rate into the termios structure.
cfsetospeed(tp, speed)
Encode the new output baud rate into the termios structure.
tcsendbreak(fd, duration)
Emit a break condition on a serial line for a time indicated by duration. (Always 0.4 seconds under Minix, duration is ignored.)
tcdrain(fd)
Wait until all output waiting in the output queues has been transmitted.
tcflush(fd, TCIFLUSH)
Flush the input queue. (I.e. discard it.)
tcflush(fd, TCOFLUSH)
Flush the output queue.
tcflush(fd, TCIOFLUSH)
Flush the input and output queues.
tcflow(fd, TCOOFF)
Suspend output. (Like the effect of STOP.)
tcflow(fd, TCOON)
Restart output. (Like the effect of START.)
tcflow(fd, TCIOFF)
Transmit a STOP character intended to make the remote device stop transmitting data.
tcflow(fd, TCION)
Transmit a START character to restart the remote device.
SEE ALSO stty(1), tty(4).
DIAGNOSTICS
All functions return 0 unless otherwise specified, and -1 on error with errno set to indicate the type of error. The most notable errors
are ENOTTY if fd does not refer to a terminal device, and EINTR if one of the functions waiting for output to drain is interrupted.
NOTES
It may be interesting to know that the functions operating on the tty are directly translated into the following Minix ioctl requests:
TCGETS, TCSETS (now), TCSETSW (drain), TCSETSF, (flush), TCSBRK, TCDRAIN, TCFLSH, and TCFLOW. You should only use this knowledge when try-
ing to understand the tty driver code, of course.
BUGS AUTHOR
Kees J. Bot (kjb@cs.vu.nl)
TERMIOS(3)