[Hackrf-dev] Enumeration bug?
Dominic Spill
dominicgs at gmail.com
Wed Oct 19 17:23:02 EDT 2016
On 19 October 2016 at 10:25, Bill Hill <mail at wbh.org> wrote:
>
> Hi, I'm getting weirdness trying to count the HackRFs:
>
> #include <stdio.h>
> #include <libhackrf/hackrf.h>
>
> int main ( )
> {
> hackrf_init() ;
> hackrf_device_list_t* hrfl ;
> hrfl = hackrf_device_list() ;
> printf ( "Found %i HackRF(s).\n", hrfl->usb_devicecount ) ;
> return 0 ;
> }
>
> If I run this on MacOS 10.10 I get:
>
> Found 8 HackRF(s).
>
> But on Linux Mint I get:
>
> Found 7 HackRF(s).
>
> In both cases this is with nothing plugged in.
>
> Is the hrfl->usb_devicecount *all* the USB devices, not just the HackRFs?
Corret
> If so, how do I iterate just the HackRFs?
The number of HackRFs is contained in hrfl->devicecount
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://pairlist9.pair.net/pipermail/hackrf-dev/attachments/20161019/f0ba0049/attachment.html>
More information about the HackRF-dev
mailing list