Subject: Re: Wskbd
To: None <tech-kern@NetBSD.org>
From: anand lalgondar <firstname.lastname@example.org>
Date: 08/24/2003 15:24:52
Well I tried to open the /dev/console and was succesful in output the
characters. But that was a program written in shell, using open and ioctl
But if I have to accomplish the above mentiond with in the ukbd driver or in
wskbd driver, how can I go about this. This question is because:
1. Using "open" system call, it will return an integer (file descriptor)
that will be an offset to the set of open devices for the current process.
And "ioctl" will take this file descriptor as the first argument, a flag and
a pointer as second and the third respectively. How can I call these system
calls in the device driver, as these are ment for userlevel access. Even if
it is possible to call these system call thru the device driver program then
it is in-effecient since the system will generate a trap to go to kernel
level even though its executing the driver is the same mode.
2. How to get the file descriptor that is to be passed in the ioctl system
>From: Lennart Augustsson <email@example.com>
>To: anand lalgondar <firstname.lastname@example.org>
>CC: tech-kern@NetBSD.org, email@example.com
>Subject: Re: Wskbd
>Date: Fri, 22 Aug 2003 11:12:19 +0200
>You can open /dev/wskbd and read the raw events from the keyboard.
>If you want them to appear as if they came from a tty you can open that
>tty, decode the events from wskbd, and insert them in the tty input queue
>with ioctl TIOCSTI (if my memory serves me).
> -- Lennart
>anand lalgondar wrote:
>>Martin: Well, I don't have a graphics card, and I think the "split
>>console" concept depends on the graphics card.
>>On the i386 host machine I use "minicom" to communicate with the MIPS
>>Target Board, which gets all the file information from NFS. So the
>>keyboard of the i386 host machine acts as an input device to the MIPS
>>Target Board (Minicom connection serial-serial, 38400/8/N). The MIPS
>>Target Board has a machine dependent serial driver written that
>>accepts-input and outputs-data to minicom. So the console here is the
>>transmit/receive line of the serial port. That is fine.
>>But since I am testing USB Keyboard how can I redirect the output to the
>>above mentioned console.
>>Does USB Keyboard driver decode the inputs to ASCII values and pass it to
>>the upper layer (wskbd), or are they decoded in wskbd.
>>Is USB Keyboard completely independent. In the sense will it decode the
>>input characters completely and place it in a buffer that can be sent to
>>any device (either a character or a display device), without the help of
>>wskbd (wscons framework).
>>I assume the wskbd works within the wscons framework, i.e if there is no
>>wsdisplay then the whole wscons framework is not useful.
>>Can you provide some inputs regarding this.
>>Well thanks for both of you to getting involved in this discussion.
>>>From: Lennart Augustsson <firstname.lastname@example.org>
>>>To: Martin Husemann <email@example.com>
>>>CC: anand lalgondar <firstname.lastname@example.org>, tech-kern@NetBSD.org
>>>Subject: Re: Wskbd
>>>Date: Fri, 22 Aug 2003 00:29:43 +0200
>>>You could use a serial line as the keyboard for a console by writing
>>>a small program that accepts characters from the tty and injects them
>>>into the wskbd mux. A similar program, moused, already exists for
>>> -- Lennart
>>>Martin Husemann wrote:
>>>>On Thu, Aug 21, 2003 at 05:54:07PM +0530, anand lalgondar wrote:
>>>>>Now when I connect a USB keyboard it gets detected as "wskbd0 at ukbd0"
>>>>>in the dmesg. But when I press any key on the USB Keyboard it doesn't
>>>>>display anything. I assume this is because I dont have any wsdisplay.
>>>>I see. This is what is sometimes called "split console" on sparcs, where
>>>>can select at the firmware level to have input from serial console and
>>>>to the graphics card - or vice versa.
>>>>I think unfortunately wscons does not provide this ability currently,
>>>>is a desirable extension.
>>Dress up your desktop! Get the best wallpapers.
Over 6,70,000 brides and grooms.
http://www.bharatmatrimony.com/cgi-bin/bmclicks1.cgi?74 Click here to join