serial port initialization

serial port initialization

Post by Andries Kruith » Wed, 22 Feb 1995 22:21:22



Hi all,

I've got the following configuration:

Pentium 60MHz, 2 serial ports: 1x16450, 1x16550
Printer NEC P6 connected to serial port #2 (/dev/ttyS1)
Linux kernel V1.1.89

I'm trying to set up the serial port to correctly talk to the printer.
Under DOS this works fine, by specifing 'MODE COM2: 9600,n,8,1,B'
(the B is for retrying to send characters to the printer when the
device is not ready yet)

Under Linux I've tried several settings for the serial port, but
without succes. I can send files to the printer, but when the printer
signals that its buffer is full, this is not recognized by linux.
This means that I can send any file smaller then 2 KByte to the printer,
and it will print correctly, but files larger then 2 KByte are not
printed completely (the printer has an internal 2 KByte buffer).
I send files to the printer with 'cat filename > /dev/ttyS1'

The printer is set up for no parity, 9600 baud, rts/cts handshaking,
and that's what I've specified with stty (and this IS set, which I
verified with 'stty -a')

Can somebody tell me what I am doing wrong, or give me any hints?
Or, does anybody know how does initializes the serial port, so that
I can specify exactly the same settings under Linux?

All help appreciated,

Andries

---
------------------------------------
| Message is author's opinion only |
|                                  |
| Andries Kruithof                 |
| Schlumberger Geco-Prakla         |

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

 
 
 

1. Mgetty and Solaris 8 serial port initialization

I have installed the mgetty package on one of my Solaris boxes
to allow me to utilize my fax-modem to receive both faxes as well
as data calls on the modem line.  It really does work great.
However, after a system reboot, mgetty (which is spawned directly
from /etc/inittab like gettys of old) complains that it cannot
open the line and respawns several times before settling down:

01/13 16:23:34 a/b  mod: cannot open line /dev/cua/b: Device busy
01/13 16:23:34 a/b  open device /dev/cua/b failed: Device busy
01/13 16:23:34 a/b  cannot get terminal line dev=cua/b, exiting: Device busy

The following line has been added to the end of /etc/inittab to
invoke it:

mg:34:respawn:/usr/local/sbin/mgetty cua/b

I'm theorizing that the underlying problem is that the serial port
is not yet initialized at the time mgetty is first invoked.  I
understand that several stream modules must be pushed for the port
to look like a serial port.

My question is:  Who does this?  ttymon?  How can one tell when it
has been accomplished?  Or, am I all wet and the problem is not
related to this at all?

Thanks in advance,
Rob

2. screen blanker makes w32i board _white_, not black

3. Initialization of Serial Ports

4. Gated 3.5.5 on linux

5. serial port on v490 and Serial port on StorEdge 3510

6. Need X11 setup for C&T B65555 Video Chip

7. Serial port to serial port copying software

8. ftp server setup problem.

9. Send traffic from one serial port out to another serial port

10. Serial port to serial port with null modem cable

11. Serial port - to - serial port networking

12. serial console - lilo serial= no serial port input

13. eth0 and eth1 "Delaying eth0 Initialization" and "Delaying eth1 Initialization" errors