libusb issue when opening device

Steve Markgraf steve at steve-m.de
Sun Jan 26 20:03:33 UTC 2020


Hi,

On 26.01.20 18:25, Carl-Fredrik Enell wrote:
> On my system (Debian stable, kernel 4.19) this change results in
> "Error  enabling  IF 0  altsetting  1". Reverting  to  the
> previous version (with Interface 1) solved the problem for me.

Thanks for reporting this issue, you are not the first one to encounter
it as it seems.

> I will investigate a bit more whether it is related to kernel or
> libusb versions. Or have I missed some other required configuration?

Do you see any reason in the kernel log (like "not enough bandwidth")?
Some googling showed that the FX3 of the bladeRF has the same issue when
setting the altsetting. It seems to only happen for them if the device
wasn't properly released, and they added a libusb_reset_device() as a
workaround. But in our case this happens always on some machines as far
as I understand.

I've just pushed a workaround for now that falls back to the old
behavior (claiming interface 1) in case switching interface 0 to
altsetting 1. This will of course only work for Kernels < 5.5.0-rc6,
but so far nobody with a Kernel >= 5.5.0-rc6 reported the altsetting
issue.

Thanks for further investigating, so far I cannot reproduce this issue
here, maybe I should set up a machine with Kernel 4.19.
What USB 3.0 host controller and version of libusb are you using?

Regards,
Steve


More information about the osmocom-sdr mailing list