I recently brought a USB DVB-T dongle that is based on the Realtek RTL2832U chip which, with RTLSDR, can be used as a really low cost SDR. This is because it can be setup to return the raw I/Q samples to the host PC. Once you have the samples they can then be processed, I tend to use GNURadio for the processing.
There is a script available that downloads and installs everything, RTLSDR, GNURadio, and more. I recomend you try it first. I think there is also a new project from the GNURadio people that will automate building and installing. I had had some issues with building gr-audio when I wrote this so I use the manual method of building the code for now.
Once you have made sure you have all of the libraries that GNURadio needs you can build the code.
mkdir build cd build cmake ../ make && make test
sudo make install
This whole process can take a while to complete. On my work machine it took nearly 40mins! I had an issue building the gr-audio on my laptop that I still haven’t been able to resolve.
Next I built downloaded and extracted the RTLSDR source code. As with GNURadio we need to create a build directory and run cmake.
mkdir build cmake ../ make
Then I ran a few commands to check that the code and the dongle worked correctly. The first tests to make sure samples are being returned at the correct rate and the second will receive and demodulate a WBFM station.
I use i3 as my main window manager but I like to play around with others so I know what’s out there. One of the window managers that I find very interesting is dwm. It is a very small window manager, about 2k lines of code and you configure it my changing a header file and re-compiling. Definitely not beginner-friendly!
To make playing easier I wanted to run dwm inside i3, that way I don’t have to keep logging in and out. I could have used a VM but the same problem would exist. Below is the shell script I use to do this. I found out how to do this from LinuxExchange.
For some reason I need to run dwm twice before it works, the first time it says “dwm: cannot open display”. Anyone know why this is happening? Below is a screenshot of dwm running emacs, it is the bottom right panel. The panel to the left is emacs editing the config.h file.
So far I have modified the background colour of the status bar and set the status message. To set the status message all you need to do is set the WM_NAME property of the root window. Most systems have a utility that lets you do this in the command line.
xsetroot -name “Hello World”
You can also use this utility to change the background colour, I did a similar thing for i3.
My current project is a control system that runs on a small embedded PC running a Linux OS. I had a problem during development where I had to open/close two serial ports alternatively because they shared an interrupt. Doing this suddenly caused the software to crash after running for a few minutes. The problem turned out to be that I was leaking file descriptors!
I wrote a simple shell script that prints the the total file descriptors open on the serial ports. This helped me make sure my bug fix worked correctly.