This is a wrapper for bladerf.
Project description
python_bladerf
python_bladerf is a cython wrapper for bladerf (https://github.com/Nuand/bladeRF). It also contains some additional tools.
You can install this library using
pip install python_bladerf
Or assemble it manually using the following steps:
In order to build the library you need to go to the python_bladerf directory
cd python_bladerf
call
python setup.py build_ext --inplace.
If the build fails, you will need to specify the paths for the libusb library.
CFLAGS="-I/path to libusb.h -I/path to libbladeRF.h" \
LDFLAGS="-L/path to libusb-1.0.so -L/path to libBladeRF.so" \
python setup.py build_ext --inplace
Requirements:
- libusb-1.0 (https://github.com/libusb/libusb)
- libBladeRF (https://github.com/Nuand/bladeRF)
- Cython==0.29.36
- Numpy>=1.26
- Scipy (optional, for faster work)
- pyFFTW (optional, for faster work)
bladerf:
Almost all the functionality of the standard library is implemented. Some features will be added later. (async recieve and transmit).
pybladerf tools:
- pybladerf_info.py - Reading information about found devices.
- pybladerf_sweep.py - Possibility to get extended range fft ( same as hackrf_sweep)
usage
usage: python_bladerf [-h] {info, sweep} ...
python_bladerf is a Python wrapper for libbladerf. It also contains some additional tools.
options:
-h, --help show this help message and exit
Available commands:
{info,sweep}
info Read device information from Bladerf such as serial number and FPGA version.
sweep a command-line spectrum analyzer.
usage: python_bladerf info [-h] [-f] [-s]
options:
-h, --help show this help message and exit
-f, --full show full info
-i, --device_identifiers
show only founded device_identifiers
usage: python_bladerf sweep [-h] [-d] [-f] [-g] [-w] [-ch] [-1] [-N] [-o] [-B] [-s] [-SR] [-BW] -[FIR] [-r]
options:
-h, --help show this help message and exit
-d device_identifier. device identifier of desired BladeRF
-f freq_min:freq_max. minimum and maximum frequencies in MHz start:stop. Default is 71:5999
-g gain_db. RX gain, -15 - 60dB, 1dB steps
-w bin_width. FFT bin width (frequency resolution) in Hz, 245-30000000
-ch RX channel. which channel to use (0, 1). Default is 0
-1 one shot mode. If specified = Enable
-N num_sweeps. Number of sweeps to perform
-o oversample. If specified = Enable
-B binary output. If specified = Enable
-s sweep style ("L" - LINEAR, "I" - INTERLEAVED). Default is INTERLEAVED
-SR sample rate in Hz (0.5 MHz - 122 MHz). Default is 57. To use a sample rate higher than 61, specify oversample
-BW bandwidth in Hz (0.2 MHz - 56 MHz). Default is 56000000
-FIR RFIC RX FIR filter ("1" - Enable, "0" - Disable). Default is Disable
-r filename. output file
Note
This library probably can work on android. To do this, go to the android directory and download two recipes for p4a.
Examples
Examples will be added later.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for python_bladerf-1.0.2-cp312-cp312-macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9d93060adab9ed7e9d5cdd90e194a9de30a300a8b88660b13c4ec3645439565f |
|
MD5 | e4d4835b869ef88fbd235391f842ba7a |
|
BLAKE2b-256 | d45139f51e1d10ef3e485b5f2b97eb79a0c4380e9c047aa852be62f8533bb4a6 |