|
From: Dean S. <dea...@gm...> - 2024-06-28 17:45:11
|
Tried a dumb thing. The device I'm getting from the hotplug arrival event isn't usable. I open a handle and make a few token attempts to claim the interface. When that fails I close the handle. Then I search for the device again and connect to that. *Best Regards,* *Dean Sands | Software Engineer * Email: dea...@gm... | Cell: 832 692 7411 On Fri, Jun 28, 2024 at 8:05 AM Dean Sands <dea...@gm...> wrote: > Host: aarch64 Linux 5.10.198 > libUSB: v1.0.24.11584 > Client: CDC device with bulk endpoints > > Hi, libUSB, > My goal is to connect to a device, then unplug it by hand after some time, > then be able to reconnect it after I plug it back in. > And it almost works. > The hotplug callbacks are working fine, and I'm able to open the device > and get a handle. > However, the "new" device returns LIBUSB_ERROR_INVALID_PARAM when I try > to do anything with the interface. > Can I claim the interface? Invalid Param. > Is the Kernel Driver attached? Invalid Param. > Can I detach it anyway? Invalid Param. > OK, maybe I need to set the configuration. LIBUSB_ERROR_BUSY. That's not > good. > Stopping the program and restarting works but that's not what I need. > How do I reconnect? > > > *Best Regards,* > *Dean Sands* > |