July 29, 2012

RTL-SDR on MK802


I wanted to see if it was possible to build a small and low cost embedded receiver with an ARM based Linux computer and a USB DVB-T tuner. The idea was to capture the signal and do some simple processing and monitoring. For the computer part a decided to go for the Rikomagic MK802 since it had a fairly fast CPU at 1 GHz and low price. I got some of my inspiration from this article:

 
MK802 runs Android on an internal flash but can also boot Linux from an microSDHC card. All my experiment where done under Linux. To find Linux images and installation guides go here: https://www.miniand.com
I used the image: Lubuntu 12.04

After preparing the Linux image and having a running system I needed to add development packages for C++ like build-essential, cmake, libusb-1.0.0-dev...

I used the graphical tool Software Center to add packages. To install it run the commands:

sudo apt-get update
sudo apt-get install software-center

(The default password is: miniand)

Building RTL-SDR

The build steps a described here:

I built it with cmake since the autotools gave me problems with libusb for some reason. After a successful build i ran the program rtl_test. It gave some promising results. Note that to access the device I needed to run it as root. I was able to run at 2.048 MSPS.

miniand@miniand:~$ sudo rtl_test -s 2048000 -t

Found 1 device(s):
0: Generic RTL2832U (e.g. hama nano)

Using device 0: Generic RTL2832U (e.g. hama nano)

Found Elonics E4000 tuner

Supported gain values (18): -1.0 1.5 4.0 6.5 9.0 11.5 14.0 16.5 19.0 21.5 24.0 29.0 34.0 42.0 43.0 45.0 47.0 49.0

Benchmarking E4000 PLL...

[E4K] PLL not locked for 51000000 Hz!
[E4K] PLL not locked for 2186000000 Hz!
[E4K] PLL not locked for 1093000000 Hz!
[E4K] PLL not locked for 1258000000 Hz!

E4K range: 52 to 2185 MHz

E4K L-band gap: 1093 to 1258 MHz

For a more substantial test i decide to try to receive a narrow band FM signal. There is a simple FM receiver included in the build. The command to use is:

sudo rtl_fm -f 155.5e6 -s 12000 -g -1.0 -l 150 - |play -t raw -r 12k -e signed-integer -b 16 -c 1 -V1 -
I transmitted with a Puxing PX777 at 155.5 MHz (that is a license free frequency in Sweden). I was able to hear the transmission. The audio was some what distorted but I was able to hear it. I decided to go to the next step by installing the python wrapper (some more software packages was also needed). It can be found here:

There are a few examples provided. I did successful runs of demo_waterfall.py and test.py (after some hacking in the scripts to get the settings right for frequency and sample rate). See the screen shots below.

To be continued...

I got the hardware from ebay.

MK802 ebay seller: http://stores.ebay.com/tomtopdigitalshop
Item name: "Mini Google Android 4.0 TV Box HD Player WIFI PC Allwinner A10 MK802 1GB White"

DVB-T USB TV dongle from ebay seller:http://stores.ebay.com/runteck88
Item name: "White USB DVB-T RTL2832U + E4000 for Windowns XP/ Vista/ Seven PC SDR GPS P335"

1 comment:

  1. Imported comments from my old blog:

    Posted by the720k 2013-01-08 23:51
    Agreed. I think I might set mine uo to run rtl_tcp tonight or tomorrow. Thanks for the reply!

    Posted by Patrik 2013-01-08 17:28
    I did not measure the rate of the waterfall but the transmissions in the screen shot are a few second so that might give you a feeling of the update rate. Thew was no buffer errors reported from rtl_fm but I'm not sure if it will report that. I suspect that it is on the limit of the hardware is capable of. I still think that this would work as a nice platform for rtl_tcp or for simple SDR applications.

    Posted by the720k 2013-01-08 03:14
    Very nice way to put to use these two inexpensive pieces of hardware. As soon as I picked up my mk802 II, I started thinking that this could be a wonderful way to create a lightweight, low-power SDR. Before I give this a try, I'm curious to know how well the waterfall draws on-screen. Did you run into any buffering issues with audio processing?

    ReplyDelete

Note: Only a member of this blog may post a comment.