Skip to content

Instantly share code, notes, and snippets.

@charlie-x
Last active January 2, 2021 18:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save charlie-x/c484b76d64e9bc9b36e4ea879e3bb648 to your computer and use it in GitHub Desktop.
Save charlie-x/c484b76d64e9bc9b36e4ea879e3bb648 to your computer and use it in GitHub Desktop.
gnuradio + ais sim for WSL2 ubuntu 20.xx
# ubuntu 20+
sudo apt-get install -y gnuradio
sudo apt-get install -y git
sudo apt-get install -y doxygen
sudo apt-get install -y swig-dev
sudo apt-get install -y swig
sudo apt-get install -y libswig-dev
sudo apt-get install -y liborc-dev
sudo apt-get install -y libhackrf-dev
sudo apt-get install -y libbladerf-dev
sudo apt-get install -y libairspy-dev
sudo apt-get install -y pkg-config
sudo apt-get install -y libairspyhf-dev
sudo apt-get install -y gr-osmosdr
sudo apt-get install -y firefox
cd ~
mkdir code
cd code
rem git clone git://github.com/wbhart/mpir.git mpir
git clone https://github.com/Mictronics/ais-simulator.git
cd ais-simulator
wget https://gist.githubusercontent.com/charlie-x/44bf1762521f2addb3ec319877e517d3/raw/46879eda43d1147dbbdca55b2f202ff8228c0fd4/ais-simulator-file.grc
wget https://gist.githubusercontent.com/charlie-x/fe72666cb504f055b4d47582a1b25cce/raw/c009baa40ac2d22cf20b7f4887ef739492155b75/ais-simulator-file2.grc
cd gr-ais_simulator
mkdir build
cd build
cmake ..
make
sudo make install
cd ~
# from here after install
export PYTHONPATH=/usr/local/lib/python3/dist-packages:/usr/local/lib/python3/site-packages:$PYTHONPATH
export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH
sudo ldconfig -v
export DISPLAY=$(cat /etc/resolv.conf | grep nameserver | awk '{print $2; exit;}'):0
gnuradio-companion &
cd ~/code/ais_simulator/webapp
firefox ais-simulator.html
# host needs xserv Xming with -ac -clipboard -multiwindow
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment