Page 1 of 1

USB keyboard project question

Posted: Tue Jul 03, 2012 11:51 pm
by centromere
Hi there. I would like to use the RPi as a way to learn how to write kernel drivers. I have years of userland programming experience, but little kernel programming experience.

I'd like to start off by making the RPi emulate a USB keyboard. That is to say, I want to have the RPi send keystrokes to the PC as if a keyboard had typed them. Do you guys have any suggestions about the best way to approach this educational project?

Re: USB keyboard project question

Posted: Wed Jul 04, 2012 12:52 am
by mahjongg
Sending keystrokes how? not as a USB keyboard device, as the RPI model B can only act as a USB master, not as a USB slave device!

There has been talk of patching a model a board so it can act as a USB on the go device, but there is no certainty this will ever work.

Maybe the PI can emulate a PS/2 keyboard, but it will take some hardware and software to do so.

Re: USB keyboard project question

Posted: Sat Jul 07, 2012 5:04 pm
by centromere
I wanted to do it as a slave device.

Re: USB keyboard project question

Posted: Sat Jul 07, 2012 10:58 pm
by clickykbd
As mentioned, the Pi is a USB Host, not a device per say. plus USB kernel level stuff is "hard" as I understand.

what is the desired behavior/use on the PC end? I'd be willing to bet there is a userspace approach that more directly fits your goals? (except the one about learning kernel programming).