Skip to main content

BladeRF SDR asynchronous wrapper

A python wrapper for the bladerf python bindings from Nuand. It provides synchronous as well as asynchronous functionality to send and receive data to and from the BladeRF SDR.

Installation

  • To install the requirements for this package: python3 -m pip install -r requirements.txt
  • To install system-wide: sudo python3 setup.py install
  • To install for your user: python3 setup.py install

Usage

Below is an example of how to use the asynchronous wrapper with a python context manager and an asynchronous generator to continuously receive samples from the SDR for 5 seconds.

import asyncio
import bladerf
from bladerfsdraio import AioBladeRF


async def main():
    with AioBladeRF() as sdr:
        ch_rx = sdr.Channel(bladerf.CHANNEL_RX(0))
        ch_rx.sample_rate = 1e6
        ch_rx.frequency = 1e9

        async def stream_samples(sdr: AioBladeRF):
            async for samples in sdr.stream_samples_async(ch_rx, chunk_size=1024):
                # .. handle samples
                print(samples.max())

        async def cancel_after(secs: float, sdr: AioBladeRF):
            await asyncio.sleep(secs)
            sdr.cancel_receive()

        await asyncio.gather(
            stream_samples(sdr),
            cancel_after(5, sdr)
        )


if __name__ == '__main__':
    asyncio.run(main())

Metadata

Release files for bladerf-sdr-aio 0.9

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for bladerf-sdr-aio 0.9
File Size Uploaded
bladerf-sdr-aio-0.9.tar.gz 6.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for bladerf-sdr-aio 0.9
File Interpreter ABI Platform
bladerf_sdr_aio-0.9-py3-none-any.whl Python 3 none any Details

Total release size: 12.4 kB

Release files / bladerf-sdr-aio-0.9.tar.gz

Download URL bladerf-sdr-aio-0.9.tar.gz
Size 6.3 kB
Tags Source
SHA-256 checksum
How to use checksums
7d74c7cbd63ed7f3008217cc0659b1c95f8ae0a076100983150a6a230ee272d2
BLAKE2b-256 checksum
How to use checksums
ab1e31dd957b18b41671853d84a7bbe43b24e25dfc9c8131a1404712d14578e7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.8.10

Release files / bladerf_sdr_aio-0.9-py3-none-any.whl

Download URL bladerf_sdr_aio-0.9-py3-none-any.whl
Size 6.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1074cea7e8559456e06bce4124c39a1cf51ce9f5990dcd6bd9462979e0442d7c
BLAKE2b-256 checksum
How to use checksums
f0060759a2d5c976058ad43d472da022d1414cf7ff74825ffa5a87b21880ab01
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.8.10

Release history Release notifications | RSS feed

This release

0.9 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page