Skip to content

Craig Rood

Month: December 2019

Homemade Plane Radar

Posted on 27th December 2019 by Craig Rood

Few years ago an SDR (Software Defined Radio) USB dongle for £10. At the time I used it for simply picking up FM and DAB+ – for the price point it was ideal. I was aware of some of the SDR ‘features’ of this device but not until recently I decided to look into this much further.

SDR

Software Defined Radio, most commonly referred to as SDR is where the signal processing from a radio signal is done in software rather than hardware. This allows for signals that couldn’t otherwise be decoded – such as ADS-B (simply information planes broadcast to let others know where it is etc), be done by simply installing software/plugin.

Device

Most popular hobby SDR devices are based on the RTL2832U chipset. This chipset was fairly groundbreaking at the time, a small and very cheap USB device was capable of doing exactly the same as a device that costs 10x. Very quickly the software library for these small USB devices grew and 100s of packages and plugins are available for hobbyists and professionals alike. Even today new devices are being produced based on this chipset with SDR in mind, rather than simply to be a TV/Radio receiver.

I’m not going to make any specific recommendation around what SDR device to get. There are plenty of reviews online including YouTube which covers all price ranges from £10 and above.

Setup

To run the software you are going to need a machine that hosts the device. More recently Raspberry Pi hosts are become more popular. This is primary due to Raspberry Pi having fixed hardware, so images can be produced and deployed to give a plug-n-play experience. The downside to this is, unless you have some experience with Linux, it can be difficult to customise. Preferably, a windows host will do the job, which I will be referring to in this post.

Installation

USB Receiver

Probably the hardest step is getting the USB Receiver installed onto a Windows. This is especially true with driver signing and compatibility. Zadig will install the driver for you, for beginners, downloading the community SDR# package is all you need. This includes the required drivers and software to get started.

This may require a few restarts of you machine, you may also need to remove the drivers and re-install for Windows to finally pair with the device.

Antenna

Your receiver should already come with an antenna. These certainly have limited mileage. Again, I’m not going to make specific recommendations into what antennas to purchase, but its important to note that both the antenna and positioning will change what you can and can’t receive.

Software

Now to the good bit, to start tracking flights, you will need 2 additional bits of software (also free).

Firstly, dump1090-win – (direct download link). Simply download, unzip and run dump1090.bat. This will automatically connect to your USB device – so make sure nothing else is running that may get in the way!

If successful, you should see a window that looks like this:-

Above shows information about the planes in your area, such as flight number, altitude, speed and location. Whilst this is neat, it doesn’t mean much visually. This is where our second piece of software comes in.

This one is called Virtual Radar Server. This takes the information shown above, into an actual map and visualise the planes in real-time.

Download the latest version. This will install onto your machine, unlike dump1090.

Once installed and running, setting up the receiver to hookup to the already running dump1090 is quite simple.

Go to Tools > Options. This will present the settings screen with a sidebar on the left. Select Receiver > Receiver. Click Wizard button on the top right.

Choose Software Defined Radio, then Dump1090. Once complete you can go back to your main Virtual Radar Server screen, as shown below.

By clicking the blue link near the middle of the page, a web browser tab will open up giving a visual on a map all the planes the SDR device can pickup.

There are quite a few options to play around within the Menu.

Limitations

Before I close this one off, it’s important to understand that both cheap devices and antennas have limitations. Personally most planes that I can pickup must be within around 20-30mi radius. Also, they also must be above 10,000ft. As ADS-B works from line of sight, having a small antenna inside is going to severely limit the reception.

More…

ADS-B is a great source of data to be use for other projects and learning. both pieces of software above are free to use, and can easily be interrogated with your own creations.

SonicGoose uses the publicly available data from himself to track flights on his website, as an example. He also has some tutorials and other software which may be of interest.

Further Reading

RTL-SDR: Seven Years Later
Realtek RTL SDR £15 Dongle Explored
RTL-SDR Tutorial: Cheap ADS-B Aircraft RADAR
Posted in UncategorisedLeave a Comment on Homemade Plane Radar

Relay logs error – MySQL/MariaDB

Posted on 5th December 2019 by Craig Rood

One of my local dev environments run WinNMP – a Windows development stack package with Nginx, MariaDB, PHP etc. Great little tool to hack with.

Over the course of around 3 years my database has grown to around 300-400MB. In itself its relatively small for a database, but for test data is quite chunky.

Now, more recently MariaDB has started to play up, when running WinNMP often MariaDB would enter a crash recovery cycle, never actually starting up properly. mysql.log would read as below, with not much more to explain what is going on.

2019-12-05 17:59:26 0 [Note] Recovering after a crash using wt-nmp-bin
2019-12-05 17:59:26 0 [Note] Starting crash recovery…
2019-12-05 17:59:26 0 [Note] Crash recovery finished.

PHP would also throw errors

[05-Dec-2019 17:59:34 UTC] PHP Warning: mysqli_connect(): MySQL server has gone away in index.php on line 10
[05-Dec-2019 17:59:34 UTC] PHP Warning: mysqli_connect(): Error while reading greeting packet. PID=7336 in index.php on line 10
[05-Dec-2019 17:59:34 UTC] PHP Warning: mysqli_connect(): (HY000/2006): MySQL server has gone away in index.php on line 10
[05-Dec-2019 17:59:34 UTC] PHP Warning: mysqli_error() expects parameter 1 to be mysqli, boolean given in index.php on line 10

These errors simply make effort to describe what is going on. After plenty of Googling, and even some desperate Bing searches. I came across an almost decade old post that outlined an issue around replication. This unfortunately is no longer available, which is why i decided to write this one up – least not for my own reference.

Turns out that WinNMP – formerly WT-NMP runs replication locally, and some action is causing this to break between the master and slave.

Luckily, with WinNMP being portable, and the database being stored neatly within its own folder, I was able to make plenty of backups and play around with recovery with little chance of losing any actual data.

To restore service to MariaDB, firstly I kill any running applications related to the package. Backup the data directory. Remove multi-master.info, all files beginning with relay-log*, then finally all files that have *-relay-bin*

Simply spin the server back up and the MariaDB/MySQL works again.

I still continue to have the same issue about once a month, so its not likely a permanent fix. So I would certainly recommend rebuilding the database server at this point.

Posted in UncategorisedLeave a Comment on Relay logs error – MySQL/MariaDB

Recent Posts

  • Apple Carrier
  • Road to FTTP
  • Homemade Plane Radar
  • Relay logs error – MySQL/MariaDB
  • Subscription Economics

Recent Comments

    Archives

    • February 2025
    • September 2023
    • December 2019
    • November 2019
    • July 2019
    • January 2019
    • June 2012
    • February 2012
    • September 2011
    • April 2011
    • February 2011

    Categories

    • Uncategorised

    Meta

    • Log in
    • Entries feed
    • Comments feed
    • WordPress.org
    Powered by Headline WordPress Theme