Skip to content

Latest commit

 

History

1,072 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

usdr-lib

uSDR software libraries, driver and utilities

Installation from packages

Ubuntu 20.04, 22.04, 24.04, 26.04

Add the repository

sudo add-apt-repository ppa:wavelet-lab/usdr-lib
sudo apt update

Install the tools

sudo apt install usdr-tools

SoapySDR plugin

sudo apt install soapysdr-module-usdr

PCIe driver

sudo apt install usdr-dkms
sudo modprobe usdr_pcie_uram

Install the development package

sudo apt install libusdr-dev

Ubuntu 18.04, Debian 12

Download

Go to releases page and download the corresponding archive.

  • Ubuntu 18.04(amd64): usdr_0.9.9~bionic0.amd64.tar
  • Ubuntu 18.04(arm64): usdr_0.9.9~bionic0.arm64.tar
  • Debian 12(amd64): usdr_0.9.9~bookworm0.amd64.tar
  • Debian 12(arm64): usdr_0.9.9~bookworm0.arm64.tar

Unpack the archive.

Install package

sudo apt install libusb-1.0-0 libsoapysdr0.8 dkms
sudo dpkg -i *.deb

Build from source

Interactive package build

Install the terminal UI dependency and run the package selector:

sudo apt install whiptail
task packages

The resulting packages are saved under output/<distribution>-<architecture>/. Build logs are saved under output/logs/.

Clone the repository

git clone https://github.com/wavelet-lab/usdr-lib.git
cd usdr-lib

Dependencies

Ubuntu 18.04
sudo apt install build-essential dwarves -y
sudo apt install libusb-1.0-0-dev check dkms curl -y

# Install fresh version of Cmake
apt-get install libssl-dev -y
curl https://cmake.org/files/v3.28/cmake-3.28.3.tar.gz -o cmake-3.28.3.tar.gz
tar xvf cmake-3.28.3.tar.gz
cd cmake-3.28.3
./bootstrap
make
make install
update-alternatives --install /usr/bin/cmake cmake /usr/local/bin/cmake 10

# Install Python3.8
apt-get install python3.8 python3.8-distutils -y
update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.8 10
curl -fsSL https://bootstrap.pypa.io/pip/3.8/get-pip.py | python3.8
python3.8 -m pip install pyyaml
Ubuntu 20.04, 22.04, 24.04, 26.04, Debian 12
sudo apt install build-essential cmake python3 python3-venv python3-yaml dwarves -y
sudo apt install libusb-1.0-0-dev check dkms -y

Build

mkdir build
cd build
cmake ../src
make

Build kernel module

sudo apt install linux-headers-$(uname -r)
cd ../src/lib/lowlevel/pcie_uram/driver
make
sudo insmod usdr_pcie_uram.ko

Finding the installed usdr library

You can find and use the installed library in two common ways — with pkg-config or with CMake's find_package.

  • Using pkg-config
# set to the install prefix used during `make install`
export INSTALL_PREFIX=/path/to/install
export PKG_CONFIG_PATH="$INSTALL_PREFIX/lib/pkgconfig:$PKG_CONFIG_PATH"

# Get version, cflags and libs
pkg-config --modversion usdr
pkg-config --cflags usdr   # include flags, e.g. -I/path/to/install/include
pkg-config --libs usdr     # link flags, e.g. -L/path/to/install/lib -lusdr
  • Using CMake find_package (CONFIG-mode)

Create a small CMake project that uses the installed package (replace /path/to/install with your install prefix):

cmake_minimum_required(VERSION 3.8)
project(example C)
find_package(usdr CONFIG REQUIRED)
add_executable(example main.c)
target_link_libraries(example PRIVATE usdr::usdr)

Then configure and build:

mkdir build && cd build
cmake -DCMAKE_PREFIX_PATH=/path/to/install ..
cmake --build .

If find_package fails, ensure the file usdrConfig.cmake is installed under <install-prefix>/lib/cmake/usdr/ (or the corresponding libdir/cmake/usdr for your system) and pass that prefix via CMAKE_PREFIX_PATH.

About

uSDR software libraries and utilities

Resources

Stars

42 stars

Watchers

7 watching

Forks

Releases

Packages

Contributors

Languages