Click Here For Advertising Information
Basic Raspberry Pi Setup You need Before our Scanner Projects
Recently I bought a Raspberry Pi. The Raspberry Pi is a credit-card size computer. Its a capable
little computer which can be used in electronic projects. This computer runs on the Linux operating
system. I will show you how to easily install a version of Linux that that been optimized for
the Raspberry Pi Computer. I've been experimenting with uses of the Pi computer for the
world of scanning and monitoring aviation.
Installing Linux on Your Raspberry Pi Computer
In this article I will guide you step by step, line by line, key stroke by key stroke on how to setup
your new Raspberry Pi computer with Linux (Raspbian), get your wifi connections correct and get the needed
software to communicate with your SDR Dongle. Then you will have a foundation of knowledge, hardware and
software to begin some fun projects using a cheap SDR radio and cheap ($35.00!) computer.
First, where can I get a Pi comptuer? I purchased mine from Amazon.com. Here is the link
to the vendor that I bought mine from HERE
Included were the computer, power supply, box to mount it in (worthless), wifi card, and SD Card
with software (almost worthless). When you get your Pi computer I suggest you go to your local
store and buy a larger SD card. Don't purchase an SD card less than 8GB, these can be gotten
at any store for $10-$15. The Pi computer runs $35.00 without any accessories however you will
need the WiFi card ($10 extra) and power supply ($10 extra) But if you use the link above everything except
for a good SD card is included. Just makes life easier if you purchase the "bundle".
Picture of the Components Check for Full Size Picture
Click on Picture for larger image
Picture of the Components Assembled into a Mode-S System
Click on Picture for larger image
You still will need the TV Dongle as discribed in my article
Your Own $20 ADSB Aircraft Radar System however the software
discribed in that article is not needed. But the article will tell you where you can get a dongle and
which dongle to purchase.
A neat thing about the Pi computer is that you can connect to it via Ethernet, WiFi, or simply plug
it into the HDMI connector on your TV or monitor. You can connect a mouse and keyboard directy to
the Pi as well. We will be using an Ethernet cable as well as WiFi in this article.
Below I've included step by step instructions so that even someone with limited computer experience
can get up and running. I use to do some programming under UNIX (simular to Linux) but wow did
I forget a lot so if you run into problems I'll help as much as I can but don't expect miracles.
- 1) Format an SD Card by using SDFormatter.exe It can be downloaded if you need it:
The options in SDFormatter you want to choose are Format Type = FULL (Erase) and
Format Size Adjustment = ON. This process is quick.
- 2) Download a copy of the NOOBS software which includes the Raspbian Operating System
which you'll need to make your Raspberry Pi work. Raspbian is basically a Linux operating system
optimized to run on the Raspberry Pi computer. You can download it here:
This is a large .zip file so it will take awhile to download. Unzip then
copy the contents of the NOOBS folder directly to your SD Card using Windows Explorer.
This process will take a few minutes as there are a lot of files.
- 3) Put your SD Card in your Raspberry Pi. Connect your Pi computer to a monitor or TV
that has an HDMI connector. Plug a USB Keyboard and mouse into the Pi. At this time
you do NOT need the Wifi card plugged into the Pi. Power up the Raspberry Pi. A window will
pop up asking you which operating system you want to install. Choose ONLY Raspbiar,
do not select any other options. This will install the Raspbiar OS onto the SD Card
while deleting the temp files. This process can take 15 minutes or so. During the
install process you'll see some helpful messages being displayed.
You don't need to write down anything, its all contained here.
When the 'status bar' says 100% do not be alarmed if nothing happens for a
few more minutes, no the system did not hang. When it is fully complete
you'll see a pop up saying the OS(es) Installed Successfully. At this time hit "OK".
- 4) At this time the screen is going to go black and you'll see many lines of messages
scroll past very fast, don't be alarmed, that is Raspbiar starting.
- 5) Next a program will automactilly start called rasp-config. This is similar to what
Windows does when your first turn on a brand new computer, we're going to do a few minor
setups here. Note, your mouse will not work at this point. You will use the UP and DOWN
arrows to naviagate this page and the RIGHT and LEFT arrows to highlight the
Select and Finish options.
- 6) First thing we need to do is option 2 Change User Password.
This is for the default user account named "pi".
- 7) Next is option 3 Enable Boot to Desktop/Scratch. Under this option make sure
"Console Text console, requiring log in" is highlighted. This tells the Raspberry to go to
console mode when it boots up, if at any time you want to bring up the DeskTop you
simply type "startx" from the console window.
- 8) The Next option we care about is option 4 International Options. The only item under
International Options that needs to be set is Timezone.
- 9) Option 4 was the last option we need to worry about in the raspi-config program.
Select and hit enter to exit. You will be asked if you want to reboot, choose Yes.
- 10) The Raspberry Pi will now reboot. When its ready you'll see on the screen raspberrypi login:
Your user name is pi and the password is what you set it to be in the above steps.
Note, when you enter your password you will NOT see **** like you might be use to,
you will see NOTHING but blanks.
- 11) When logged into the system the prompt you'll see is "pi@raspberrypi ~$" this is known
as the command prompt. If you want to bring up the Desktop display simply type "startx" but
it isn't necessary for what we want to do. However if you do start the desktop there is a
version of the old but fun game Tetris!
You have now successfully installed a Linex based operating system on your new Raspberry Pi
Setting Up The Raspberry Pi to use your WiFi Network
Next we're going to remotely log into the Raspberry Pi computer via your network.
In order to do this connect an Ethernet cable between your Raspberry Pi and your router.
Before we can use the wireless features, we must connect via hardwire Ethernet to make
some changes. You will first need to get a copy of a terminal program call "PuTTY".
You can download it free here:
Once you have PuTTY on your computer make sure you're Raspberry Pi is connected to your
router, then power up the Raspberry, you no longer need to have a keyboard, mouse, or
monitor attached to your Raspberry.
You will have to figure out what IP address your Raspberry is, it probably will be something
like 192.168.1.xxx (mine happens to be 192.168.1.104 but if your reboot all your computers
and router that could change so just give an educated guess).
When you try to connect via PuTTY you might get a warning "Potential Security Breach"
just ignore this for now. If all worked and you picked the correct IP address you should
see on your screen "login as:
". Type in your username (pi) and password.
Bingo, you have just logged via your home network! Next we want to get the wireless network to work, this will take a bit more work!
- 1) At the command line prompt type sudo apt-get update this will get the latest
updates for the wireless functions. This could take a few minutes, you'll see files and
messages pass by your PuTTY screen as your Raspberry is downloading files from the internet.
- 2) Once you are back to the command line prompt type sudo apt-get install wicd-curses.
You will see the Raspberry notify you that this install will use up some diskspace
(5,117 kB in my case) and if you would like to continue. Enter Y. It must be an uppercase Y.
- 3) Next type sudo wicd-curses and find your wireless network on the list.
You can select your wireless network by highlighting it with the arrow keys and press
the right arrow key to edit its properties. If you don't see your wireless connection listed,
hit "P" and make sure it says "wlan0" beside Wireless Interface, if it doesn't, enter "wlan0", hit F10, hit "R"
to refresh. You should see it now.
- 4) I suggest using a static IP address, just makes life easier. I used 192.168.1.201.
For Netmask use 255.255.255.0. For Gateway use the IP address of your router,
most routers default IP address is 192.168.1.1
- 5) Make sure "Use Static DNS" is checked but leave all the DNS domain stuff blank.
- 6) Make sure the following are checked "User these settings for all network sharing this essid",
"Automatically connect to this network", and "Use Encryption".
- 7) In the field marked "Key", put the password you use to log into
your router from other wireless devices.
- 8) Press the F10 key to save.
- 9) Hit "P" (must be capitalized). From this screen make sure Wireless Interface
says "wlan0" and Wired Interface says "eth0". The only other checked item on this
page should be "Use default profile on wired autoconnect". Everything should be blank.
Now hit "F10"
- 10) You should be back to the screen with the wireless network highlighted. At the bottom
of this screen you'll see an option "C" for connect. Make sure you have the shift key
pressed and hit "C". You should see your Raspberry Pi connect to your wireless router. This
could take a minute to see anything happen.
From this point on I suggest you do not plug an Ethernet cable into the Pi during a
reboot OR you will have to run "sudo wicd-curses" again to connect to the wireless network.
However if you boot the Pi without an Ethernet cable the Pi will boot up using the wireless
network, after which time you can plug in the Ethernet cable and be connected to your Pi
wirelessly and wired at the same time.
If you are not planning on
connecting a Dongle to your Raspberry you can stop here. If later you
buy a Dongle and want to connect it to your Raspberry simply follow the few instructions below and
it will work find.
Making Your Raspberry Pi and Dongle Talk to Each Other
If you're setting up your Raspberry Pi to use the MilAirComms1090 Mode-S sharing software you can skip this step. The
MilAirComms1090 install program will automatically setup your Raspberry Pi to talk with your RTL Dongle.
- 1) Using PuTTY log into your Pi Computer if you already aren't.
- 2) We are going to make sure the software/drivers/etc on the Pi comptuer are upto date.
Type this command sudo apt-get update. When that is complete the next command you
will want to enter is sudo apt-get upgrade. This will update the operating system to
the latest version.
- 3) Type the following command: sudo apt-get install git-core This installs the git
repository fetch code. You may already have this installed, in which case you will get a
message advising that you already have the most up-to-date version.
- 4) Next we will use the following instructions to setup sdr-rtl.
- sudo apt-get install git
- sudo apt-get install cmake
- sudo apt-get install libusb-1.0-0-dev
- sudo apt-get install build-essential
- 5) Now we're going to install the RTL-2832U USB dongle driver source code and compile it
to run on the Raspberry Pi. Simply type each command below.
- git clone git://git.osmocom.org/rtl-sdr.git
- cd rtl-sdr
- mkdir build
- cd build
- cmake ../ -DINSTALL_UDEV_RULES=ON
- sudo make install
- sudo ldconfig After typing this command if all was successful you should see no
return or error messages.
- 6) You now can plug your Dongle into the Raspberry Pi USB port.
- 7) These follow steps will tell the system about what the new device is allowed to do and we'll reboot
- cd ~
- sudo cp ./rtl-sdr/rtl-sdr.rules /etc/udev/rules.d/
- sudo reboot
- 8) Earlier we upgraded the Raspberry Pi, as with most upgrades something breaks! But don't
worry we're going to fix that. Apparently the upgrade incorporates a new Linux kernel which
included a DVB driver for the dongle to be used as a true TV receiver.
Since the device is already in use by this driver, the driver needed for
dump1090 (the Mode-S program) can't access it. To fix this little issue you will need
to create a conf file to restrict what the drivers can do. Type these commands cd /etc/modprobe.d
then sudo nano no-rtl.conf. This will start a text editor where you're going to enter the
To save the file hold the CTRL key down and hit "O" (oh, not zero) it will ask you file name
to write, just hit the enter. To exit nano type CTRL X. Now would be a good time to reboot
so type sudo reboot.
- blacklist dvb_usb_rtl28xxu
- blacklist rtl2832
- blacklist rtl2830
- 9) Once the system is booted, log into the Raspberry and type rtl_test -t. If your Pi
is able to communicate with your dongle you should see something list this:
Found 1 device(s):
0: Realtek, RTL2838UHIDIR, SN: 00000001
Using device 0: Generic RTL2832U OEM
Found Rafael Micro R820T tuner
Supported gain values (29): 0.0 0.9 1.4 2.7 3.7 7.7 8.7 12.5 14.4 15.7 16.6 19.7 20.7 22.9 25.4 28.0 29.7 32.8 33.8 36.4 37.2 38.6 40.2 42.1 43.4 43.9 44.5 48.0 49.6
Sampling at 2048000 S/s.
No E4000 tuner found, aborting.
Don't worry about the No E4000 tuner found, aborting statment. If you're running a dongle
for Mode-S it is not using the E4000 tuner, its running the R820 tuner which was found.
At this stage you have a Dongle that is successfully talking with your Raspberry Pi computer and
you can see its data via a wireless network connection on your computer. That is a major
feat! Now you have the basic building blocks to try other projects. Next I suggest the ADSB / Mode-S
project or the Wifi Dongle Streaming project.
I hope you've enjoyed this article.