Tuesday, September 10, 2013

ADS-B on Win7 with RTL-SDR --RTL1090 adsbSCOPE

(Note: I wrote this while I was using the 4000e version USB tuner stick I had originally used for SDR.   I just got an 820T version, and other than using a newer version of Zadig, I did not change anything in my installation to use it, the software explaned in this post still works without any changes...and reception improved.


For completeness sake, I thought I would throw on the Win7 version of this...using the PC as receiver and decoder.

(here is my original blog entry on the USB stick and Win7)

Some info was here...but not complete.

Again the adsbSCOPE software is here.

RTL1090 Software Download from here.(a little way down the page)  I got the German web site the first time...your mileage may vary.

When you unzip the contents and view the readme, you might get confused.

If you have already been using the RTL-SDR dongle on that computer (like I did) then just do these steps.

1 -Download this file http://sdr.osmocom.org/trac/raw-attachment/wiki/rtl-sdr/RelWithDebInfo.zip

2 -Unzip

3 -Dig through the folders "rtl-sdr-release\x32\" (assuming a 32 bit OS...I haven't tried the 64bit)
     and copy the following files to your RTL1090 unzip folder location.
      -rtlsdr.dll,
      -msvcr100.dll and
      -libusb-1.0.dll

4 -Now your RTL1090 folder should have (at least) the following files...
  -rtl1090.exe
  -libusb-1.0.dll
  -msvcr100.dll
  -rtlsdr.dll

5 - Stick in the USB, launch the RTL1090.exe program, and hit start.
     it shouldn't give any errors, just data...if errors, then probably you haven't used the dongle in that   USB port before...you need to install the rtl-sdr drivers.

if it works, then launch adsbSCOPE.

The only setting is in the Network area (like the previous topic) click the button labled RTL1090, and the button labled LOCAL.

Thats it, enable the client, and you should get data.


This screen shot shows the RTL1090 running, with the adsbSCOPE in the background...you can keep RTL1090 in the background normally...

...NY airspace is busy!

Raspberry Pi wth RTL-SDR receiving ADS-B aircraft data

One of the more interesting finds in the last few years was that aircraft were transmitting telemetry in the clear...apparently through the mode S transponder.

In the last year people wrote software to capture and decode this info.

Within the last year an ability to capture the data with an RTL-SDR TV on a stick was created.

I am not sure of the actual history or lineage...


I am using Dump1090 on the Pi written in Dec 2012 by Salvatore Sanfilippo.

The usage ..cd to the Dump1090 directory then
 ./dump1090 --interactive --net
is on his page...but installation I got from here.

I found more Dump1090 usage info here.

./dump1090  --interactive  --net  --net-beast  --net-ro-port 31001

That last ./dump1090 command breaks down like this...

--interactive =puts raw display on Pi with received data in columns.

--net            =tells Dump1090 to act as data server

--net-beast  =says output data in 'beast' format (adsbSCOPE can decode beast)

--net-ro-port 31001 = sets the output port at 31001 to match what adsbSCOPE is looking for

I am trying to use adsbSCOPE (on a networked windows computer) to decode the data and plot it...but not sure why it isn't working...

So far I AM getting limited acft info on the Pi...but nothing is being seen by adsbSCOPE...

...of course I look away for a few minutes, and adsbSCOPE is working now...but seems to be a bit of lag from when it shows on the Pi till it shows on adsbSCOPE.





The two screen shots were taken within seconds of each other, and show different data...the adsbSCOPE keeps data on longer...Dump1090 only displays data it is currently receiving.

Also, sometimes the LAT/LON shows up on the Dump1090 display...I don't know why it didn't here...unless it received the position data early, and I didn't see it before it went away.

Here is how I setup adsbSCOPE

1- since I am using a Raspberry Pi in this case to capture the data...I don't need any of the other software that comes with the adsb_all.zip file from here.

The actual file is multiple folders deep...

(unzipped folder location)...\adsb_all\pc_software\adsbscope\26\adsbscope26_256.exe

Obviously make a desktop link for ease of use...

Only a couple of settings to make it work with the Pi as I set up previously...

First, Network setup (BTW, you can't set it up while the RAW-data Client is active as shown)


I clicked on the BEAST default, put the Pi IP address in the URL, and make sure the port was 31001.
Then "CLOSE" (on mine I have to drag the window larger to see the CLOSE button)


 Now for the decoder select Beast.


Finally NOW select "RAW-data Client active" on the 'other-Network' menu.

So far working great with the stock antenna near a window!

Yes, you don't need a Pi to do this...you can plug the RTL-SDR stick into your PC and do it all there...but what fun is that?



Addendum:

I found on this web page a command for starting a Dump1090 webserver...I haven't tried it yet...

  ./dump1090 --gain -100 --net --net-ro-port 31001 --net-http-port 8080


Obviously you access that from a different computer.

Monday, September 9, 2013

RTL-SDR on the Raspberry Pi

Disclaimer...so far the Pi does not have enough horsepower to run the typical SDR linux software...so for now don't expect waterfall displays etc.

But the Pi WILL see the TV USB dongle I use, and the RTL software does run...

I will list the links and steps I used to get the hardware/software running...


...time passes...


There seem to be 3/4 projects along this subject (that I am interested in anyway))

(1/2)First two involve using the rtl_fm software...one runs the a server and audio etc is decoded on a client, the other involves actually tuning in and listening to audio on the Pi.

(3)Next one uses the rtl software and multimon to decode data...like APRS messages.

(4)Last one uses the rtl software and some other software to receive ADS-B aircraft transponder data.


So far the last one is working suprisingly well.  The first one seems to work, the second one is a nogo...and I lost the link I found that described #3.


It is interesting, it seems that the links I find on one computer are different than on another computer using the same search terms...so in the process I have lost some locations...that is what is delaying this blog entry...

...I will say, over the next week, I won't be playing with this stuff...but I will be able to research and organize the links.

I will probably break out the #1/#2 to a different section than #3/#4.  So consider this a top level article.


More to follow.

Sunday, September 8, 2013

Raspberry Pi and Motorola Atrix Lapdock and...


To begin with, I am typing this blog entry on this setup!

Hopefully by now everyone has at least limited knowledge of the Raspberry Pi micro computer.

Here is some info if you haven't much knowledge on the subject.

Now some very clever people out there discovered some very useful features of a discontinued cellphone accessory, the Motorola Atrix 4G Lapdock.

The lapdock is a screen, keyboard, battery pack, USB hub in one nice ultraportable laptop case.  Specifically it has USB out for its hub, the keyboard and trackpad are on the hub.  The screen is a HDMI display.

Well guess what, the Pi has HDMI out, and USB plugs.  All you need are the correct connectors.



I used this blog to sort out what connectors I need.  I was able to find an ebayer that had all the parts I needed for a reasonable price (not a package, but one shipment from China).


The Lapdock has male micro usb and HDMI plugs where the cellphone would dock in.  I picked up a 12" micro HDMI extension cable (male-female) and 12" micro USB extender.  I also picked up a microHDMI female to HDMI male adapter, and the same thing in a USB adapter.

USB 2.0 type A male to Micro USB B type 5pin female Connector Adapter convertor,
HDMI Male to Female Micro HDMI socket adapter convertor, 
50cm Micro USB 2.0 type 5Pin Male to micro USB Female tablet extension cable, 
HDMI 1.4 D type Micro HDMI Male to Micro HDMI Female M/F Extension Cable 30cm

The Raspberry Pi has a micro USB power plug...but the latest version can take USB power through the normal USB ports also...and this allows the Pi access to the Lapdock hub/keyboard.

So with two wires, the Pi is powered and sends video/audio to the Lapdock.

I installed the Raspbian Wheezy (to be specific, I used the NOOBS file for installation) and it recognized all the hardware immediately.   The only thing that didn't work out the box was HDMI audio...but that is a simple edit...here.

sudo nano /boot/config.txt
  - uncomment the hdmi_drive=2 entry
  -save the edited file by using...

Press Control-x
Press y
Press [enter]


I will admit, I did the Raspbian installation using a standard keyboard/mouse, HDMI display (my cables weren't in yet)...but I didn't do any changes to the installation other than the audio edit to get the Pi to access the lapdock.

Now the why portion of this other than because it is there...

I intend to install RTL-SDR on it with my TV USB dongle and maybe GNU radio...

...for later...


Friday, September 6, 2013

Linksys WRT54G V2 w/ DD-WRT used as a Client Bridge

I have a few projects in progress, but I thought I would add my thoughts on this.

I spent all last evening, and most of today on and off trying to do this.


I received a defunct WRT54G Version 2.0, it wouldn't do it's router job properly with the linksys software, and was flakey anyway.

So it sat for a few months when it was replaced and then instead of going into the trash it was given to me.  If you read the reports, you know there were a lot of issues with some of these models...so I figured I would attempt loading DD-WRT on it, and maybe use it somewhere (actually looking at a HMSS-MESH setup...maybe later)

I won't retype all the well documented steps at DD-WRT I used to accomplish this...just point out some important (maybe hidden) items.

(1) First, flash the 54G with the DD-WRT firmware as annotated here.

- they mention a 30/30/30 reset...it is well explained here.

--1. DO A HARD RESET *BEFORE AND AFTER* YOU CHANGE DD-WRT FIRMWARE VERSIONS. This does not mean hitting the reset button and saying you are done. This means doing the 30-30-30 reset. To do a 30-30-30 reset you must push the reset button with your router powered on. Hold it for 30 seconds with the router powered on. STILL holding it, pull the power cord for 30 seconds. Still holding it, plug the power back into your router and continue to hold the reset button for 30 more seconds. You will have held the button for a full 90 seconds without releasing it.

 (2) Next install the preferred firmware as noted lower down the page on that last link...

--12548 is a good build for older G only routers.
ftp://dd-wrt.com/others/eko/V24_TNG/svn12548/

 --note that in the first (1) step, you installed a firmware named  dd-wrt.v24_mini_wrt54g.bin
---so download the firmware from the list in (2) that has "mini" in the name.

(3) Again, follow this link for updating the firmware...BTW it is called the 'Peacock Thread'.

(4) assuming everything is working properly, follow these directions.


I did all that, but want to add some info.

-I set up my network under 192.168.11.x  so I had to modify the instruction to use that...obvious, but people may miss that.
-At some point in the past, I set up my wireless network a WPA2-Mixed...apparently that is a bad idea...and caused my many hours of hair pulling...
--I changed it after I read this link...
-Avoid WPA2 Personal MIXED, as it will likely kill communication between the routers (see Security section below for more on this). WPA2 Personal is fine.
 ---it immediately started working after I changed to WPA2-Personal...not mixed...and use AES vs TKIP+AES.



The DD-WRT forums are full of info, but it is a bit hard to sift through, and the forums are very nice to the clueless (like me in this case)...but luckily the answers were all there.