DSD and the Rapsberry Pi

This is a work in progress, and as such is more a journal of things that didn't work

I got DSD+ compiled without any issues, just following the instructions as George M1GEO did, however I did run into a couple of issues trying to decode anything and have been unsuccessful as of yet.

The first was an error “Fatal unable to get cpu freq from /proc/cpuinfo” when running ‘dsd -a’ to list the audio devices attached. I tracked this back to being a problem/bug/feature of the jack package, which is resolved in JACK2. Building and installing that following the instructions here:

http://theredbalcktree.wordpress.com/2014/08/10/fatal-cannot-locate -cpu-mhz-in-proccpuinfo/

There is a JACK2 package in the raspbian repositories which I also installed for good measure, but found that the portaudio19-dev package will complain about it, but if you’ve already got dsd built you can ignore portaudio19-dev (the actual library is in the libportaudio0 or libportaudio2 package).

As an aside, this should also have fixed wspr, fldigi and anything else that uses portaudio.

This is where I ran into my next hurdle, dsd tries to open the soundcard at 48K, which the cheap Chinese usb sound card I was using didn't support so the program ungracefully segfaults, spitting vast quantities of errors to the screen. I did bodge round this by creating an upsampling virtual device, which did at least run. But as you’d expect nothing would decode given the limited bandwidth.

George reports that using 96K worked better for him, and he has a trick for making it work which escapes me atm.

Undeterred by this, I next tried to use an rtl sdr as the receiver rather than the ft857 I had been using before. This however proved to be unsuccessful. However I will detail how I attempted it and you may find it of some use.
From the dsd wiki it outlines that you can pass it raw data via STDIN rather than using an audio device, and the format happens to be compatible with that written by rtl_fm to std out. I should therefore be able to do the following:

rtl_fm -F 145.150M -s 48K -M fm | dsd -i - -o pa:0
and this should decode any dstar on 145.150 MHz, however I was never successful at decoding either the two local repeaters VK3RWN and VK3RMM, or a local transmission. I believe the problem to be with the audio level output from rtl_fm. Playing it back it is significantly lower than the volume of the noise, however there are no options to adjust this. There is a tuner gain option for rtl_fm however none of the values I tried 1 to 10K had any effect.
I would suggest maybe if your going to go down the rtl sdr route to use something like gqrx to demodulate the fm and raise the level before presenting it to dsd. However I haven’t had a chance to do so.

Linux and Amateur Radio

A few weeks ago I gave a talk at the Geelong Radio and Electronics society (http://qrz.com/VK3ANR) about the history of the Linux operating system and some the applications relate to amateur radio. In this short article, I aim to follow up on that talk and address some of the feedback I've received from the members by presenting some of the applications mentioned and how they can be installed.

Most of the instructions here should work for those using a Raspberry Pi, although some packages may require additional repositories in this instance. I'm personally am writing this using Linux Mint as my distribution and inspiration, although most things will transfer directly to Ubuntu and it's many derivatives.

The slides from that presentation are available here

Continue reading Linux and Amateur Radio

2.2" ILI9340C TFT and the Raspberry Pi


This page describes how I went about connecting a small 2.2" TFT display to the Raspberry Pi. This page is mainly for reference about what chip is in the display and what modules are required to make it work.

X server running on the 2.2" TFT in portrait mode.
X server running on the 2.2" TFT in portrait mode.

The hardware

The display is I purchases is a 2.2" Colour TFT with a resolution of 320x240. It is controlled with the ILI9340C LCD driver chip via the SPI bus and runs on 3.3v.  They can be found on eBay for a ~$6 AUD.

Continue reading 2.2" ILI9340C TFT and the Raspberry Pi

Getting Started with the STM32F3 Discovery Board on Ubuntu 13.10

On a whim I went out and added a STM32F3-Discovery Development board to a rs-online order. The board contains an STM32F303 ARM-Coretex M4 processor capable of ~70MHz and has four  5 MSPS ADCs, 12 Fast DACs, hardware DSP and FPU; making it an ideal candidate for building a software defined radio. Although before I could get to that I had to setup the tools needed to actually program the thing. Having never programmed an ARM chip before (well not bare metal anyway). Here are the steps that I went through to get it working. Most of which are taken from articles published here: http://engineering-diy.blogspot.com.au/2012/11/stm32f3-discovery-eclipse-openocd.html . I'm just collating them all together for reference.

Continue reading Getting Started with the STM32F3 Discovery Board on Ubuntu 13.10

RTL-SDR on the Raspberry PI


A while ago I decided to venture into the world of Ham Radio. Under the advice of   George I went out a purchased a cheap DVB USB dongle to use as a Software Defined Radio (SDR). I had thought about using it with the Raspberry Pi I bought a while ago.


The software was pretty straight forward to setup, here are my instructions from a fresh install of the Raspbian distribution:

Continue reading RTL-SDR on the Raspberry PI

Raspberry Pi

I recently received my Raspberry PI from RS a few weeks ago. Here I plan to document the oddities and things I learn. If only such that I can look them up when I forget.

I can wholly recommend the case sold by these guys it  fits perfectly.

If you plan to have your root FS on a USB harddrive, you need to upgrade the firmware, either using the tool by hexxeh using his awesome util found (https://github.com/Hexxeh/rpi-update) or by manually pulling the latest from https://github.com/raspberrypi/firmware


If you want to play audio from mplayer, it's broken. Well very buggy there's currently an open issue https://github.com/raspberrypi/firmware/issues/2 addressing it in which anumber of things are suggested. Although it can be bodged round using "mplayer -ao sdl" to play viasdl which some reason gets round (from my understanding) the buffer underrun in the alsa module. - This was fixed! 😛


A good powersupply is vital, otherwise you can expect all of the issues mentioned over at: http://elinux.org/R-Pi_Troubleshooting#Troubleshooting_power_problems

Pointless Things Discovered:

LAMMPS (http://lammps.sandia.gov/) can be run on the PI, it is however very slow. Using stock debian-arm and lammps built with gcc -mfloat-abi=softfp. I managed to achieve 100ps NPT in 89 hours for alanine with 1728TIP3P water molecules. This could be improved if I moved to Raspbian (http://www.raspbian.org/) which is built to use the hardware floating point unit.