Receive USB signals \ custom USB driver

Hello all this is my first thread on this forum, I am wanting to plug in a USB device (Xbox 360 controller, 2nd keyboard and 2nd mouse) and to receive the signals from the devises. Ultimately I want to make the system think that a 2nd keyboard and mouse is an Xbox 360 controller by changing the signals from the keyboard and mouse to that of an Xbox 360 controller.

I am not a complete novice, but my background is in software and not hardware. Does anyone have any idea on how to archive this or know of any resources on this topic?

Presumably I would need to create a custom driver that would listen on a USB port, then I could capture certain signals from the controller and keyboard. I could then change a keyboard signal to a signal that is relevant to the controller. For example, if a button on the controller produced 00110110 ..., and "w" produced 11001010 ... on the keyboard, I could create a switch statement or similar that will on input of 11001010 ... change it to 00110110 ....

Sorry if I haven’t explained myself well, but as I stated before my background is in software and not hardware.

Thanks in advance.
I would imagine that all you need to do is intercept the message, and translate and convert it into a format that is consistent with the XBOX 360 controller.

How you do this I don't know.
Anyone have any idea?
closed account (D80DSL3A)
You will need to use the Xinput api provided by microsoft for this:
http://msdn.microsoft.com/en-us/library/windows/desktop/ee417001%28v=vs.85%29.aspx

EDIT:
This api is pleasantly simple to use, as long as you are just looking to read the controller state (advanced stuff like force feedback, etc is more involved).
If you have questions I may be able to help. I am using this api myself for a usb connected Xbox 360 controller in a game.
Last edited on
Thanks for the replay, but I don't think that will be suitable for what I am wanting to achieve. I need to receive the raw data from the USB Xbox controller so that I can translate a signal from another USB device into that of the Xbox controller.
closed account (D80DSL3A)
OK. You might still wish to peruse that link to unsuitable content.
For example, it is revealed there what data type this raw data consists of.

typedef struct _XINPUT_GAMEPAD {
WORD wButtons;
BYTE bLeftTrigger;
BYTE bRightTrigger;
SHORT sThumbLX;
SHORT sThumbLY;
SHORT xThumbRX;
SHORT xThumbRY;
} XINPUT_GAMEPAD, *PXINPUT_GAMEPAD;

and this is very relevant to your task.

You need to write and register your own device driver for that which intercepts and forward all I/O operations through the real (existing) XBOX360 driver installed on your system.

I think Microsoft called this "a filter driver". You should download Windows DDK to start, but this is in no way a task suitable for a beginner.
Topic archived. No new replies allowed.