Try to detect all /dev/js* devices that can be opened
Requires root, a kernel with USB host mode and joydev.ko!
Connect USB gamepads/joysticks and control games/emulators with input method support.
Details, video and source code available on the website.