PORTS Forum

Ports and Interfaces => USB => Topic started by: RichardW on March 19, 2016, 08:02:55 pm

Title: How to sniff Joystick data
Post by: RichardW on March 19, 2016, 08:02:55 pm
Hi everybody,

I am new to the USB programming and bought USB Complete 5th. but did not find an answer for my problem.
I want to read (sniff) the data generated by a joystick and use it to trigger some selfmade effects (feedback for more realistic experience).

The question is: Is it possible to sniff USB data and what is a good starting point / catchword  to start from?
Anybody here that can give me a hint?

Thanks

Title: Re: How to sniff Joystick data
Post by: Jan Axelson on March 19, 2016, 08:56:37 pm
If you want to change the behavior of the joystick, you will need to write a filter driver. See:

https://msdn.microsoft.com/en-us/library/windows/hardware/ff565644%28v=vs.85%29.aspx

https://github.com/Microsoft/Windows-driver-samples/tree/master/hid/firefly
Title: Re: How to sniff Joystick data
Post by: RichardW on March 20, 2016, 08:20:40 am
Dear Jan,

thank You for fast answer. But may be You got me wrong, I do not want to modify the bahaviour of the joystick.
I want to detect if the firebutton is pressed, with that information I want to trigger a self designed hardware that creates extended light effects outside the game monitor.
I look for a passive listener of the Joysticks USB datastream

Thank You
Title: Re: How to sniff Joystick data
Post by: Jan Axelson on March 20, 2016, 10:33:37 am
These should help in explaining how to monitor joystick input on a Windows system:

https://msdn.microsoft.com/en-us/library/windows/desktop/bb153252%28v=vs.85%29.aspx

http://www.codeproject.com/Tips/850730/Obtaining-Input-Form-a-Joystick-with-Csharp-and-Di

You would then need to write code and provide a hardware interface to control your self-designed hardware.