Page 1 of 1

libbladeRF.so error

Posted: Mon Feb 10, 2020 1:40 pm
by jzyy2003
Hi:

I was trying to run the Python example under windows environment, but it always give me the error message "cannot load library 'libbladeRF.so': error 0x7e. Additionally, ctypes.util.find_library() did not manage to locate a library called 'libbladeRF.so'. Could you help to give me some guidance that how to install the libbladeRF.so library in the windows?

Thanks a lot,

Jason

Re: libbladeRF.so error

Posted: Tue Apr 28, 2020 11:09 pm
by robert.ghilduta
Are you running Python for win64 directly or is it running on WSL or in Cygwin?
It appears that what you may be trying to use is Linux userspace spaced meaning that Linux shared object files (.so)s should be used.

Re: libbladeRF.so error

Posted: Wed Jun 09, 2021 8:20 am
by Skofnung
Hello,
I was trying to run python for win64 using the programs uploaded at https://github.com/michelp/pybladeRF. Located in _bladerf.py there is the following call: libbladeRF = ffi.dlopen("libbladeRF.so"). A complete computer search on my hard drive for libbladeRF.so resulted in nothing. Searching the internet for this file came up with the question posed by jzyy2003. Can you tell me how to locate this so file and load it onto my windows operating system?

Thanks

Re: libbladeRF.so error

Posted: Wed Jul 07, 2021 12:16 am
by robert.ghilduta
The CFFI interface apparently only loads shared objects on Linux/Mac, so those examples probably won't work on Windows directly but may on WSL.

Re: libbladeRF.so error

Posted: Wed Sep 29, 2021 1:36 am
by dritory
Hi!
I encountered the same error when trying to use the python bindings on Windows. The solution was to change the "libbladerf.so" to "bladerf.dll" in order for the python package to find the installed distribution of libbladerf.

The code I changed is inside the _bladeRF.py,

Code: Select all

libbladeRF = ffi.dlopen("libbladeRF.so")
to

Code: Select all

libbladeRF = ffi.dlopen("bladerf.dll")
.

I have created a pull request for automatically detecting the operating system and adjusting the library name accordingly. Note that I am using the python bindings distributed by the git repository https://github.com/Nuand/bladeRF and not pybladeRF, but this fix should work for the unofficial python library too.