Hi David,
I use this approach in my code:

        try:
            self.handle.claimInterface( 0 )
        except usb.USBError, e:
            if e.message.find("could not claim interface") >= 0:
                self.handle.detachKernelDriver( 0 )
                self.handle.claimInterface( 0 )

Also, you might need to be root, by running the program with "sudo", for
instance.

Karl

On Wed, Dec 31, 2008 at 4:21 AM, David Portabella Clotet <
da...@portabella.name> wrote:

> Hello,
> I am using PyUSB 2.6 in OSX 10.5.4 (installed using Fink) to use a weather
> station software (http://www.jim-easterbrook.me.uk/weather/ )
>
> When I run "python TestWeatherStation.py" without the weather station
> connected, it correctly says that it does not find the weather station.
>
> When I run it again with the weather station connected, it says the
> following error:
> usb.USBError: usb_claim_interface: couldn't claim interface
>
> I am using the last version PyUSB 2.6, installed using Fink.
> Do you know what could be the problem?
> The author of the Weather station software told me:
> >if there is a way of examining what USB devices are active you might be
> >able to see if another driver is claiming the weather station. I know
> >that on Windows I had to disable the operating system driver for it
> >(which stopped the station's own software using it) before being able to
> >talk to it with PyUSB.
>
> do you know how to do this?
>
>
>
> Many thanks,
> DAvid
>
>
>
> ------------------------------------------------------------------------------
>
> _______________________________________________
> Pyusb-users mailing list
> Pyusb-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/pyusb-users
>
>


-- 
Code or be coded.
------------------------------------------------------------------------------
_______________________________________________
Pyusb-users mailing list
Pyusb-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pyusb-users

Reply via email to