• Stars
    star
    604
  • Rank 74,189 (Top 2 %)
  • Language
    Lua
  • License
    Other
  • Created almost 9 years ago
  • Updated 9 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A lightweight, embeddable software-defined radio framework built on LuaJIT

LuaRadio Build Status GitHub release License Reference Manual Mailing List

LuaRadio is a lightweight, embeddable flow graph signal processing framework for software-defined radio. It provides a suite of source, sink, and processing blocks, with a simple API for defining flow graphs, running flow graphs, creating blocks, and creating data types. LuaRadio is built on LuaJIT, has a small binary footprint of under 750 KB (including LuaJIT), has no external hard dependencies, and is MIT licensed.

LuaRadio can be used to rapidly prototype software radios, modulation/demodulation utilities, and signal processing experiments. It can also be embedded into existing radio applications to serve as a user scriptable engine for signal processing.

LuaRadio blocks are written in pure Lua, but can use LuaJIT's FFI to wrap external libraries, like VOLK, liquid-dsp, and others, for computational acceleration, sophisticated processing, and interfacing with SDR hardware.

Use GNU Radio? See how LuaRadio compares to GNU Radio.

See the LuaRadio mailing list for general discussion.

Example

Wideband FM Broadcast Radio Receiver

local radio = require('radio')

radio.CompositeBlock():connect(
    radio.RtlSdrSource(88.5e6 - 250e3, 1102500), -- RTL-SDR source, offset-tuned to 88.5MHz-250kHz
    radio.TunerBlock(-250e3, 200e3, 5),          -- Translate -250 kHz, filter 200 kHz, decimate by 5
    radio.FrequencyDiscriminatorBlock(1.25),     -- Frequency demodulate with 1.25 modulation index
    radio.LowpassFilterBlock(128, 15e3),         -- Low-pass filter 15 kHz for L+R audio
    radio.FMDeemphasisFilterBlock(75e-6),        -- FM de-emphasis filter with 75 uS time constant
    radio.DownsamplerBlock(5),                   -- Downsample by 5
    radio.PulseAudioSink(1)                      -- Play to system audio with PulseAudio
):run()

Check out some more examples of what you can build with LuaRadio.

Built-in Applications

LuaRadio comes with a collection of built-in command-line applications. These applications include radio receivers that are compatible with all SDR sources supported by the framework, as well as file and network sources:

$ luaradio
Usage: luaradio [options] <script> [args]

Options:
  -h, --help            Print help and exit
  --version             Print version and exit
  --platform            Dump platform and exit
  -v, --verbose         Enable debug verbosity
  -a, --application     Run built-in application

Application Usage: ./luaradio -a <application> [args]

Built-in Applications:
  rx_raw                Raw Receiver
  rx_wbfm               Wideband FM Receiver
  rx_nbfm               Narrowband FM Receiver
  rx_am                 AM Receiver
  rx_ssb                SSB Receiver
  rx_rds                RDS Receiver
  rx_ax25               AX.25 Receiver
  rx_pocsag             POCSAG Receiver
  rx_ert                ERT Receiver (IDM, SCM, SCM+)
  iq_converter          IQ File Converter
$ 

See the Applications documentation for more information on running built-in applications.

Quickstart

With LuaJIT installed, LuaRadio can be run directly from the repository:

git clone https://github.com/vsergeev/luaradio.git
$ cd luaradio
$ ./luaradio --platform
luajit          LuaJIT 2.0.5
os              Linux
arch            x64
page size       4096
cpu count       4
cpu model       Intel(R) Core(TM) i5-4570T CPU @ 2.90GHz
features
    fftw3f      true    fftw-3.3.8-sse2-avx
    volk        true    2.0 (avx2_64_mmx_orc)
    liquid      true    1.3.2
$

LuaRadio is accelerated by the optional libraries liquid-dsp, VOLK, and fftw. For best real-time performance, install these libraries and check that the features are marked true in the platform information:

  • Arch Linux: sudo pacman -S liquid-dsp libvolk fftw
  • macOS (Homebrew): brew install liquid-dsp fftw
  • macOS (MacPorts): sudo port install liquid-dsp volk fftw-3
  • Ubuntu/Debian/Raspbian: sudo apt-get install libliquid-dev libvolk2-dev libfftw3-dev
  • Fedora/CentOS: sudo yum install liquid-dsp fftw

Try out one of the examples with an RTL-SDR dongle:

$ ./luaradio examples/rtlsdr_wbfm_mono.lua 91.1e6

LuaRadio primarily supports Linux. It also strives to support FreeBSD and macOS, but real-time and audio support on these platforms is currently experimental. LuaRadio and all of its examples run great on the Raspberry Pi 3 with Arch Linux or Raspbian.

See the Getting Started guide for a tutorial on building your own flow graphs.

Installation

Arch Linux users can install LuaRadio with the AUR package luaradio.

macOS users can install LuaRadio with the Homebrew or MacPorts package luaradio.

See the Installation guide for other installation methods and details.

Project Roadmap

Check out the project roadmap for upcoming changes.

Contributions are welcome! See the contributing document for guidelines.

Documentation

LuaRadio documentation is contained in the docs folder.

  1. Reference Manual
  2. Installation
  3. Getting Started
  4. Creating Blocks
  5. Embedding LuaRadio
  6. Architecture
  7. Comparison to GNU Radio
  8. Supported Hardware

Project Structure

Testing

LuaRadio unit tests are run with busted.

Install busted with LuaRocks:

sudo luarocks --lua-version=5.1 install busted

Run unit tests with:

busted

License

LuaRadio is MIT licensed. See the included LICENSE file.

More Repositories

1

c-periphery

A C library for peripheral I/O (GPIO, LED, PWM, SPI, I2C, MMIO, Serial) in Linux.
C
727
star
2

python-periphery

A pure Python 2/3 library for peripheral I/O (GPIO, LED, PWM, SPI, I2C, MMIO, Serial) in Linux.
Python
529
star
3

u-msgpack-python

A portable, lightweight MessagePack serializer and deserializer written in pure Python, compatible with Python 2, Python 3, CPython, PyPy / msgpack.org[Python]
Python
253
star
4

briefsky

A free weather frontend to a variety of weather providers
TypeScript
243
star
5

apfcp

x86 Assembly Primer for C Programmers
Assembly
211
star
6

lua-periphery

A Lua library for peripheral I/O (GPIO, LED, PWM, SPI, I2C, MMIO, Serial) in Linux.
C
181
star
7

btckeygenie

A standalone Bitcoin keypair/address generator, written in Go.
Go
104
star
8

ntgbtminer

A no thrills getblocktemplate Bitcoin miner, written in Python.
Python
83
star
9

vavrdisasm

vAVRdisasm is an 8-bit Atmel AVR disassembler.
C
74
star
10

audioprism

A spectrogram tool for PulseAudio and WAV files, written in C++11.
C++
63
star
11

tinytaptunnel

a point-to-point layer 2 tap interface tunnel over UDP/IP with HMAC-SHA256 authentication, written in Go.
Go
57
star
12

ssterm

A simple console-based serial port terminal, written in Python.
Python
52
star
13

libGIS

libGIS is a collection of utility functions to create, read and write Atmel Generic, Intel HEX8, and Motorola S-Record formatted files.
C
50
star
14

0xtrades.info

A real-time trade viewer for the 0x protocol.
TypeScript
36
star
15

snake.ts

A simple snake implementation in TypeScript and blessed.
TypeScript
22
star
16

3d-gears

3D Parametric Gears made with Fusion 360
18
star
17

arm-bmw-sw

ARM Bare Metal Widget (arm-bmw) software
C
18
star
18

mbed-cmsis

Building your own CMSIS Code for the mbed.
C
17
star
19

vpicdisasm

vPICdisasm is a Microchip PIC disassembler for Baseline, Mid-Range, and Mid-Range Enhanced 8-bit PIC cores.
C
16
star
20

arm-bmw-hw

ARM Bare Metal Widget (arm-bmw) hardware
Eagle
15
star
21

cmsis-templates

CMSIS v3.20 Bootstrapping Templates for GNU ARM Tools
C
14
star
22

v8cpu

v8cpu is a simple multi-cycle von Neumann architecture 8-bit CPU in under 500 lines of Verilog.
Verilog
14
star
23

teatimer

A simple kitchen timer implemented in digital logic on a Lattice MachXO2 CPLD.
Eagle
14
star
24

gardend-lua

A modular, discrete-time control daemon for a hydroponic garden, written in Lua.
Lua
12
star
25

radio-decoders

Python
11
star
26

evolve110

Rule 110 on the Ethereum blockchain
JavaScript
9
star
27

libGISdotnet

libGIS ported to .NET.
C#
8
star
28

wireless-triac

Wireless ZigBee/XBee Controlled TRIAC (Sep 2009)
C
8
star
29

zigradio

A lightweight software-defined radio framework built with Zig
Zig
7
star
30

rigexpert-tool

Dump, plot, and convert impedance sweeps from a RigExpert antenna analyzer.
Python
6
star
31

qrd

Simple QR Code decoder for educational purposes
Python
6
star
32

minifortune

A minimal fortune-mod clone, written in C.
C
6
star
33

basic-makefiles

TeX
6
star
34

3d-simple-iso-thread

A simple, single-file modeled ISO thread module for OpenSCAD
OpenSCAD
4
star
35

3d-holster-claw

A 3D printable holster claw accessory made with Fusion 360
3
star
36

wireless-power-meter

Wireless ZigBee/XBee V-I Power Meter (Sep 2009)
Python
2
star
37

3d-mini-turntable

A miniature motorized turntable for small objects made with OpenSCAD
OpenSCAD
2
star
38

3d-fiber-enclosure

A 3D printable fiber optic project enclosure made with Fusion 360
1
star
39

3d-webcam-mount

3D Printable Webcam Mount made with Fusion 360
1
star
40

3d-jewelry-box

A 3D printable jewelry box made with OpenSCAD
OpenSCAD
1
star
41

3d-flosser-holder

A 3D printable flosser holder made with OpenSCAD
OpenSCAD
1
star
42

template110

Rule 110 implemented with C++11 templates and std::array.
C++
1
star
43

wclock

LED Word Clock (Mar 2012)
Eagle
1
star
44

yatumblr-backup

yet another tumblr backup script
Python
1
star