[prev in list] [next in list] [prev in thread] [next in thread] 

List:       libusb-devel
Subject:    Re: [libusb] libusb 1.0.8, CentOS 5: problems with libusb_get_device_list()
From:       Xiaofan Chen <xiaofanc () gmail ! com>
Date:       2014-05-04 0:23:46
Message-ID: CAGjSPUBmbKvwkyneN+orwY2Zu+FrX9n+Sem++2H2uk58rk7_Jg () mail ! gmail ! com
[Download RAW message or body]

On Mon, Apr 14, 2014 at 3:46 AM, Robert Heller <heller@deepsoft.com> wrote:
> OK, I found a problem with libusb_get_device_list() in libusb 1.0.8 (I know it
> is old, but please bear with me). When running as a non-priveledged user (I
> have a udev rule to fix the mode of the devices my code is interested in),
> libusb_get_device_list aborts if in scanning the it finds either a device file
> with no permission ('other' has no read access) or a bogus device file (eg
> something leftover and not cleaned up properly). That is, instead of just
> skiping inaccessable or bogus devices, it completely gives up returning NO
> devices. *I* am happy to ignore any inaccessable devices -- *my* code only
> interested in devices from a specific vendor. I can't just use the
> libusb_open_device_with_vid_pid(), since there could be multiple devices with
> various *different* pids -- I need to scan for a specific serial number, so I
> really need to itterate over the available devices. I'm guessing this is a
> bug(?), that is properly fixed in a newer version. The problem for me is that
> libusb 1.0.18 (the current version) won't compile on CentOS 5, since CentOS 5
> lacks libudev (it is running with a (much patched) 2.6.18 kernel and udev 095.
>
> Question: is there a newer version of libusb that has libusb_get_device_list()
> 'fixed' that will compile under CentOS 5?
>

It may or may not be a libusb bug (could be a CentOS 5 bug as well).
But you can try the latest libusb git since it has a fix for the netlink
fix (no need libudev) which might help you on your old kernel.
https://github.com/libusb/libusb/commit/c59d574b211bedcab951b2f19de58bb03a04d671

Or you can try libusbx-1.0.15 which is the last version of libusbx
which do not have hotplug.
http://sourceforge.net/projects/libusbx/files/releases/1.0.15/

-- 
Xiaofan

------------------------------------------------------------------------------
"Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
Instantly run your Selenium tests across 300+ browser/OS combos.  Get 
unparalleled scalability from the best Selenium testing platform available.
Simple to use. Nothing to install. Get started now for free."
http://p.sf.net/sfu/SauceLabs
_______________________________________________
libusb-devel mailing list
libusb-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libusb-devel
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic