changeing port speed over a socket

I have a situation where I’m connecting from a linux box (Fedora RC3) to a serial device via a TS4 W using a socket connection.

When the serial device powers up it looks for a 9600 baud connection. Several configuration packets are exchanged and then I send it a packet requesting 38400 baud.

Obviously the line setting on the TS4 is originally 9600 baud, and I must change it during the connection. My first thought was something like:

  1. send 38400 baud request packet to device
  2. system(“rsh ts4IPaddress ‘set line range=4 baud=38400’”);

and set the relevant user to have no password (security is not an issue here). The problem is that root access is required to change speeds and of course that user must have a password.

So I have two questions:

  1. Is there any way to change serial speed on a line non-interactively over a TCP/IP connection?

  2. If there isn’t, will using the Realport stuff allow me do the normal low level ioctl / tcsetattr / cfsetiospeed sort of calls that I would do to if the device were directly connected to the computer?

Thanks for your help!

Using RealPort along with the standard ioctls would be my recommendation. The RealPort driver tty devices are designed to behave like the built-in serial ports and accept the standard ioctls.

Otherwise, these devices are RFC-2217 compliant.