USB keyboard on embedded system

Hi,

We're trying to get a USB keyboard working under X in our embedded system.

We are using a custom graphics chip, that provides support for a linux framebuffer device (kernel version 2.4). On top of this we are then running X, using the kdrive Xfbdev server.

We have plugged in a USB keyboard and mouse, and both are recognised by the kernel. Reading from the appropriate /dev/input/eventX device shows that both devices are working. We have successfully configured X to use the USB mouse.

However, we are not having any success in getting the keyboard to work under X. Our system console is on a serial port, and there is no 'standard' console for the keyboard to 'hook' up to.

Can anyone offer any advice as to how we can get this to work? Do we need to somehow 'divert' the USB keyboard to the console that X is using? If so, how do we do this?

Many thanks.

Andy

Reply to
Andy Hawkins
Loading thread data ...

You need to configure the X server to use the HID event interface to access the USB keyboard, instead of the kernel console keyboard interface it traditionally uses (synthesized for USB, incidentally, by the usbkbd module).

If there isn't an X driver for the keyboard event interface (and there really ought to be, although my desktop XFree86 installation doesn't seem to have one), then maybe you can get the usbkbd driver to work usefully.

--
Grant Taylor
Embedded Linux Consultant
 Click to see the full signature
Reply to
Grant Taylor

There doesn't appear to be any built-in support for the HID event interface I'm afraid.

Can you give more details on what you mean by 'get the usbkbd driver to work usefully'? I've been trying to work out exactly where the keypresses from the USB keyboard are being sent, but my knowledge of the internals of the kernel is still fairly limited at present.

Thanks.

Andy

Reply to
Andy Hawkins

to

how

I don't know if this could help , however you could try to see if this can suit you see: USB keyboard driver for arm-linux

formatting link

Cheers /helix

Reply to
Helix

Ah, here it is, it's a Debian-developed patch, or perhaps it's included in newer X.org/XFree releases.

formatting link

--
Grant Taylor
Embedded Linux Consultant
 Click to see the full signature
Reply to
Grant Taylor

The link at that URL goes to a place where there are no patches...

Anyone tell me where I can get them?

Thanks.

Andy

Reply to
Andy Hawkins

How odd. The readme there even describes them.

I assume that they've been rolled into the standard Debian XFree package; as such they ought to be in the diff or even orig sources found at

formatting link

--
Grant Taylor
Embedded Linux Consultant
 Click to see the full signature
Reply to
Grant Taylor

Thanks for that. I downloaded the diff and there are indeed patches for this. However, they're against the 'full' Xserver, rather than kdrive (that we're using).

Any idea if similar support is available for kdrive?

Thanks.

Andy

Reply to
Andy Hawkins

KDrive appears to simply be a minimally configured build of the usual XFree86 sources, with fixed configuration and a lightweight core. The instructions I found suggest that you can select arbitrary drivers for a kdrive server, although I'm sure a bit of fiddling will be needed for drivers that no one has tried before.

See

formatting link

--
Grant Taylor
Embedded Linux Consultant
 Click to see the full signature
Reply to
Grant Taylor

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.