Page 1 of 2

Timeframe on Windows drivers?

Posted: Mon Jul 29, 2013 2:20 am
by spcutler
Has there been any schedule update on Windows driver support? I received my unit and it looks fantastic, but for me, it's a paperweight until Windows driver support is available. I'm anxious to step up from my RTL SDR dongles!

Re: Timeframe on Windows drivers?

Posted: Mon Jul 29, 2013 4:52 am
by bpadalino
We're actively working on getting libusb support into our library. After that, we should be able to supply binaries for the drivers.

Sorry for the delay. Mid-week is where we hope to have initial support.

Re: Timeframe on Windows drivers?

Posted: Wed Jul 31, 2013 2:54 am
by spcutler
Good to hear--thanks! Even source level support would be useful; I currently build the rtl-sdr libraries in my project, and it should be relatively easy to add another client if it also uses libusb.

Re: Timeframe on Windows drivers?

Posted: Wed Aug 28, 2013 12:24 am
by on4bhm
Any progress so far?

Re: Timeframe on Windows drivers?

Posted: Wed Aug 28, 2013 5:17 am
by bpadalino
We recently pushed the libusb version of the library to master and, with that, comes CMake for the build system. There are some preliminary instructions on the wiki on how to build the DLL for windows. We've seen some success with loading the FPGA, but we have not shuffled samples around yet.

Feedback is very much appreciated.

Re: Timeframe on Windows drivers?

Posted: Wed Aug 28, 2013 1:45 pm
by on4bhm
how can i find the vid/pid?

i'm no expert in usb.... :(

maybe helpfull for others to, to explain how to find them....

kind regards
Guy

Re: Timeframe on Windows drivers?

Posted: Wed Aug 28, 2013 2:02 pm
by on4bhm
the cmake part is not very clear to me:

i get this error:

The C compiler identification is unknown
Build type not specified: defaulting to a release build.
Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE)
CMake Error at cmake/modules/FindLibUSB.cmake:120 (message):
libusb-1.0 not found - is it installed? If you're using a binary
distribution, try setting -DLIBUSB_PATH=<path_to_libusb_files>.
Call Stack (most recent call first):
libraries/libbladeRF/CMakeLists.txt:106 (find_package)


Configuring incomplete, errors occurred!

Re: Timeframe on Windows drivers?

Posted: Wed Aug 28, 2013 6:20 pm
by bpadalino
Are you using Visual Studio? mingw? What development environment is installed? Did you follow the instructions on the wiki?

Re: Timeframe on Windows drivers?

Posted: Thu Aug 29, 2013 1:11 am
by spcutler
Cool! I've got this... almost working :). I have a bladeRF.dll being built. Some problems:
- had to move the statement "struct si5338_readT risul;" in si5338.c to the beginning of the function (I guess it's not C99 by default?)
- had to provide a definition of strcasecmp ("#define strcasecmp(x, y) stricmp(x, y)" works)
- there's no usleep() on Windows. Used "#define usleep(x) Sleep(((x)+500)/1000)" instead
- functions aren't exported by default. I have to put "__declspec(dllexport)" in front of all the bladerf_* definitions.

So far, I just have bladerf_get_device_list returning 1 and this structure:
- devices 0x0529ef00 {backend=BLADERF_BACKEND_LIBUSB serial=0x0529ef04 "" usb_bus='' ...} bladerf_devinfo *
backend BLADERF_BACKEND_LIBUSB bladerf_backend
+ serial 0x0529ef04 "" char [33]
usb_bus 2 '' unsigned char
usb_addr 4 '' unsigned char
instance 0 unsigned int

It's a start, though!

Re: Timeframe on Windows drivers?

Posted: Thu Aug 29, 2013 1:30 am
by SDR-Radio.com
Hi,

Where's the API info for using this on Windows - I think I've missed out something, somewhere. I've used LIBUSB with other SDR hardware but I'm guessing there's a note about the bladeRF and LIBUSB that I've overlooked.

I've often been an early adopter, this time I'm waiting until someone has the Windows driver running then I'll be buying hardware :) .

Re: Timeframe on Windows drivers?

Posted: Thu Aug 29, 2013 2:09 am
by spcutler
A couple more things:
- bladerf_open_with_devinfo fails with code -8. Stepping in, I see this error:

Code: Select all

                /* Claim interfaces */
                for( inf = 0; inf < ((dev->legacy & LEGACY_ALT_SETTING) ? 3 : 1) ; inf++ ) {
                    status = libusb_claim_interface(lusb->handle, inf);
                    if(status < 0) {
                        dbg_printf( "Could not claim interface %i - %s\n", inf, libusb_error_name(status) ); // <<<<<
                        status = error_libusb2bladerf(status);
                        goto lusb_open__err_device_list;
                    }
                }
Here, inf==1 and status==-12. (dev->legacy & LEGACY_ALT_SETTING) is true. The code seems to imply it needs to claim 3 interfaces. I see 3 interfaces in Zadig, and set them all to libusbK. Not sure what's going on... how do I get out of legacy mode so I have just one interface?

- For some reason, libusbx 1.0.16 produced an LIBUSB_ERROR_ACCESS error from libusb_open (within bladerf_get_device_list). I went back to 1.0.12 and I no longer get that error.

Re: Timeframe on Windows drivers?

Posted: Thu Aug 29, 2013 2:24 am
by spcutler
A few more things:
- there's no stdbool.h in Visual Studio. I had to create one myself.

- SDR-Radio.com: The code is all at https://github.com/Nuand/bladeRF. The API header is here. It looks pretty straightforward to me, and not all that different from the rtl-sdr API, for instance. However, I don't yet have the driver fully working.

- I got past the problem I listed above. Contrary to the Wiki instructions, the WinUSB driver (instead of the libusbK driver) seems to work fine if I install it on all three interfaces.

Re: Timeframe on Windows drivers?

Posted: Thu Aug 29, 2013 2:33 am
by SDR-Radio.com
SP Cutler - excellent info, thanks.

Once you have it working I'll buy the hardware & follow your trail of experimentation :) .

Re: Timeframe on Windows drivers?

Posted: Thu Aug 29, 2013 2:40 am
by spcutler
Sadly, I won't have time in the next several days to work on it more. I'll keep you guys posted, though!

Re: Timeframe on Windows drivers?

Posted: Thu Aug 29, 2013 2:47 am
by SDR-Radio.com
spcutler wrote:Sadly, I won't have time in the next several days to work on it more. I'll keep you guys posted, though!
No rush, code to write here as well. I'm looking forward to satellite tracking with the bladeRF.