Subject: Re: wsmux inject
To: Iain Hibbert <plunky@rya-online.net>
From: Garrett D'Amore <garrett_damore@tadpole.com>
List: tech-kern
Date: 03/14/2006 10:31:15
Iain Hibbert wrote:
> On Tue, 14 Mar 2006, Martin Husemann wrote:
>
>   
>> On Mon, Mar 13, 2006 at 10:07:35PM +0000, Iain Hibbert wrote:
>>     
>>> Hi,
>>>   looking to inject events into wsmux from userland - have opened
>>> "/dev/wsconsctl0" (wsmouse) and "/dev/wsconsctl1" (wskbd) for writing, and
>>> injecting mouse events works fine, but keyboard events are vanishing in
>>> the kernel. After enabling wsmux_debug, I get this:
>>>       
>> Looking at wsmux_open it sounds like you need to open /dev/wskbd for writing,
>> that should be all that is needed.
>>     
>
> Hm, sort of - If I open that for reading with "hexdump /dev/wsmux1", then
> I can see the injected events showing on that input stream.
>
> But what I want is for wsdisplay0 to be reading from wsmux1 so that I can
> inject events and have them appear as normal keyboard events by wsdisplay0.
>
> I see the following in wskbd_attach()
>
> 	mux = sc->sc_base.me_dv.dv_cfdata->wskbddevcf_mux;
> 	if (ap->console) {
> 		/* Ignore mux for console; it always goes to the console mux. */
> 		/* printf(" (mux %d ignored for console)", mux); */
> 		mux = -1;
> 	}
>
> which could be causing this behaviour?
>
> Is this 'console mux' available to inject events into, or am I doomed?
>
> iain
>   
I saw this until I added "pseudo-device wsmux" into my kernel config. 
You might want to verify that a MUX is configured.

    -- Garrett

-- 
Garrett D'Amore, Principal Software Engineer
Tadpole Computer / Computing Technologies Division,
General Dynamics C4 Systems
http://www.tadpolecomputer.com/
Phone: 951 325-2134  Fax: 951 325-2191