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

Goodbye, Nexus 7

Back in October on a trip through London I picked up the Google tablet, the Asus Nexus 7 from the duty-free. I also had an iPad 2 and a Nook Color that was beginning to show its age. With my son, wife, and niece making extensive use of the iPad I was really looking forware to having another tablet around the house. And I wanted to check out and see if Android 4 was as good as everyone says it was. Well, I can say I was not disappointed.

ICS was an excellent OS but no one uses just the OS and once I got past the basics, gmail, Youtube, web browser I really needed more. And what I needed I couldn’t find on the app store and the equivalents were always a little lower in quality. There are a lot of free games in Play. Some of the paid apps in the iTunes App Store were free in the Play store. And it showed. Usually with ads along the top or bottom of the app and sometimes at the startup. Then one day I started getting charges to my credit card. I had enabled Google Wallet and assumed it would behave like any other online store and ask for a password, first. Luckily the receipts arrived quickly in my inbox and I was able to cancel the transactions. Then I deleted Google Wallet. But 5 year olds and Play store don’t mix. I realized I could enable a pin on the device but that would be like getting a credit card from the bank then calling them to set up the pin. Some things are just automatic for a reason.

After a while I started to use it less and everyone else started to use it less as well. It became routine to squabble over the iPad and reach for the Nexus 7 only as the runner up. The games that were being played the most simply weren’t on the Nexus, the educational apps I bought on the iPad had no equivalent on the Play store.

Then it hit me while I was on vacation. Talking to my cousin on why I prefer Apple over Google, and him knowing I was a geek so it should be the other way. I simply told him, “I’ve invested 10 years into Apple. I signed up for the iTunes store when it opened it 2003 (I should have bought some stock then, dammit).” The iPhones and iPads are the least of my concern, they are just the terminal. I’ve bought 1000s of music and a few dozen apps through that store. For me to switch would mean I’d have to do it all over again. And I haven’t found a strongly compelling to throw that money away. He quite liked my reasoned argument rather than the typical fanboy rant.

So one day while the Nexus was sitting on the banquet, completely discharged, I plugged it in and did a reset and wipe. An hour later I listed it on the local version of Craigslist, Le Bon Coin. A few days later I was 120€ richer. It took about 4 days before anyone else in the house even realised it was missing. My son finally asked about the motorcycle game he loved so much.

So, goodbye, Nexus 7. You will be missed, a little bit.

I sold out, a little bit.



On the way back home, while passing through the airport I stopped at the Dixon’s and found this baby, The Google Nexus 7. I’ve had a poor experience with previous Android tablets so wanted to see if Android had really gotten any better or was it more fanboy drivel. After having it for a week I can honestly say it’s pretty good. There are differences between Apple and Android OS philosophy and there are some things I enjoy more on the iPad 2 than on the Nexus 7. I’ve been forced to make this my daily driver since my son has assumed control of the family iPad. So I’ll discuss my thoughts on each aspect below.

Apple pays a great deal of attention to the out of the box experience in all their products. The Nexus came in a cardboard box with a sleeve that was almost impossible to open without tearing it. Inside was the Nexus wrapped in plastic, a box with the cable and charger inside, and warranty card. While not as great a packaging as the iPad at least it wasn’t blister packed.

I turned it on for the first time and after doing it’s initial cold boot, which took about a minute, we go to the language selection screen. I selected English of course then moved through the wizard in selecting an access point, entering my Gmail details and then entering the play store where Transformers 3 was ready for me to watch. It was thrown in as freebie.

I do a lot of reading and the Google Books app looked sorta nice. But you can’t side load books; it only takes content you purchased through the Play store. It downloaded some copy-expired books, Jules Verne, Victor Hugo, etc, but I wasn’t interested in reading those (they are good books just not what I’m looking for at the moment). Since Google’s competition is the Kindle, the Nook, and the iPad, 3 devices with first party readers that do support undreamed ebooks this is something they will need to work out, soon.

Next I tried Google Music. The online version is still not available in France and I haven’t plugged a tablet into a PC in ages. But when activated that was my only option. I looked at my iPhone, conveniently loaded up with music that hasn’t been copied from a PC since I bought it, and shrugged. Google may rule the cloud but it appears the cloud doesn’t work everywhere.

So books and music are a wash, surely video works. Netflix isn’t available in my country (still feels weird saying that) nor was it presented as an option to download in the Play store. I do subscribe to playmo.tv so hopefully those guys were able to do some DNS magic for the Play store. I went into wifi settings, selected advanced options and changed my IP and DNS from DHCP to static. The dynamic IP remained, this was good, the DNS was blank so I entered the IP to the DNS servers playmo provides. I rebooted the Nexus and entered the Play store again. Sure enough the Netflix app was available to download. I Installed and logged in and was soon watching the show from where I left it. The Netflix app for Android would pause and stutter at the selection screen. It clearly wasn’t as smooth as the iPad but having Netflix is better than nothing.

The Nexus 7 also includes 2 native players. The Gallery app and the Play Videos app. Play Videos would only display the files if they were local. I wasn’t interested in plugging it into the USB port of my PC. I did watch a few minutes of Transformers 3. It was pretty good. The Gallery app was able to play some formats; mp4 it seems. It doesn’t natively handle network shares, I downloaded another app (ES File Explorer) to connect to my NAS and pipe the data to Gallery. The results were good but Gallery is sort of bare when it comes to video control. I ended up using Mobo Player to watch the subsequent videos. I’m not a fan of Mobo’s interface (I think it’s not pretty) but it has all the controls I need.

Games are another thing. They are actually pretty good on the Nexus 7. For casual gaming, like Bad Piggies or Angry Birds, you wouldn’t be able to tell the difference between this and the iPad. FPS games, I felt, weren’t as smooth as they are on the iPad. This is a subjective observation and I don’t have the tools to make a completely unbiased opinion. The zombie game, Dead Trigger, was just alright.

The Nexus 7 is a great device. It’s just marred by the geo-locks Google puts in place for the moment. And some first-party apps that I feel are incomplete compared to the competition. For now, Apple still rules the roost. The iTunes, iPad, iPhone integration is much better implemented and I’m still waiting on Android’s response to Airplay (it’s not DLNA; snort). I am reading books on it. The main thing that keeps it from being returned is the fantastic screen, lightness, and the Kindle app. It’s ironic that one of the best stores on Android is not from Google but their competitor. And the price is hard to beat. If you’re invested in the iTunes ecosystem then the iPad mini is a better option. If you try to purchase DRM-free material when available then this is also a great option. I have reservations about Google’s motives, they hacked around Safari’s privacy settings because their tracking was more important than your privacy. Their were a  lot of features that I wanted to use but are still “unavailable in this country” like Wallet and Music.

Apple TV, IPv6, and a problem

For the past month I’ve been beta testing the DNS services of playmo.tv to access my Netflix account while outside the US. It’s very simple, sign up, and change the DNS settings on your compatible devices. In the network settings of the Apple TV I switched the LAN configuration from DHCP to manual, kept the IP and subnet but updated the DNS address (originally pointing to the router which was downstream from my ISP DNS) with the DNS servers provided with my playmo account. After rebooting the AppleTV I was surprised to find I had no internet service at all. Clicking on the network configuration again should that it was manual IP, Subnet, and router, but now the DNS was changed not to the one I specified but to the IPv6 DNS of the router.

I repeated this 2 more times hoping it was some kind of error but the results were the same. DNS I entered was gone, replaced by the automatically completed IPv6 DNS address. My family was starting to get bothered (since they only complain when things break) and as a quick fix I disabled the IPv6 DHCP service on the router. Rebooting the Apple TV one more time got me connected to the iTunes Store and now Netflix.

So in summary if you want to use the Apple TV with a DNS forwarding service like playmo you’ll need to disable IPv6 services on your router. For the moment it isn’t a big problem but I’d like for Apple to fix this bug in their network stack.

An all new iPad, iOS 5.1, and Apple TV


Yesterday Apple released a new iPad and it was just as amazing as everyone thought it would be. First, there is the Retina display that exceeds the resolution of just about every laptop monitor on the market. The memory has been bumped to 1GB. Up from the iPad 2’s 512MB. And the rear camera has been upgraded from the grainy POS it was to a new 5MP sensor with autofocus, face detection, and true HD. The weight has gone up a little by 50grams. And finally the mobile version has an updated radio that now supports LTE.

Of course the iPad wasn’t the only thing Apple presented even though it was what everyone came to see. There was the upgrade of iTunes to 10.6. This new version now supports 1080p videos. And iTunes is furthering the Cloud as the backend with iTunes in the Cloud. Now you can watch your purchased videos on all your devices; no synching necessary.


With the upgrade of the iTunes store comes the upgrade of Apple TV. It’s still the same black puck with a new processor; a single core A5 processor. It’s like the same processor in the iPad 2 just with half the cores. The UI has been upgraded with a wall of buttons interface similar to the Nintendo Wii. You can now sign up and pay for Netflix using your iTunes account (now if it doesn’t do region checking that would be great). The same shitty prices still apply. $2.99 to rent a TV Show and $3.99 for a HD Movie. compared to Netflix it’s a bit pricey.

With the conclusion of MWC just a week and other tablet makers showing off their wares before this event 2012 is looking to be another great year for users, developers, and Apple. Other tablet makers are going to have to do something truly amazing to stay competitive. Adding more cores simply won’t be enough.

Minibloq: graphical Arduino programming aimed at kids

I’m a dad and a geek and I’ve been looking at getting my son, who’s a toddler, more involved with the things I like. We still do the other father son activities like walking to the park, playing football, and video games. But when all those things are away I usually go to my workdesk and break things down and build them back up, while he’s at his room that we  decorated with Treasure Rooms furniture. The size and delicacy of these gizmos means that my son is restricted from being too involved.

Luckily, some hacker Julian da Silva has created a kickstarter project called Minibloq to get the kids started programming the Arduino. I really look forward to working it into projects that my son and I can collaborate on in the future. The kickstarter goal has just been met so in the next few weeks or months something interesting should be emerging.

I bought a Nook Color

A week ago I went on vacation to Hawaii to visit family. While I was there I took advantage of the exchange rate to get a device that I’ve been hearing a lot about. That was the Nook Color; an ebook reader available from the store Barnes and Noble. For a color ebook reader that boasts a 7-inch screen the $250 price is hard to beat.

Already, hackers have gotten hold of the system and rooted the custom version of Android that runs on it. The underlying OS is Android 2.1(Eclair) which doesn’t support Flash. According to BN an update should be available shortly that updates the system to 2.2 (Froyo) and includes the Flash player. The included reader application from BN is quite nice. It supports DRMed epub, open epub, text, and pdf files. A simple file browser allows you to open videos, pictures, and music files as well as browse towards your ebook files. There is a bookcase like display that you can add your current books too. Or, replacing the android status bar, you can go directly to the last opened book but selecting it from the status bar.

One thing the BN reader has that their Android Marketplace app doesn’t is the ability to read books aloud. Since I have a 4 year old this was a very handy feature that isn’t available in all the ebook reader applications I’ve tried. Without rooting the device your choices for entertainment are limited. It includes chess, crossword puzzles, and soduku as the included games. Rooting the device is as simple as downloading a file to an SDCard and booting from it. Instructions are available here. Once done you’ll have acces to a different applauncher and the android market. I downloaded the game Angry Birds and had a great time playing it on a much larger screen than my iPhone.

Not completely satisfied with spending money on a device that only has one purpose I decided to install an alternate version of the OS. Using this guide I installed the current version of Android, 2.3(Gingerbread). But after being disappointed with the battery life, button placement, and available ereaders I went back to the original firmware, that I eventually rooted.

The current release isn’t fast by any means but it is the one that works the best all things considered. CM7 didn’t have proper power management and having to charge an ereader everyday was beginning to be annoying. With the original firmware the Nook Color can go a week between charges.

greenpois0n for the AppleTV is released

The final version of greenpois0n has been released. This is the version that includes the AppleTV 2G which was not included in the previous release candidates. Installation was really really simple. For this jailbreak you’ll need the power cord, Apple remote and microUSB cable. The instructions are as follows:

  1. Start greenpois0n. And click Jailbreak
  2. Plug in the microUSB cable first.
  3. Plug in the power cable.
  4. Press Menu and Play on the Apple Remote for 7 seconds.
  5. After a minute it should complete. Don’t disconnect the AppleTV right away. It will need a minute to build a ramdisk.
  6. After an appropriate amount of time you can unplug the AppleTV and reconnect it to your TV.

Once I connected it to the TV and let it boot I was presented with a new menu option to install the payload software. Make sure your internet connection is on and run the script to install Cydia and NitoTV. After Cydia is installed the AppleTV should reboot again and the greenpois0n menu option should disappear and nitotv will be in its place. Now you can install software (like XBMC-ATV2) with just a click.

One problem I did have was that XBMC didn’t install. You can connect to your AppleTV using SSH root:alpine is the default username and password. Run the command below to install it.

Apple-TV:~ root# apt-get install org.xbmc.xbmc-atv2

Note, that it might throw an error at the end. You can ignore this because it will be installed and fully functional. The TV menu should change but if not you can restart it by sending a killall AppleTV to restart the GUI.

Greenp0ison released

It certainly took long enough but chronic-dev has released greenp0ison for the Mac (and eventually windows and Linux). The server was down earlier so I’ve added a link in the bottom of the page to store a copy here until they get their servers together. This works on the iPhone 3GS, iPhone 4, iPad, and AppleTV2. For now it only does jailbreaks so if you are needing to unlock the phone you’ll have to continue waiting until a new version of ultrasn0w (or whatever it will be called) is released.


Merry Christmas / Happy New Year

It’s been quiet on this blog… too quiet and things are quickly developing in Chin household. Christmas was a little tight this year but everyone has been pleased with their gifts. In that regard Santa has been good to us. Some of our friends came up from Barcelona to visit and spend some time with us. There was lots of drinking, eating , and reminiscing done that night. The recycle bin for glass was completely blocked up with all of our bottles. Matt and Charlie, thank you for stopping by.

My son is quite the musician these days. He takes it from his father, an excellent cellists in his teenage years /s. As a present he received an acoustic guitar and xylophone. Just what every little kid wants. Now he imagines himself as some badass bard strumming his strings as he leads the mice to the river. That is in addition to the dancing and toasting.

I received an Ar.drone as my gift. It’s expensive but worth it. As a hacker the hackability on this thing is about a 9/10. Parrot has gone out of their way to cultivate a developer community around this device. It’s not really a toy since you do have to have a good idea of 3-dimensional movements. It is also controlled by the iPhone, and now android, linux and windows. I’m working on getting some photos and videos together. So far it’s just me crashing into walls or landing. The available free iPhone application is pretty good. The ones that record video and telemetry data cost money. Or I can write my own 🙂