centromere
Posts: 2
Joined: Tue Jul 03, 2012 11:44 pm

USB keyboard project question

Tue Jul 03, 2012 11:51 pm

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?

User avatar
mahjongg
Forum Moderator
Forum Moderator
Posts: 12357
Joined: Sun Mar 11, 2012 12:19 am
Location: South Holland, The Netherlands

Re: USB keyboard project question

Wed Jul 04, 2012 12:52 am

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.

centromere
Posts: 2
Joined: Tue Jul 03, 2012 11:44 pm

Re: USB keyboard project question

Sat Jul 07, 2012 5:04 pm

I wanted to do it as a slave device.

User avatar
clickykbd
Posts: 117
Joined: Wed Jun 06, 2012 2:21 am
Location: Austin, Texas
Contact: Website

Re: USB keyboard project question

Sat Jul 07, 2012 10:58 pm

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).

Return to “Other projects”