libbladeRF.so error

Discussions related to embedded firmware, driver, and user mode application software development
Post Reply
jzyy2003
Posts: 1
Joined: Tue Feb 04, 2020 8:11 am

libbladeRF.so error

Post 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
robert.ghilduta
Posts: 156
Joined: Thu Feb 28, 2013 11:14 pm

Re: libbladeRF.so error

Post 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.
Skofnung
Posts: 1
Joined: Wed Jun 09, 2021 8:11 am

Re: libbladeRF.so error

Post 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
robert.ghilduta
Posts: 156
Joined: Thu Feb 28, 2013 11:14 pm

Re: libbladeRF.so error

Post 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.
dritory
Posts: 1
Joined: Wed Sep 29, 2021 1:27 am

Re: libbladeRF.so error

Post 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.
Post Reply