|
From: Jordan J. R. <jj...@co...> - 2011-06-08 07:53:38
|
Still at a complete loss as to why I can't use usb_dfu.py. It seems
that the trouble starts with the line:
state_packed = self._device.ctrl_transfer(0xA1, Request.GETSTATE, 0, 0, 1)
As far as I can tell, the specan code (which runs fine) sends only one command:
self._device.ctrl_transfer(0x40, 27, low_frequency, high_frequency)
so it could be that only 0x40-type commands make it through. No idea
why that would be.
Normally, I'm using libusb1.0. However, I also tried libusb0.1 by invoking:
dev = usb.core.find(backend=usb.backend.libusb01.get_backend(),idVendor=0xFFFF,
idProduct=0x0004)
That yielded the same error as before, so it seems that whatever is
going on happens underneath the interface layer.
jjriggs@tomcat:~/projects/ubertooth/trunk/host/usb_dfu$ python usb_dfu.py
Traceback (most recent call last):
File "usb_dfu.py", line 237, in <module>
dfu.enter_dfu_mode()
File "usb_dfu.py", line 154, in enter_dfu_mode
state = dfu.get_state()
File "usb_dfu.py", line 132, in get_state
state_packed = self._device.ctrl_transfer(0xA1, Request.GETSTATE, 0, 0, 1)
File "/usr/local/lib/python2.7/dist-packages/usb/core.py", line 678,
in ctrl_transfer
self.__get_timeout(timeout)
File "/usr/local/lib/python2.7/dist-packages/usb/_debug.py", line
52, in do_trace
return f(*args, **named_args)
File "/usr/local/lib/python2.7/dist-packages/usb/backend/libusb01.py",
line 518, in ctrl_transfer
timeout
File "/usr/local/lib/python2.7/dist-packages/usb/backend/libusb01.py",
line 364, in _check
raise USBError(errmsg)
usb.core.USBError: error sending control message: Broken pipe
Also, I'm running 32-bit Ubuntu 11.04. Really starting to get frustrated here.
Jordan
|