Date: Tue, 11 Oct 2022 20:35:47 +1030 From: "Daniel O'Connor" <darius@dons.net.au> To: Hans Petter Selasky <hps@selasky.org> Cc: freebsd-usb@freebsd.org Subject: Re: Failed control transfer Message-ID: <DF88E7EE-B986-4853-9CF8-9047B084F03C@dons.net.au> In-Reply-To: <7e1de023-094f-4247-146d-9e8f498ae0e7@selasky.org> References: <7FF9CB5C-26B0-4DBA-B7E4-80DBF50A80BB@dons.net.au> <7e1de023-094f-4247-146d-9e8f498ae0e7@selasky.org>
index | next in thread | previous in thread | raw e-mail
> On 11 Oct 2022, at 17:27, Hans Petter Selasky <hps@selasky.org> wrote:
>
> On 10/11/22 06:18, Daniel O'Connor wrote:
>> I am trying to fix a bug in xc3sprog whereby it can't read the hardware ID (serial number) from the Xilinx programming tool.
>
> Sometimes you need to ask for 255 bytes and allow the control transfer to short terminate. Many USB devices are broken this way, that they cannot return partial USB descriptors.
I tried that but no dice:
In [6]: d.ctrl_transfer(0xc0, 176, 0x42, 0, 256, 1000)
---------------------------------------------------------------------------
USBError Traceback (most recent call last)
...
USBError: [Errno 19] No device
The device does do short transfers for other requests, eg a version request:
In [7]: d.ctrl_transfer(0xc0, 176, 0x50, 258, 2, 100)
Out[7]: array('B', [5, 0])
--
Daniel O'Connor
"The nice thing about standards is that there
are so many of them to choose from."
-- Andrew Tanenbaum
home |
help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?DF88E7EE-B986-4853-9CF8-9047B084F03C>
