We have a need to replace an AIX based serial port system with a Linux based one. There are a couple of applications that are running on the system, one that uses only modems and another that uses a mixture of input only, output only, or 2 way serial communications. This application needs to control the TTY device using termios. I have been unable to find any documentation on the web page as to which tcsetattr flags are supported. Apart from reading through the driver code is there are a document that describes which parts of termios the driver supports or doesn’t support ?
Thank you for any help,
I do have a bit of info for you. On Linux, we support POSIX compliant ioctl calls, so tcgetattr and tcsetattr calls should work for you.
To get the settings:
int tcgetattr(int fd, struct termios *termios_p);
The variable in the struct:
tcflag_t c_cflag; /* control modes */
Then to set them:
int tcsetattr(int fd, int optional_actions, struct termios *termios_p);
If you check the man pages under Linux (man tcgetattr, man tcsetattr) it will show you how to do it.
> I do have a bit of info for you. On Linux, we
> support POSIX compliant ioctl calls, so tcgetattr and
> tcsetattr calls should work for you.
Sorry if I didn’t make myself clear, but I assumed the calls would be supported, I was specifically looking for whether all the standard serial port flags are supported, e.g. CLOCAL, HUPCL ? Given that our application runs successfully on Linux against “standard” (onboard PC) serial ports, whether the application can be run against a RealPort device (to a, for example, PortServer TS 8) without any changes ?
All the various flags in termios are supported.
The whole goal of the RealPort software is to be able to take software written for a standard serial port, and be able to use it without change against a “network” enabled serial port, like the PortServer TS 8 product.
> All the various flags in termios are supported.
> The whole goal of the RealPort software is to be able
> to take software written for a standard serial port,
> and be able to use it without change against a
> “network” enabled serial port, like the PortServer TS
> 8 product.
I had hoped that to be that case, but I will just mention that I have had a hard time finding that kind of clear statement on the web pages or the documentation for the suppliers of these types of remote serial port solutions (Digi, Moxa, etc.), and by that I mean technical descriptions, not “marketing” descriptions.
At any rate, thanks for such quick and clear responses to my question. A thumbs up for a Digi solution !