From: betoman <be...@gm...> - 2008-01-15 18:46:28
|
hi, I have an IR interface with serial port and usb adapter... i have no serial port so im tryiing to use it with usb and python... my problem is that i cannot do anything xD I tried do this: *import usb for bus in usb.busses(): for dev in bus.devices: if dev.idVendor==0x4fc and dev.idProduct==0x201: IR=dev >>> IR.open().detachKernelDriver(IR.configurations[0].interfaces[0][0]) Traceback (most recent call last): File "<stdin>", line 1, in ? usb.USBError: could not detach kernel driver from interface 0: No data available >>> a.open().claimInterface(a.configurations[0].interfaces[0][0]) >>> >>> a.open().bulkRead(a.configurations [0].interfaces[0][0].endpoints[0].address,30) Traceback (most recent call last): File "<stdin>", line 1, in ? usb.USBError: could not detach kernel driver from interface 0: No data available* after bulkRead dmesg throws *usb 1-1: usbfs: process 4886 (python) did not claim interface 0 before use* and I dont know what i can do mi kernel : 2.6.22 im using Python 2.4.4 the IR interface is kosmos if anyone knows it... thanks |