WebAssembly and WebUSB build of UHD 4.0, with a multithreading-friendly shim of the libusb async C-API in Javascript, in order to compile UHD and Boost to WebAssembly mostly unmodified.
The demo initializes an Ettus USRP B200/205/210 and streams IQ data to a waterfall plot, all within a Chrome browser-tab.
Live Demo:
https://marcnewlin.github.io/uhd.js/
- Emscripten installed and on your $PATH
- Google Chrome-based Web Browser (Chrome/Edge/Opera)
- If on Windows, follow these instructions to assign the
WinUSB.sys
driver to the USRP - Ettus USRP B200/205/210
git clone https://github.com/marcnewlin/uhd.js.git
cd uhd.js
git submodule update --init --recursive
The build scripts have been tested on Ubuntu 20.04, and may not work in other environments.
Boost 1.74.0
./scripts/build-boost.sh
UHD 4.0
./scripts/build-uhd.sh
KissFFT
./scripts/build-kissfft.sh
UHD FPGA/FW Images
./scripts/download-uhd-images.sh
libusb shim and demo application
make
Start a web server as shown below below, and browse to http://127.0.0.1:8000.
cd build
python3 -m http.server