Skip to main content

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:

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

python_bladerf-1.0.2.tar.gz (25.3 kB view details)

Uploaded Source

Built Distribution

python_bladerf-1.0.2-cp312-cp312-macosx_10_9_universal2.whl (475.9 kB view details)

Uploaded CPython 3.12 macOS 10.9+ universal2 (ARM64, x86-64)

File details

Details for the file python_bladerf-1.0.2.tar.gz.

File metadata

  • Download URL: python_bladerf-1.0.2.tar.gz
  • Upload date:
  • Size: 25.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.12.3

File hashes

Hashes for python_bladerf-1.0.2.tar.gz
Algorithm Hash digest
SHA256 f847649136d5a8c8bd50ce3b88920a761ff19638d41abd78f6748ace365812bd
MD5 cd0b57a88624f8001c91c826b4837080
BLAKE2b-256 8acc2947a774890d68b7c451e4ad0bab5156981edb45fb1077345d386de56b84

See more details on using hashes here.

File details

Details for the file python_bladerf-1.0.2-cp312-cp312-macosx_10_9_universal2.whl.

File metadata

File hashes

Hashes for python_bladerf-1.0.2-cp312-cp312-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 9d93060adab9ed7e9d5cdd90e194a9de30a300a8b88660b13c4ec3645439565f
MD5 e4d4835b869ef88fbd235391f842ba7a
BLAKE2b-256 d45139f51e1d10ef3e485b5f2b97eb79a0c4380e9c047aa852be62f8533bb4a6

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page