Monday, May 4, 2020

Dipping my feet into the Flightaware/PiAware waters

Being with my family is my #1 priority. Having young children means that all of your hobbies will likely get put on a shelf for a while. In my case, my radio hobby had to take a back seat. Learning about parenthood and that insane amount of time it takes to keep children alive meant that there wasn't enough time or mental capacity to do much else, for about 6 years.

After a while, however, you start the get the hang of things.

Last year I had been really feeling like there was something missing in my life, and it was likely RF. After watching lots of friends on Facebook build impressive ADS-B monitoring systems, I decided it was simple enough, cheap enough, to get my toes wet in the hobby waters.

So, a Raspberry Pi, Flightaware Pro stick and filter were purchased, and I was off.

assembled on the test bench
I was shocked that I was actually able to decode some aircraft at 1090MHz with a little whip in my basement. My mind started buzzing with what a resonant antenna mounted outdoors could produce.

Next, an external antenna was procured, but where to mount it? For the time being, it would be in the second floor of my barn, for various reasons why I won't go into here. Having the resonant antenna with a small amount of gain helped me see quite a few more aircraft. This was getting exciting!

Before long, I told my BFF, Jay Tarantino, AB1II, about this setup and I had him hooked after about 2 second of talking to him on Facebook Chat. 

Jay got the same system and put his antenna in his attic. Jay, unlike me, is in a FANTASTIC location to hear aircraft close into KBOS. In fact, he's close enough to hear the ground aircraft. We were both hooked!

Within a few months, I realized that my RF hobby was starting to come back. Jay and I were chatting regularly about radio topics. We were both finding oddball aircraft and flight paths, we were both having a lot of fun. 

But then it started to happen. How can I make my system better? How come Jay can see more stuff than ME? What can I be doing to improve my system?.....down the rabbit hole I went. 

The first thing was to get the antenna out of the attic and into the air. I slowly started to think about how to mount it and started digging through an old pile of antenna masts, mounts and accessories to see what I could put together. I had forgotten about an H-frame I had made years ago that was originally built to mount a pair of M2 eggbeater antennas. I decided that If I was going to do the work to mount one antenna, I may as well mount a few antennas! The first batch of antennas included:

- a Daimond X50 (144/444Mhz)
- a DPD dual air-band antenna (VHF/Mil-Air)
- an old Marine GPS antenna of unknown origin
- a Flightaware 5dbi ADS-B vertical
- an M2 435MHz eggbeater 

Next, find a piece of mast to mount it all on and get it vertical. I had some 2" Aluminum mast from another project, so I was able to cut a piece of and get the whole thing mounted over the course of a weekend. 

The initial RX antenna array

That did the trick! I was able to see quite a bit more ADS-B traffic and as a bonus was able to start listening to ATC using the VHF air-band antenna with a RTL-SDR receiver into a second Raspberry Pi (using rtl_tcp and GQRX). 

There was a problem, however, quite frequently Jay would be seeing traffic down close to me that I wasn't seeing. That was driving me mad, so next I started reading more and started thinking about looking for greater efficiencies. The first step was about understanding the SDR receiver and it's gain settings. By default, the Flightaware Pro stick and PiAware are configured to use hardware automatic gain control (AGC). This is probably fine for most, but if you have any noise or out of band signals nearby, it will cause your receiver to miss a lot. I started working with the gain settings, but wasn't finding much in the way of consistent results. 

My next detour was to look at filtering and pre-amplification. The Pro stick claims to have a LNA built into the device, but how decent of an LNA? Low noise, to me, should be something in the vicinity of 0.5db nf. I wasn't sure what the spec was on the Pro stick, so I started looking online. There were many to choose from, I ended up trying one I found on Ebay from a Canadian company called GPIO labs. a GPIO labs bandpass filter was also procured. The issue I noticed with these devices was that they came as pre-assembled circuit boards not in enclosures. When I received the boards in the mail I noticed they were very fragile and as I would soon discover, not particularly well soldered (at least the SMA connectors). 

Meanwhile, I had also come across a mini-circuits bandpass filter that was appropriate for the 1090MHz signals I was monitoring, and was physically much studier than the GPIO labs filter. I also happened to have a small aluminum box with holes just the right size for SMA connectors with enough room for the filter and pre-amp. A few bits of UT-141 coax with SMA connectors from the junk box and voila!
0
GPIO labs ADS-B 5v pre-amp, Mini-Circuits VBFZ-1065-S+ bandpass filter

At the same time, I decided to try swapping out a different receiver. I went with a Nooelec NESDR SMArt. I was concerned that having an external LNA into the oboard LNA of the Pro stick might just end up being more gain that would be useful, and besides, we're talking $25 per receiver! The receiver ends up being one of the cheaper components of the system. That, in fact, is a new paradigm that I can get behind. 

The new receiver, pr e-amp and band-pass filter all show improvements, each time getting me a little more signal to decode, but we're not quite done yet. It was time to replace the cheap Flightaware 5dbi antenna with something a bit more substantial and a little more gain. I ended up with the DPD Productions 9dbi vertical for ADS-B. That.....is what I needed. 

Now, finally, I'm able to track aircraft much further out on the edges and I'm suddenly seeing a ton more close-in aircraft as well. I'm now finding consistent results when adjusting the receiver gain under dump1090, with my gain currently set at 27. 

This was a really fun project that took me from "mildly interested in getting back into an rf project" to "I now can't stop thinking about all things RF". 

There are MANY more projects now in various states of planning. Next up, GNSS monitoring on a global scale and a side benefit, a stratum 1 time source. 

73
de N1JFU

The RX array with the new DPD 9dbi ADS-B antenna far right













Tuesday, March 26, 2019

LibreNMS PHP7.0 to 7.2

LibreNMS recently moved the minimum PHP version to 7.1.3, with 7.2 recommended. There were some examples of how to do that with Ubuntu 16.04, but after doing so a few things also had to be done. First, there were a bunch of php modules that needed to updated to the 7.2 versions. Second, a little less obvious to me, you have to specifically enable the php7.2 module in apache and disable the 7.0 (in my case) module. I did this by:

sudo a2dismod php7.0
sudo a2enmod php7.2 

Make sure to re-run validate.php afterwards....

Saturday, January 26, 2019

Using a Raspberry Pi B+ as a Spotify endpoint


I've started using Spotify recently and noticed that it has the ability to play it output on multiple devices, meaning you can use your desktop client or phone client and have it play on your Sonos speakers, or whatever. This is a nice feature, one I fell in love with when Apple had an audio out on an older airport model.

I soon discovered that there are several linux utilities to help accomplish similar tasks and someone has packaged them all together in nice distribution called Pi Musicbox. As the title may infer, it's meant to be run on a Raspberry Pi, if which I have three that are sitting idle. I downloaded the image and burned it to flash and began my journey.

Problem #1: Apparently there is an incompatibility with Spotify and Librespot (linux Spotify Connect endpoint) that makes it difficult to use if you opted to create your Spotify account using Facebook authentication. I normally NEVER do this, but for some odd reason I chose to try it with Spotify. There are several online resources that tell you how to make it work by creating device accounts, etc. None of them worked for me, I spent the better part of a week trying the various methods and none of them worked.

The end result was that I had to cancel my Spotify Premium account. The very last step of cancelling your account puts you in a live chat with a Spotify support person. In my case it was Aubrey V. (whom I discovered was working in the Philippines!). Aubrey walked me through the steps to transition over to non-facebook auth and made sure I could re-use the same email address. 10 minutes later I was set and Pi Musicbox (using Librespot in the background) started working as a Spotify endpoint!


This brings me to .....

Problem #2: Pi Musicbox would only play for one or two songs before it would disappear from the list of available devices on Spotify. After about an hour of digging through logs and watching the system live during playback, I soon discovered that Musicbox was fine, but the Raspberry Pi was rebooting, which was causing the issue. Huh, that's strange....

It was around that point that I realized that I never applied the two heatsinks that came the external case that I had purchased for the Pi b+. Whoops!

After a quick search for the cardboard box, the heatsinks were applied and now the box is much happier and hasn't rebooted after constant playback for an hour.

Apparently those heatsinks aren't just a suggestion!


Tuesday, September 4, 2018

Ubiquiti Hardware Offload


If you are searching for documentation on why hardware offload isn't working on your ER-PRO8 or even Edgerouter-X, the documentation doesn't get directly to the point, but if you have IP Netflow enabled, offload will be disabled.


Tuesday, July 10, 2018

Skype fo Business web plugin for Chrome on OSX


One for the archive, or for anyone else trying to figure it out.

67.0.3396.99 (Official Build) (64-bit)

Trying to install the Skype for Business web-plugin for Chrome OSX just gets me into a virtual loop where it claims to install but each time you try and launch a meeting it asks you to download and install the plugin again.

My issue seems to have been that the plugin did not properly install the first time, or did not install with the correct permissions.

Deleting the file "~/Library/Internet Plug-Ins/SkypeForBusinessPlugin-16.2.bundle" worked for me, YMMV.


Thursday, April 19, 2018

Rsyslog hostname preservation in Ubiquiti Edge Router devices

This was tested and verified on an EdgeRouter X and a EdgeRouter PRO-8 running v1.9.7+hotfix.4

Ubiquiti Edge Router devices use rsyslog for syslog, but the default configuration does not preserve the FQDN of the router. This is causing complications in my Graylog/LibreNMS configuration.

After researching the problem I found that the three potential candidates to fix the issue are:

  1. The hostname in the /etc/hosts file needs to be set to the FQDN. I tried this, it had no effect on the syslog output.
  2. add "$PreserveFQDN on" to the syslog configuration. 
  3. Append "$LocalHostName host.name.org" to the rsyslog config. 
All three configurations were made in varying order, but nothing worked. I had (incorrectly) assumed that since they were using rsyslog and /etc/rsyslog.conf existed, that /etc/rsyslog.conf would be the correct config file to edit. I even tried adding a new config file in /etc/rsyslog.d/ to no avail. 

The only changes that seemed to take were in /etc/rsyslog.d/vyatta-log.conf. The "$PreserveFQDN on" syntax didn't seem to have any effect by itself, even though the system domain-name is set properly. 

I tried to manually set the FQDN in /etc/rsyslog.d/vyatta-log.conf by  manually appending "$LocalHostName host.name.org" and restarting the rsyslog service. Again, it had no effect. Finally, adding both "$LocalHostName host.name.org" *and* "$PreserveFQDN on" worked. 

I haven't tested to see if these changes will be persistent through web interface config changes, but at least it's a start. 

UPDATE: It gets weirder, most syslog messages are making it to the server with the FQDN....except anything related to PAM. Strange...

Friday, August 21, 2015

Intel ATOM D525 Network Performance


I recently had the occasion to use a small Intel Atom D525 based Linux server to do some file transfers from one machine to another. I noticed that the file transfers were not very snappy, so I started to look closer at the issue. The Microtik switch that I'm using has a nice usage meter on each interface and I noticed that a single rsyc over ssh was only giving me 100-150Mb/s performance. Realizing that this was compressed and using the somewhat whimpy Atom CPU, I backed off to a minimal compression algorithm and ended up getting a modest improvement (200Mb/s). So, running 4 parallel rsyncs seemed to be the trick, but I seem to cap out around 5-600Mb/s:


The CPU seemed to hover around 40-50%, which was odd, I would have expected to see a higher percentage if my performance was capped.

I later tried NFS to see if that did the trick, but it too capped around 5-600Mb/s. The particular distribution of Linux I was using was Zentyal 3.5, but I also tried on an Ubuntu 14.04 Atom D525 system as well with the same results.

Just to make sure it wasn't something to do with the server I initiated a transfer from my desktop PC running Windows 7. You can see the server doesn't have any issues keeping up. In a later blog post I'll go into the ethernet switch I'm using and how changing the default queueing method affects performance in a positive manner.

The end result is that I wasn't able to push the Intel Atom D525 board beyond 5-600Mb/s. It could be an ethernet driver issue since the CPU didn't seem to be loaded beyond 50%, but I figured it would be an interesting datapoint to share. If anyone sees differently, please message me with your results.


Thursday, May 7, 2015

Android lockscreen image stuck?

I've been using a Samsung Galaxy S5 for about a year now. I don't really like it, and recently ran into another little annoyance that I'm fairly sure would *never* happen on an Apple device. I created an Audible.com account and started listening to a book on my long commute to/from work. I notcied that Audible used the book image as the default lock screen image. Fine, whatever, but when Audible was closed the image remained. This was really annoying, as I couldn't change it even manually!

I googled for a fix, but nothing really came up that was useful. The suggestions mostly came in the form of "launch another streaming app and then lock the screen, that should undo it...". Well, that didn't work. Even when I closed all open apps it still didn't go away.

Then I discovered that even though I closed all the open apps it didn't really close. If I did the "pull-down" motion in touch-wiz there was an audible control applet still running. Once that control applet was closed, the problem went away. Very annoying, this is the lack of attention to detail that drives me nuts with Android. I'm likely going back to Apple just because I know it will do the right thing. It may not be quite as configurable, but the experience will be much more consistent.


Friday, August 3, 2012

Tropo the day before the contest!

This weekend is the UHF contest, and of course, we had a bit of tropo the nigh before! I missed most of it, even after N1ZZN texted me. I was busy watching "All the President's Men".

Anyhow, I ran downstairs and worked three stations: N4HB, KD8UD and KD4AA, all in FM17. I didn't hear any of the beacons, so this seemed like a very narrow path. The APRS map isn't detailed enough, but gives and ok representation.


Thursday, July 26, 2012

Massive Es 2M opening on 7/24/2012

I got home from work Tuesday, 7/24/2012, to an email from Bart, W9JJ, saying there was a 2M Sporadic E opening on 2M. I literally leapt from the couch and flew down the stairs to the shack. I turned the rig on and immediately heard AG4V in Tennessee, grid square EM55! I quickly worked him, just as he faded. That QSO was 1060 miles on 2M!

There were reports of guys working from New England all over the Memphis, TN area. The last two stations I heard were WB5AFY in TX and another station in AK. I wasn't able to work the Texas station, he was just too weak and he was saying the W2/W3's were S9+. He was about 4x2 here.

The best DX I've heard so far was Dave, K1WHS, working Al Ward, W5LUA in TX (FN43 to EM13, roughly 1500 miles).

I did manage to grab a screen shot of the APRS map before it faded into history: