Skip to content

Instantly share code, notes, and snippets.

View tstellanova's full-sized avatar
💭
growing excited

Todd Stellanova tstellanova

💭
growing excited
View GitHub Profile
@tstellanova
tstellanova / satdump_plutosdr_examples.sh
Created August 9, 2024 04:10
Recording GPS bands using satdump and PlutoSDR
# some example commands for pulling data from an IP connected PlutoSDR into satdump, on macos
/Applications/SatDump.app/Contents/MacOS/satdump record gps_L1_test_pluto --source plutosdr --samplerate 10e6 --frequency 1575420000 --baseband_format cs8 --gain_mode hybrid --ip_address 10.0.1.191 --auto_reconnect false --timeout 10
/Applications/SatDump.app/Contents/MacOS/satdump record gps_L5_test_pluto --source plutosdr --samplerate 10e6 --frequency 1176000000 --baseband_format cs8 --gain_mode hybrid --ip_address 10.0.1.191 --auto_reconnect false --timeout 10
/Applications/SatDump.app/Contents/MacOS/satdump record gps_L2_test_pluto --source plutosdr --samplerate 10e6 --frequency 1227600000 --baseband_format cs8 --gain_mode hybrid --ip_address 10.0.1.191 --auto_reconnect false --timeout 10
@tstellanova
tstellanova / hrf_gps_L1CA.conf
Created July 13, 2024 16:03
Tested configuration file for gnss-sdr that allows receiving GPS L1 C/A with HackRF
[GNSS-SDR]
; tstellanova tested with:
; gnss-sdr running on rpi4
; Standard UBX multiband active antenna (includes a preamp/LNA) supplied with +5 VDC power on external bias-tee.
; Plus an additional HT004a LNA ("30 dB" claimed), powered by USB-C
; HackRF info:
; Board ID Number: 4 (HackRF One)
; Firmware Version: 2024.02.1 (API:1.08)
; Hardware Revision: r9
@tstellanova
tstellanova / hrf_gps_L1.conf
Last active July 13, 2024 16:04
Configuration file for gnss-sdr that allows receiving GPS L1 C/A with HackRF
[GNSS-SDR]
; tstellanova tested with:
; gnss-sdr running on rpi4
; Standard UBX multiband active antenna (includes a preamp/LNA) supplied with +5 VDC power on external bias-tee.
; Plus an additional HT004a LNA ("30 dB" claimed), powered by USB-C
; HackRF info:
; Board ID Number: 4 (HackRF One)
; Firmware Version: 2024.02.1 (API:1.08)
; Hardware Revision: r9
@tstellanova
tstellanova / gnss_sdr_macos_14_5.md
Last active July 11, 2024 16:58
Notes on building and installing gnss-sdr on macbook M3 running macos version Sonoma 14.5

At time of writing, there is not a homebrew formula for installing gnss-sdr on this macos version. These are notes on how I built it from source.

  • Preliminaries:
    • install python using pyenv, set local python to 3.11
    • install xcode command line tools
    • install Homebrew package manager
  • Core dependencies (install using homebrew)
brew install cmake volk gnuradio hdf5 protobuf
@tstellanova
tstellanova / hackrf_gnss_sigmf.py
Last active July 13, 2024 20:00
Wrapper around hackrf_transfer that records GNSS samples and generates SigMF data and meta file pairs
#!/usr/bin/env python
from subprocess import Popen, PIPE, STDOUT
import re
import argparse
import os
import json
from datetime import datetime, timezone
import sigmf
from sigmf import SigMFFile
@tstellanova
tstellanova / extract_coarse.py
Last active July 12, 2024 19:08
Extract coarse channel data from a GUPPI raw file set (BL_SETI) into SigMF files
"""
From a GUPPI .raw file (or set of files),
extract a single coarse channel's worth of data
into two separate polarization SigMF file sets
including both sigmf-data and sigmf-meta files
for each polarization.
Based on prior raw2sigmf from https://github.com/greghell/extractor
first argument = filename of one '.raw' file of the data set
@tstellanova
tstellanova / guppi_raw_data_format.md
Last active July 8, 2024 17:59
Notes on the GUPPI Raw Data Format (from S. Ellingson)

Notes on the GUPPI Raw Data Format S. Ellingson Nov 1, 2013

This format consists of blocks, with each block consisting of a text header and a raw binary data segment.

An example of a header is shown in the file "header_example.txt". The header ends with the word "END". Some important fields are:

@tstellanova
tstellanova / rtl_fm_broadcast.md
Last active June 26, 2024 01:11
Using rtl_fm with aplay to listen to broadcast FM stereo

I use this to listen to stereo from KALX using an RTL-SDR.

  • On debian (raspberry pi with ALSA):

rtl_fm -M wbfm -f 90.7M -r 64k - |aplay -r 32000 -f S16_LE -t raw -c 2

  • On macos (using Sox via homebrew):

rtl_fm -M wbfm -f 90.7M -r 64k - | play -t raw -r 32k -es -b 16 -c 2 -V1 -

@tstellanova
tstellanova / uconsole_cm4_setup.md
Last active March 3, 2024 21:50
New uConsole setup

Assembly

  • When assembling the uConsole, at step "E. Mount the Core", the CM4 module tends to unplug/disengage from the two connectors that hold it on the main board. Carefully use glue or another method to secure the CM4 to the core board.
  • When placing the heat transfer putty on the CM4, between the CM4 and the case, spread the putty so that it will make approximately flat contact with the case. The Broadcom chip is a bit thicker than the adjacent chips. If needed you can scribe some shallow hash marks into the putty to make it spread more easily.

Software Configuration

  • Use the external antenna rather than the CM4 internal antenna
@tstellanova
tstellanova / gui1_liners.sh
Last active March 2, 2024 05:24
one liners for wmctrl and xrandr on ubuntu 22 with wayland
# wmctrl one-liners
# DISPLAY is needed if you're running from eg an ssh shell
# list all windows
DISPLAY=:0 wmctrl -lG
# Resize the "active" window
# dimensions are: X,Y,width,height
DISPLAY=:0 wmctrl -r :ACTIVE: -e 0,40,40,1000,500