Menu

#1 Can't claim USB interface on LinuxMint 5 (Ubuntu 8.04)

closed
nobody
None
5
2010-03-07
2009-12-13
Marty
No

Hi. Neat app.
pk2-la had trouble claiming interface 0 of the PICKit2 on my linux box. After a bit of web searching, it turned out that sometimes an app has to release the interface from the kernel driver before claiming it (lost the link, sorry). So I added the following code before the claim try/except block and it worked:

try:
dev.detachKernelDriver(0)
except usb.USBError :
sys.stderr.write("Can't detach kernel driver to claim the PicKit2 USB interface!\n")

Marty

Discussion

  • Joseph Jezak

    Joseph Jezak - 2010-03-07

    Thanks for the fix! I've applied it to the repository.

     
  • Joseph Jezak

    Joseph Jezak - 2010-03-07
    • status: open --> closed
     

Log in to post a comment.