Repository navigation
Conversation
* The kernel driver might be there and it does not bother us and cannot be detached via libusb1 * set_configuration() is already a soft reset, full reset() returns an error
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #763 +/- ##
=======================================
Coverage 79.07% 79.07%
=======================================
Files 21 21
Lines 1754 1754
Branches 243 243
=======================================
Hits 1387 1387
Misses 286 286
Partials 81 81
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
|
Hi @saper . Do you mean that in the BSD platform the USB is handled differently than in Linux so Those checks are needed specially on the Linux platform to let python get exclusive control of the USB device, so we should keep the checks on Linux. |
|
I understood from the code comments that this was mainly needed for Windows, will check how the driver detach prevents this from working and why (FreeBSD uses something similar to Linux, too). What I am sure is that |
| @@ -155,7 +156,11 @@ def _check_driver(self) -> None: | |||
| and detach_kernel_driver(). | |||
| This helps enable this library to work on Windows. | |||
There was a problem hiding this comment.
| This helps enable this library to work on Windows. |
This line is confusing, remove for the moment
| if ( | ||
| self.device | ||
| and self.device.backend.__module__.endswith("libusb1") | ||
| and os.name == "win32" |
There was a problem hiding this comment.
| and os.name == "win32" | |
| and os.name == "posix" |
Check the kernel driver if the OS is posix (Linux, MacOS, BSD)
|
Yeah, the docstring is a bit confusing. I've suggested to ckeck the kernel driver only on posix systems. ¿Could you test this change on FreeBSD? |
Description
and cannot be detached via libusb1
Tested with
FreeBSD 16.0 (-current)
Epson TM-T88V