I have a script which uses termios.h to access the serial port of a SUN Sparc (/dev/term/b). The script uses the following code snippet to send via the tty.
$msg = "C2 RICE OK?\cJ";
$written = syswrite (PORT,$msg,12,0);
(PORT being the term filehandle)
Using a scope I have found that which ever incantation of \xOA or ^J I use, I always seem to send \0D\0A or crlf.
It appears that the code running the serial connection always prepends lf with cr. Anyone got any ideas how to stop this.
$msg = "C2 RICE OK?\cJ";
$written = syswrite (PORT,$msg,12,0);
(PORT being the term filehandle)
Using a scope I have found that which ever incantation of \xOA or ^J I use, I always seem to send \0D\0A or crlf.
It appears that the code running the serial connection always prepends lf with cr. Anyone got any ideas how to stop this.