Menu

#4 Works in Windows with this patch

v1.0 (example)
closed
None
5
2014-08-18
2014-06-26
Berwyn Hoyt
No

The latest version (0.3) of this tool (cp210x) works in Windows with the latest libusb-win32 (1.2.6.0) except that it needs the following patch. It would be great if you could include this into the main release:

:::python
    def __init__(self, usbdev):
        self.usbdev = usbdev
        self._locked = None
-            self.has_kernel_driver = False
+        try:
+            self.has_kernel_driver = usbdev.is_kernel_driver_active(0)
+        except NotImplementedError:
+            self.has_kernel_driver = False
        if self.has_kernel_driver:
            cfg = usbdev.get_active_configuration()
            self.intf = cfg[(0,0)].bInterfaceNumber
            usbdev.detach_kernel_driver(self.intf)
        usbdev.set_configuration()

Discussion

  • Petr Tesarik

    Petr Tesarik - 2014-06-28

    Thank you for the patch! I've applied it to the repository.

    Looking at the rate of change and number of downloads, let's finally make a 1.0 release.

     
  • Petr Tesarik

    Petr Tesarik - 2014-06-28
    • status: open --> closed
    • assigned_to: Petr Tesarik
     

Log in to post a comment.