Skip to content

Getting started

tuvabjornberg edited this page Aug 1, 2024 · 16 revisions

Feeling overwhelmed and lost? Don't fret! Here is the complete startup guide for the beamforming repo and the complete digital signal processing of audio sampling.

Prerequisites

Cloning repositories

This repo, beamforming-lk, should be cloned.

git clone https://github.com/acoustic-warfare/beamforming-lk.git

Docker

Download docker using the apt-repository.

Files

For running with FPGAs and arrays live, bitstream file and ps.elf from FPGA-sampling releases need to be downloaded and placed into boot/tftp.

Realtime Kernel

It is also good to have a realtime kernel. see https://ubuntu.com/pro.

When you have a real time kernel:

sudo addgroup realtime
sudo usermod -a -G realtime $(whoami)

Then edit the limit configuration /etc/security/limits.conf

# /etc/security/limits.conf
@realtime     soft    rtprio          99
@realtime     soft    priority        99
@realtime     soft    memlock     102400
@realtime     hard    rtprio          99
@realtime     hard    priority        99
@realtime     hard    memlock     102400

Configuration

Specific configurations for developers is found in each header file.

Configurations may need to be done for realtime audio playing in the src/audio/daemon.conf file. The current standards should work for most machines. If you are not running the project in the provided docker container, replace the current /etc/pulse/daemon.conf with the above file, daemon.conf.

Building and Running prerequisites - Docker container

Automatic

By running the script start.h the prerequisites and docker container are set up, built and run automatically.

./start.sh

Manual

The project may also be compiled and executed inside a Docker environment manually. A working Docker installation is required and Docker without root privileges is recommended.

To build the container run the following command:

docker build -t beamformer .

To run the container run the following command:

docker run -v $(pwd):/usr/src/app -e DISPLAY=$DISPLAY -it --network=host -v /tmp/.X11-unix:/tmp/.X11-unix -e PULSE_SERVER=unix:${XDG_RUNTIME_DIR}/pulse/native -v ${XDG_RUNTIME_DIR}/pulse/native:${XDG_RUNTIME_DIR}/pulse/native -v /run/dbus:/run/dbus --device /dev/snd beamformer bash

Local

If not wanting to use a Docker container, all prerequisites need to be fetched and downloaded manually. A hint of which packages and repos need to be installed can be seen in the Dockerfile.

Building and running the project

Usage

Testing

Clone this wiki locally