outputting from tty1a at 19200 baud

outputting from tty1a at 19200 baud

Post by Matt Rawli » Sat, 28 Oct 1995 04:00:00



Im trying to output a string out of the serial port.
Ive tried echoing out and redirecting it to tty1a and this works but
even thoug the port is configured to run at 19200 baud it only comes
out at 9600.
Can anyone tell me how I can output at 19200.
Cheers in advance
Matt Rawlins


 
 
 

outputting from tty1a at 19200 baud

Post by SEAN EMBR » Tue, 31 Oct 1995 04:00:00



>Im trying to output a string out of the serial port.
>Ive tried echoing out and redirecting it to tty1a and this works but
>even thoug the port is configured to run at 19200 baud it only comes
>out at 9600.
>Can anyone tell me how I can output at 19200.

Yes. Place this in /etc/rc.d/8/userdef. Be sure to kill it if you want to
use the port for a terminal.

(stty 19200 ixon ixoff opost ; while : ; do sleep 3600 ; done)<
/dev/tty??&

This is the classic "Hold open" script used since day one for serial
printers. The only problem will be reading from the port, as every other
charecter will be lost, i *think*. PS, man stty for modes you may need.

 
 
 

outputting from tty1a at 19200 baud

Post by Stephen M. Du » Wed, 01 Nov 1995 04:00:00


$Im trying to output a string out of the serial port.
$Ive tried echoing out and redirecting it to tty1a and this works but
$even thoug the port is configured to run at 19200 baud it only comes
$out at 9600.

   This probably means you did

stty 19200 < /dev/tty1a
cat foo > /dev/tty1a

   Don't forget that port settings reset to default when the port
isn't in use - and between when the device is closed after the
stty command runs and opened before the cat command runs, it's
not in use, so it resets to 9600.

   Run both commands together with stdin and stdout redirected:

(stty 19200; cat foo) </dev/tty1a >/dev/tty1a
--

----------------------------------------------------------------------------
Stephen M. Dunn, CNE, ACE, Sr. Systems Analyst, United System Solutions Inc.
104 Carnforth Road, Toronto, ON, Canada M4A 2K7          (416) 750-7946 x251

 
 
 

outputting from tty1a at 19200 baud

Post by Don Lee - Sr. Software En » Thu, 02 Nov 1995 04:00:00


: Im trying to output a string out of the serial port.
: Ive tried echoing out and redirecting it to tty1a and this works but
: even thoug the port is configured to run at 19200 baud it only comes
: out at 9600.
: Can anyone tell me how I can output at 19200.
: Cheers in advance
: Matt Rawlins

I have a feeling that you are setting the baud rate by doing something
like stty 19200 < /dev/tty1a, which does set the baudrate to 19200,
but as soon as stty exits (and there are no more processes that have
/dev/tty1a open) the baudrate goes back to the default which is 9600.

You can do the following to keep it at 19200, but I don't know
exactly what you are trying to perform so I don't know if this
is a solution for you or not.

sh -c 'stty 19200; echo "19200 test"  ' > /dev/tty1a </dev/tty1a

This way the shell keeps /dev/tty1a open until after the echo has
completed.

Don

 
 
 

1. 19200 baud printer - the solution

I recently asked how to set up a serial line for a printer under Solaris 2.4
at a speed other than the default 9600 baud. I was successful. My thanks to
each of you named below for responding (each with a different suggestion).





The simplest solution that worked was:
1. Use admintool to create a local printer
2. As root    % lpadmin -p printername -o stty=19200
3. I used a cable with RTS/CTS etc signals so there was no need
   to change the ttya-... eeprom values.

Thanks again, Edward

--
-------------------------------------------------------------------------------

Physics Department      Phone:  002 207588   Fax: 002 202410
University of Tasmania, GPO Box 252C, Hobart 7001, Australia

2. Horribly slow telnet, rlogin, strange net problems

3. 19200 baud printer setup - how to?

4. HELP ! editing /etc/passwd in single user mode on HP-UX 10.20 !!!!

5. ate max baud 19,200 = v.poor...

6. Installing SuSE Linux Issues

7. device tty1a and tty1A

8. Linux & RS-232 Interface with 6402 UART

9. Diff. Btwn. /dev/tty1a and /dev/tty1A

10. tty1a versus tty1A

11. Trust SCSI Connect 19200 Scanner

12. 9600 ok, 19200 won't work

13. Modem only 19200