Skip to content
gordonjcp edited this page Mar 29, 2011 · 8 revisions

Getting Started

Getting lysdr going is supposed to be easy. Part of the original design was that it should have minimal dependencies and be easy to set up and use, particularly with other software.

What You Need

You need a few fairly common packages to compile lysdr. To download the most recent version of lysdr from github, you'll need git. To actually compile and run lysdr you'll need fftw3, jackd and Gtk+. In Ubuntu, you'd use a command like: sudo aptitude install git-core libjack-jackd2-dev libgtk2.0-dev libfftw3-dev. Now clone the git repository, configure and build: $ git clone git://github.com/gordonjcp/lysdr.git Cloning into lysdr... (lots of stuff about receiving objects and resolving deltas) $ cd lysdr/ $ ./waf configure Setting srcdir to : /home/gordonjcp/devel/temp/lysdr Setting blddir to : /home/gordonjcp/devel/temp/lysdr/build Checking for program gcc,cc : ok /usr/bin/gcc (lots more "Checking..." lines) 'configure' finished successfully (1.334s) $ ./waf Waf: Entering directory /home/gordonjcp/devel/temp/lysdr/build' [1/8] cc: waterfall.c -> build/default/waterfall_1.o (list of files being built) Waf: Leaving directory /home/gordonjcp/devel/temp/lysdr/build' 'build' finished successfully (6.902s)

... and that's it done. Now you have lysdr compiled in ./build/default/lysdr and it's ready to go. You won't see much yet, because we need some sort of source. Haven't got an SDR like a softrock or similar? No problem, we'll just play a prerecorded file into it.

If you use Arch Linux

There is already a lysdr-git package in AUR. Install it with your favourite AUR helper, or whichever technique you prefer.

Listening to the radio

There are various sources of pre-recorded IQ files on the internet. The SDR-IQ site has some interesting ones, or you can grab this example (18M) here. The files tend to be quite large, because they're recorded in stereo at a high sample rate, and you cannot use lossy compression like Ogg Vorbis or MP3 without destroying the phase information and making them utterly unusable. Well, unless you want to get published on Rephlex Records. You're also going to need a media player that can play back through jack, and for that I tend to use mplayer. So, install that - sudo aptitude install mplayer and we're just about ready. If you don't explicitly configure jackd it will start with some fairly reasonable default settings - nothing great, but perfectly okay for what we want to do. It can be set up to send audio to different sound cards, and all sorts of clever stuff, so if you want to use that you should consult your Linux distribution's documentation on using and configuring jack.

We don't care about the clever stuff, so just go and start lysdr, from the directory you downloaded it into: $ ./build/default/lysdr --co -f 7056000 lysdr starting jackd 0.118.0 (lots of stuff about jack) JACK server started

The two switches you passed to lysdr there tell it to automatically connect the output, and set the centre frequency to 7.056MHz - the LO frequency of the SoftRock I used to capture the demo file.

Now in another terminal, do this: $ mplayer -ao jack:port=lysdr sdr1.flac (lots of stuff about mplayer)

Mplayer will show a status bar in the terminal, something like A: 137.0 (02:17.0) of 299.0 (04:59.0) 0.1% - this tells you that it's a little over two minutes into a 5-minute recording. You can pause, skip backwards and forwards, and restart this recording as often as you like - did you miss what the guy said? Skip it back! Another station was talking, 3kHz up? Well, skip it back, pause, retune, and start playing again. You can do that. Any sufficiently advanced technology is indistinguishable from a carefully-rigged demo.

Clone this wiki locally