I want to write linux/win application in python. But I can't get win version working on linux works nice.
The minimum example to shov error is below. In both systems selecting right device works, but control write fain on windows with bad parametter error.
anny idea?
Code: Select all
import usb1, libusb1
bmRequestType=libusb1.LIBUSB_TYPE_CLASS | libusb1.LIBUSB_ENDPOINT_IN
bRequest=libusb1.LIBUSB_REQUEST_SET_CONFIGURATION
buf=chr(0)+chr(0)+chr(0)
context = usb1.USBContext()
deviceList=context.getDeviceList(skip_on_error=True)
for device in deviceList:
if '16c0:05df' in str(device):
deviceName=device.getProduct()
if deviceName=='ISM_RTX':
usbHandle=device.open()
print usbHandle.controlWrite(bmRequestType, bRequest, 0, 0, buf,0)