Re: Serial port monitoring with keyboard LEDs

From: Brad Hards (
Date: Sun Sep 22 2002 - 01:26:26 EST

Hash: SHA1

On Sun, 22 Sep 2002 07:06, wrote:
> I'm using a 2.4.19 kernel as a reference, and looking at putting my code in
> /drivers/char/serial.c, specifically at the serial_in and serial_out
> functions, is this the Right Thing or not? Obviously the LEDs won't
> actually reflect what is going out on the serial line, because of
> buffering, etc, and also, what's going to be more useful - just flash on
> and off for each byte sent, or LED on for 1, LED off for 0 bit? That would
> be even more of an approximation to what's actually happening on the serial
> line, because obviously we're sending a byte at a time to the serial port.
Not sure about the serial code.

However you can't update the keyboard LEDs at anything like normal serial port
rates. And even if you could update at 10kHz, you just varied the brightness,
rather than caused any real "blinking"

> Any pointers to docs I should read would be appreicated :-)
You are going to cause problems. There are other users of keyboard LEDs in the
kernel (eg for notifying of an oops). It isn't looking too good.

If you are really intent on doing this, you can probably manage this from
userspace, using the event interface and the application that is sending data
over the serial interface. Of course, you'd need to have a suitable keyboard
(probably only USB or ADB in 2.4.x).


- -- 22-25Jan2003. Perth, Australia. Birds in Black.
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see


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 : Mon Sep 23 2002 - 22:00:35 EST