WebAssembly build of GNU Radio
Experimental WebAssembly build of GNU Radio that runs in a browser tab
For some reason I thought it would be easy
narrator: it was not, in fact, easy
but I eventually got a proof-of-concept ~working, so I thought I’d share ?
status: experimental proof-of-concept
This is a proof-of-concept WebAssembly build of GNU Radio Companion which can generate and run basic flowgraphs. It includes
gr-qtgui and supports visualization using the QT GUI sink-blocks.
The GNU Radio Companion UI is running the
feature-grc-qt branch of GNU Radio, which itself is a work-in-progress, so some basic capabilities (like the ability to edit block properties) are missing.
Support for USB software-defined radios is not yet implemented, but will be possible. (Earlier in the pandemic I published standalone WebUSB proof-of-concepts for USRP B210, HackRF, and PlutoSDR.)
how to run a simple flowgraph with QT GUI visualization
cd webapp && ./server.py
open your web browser (and the F12 developer-tools)
navigate to http://localhost:8000
It will block on the browser UI thread while loading, which takes on the order of 15-30 seconds. If you have the developer console open, you can watch stdout/stderr while it loads.
add/connect some blocks (eg.
QT GUI Sink)
how make gnuradio-web
The repo includes prebuilt binaries, but if you like watching cross-compilation marathons, you can build it from source:
make base && make webappin the repository root
(I’ve only tested this on an Ubuntu 20.04 x86_64 host. It probably works in other environments but YMMV.)
simple flowgraph demo