oookay.
I was having the same problems like BigSilly (?) on the first few pages, with the same gamepad.
xpad is blacklisted, endpoints had been tested hardcoded as both 1 and 2, but it still wouldn't allow the driver to claim that interface.
So I did a little bit of treachery, stealing the interface from the kernel (not my code, stolen from here http://www.c-plusplus.de/forum/viewt...is-243643.html)
Code:
void forceClaimInterface( usb_dev_handle *targetDevice, int interfaceNumber ){
int nRet = -1;
for( int i = 0; i < nRetries; i++)
{
if(1)
{
nRet = usb_claim_interface( targetDevice, interfaceNumber);
if( nRet < 0)
{
std::cerr << "openUSBDevice: try to claim interface again..." << std::endl;
if( usb_detach_kernel_driver_np( targetDevice, interfaceNumber ) < 0)
{
printf( "failed to detach kernel driver from USB device...");
return;
}
}
else
{
std::cerr << "openUSBDevice: claimed interface successfully" << std::endl;
break;
}
}
}
}
and then it told me this:
Code:
openUSBDevice: try to claim interface again...
openUSBDevice: claimed interface successfully
Starting with uinput... done
Your Xbox/Xbox360 controller should now be available as:
/dev/input/js0
/dev/input/event5
Press Ctrl-c to quit
Well. When using jstest, js0 and event5 are removed again, and jstest tells me those files do not exist (they are removed when using jstest, not before).
When disconnecting and reconnecting the gamepad to the usb-port, a new js0 is created.
Both jscalibrator and jstest then think to know my device, but don't react to any buttons/pads whatsoever.
any idea on what to do?
EDIT: Wrong thread. Actually should have landed in here.
Bookmarks