Re: Controlling the serial port at kernel level

From: Richard B. Johnson (
Date: Thu May 02 2002 - 09:34:00 EST

On Thu, 2 May 2002, wrote:

> Hallo,
> I would find the way of controlling the serial port at kernel
> level; more precisely I want to set the DTR or RTS pin of the serial
> port whenever my host send or receive an udp packet.
> Can you help me?
> Please answer me as soon as possible!!!
> Thanks a lot !!

If this is just a hack and you don't care if it screws up
somebody else using the UART, just....

#define BASE 0x3f8 // For first UART
#define MCR 0x3fc
#define DTR 0x01
#define RTS 0x02

... read/write directly to the MCR port, saving the bits you don't
want to change... You use the outb(value, port); and inb(port);
instructions for ports.

Dick Johnson

Penguin : Linux version 2.4.18 on an i686 machine (797.90 BogoMips).

                 Windows-2000/Professional isn't.

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

This archive was generated by hypermail 2b29 : Tue May 07 2002 - 22:00:13 EST