Skip to content

Instantly share code, notes, and snippets.

@rxseger
rxseger / gist:4b66f3fee2ba743123c34d911dedd25c
Created June 4, 2016 23:45
gr-osmosdr from titanous/homebrew-gnuradio install failure 10.11: Could NOT find Doxygen
local $ sw_vers
ProductName: Mac OS X
ProductVersion: 10.11.5
BuildVersion: 15F34
local $ brew brew tap titanous/homebrew-gnuradio
local $ brew install gr-osmosdr
Error: titanous/gnuradio/gr-osmosdr is a head-only formula
Install with `brew install --HEAD titanous/gnuradio/gr-osmosdr`
local $ brew install titanous/gnuradio/gr-osmosdr
Error: titanous/gnuradio/gr-osmosdr is a head-only formula
@rxseger
rxseger / top_block.py
Last active May 26, 2021 03:10
Software FM radio receiver with GNU Radio and Raspberry Pi GPIO volume/channel buttons
#!/usr/bin/env python
import threading
import time
import RPi.GPIO as GPIO
GPIO.setmode(GPIO.BOARD)
# GPIO pins
@rxseger
rxseger / gist:7519799ba0eeb05a154f3a33b38bae68
Created June 6, 2016 07:09
MacPorts GNU Radio install failure OS X 10.11.5 - org.macports.build for port doxygen returned: command execution failed
Able to install GNU Radio through Homebrew, but trying to install it through MacPorts instead for https://github.com/rxseger/homebrew-hackrf/issues/4
~ $ time port install gnuradio
---> Computing dependencies for gnuradio
---> Dependencies to be installed: boost python27 cmake curl curl-ca-bundle libarchive libxml2 xz lzo2 cppunit doxygen bison bison-runtime m4 flex libpng fftw-3-single fftw-3 graphviz fontconfig freetype gd2 jpeg tiff xpm xorg-libXext xorg-libX11 xorg-kbproto xorg-libXau xorg-xproto xorg-libXdmcp xorg-libxcb xorg-libpthread-stubs xorg-xcb-proto xorg-xextproto xorg-libXt xorg-libsm xorg-libice gts glib2 libffi pcre libnetpbm libLASi pango Xft2 xrender xorg-renderproto cairo libpixman xorg-xcb-util gobject-introspection libtool py27-mako py27-beaker py27-setuptools py27-markupsafe harfbuzz graphite2 urw-fonts webp xorg-libXaw xorg-libXmu gsl jack db60 libsamplerate libsndfile flac libogg libvorbis libxslt libsdl xorg-libXrandr xorg-randrproto log4cpp pkgconfig portaudio py27-cheetah py27-lx
@rxseger
rxseger / dump1090_sdrplus-hackrf.patch
Created June 9, 2016 05:01
dump1090_sdrplus HackRF patch
from https://github.com/itemir/dump1090_sdrplus/releases/tag/HackRF_One
diff --git a/dump1090.c b/dump1090.c
index 7fa5327..01cea88 100644
--- a/dump1090.c
+++ b/dump1090.c
@@ -2,6 +2,8 @@
*
* Copyright (C) 2012 by Salvatore Sanfilippo <[email protected]>
*
@rxseger
rxseger / scipy.fftpack.homebrew.txt
Created June 20, 2016 03:46
Fixing 'ImportError: dlopen(/usr/local/lib/python2.7/site-packages/scipy/fftpack/_fftpack.so, 2): Library not loaded: /usr/local/opt/gcc/lib/gcc/5/libgfortran.3.dylib' with scipy installed via homebrew
python /Users/admin/rf/gnuradio/gr-dtv/examples/atsc_ctrlport_monitor.py
python
import scipy
import scipy.fftpack
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python2.7/site-packages/scipy/fftpack/__init__.py", line 95, in <module>
from .basic import *
@rxseger
rxseger / psipdump.py
Created June 22, 2016 05:50
MPEG TS (transport stream) ATSC (over the air digital television broadcast) PSIP (program information) Python script
#!/usr/bin/python
# -*- coding: utf-8 -*-
# Show PSIP data (and other packets) from MPEG TS streams from ATSC broadcasts
# Warning: very rough, incomplete, you're probably better off using VLC 3.0 (show Media Information,
# go to Codec Details, then scroll down to the EPG (electronic program guide) sections)
import sys
import struct
def decodeTSpacket(packet):
@rxseger
rxseger / file_atsc_rx2.grc
Created June 22, 2016 07:32
Enhanced file_atsc_rx.grc, exploded view with additional debug/diagnosis blocks for testing
<?xml version='1.0' encoding='utf-8'?>
<?grc format='1' created='3.7.9'?>
<flow_graph>
<timestamp>Tue Jul 22 14:34:09 2014</timestamp>
<block>
<key>options</key>
<param>
<key>author</key>
<value></value>
</param>
@rxseger
rxseger / file_atsc_rx2.py
Created June 22, 2016 07:33
Generated file_atsc_rx2.py from file_atsc_rx2.grc
#!/usr/bin/env python2
# -*- coding: utf-8 -*-
# see https://gist.github.com/rxseger/4c6fce39cffa149424a4780a37fae426
##################################################
# GNU Radio Python Flow Graph
# Title: Receive ATSC from UHD
# Generated: Wed Jun 22 00:27:50 2016
##################################################
from gnuradio import analog
@rxseger
rxseger / file_atsc_rx2.grc
Created June 30, 2016 03:10
Enhanced file_atsc_rx with bladeRF and adjustable gains
<?xml version='1.0' encoding='utf-8'?>
<?grc format='1' created='3.7.9'?>
<flow_graph>
<timestamp>Tue Jul 22 14:34:09 2014</timestamp>
<block>
<key>options</key>
<param>
<key>author</key>
<value></value>
</param>
@rxseger
rxseger / pwr-nec-decoded.txt
Last active July 3, 2016 23:55
rtl_ir hand decoding
decoding NEC pulses for power down button (0x4d) of RTL remote
http://www.sbprojects.com/knowledge/ir/nec.php
pulse, pause = 0
pulse, pause pause = 1
received using rtl_ir https://github.com/librtlsdr/librtlsdr/pull/9
$ ./rtl_ir
press the power button on the RTL remote, shows pulses: