python - PyUSB does not get response from XBox One Controller -
i trying read xbox 1 controller responses keys. have found idvendor , idproduct using
dev = usb.core.find(find_all=true)
this controller works fine on ubuntu since use in steam, there no problem of drivers.
when device object , try read 0s:
dev = usb.core.find(idvendor=xxx, idproduct=xxx) interface = 0 endpoint = dev[0][(0,0)][0] if dev.is_kernel_driver_active(interface) true: dev.detach_kernel_driver(interface) usb.util.claim_interface(dev, interface) collected = 0 attempts = 50 while collected < attempts : try: data = dev.read(endpoint.bendpointaddress,endpoint.wmaxpacketsize) collected += 1 print data array('b', [0, 0, 0, ...] array('b', [0, 0, 0, ...] array('b', [0, 0, 0, ...] etc
i tried filter responses 0s have never recieved anything.
any help?
thanks in advance!
Comments
Post a Comment