Raspberry Pi and SDR, Getting started

Due to the limited availability of free time I’ve had the raspberry pi has been sitting in a box unused, and unloved for a very long time. Looking for a project that was inexpensive and didn’t require a lot of loose wires hanging around I got involved in using SDR. SDR stands for Software Defined Radio and is where traditional radio components (tuners, clocks, modulators) are handled in software. Most popular SDR uses are USB TV Sticks such as this one.

After thinking long and hard about this (okay, 2 minutes) I put in an order for this USB DVB-T stick. It was even cheaper than the previous link and the reseller was a Prime reseller so it would get here quick. I should have done more research, according to the SDR wiki what I really wanted was a chipset that used the E4000 or R820T tuner chip. The RTL software lists mine as a Fitipower FC0013 which has half the range of the E4000. No worries, you learn and you learn.

So now that I’ve got the USB stick I needed to get the software that would interface with it. With the Raspberry Pi plugged in and fully booted I proceeded to install all the necessary files.

Here are the steps I used:
Step 0. Update and upgrade your system.
# sudo apt-get update; sudo apt-get upgrade

Step 1. Install the build tools
# sudo apt-get install git cmake build-essential libusb-1.0-dev

Step 2. Download the SDR files
# cd /tmp
# git clone git://git.osmocom.org/rtl-sdr.git

Step 3. Compile and install
# cd rtl-sdr
# mkdir build; cd build
# make
# sudo make install
# sudo ldconfig

Step 4. Test
# rtl_test -t
Found 1 device(s):
0: Sweex DVB-T USB

Using device 0: Sweex DVB-T USB
usb_open error -3
Please fix the device permissions, e.g. by installing the udev rules file rtl-sdr.rules
Failed to open rtlsdr device #0.

Hmm, okay appears to be a problem. Let’s test with root permissions

# sudo rtl_test -t
Found 1 device(s):
0: Sweex DVB-T USB

Using device 0: Sweex DVB-T USB
Found Fitipower FC0013 tuner
Supported gain values (23): -9.9 -7.3 -6.5 -6.3 -6.0 -5.8 -5.4 5.8 6.1 6.3 6.5 6.7 6.8 7.0 7.1 17.9 18.1 18.2 18.4 18.6 18.8 19.1 19.7
No E4000 tuner found, aborting.

Yes, definitely permissions. I did everything correct in /etc/udev/rules.d so not sure why this doesn’t work with a normal account.

The radio is on and working with Raspberry Pi. Now I can try some other tests
# sudo rtl_adsb
Found 1 device(s):
0: Realtek, RTL2838UHIDIR, SN: 000000041

Using device 0: Sweex DVB-T USB
Found Fitipower FC0013 tuner
Tuner gain set to automatic.
Tuned to 1090000000 Hz.
Sampling at 2000000 Hz.
Exact sample rate is: 2000000.052982 Hz

This pipes all ADS-B traffic to the screen. And if you have the right software you can decode the string to get position, aircraft.

Now that rtl_sdr is installed we have some alternatives that can use the USB stick now.

# git clone git://github.com/MalcolmRobb/dump1090.git
# cd dump1090
# make

Then start dump1090 to get a formatted ADS-B table
# ./dump1090 –interactive –enable-agc
Hex Flight Altitude Speed Lat Lon Track Messages Seen .

The RTL library includes a basic server that can be accessed over telnet. Now you can stick your Pi and USB stick in a remote location and process the results elsewhere.
# sudo rtl_tcp
Found 1 device(s).
Found Fitipower FC0013 tuner
Using Sweex DVB-T USB
Tuned to 100000000 Hz.
Use the device argument 'rtl_tcp=' in OsmoSDR (gr-osmosdr) source
to receive samples in GRC and control rtl_tcp parameters (frequency, gain, ...).

For many other tutorials and information visit the project wiki

A week with the AppleTV 2G

While on my trip to Florida I decided to make a stop at the Apple Store like I normally do. I bought 2 things while there: a Magic Trackpad and the new AppleTV.

The trackpad has been everything I imagined and more. It connected to my Hackintosh beautifully and quickly. Then I ran software update to download any libraries and preference panes that it needed. I was quickly tapping, swiping and dragging in no time at all. I was confident that this was truly going to make using the computer better so I shut off my Magic Mouse and put in the drawer (I eventually took it to the office).

The AppleTV was a bit more complicated. It requires an HDMI port and all the HDMI ports on my TV were taken so I got to play with it for a little while I didn’t truly feel like it had found a permanent home. But everything on it worked beautifully. I am weary of Apple’s Homesharing simply because no one has reversed engineered the protocol so it makes it hard to use outside of iTunes. A have a lot of videos that aren’t in iTunes so I thought this would be a constraint. Seriously, iTunes is great but even on the Mac it’s starting to feel a bit bloated. Plus I didn’t upgrade iTunes on my hack to the, now required, version that supports the AppleTV.

But never fear, some inventive developer had managed to successfully port a PLEX client to the AppleTV. It requires the jailbreak so I had to track down the micro-USB cable I let one of my colleagues borrow. None the less, a few minutes with Pwnagetool, some SSH command-lines and a few repository additions and I was in business. I installed Plex Media Server onto my hack, pointed it to the share with all my DVD rips and TV shows and gave it a few hours to update its library. I then fired up AppleTV and bob is your uncle. I watched a few minutes of ripped TV shows and browsed through the catalog. This thing is great!

Then yesterday it just so happened that the Media Center remote for just stopped working. Changing the batteries and cleaning the contacts seemed to make no difference, the LEDs didn’t fire and the damn thing never sent a signal. I took this as a sign that the HTPC was going to be taken out of service. Between the lockups, updates, disappearing devices, and the system maintenance keeping it running was turning into a part-time job. So now the AppleTV has a new spot replacing the buggy (not Microsoft, just a HID device manufacturer that never updates their drivers), loud and large HTPC that currently sits under the TV. I’m contemplating giving it away or turning it into Windows Home Server, putting it out of mind in another part of our apartment.

In the meantime, I’ve given the missus the 1-minute walkthrough of how to browse her TV shows and videos. And I’m seriously thinking of getting klexi which is by the same developer that created the AppleTV client for PLEX.

98% gets the job done

Well it’s been a year and a half since I built the Mediacenter PC. So far everything goes well or mostly well. Hardware has changed in the mean time and my Radeon HD 2400 Pro is 2 generations old. The hard drive feels small with all the TV shows, movies, and music stored on it. And for some reason with very little actually installed Windows Vista has managed to chew through a 40GB partition. Leaving just under 6GB of free space. When I first installed the system it had ran consumed 20GB from a fresh install. This doesn’t really bother me but, eventually, strange things start to happen when disk space gets really low.
As with all Windows system. The computer gets slower and slower from the accumulated sludge of system updates, software updates, restore points, and fragmentation. The only solution is to do a clean reinstall. But for a device that only does one thing, doing this can be really inconvenient. Even more so by the fact that I’m not the only one using the PC. My son has his cartoons and DVDs, my wife has her TV shows and movies. 98% of the time this setup works normally with no problems. It’s just the last 2% that I can’t stand. That really make me want to start over. But the family thinks everything is fine and for the foreseeable future that’s the way it’s going to stay.

Now that’s just really dumb

I’ve been struggling with my custom PC over the weekend. After ordering, waiting, and assembling the parts it just didn’t go all the way like I wanted it to. My Gigabyte P35-DS3R was stuck at “Verifying DMI Pool…”. I searched all over the internet about why I would be stuck at “Verifying DMI Pool……” after assembling everything correctly. I tested the motherboard to see if overclocking the easily overclockable Q6600 was the proper. Not. I thought the order of SATA drives was the problem. Not. I thought the drive had gone bad between the time I plugged it in the first time and the time I restarted the computer. A disk check later, not. So I disabled the ACHI capabilities. Meaning I would loose Hot-disconnect, NCQ, and RAID. This basically made the computer I planned to build with nearly unlimited capabilities, incapable of doing some of the things I would like in the near future.
So I browsed the forums and checked other posts on the same board, and I got nothing. One day I was browsing the OSx86 forums and someone with an ABIT IP35 (a similar chipset with similar features) mentioned the Boot Order in BIOS.
Apparently, my Pioneer DVD Drive is no longer recognized as CDROM, but as PIONEER-DVR… down in the bottom of the list if bootable devices in BIOS. It’s important that CDROM is not selected if you are using AHCI or else it will hang everytime. Realizing this might be the problem I’m having I changed the BIOS, booted and got the “Press any key to boot from CDROM”. Yes!
I posted this here in case someone else with a gigabyte P35-DS3R motherboard also encounters this Verifying DMI Pool error. Maybe the search engine gods will have this in a useful search.

Locked in

Most of the posts on this blog comes from my problematic laptop. Recently on slashdot.org there was the announcement of the 5.0 release of Truecrypt. For a long time I’ve been looking for a solution to secure my files and my laptop. There has been other programs that create encrypted partitions or encrypted disk images. On windows this encrypts some of your data but rarely most of it. And for these there was no solution to secure your Local folder, where the meat of your information is (outlook.pst, thunderbird, firefox, etc). But the great thing about Truecrypt is it can do the filesystem level encryption on a running system partition. No need to boot up into a seperate system or CD and run an encryption script. In fact it makes securing your system so easy (and for laptop users, not having to swap drives around is a godsend) that there is no reason that it shouldn’t be included with every computer sold. I’ve been using it for less that 24 hours and there hasn’t been any visible performance hit (generally 5%) or lost files, or unrecoverable boots.

SO is that what it was

After weeks of screwing around with this laptop and thinking I was having a software problem. I blew away my windows partition. Twice. Installed Ubuntu and then Fedora Core Linux. I was still out of a fully functional laptop. I even went as far booting various LiveCDs and scanning the hardware and hard drive for errors. But this problem would still persist. The keyboard and mouse would lockup after a few minutes and be unrecoverable. Well now I’m back on Windows Vista…Basic. After using Business for a few weeks late last year I was hardly getting anything done. Click and wait was the operation of the day. Basic is supposed to be the lighter brethren of all things Vista. And frankly it’s marginally better. Lots of features have been dropped in the name of making you pay more for the slightly better and resource intensive Premium. Turns out the same thing did happen. But after poking around on the internet I found other people who had the same problem.

Turns out there is a bug in Acer laptops. A bug where when the battery goes kaput it manages to lock the keyboard and causes hellish amount of problems. All this from a fooking battery? I should really slap the taste out of the engineers mouth that managed to let this slip by. I should also slap the design team for integrating the rubber standoffs into the battery. In my case I can’t use it and I can’t through it away unless I also enjoy trying to work on a three legged square table. You see the battery holds the ass end of the laptop up. And there you have it. The worlds largest manufacturer of portable PCs couldn’t bother to think what would happen if someone tried to use the PC without the battery in the by. In other words "Get a Mac".

TV Weekend

The past weekend was another Chin TV weekend. Since I’m sort of late getting caught up on watching my favourite programmes (can you taste the britishness) every now and then I dedicate the entire day to watching what’s left of the TV shows in my queue. This weekend happened to be Veronica Mars S1 and Heroes S2. I tried to follow VM a long time ago when I lived in Miami and Boca. But I just didn’t have the time.
The advantage of living in a subtropical area is you have a reason to go out. To the beach, to the mall, to the race track, you just go somewhere. Paris is cold and gray at the moment. You only go out if you have a death wish and love the cold. Plus, getting Mac ready is like putting a coat on wet noodle. In the end I lose because all the time I spent getting him ready is for not. Now he’s hungry/wet/sleepy and it all has to be undone. So TV weekend it is.
I did make it to the BHV. And bought power tools. Lots of them. I’m still on the look for SMD desolderers and extra fine point soldering tip. And some electronics to hack.
I can’t wait for the next productive TV Weekend

Building a new computer: 3

It’s done and running. For a few weeks in fact. So to wrap up lets see what we’ve done:

Building a new computer: 2

Okay, it’s been almost a week since I ordered the parts for my new HTPC. I haven’t seen anything or a confirmation yet. Barring the weekend, I’ll be waiting 4 days. Thursday makes it an official business week and nothing. So far this sucks. I thought I would have it by the weekend or the start of the week. If it’s not sent tomorrow I’m pulling the plug and go shop elsewhere.

Building a new computer

I think it’s been ages since I put together a computer. I had a Mac for a while and it served me well. I know I can get a Dell or HP for cheap but I want to do it my way. After futzing around for a long time I finally put in the order for a few components. I’ve acquired a lot of computer parts and it costs me a lot less than I assumed it would.
But this is no top of the line rig. I’m building a Media Center PC, and it will be used for a few games but nothing like Crysis. I’ve got a Packard Bell that’s barely keeping up with what I throw at it. basically watching a few DVDs, torrents, and iTunes. I love iTunes but it’s a real monster on such a old PC.