Skip to content

Instantly share code, notes, and snippets.

Avatar

Sam sam210723

View GitHub Profile
@sam210723
sam210723 / ffmpeg-waveform-vectorscope.bat
Last active Jun 13, 2021
Waveform and Vectorscope monitor using FFmpeg video filters
View ffmpeg-waveform-vectorscope.bat
@echo off
REM https://ffmpeg.org/ffmpeg-filters.html
REM https://trac.ffmpeg.org/wiki/FancyFilteringExamples
ffplay -window_title "FFmpeg Waveform and Vectorscope" -i %1 -vf "split=4[vid][vec][wavh][wavv],[vec]vectorscope=mode=color3:graticule=green[vec],[wavh]waveform=mode=column:graticule=green:components=1:display=overlay[wavh],[wavv]waveform=mode=row:components=1:display=overlay[wavv],[vid][wavh]vstack[s1],[wavv][vec]vstack[s2],[s1][s2]hstack[out]"
@sam210723
sam210723 / iridium-setup.sh
Last active Jun 1, 2021
Install gr-iridium and iridium-toolkit for receiving and decoding frames from Iridium NEXT satellites
View iridium-setup.sh
# Install dependencies (GNURadio 3.9.1)
sudo apt update
sudo apt install -y build-essential cmake git gnuradio gr-osmosdr swig3.0 libsndfile1-dev pybind11-dev python-tk
sudo apt install -y --no-install-recommends mplayer
volk_profile
# Install gr-iridium OOT
git clone https://github.com/muccc/gr-iridium
cd gr-iridium
git checkout maint-3.9
@sam210723
sam210723 / nrf24l01-setup.sh
Last active May 30, 2021
Setup GPIO tools and nRF24L01 on Raspberry Pi Zero W (Raspbian Buster)
View nrf24l01-setup.sh
#!/bin/bash
# Install dependencies
sudo apt update
sudo apt install -y build-essential cmake git make libtclap-dev
# Install pigpio
git clone https://github.com/joan2937/pigpio
cd pigpio
make
@sam210723
sam210723 / glscopeclient-install.sh
Last active Feb 16, 2021
Install scopehal and scopehal-apps (glscopeclient)
View glscopeclient-install.sh
# Install dependencies
sudo apt-get install -y build-essential git cmake pkg-config libglm-dev libgtkmm-3.0-dev libsigc++-2.0-dev libyaml-cpp-dev liblxi-dev texlive texlive-fonts-extra libglew-dev
# Install Catch2 v2
git clone https://github.com/catchorg/Catch2
cd Catch2
git checkout v2.x
git fetch
git pull
mkdir build
@sam210723
sam210723 / ise-vm-riscv-install.sh
Last active Jan 10, 2021
Install RISC-V build toolchain on Xilinx ISE 14.7 VM (Oracle Linux Server 6.4)
View ise-vm-riscv-install.sh
#!/bin/bash
# Install RISC-V build toolchain on Xilinx ISE 14.7 VM (Oracle Linux Server 6.4)
# Build libmpc from source
rm -rf mpc-0.8.1
wget ftp://gcc.gnu.org/pub/gcc/infrastructure/mpc-0.8.1.tar.gz
tar zxvf mpc-0.8.1.tar.gz
cd mpc-0.8.1
./configure --disable-shared --enable-static --prefix=/tmp/gcc --with-gmp=/#tmp/gcc --with-mpfr=/tmp/gcc
make
@sam210723
sam210723 / gnuradio-wsl2.md
Last active May 30, 2021
Install GNU Radio 3.8 in WSL2 (Ubuntu 20.04)
View gnuradio-wsl2.md

Setup Xming X Server in Windows

Download and install Xming with all default settings. Uncheck "Launch Xming" on the last setup screen.

Start "XLaunch" from the Start Menu and click next until the "Specify parameter settings" screen. Check "No Access Control" then click next, then finish.

Setup GNU Radio

Launch a WSL2 instance and run the following commands:

@sam210723
sam210723 / Makefile
Last active Apr 2, 2021
Install IceStorm + Yosys + NextPNR + RISC-V toolchain + TinyFPGA PicoSoC Example
View Makefile
upload: hardware.bin firmware.bin
tinyprog -p hardware.bin -u firmware.bin
build: hardware.bin firmware.bin
echo "Complete"
hardware.blif: hardware.v spimemio.v simpleuart.v picosoc.v picorv32.v
yosys -ql hardware.log -p 'synth_ice40 -top hardware -json hardware.json' $^
View false-colour.py
"""
false-colour.py
https://github.com/sam210723/himawari-rx
Generates false colour images from multiple grayscale channels
"""
import argparse
import colorama
from colorama import Fore, Back, Style
@sam210723
sam210723 / tsduck-himawari.sh
Last active Jan 6, 2021
Demodulate HimawariCast carrier with TSDuck and handle Multi-Protocol Encapsulation wrapping
View tsduck-himawari.sh
tsp -I dvb --adapter 0 --delivery-system "DVB-S2" --lnb "5150000000" --frequency 4148000000 --modulation QPSK --symbol-rate 2586148 --fec-inner "3/5" --roll-off 0.2 --polarity "horizontal" -P mpe --pid 0x03E9 --udp-forward --log -O drop
@sam210723
sam210723 / README.md
Last active Jul 18, 2020
Debian systemd service for xrit-rx
View README.md

Debian systemd service for xrit-rx

  1. Download xrit-rx.service
  2. Edit WorkingDirectory in xrit-rx.service to the location of xrit-rx on your system
  3. Copy xrit-rx.service to /etc/systemd/system (sudo cp xrit-rx.service /etc/systemd/system)
  4. Reload systemd daemons (sudo systemctl daemon-reload)
  5. Start xrit-rx service (sudo systemctl start xrit-rx.service)
  6. Check service is running (systemctl status xrit-rx.service)
  7. Check console output of xrit-rx (sudo journalctl -u xrit-rx.service)
  8. Enable service to run at startup (sudo systemctl enable xrit-rx.service)