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.0.tar.gz (25.3 kB view details)

Uploaded Source

Built Distribution

python_bladerf-1.0.0-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.0.tar.gz.

File metadata

  • Download URL: python_bladerf-1.0.0.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.0.tar.gz
Algorithm Hash digest
SHA256 0e3f22d70b621450ffdfae627e84ad4c6e8da920fcae6c5b72d1cd18b664471a
MD5 82268cc81c9832927142c1c4699fc723
BLAKE2b-256 3ccffc8e7b5862b86c29913be31b9dcebeeb8e5baa07f5dcdb5d53c58b9e2ac8

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for python_bladerf-1.0.0-cp312-cp312-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 53a8b800ac2b0156f52f86a9ad09a75c257bf09b6480b0b82b410e1ed3e1c1c1
MD5 7348680657b9bc745f7fb3ae8536a588
BLAKE2b-256 79b093a8c49bb6f5d19a516578d51a82773fbe82374f6e51073d3a54a623a2c4

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 Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page