DV4mini image supporting RPi3B+

Just in time for Cinco de Mayo, let’s celebrate the latest iteration of the K2DLS DV4mini image for the Raspberry Pi 2, 3, and 3+.  Thanks to the folks on the Facebook DV4mini support group for pointing out that the November release did not contain code to boot on the new Raspberry Pi 3 Model B+.

This is a fresh build, based upon the latest Raspbian Stretch.  ssh and RealVNC are ready to go and it works nicely with the official 7″ touchscreen.  The DV4mini console and the Brandmeister XTG Dialer start up automagically.

Default user: pi
Default password: raspberry (please change on first use!)

You will find the new image here.

Facebook Fails the Third Party Risk Test

Information security professionals often examine “third-party risk”. Simply put, associations with business partners and contractors can present outside risks to the data, financial, and/or physical security of an organization. The risk may be contractors with access to secure areas or sensitive business processes. The risk can be shared data in the temporary custody of a partner. The risk can be virtual access to a network or a facility without adequate audit.

Today I was informed by Facebook that my privacy could have been compromised because “friends” of mine used an application platform profiling app called “This is Your Digital Life”. I wish I could tell you more or show you the notification, but in typical arrogant Facebook fashion, the notification was a fly-by. It was presented on the screen of my smart mobile device. I put the phone in my pocket and headed to my office to compose this piece, but once the Facebook feed refreshed I can no longer find it. It is not on my notification list. So much for transparency. So much for ease of use. Now you see it, now you don’t.

So what does this mean? Well, in this case Facebook allowed a third party that I did not authorize to access my profile data. They allowed the third party because a second party (my Facebook friends) accessed an application that pulled the data. They allowed this even though I opted out of the Facebook application platform and therefore had a reasonable expectation of data privacy. Facebook fails. And my mom was right. You are impacted by the actions of your friends.

What is the answer? Take ’em down. Let’s see a class action lawsuit financially impact Facebook. There are enough of us in this potential class that have, by Facebook’s own admission, suffered harm. Congress is not likely to impose a satisfactory regulatory solution any time soon. So let’s take it to the courts and show companies that a willful direct and careless violation of our data privacy will be the most expensive mistake that their companies can make.

A New Raspberry Pi for π Day

The Raspberry Pi Foundation has announced the new Raspberry Pi 3 Model B+. This incremental design improvement provides some interesting features.

  • 1.4GHz 64-bit quad-core ARM Cortex-A53 CPU
  • Dual-band 802.11ac wireless LAN and Bluetooth 4.2
  • Faster Ethernet (Gigabit Ethernet over USB 2.0)
  • Power-over-Ethernet support (with separate PoE HAT)
  • Improved PXE network and USB mass-storage booting
  • Improved thermal management
Raspberry Pi 3 Model B+

The 5 GHz wifi and power over ethernet capabilities are especially interesting improvements. The Raspberry Pi is a great experimenter’s computer. Many amateur radio operators and makers are using them in purpose built applications such as digital hotspots and home control. You can see more here.

Update: 03/19/2018 — One difference that I failed to note betwee the RPI 3 Model B and the B+ is that while the RPi 3 Model B sported 1 GB of RAM, the B+ cuts it back down to 512 MB. While 512 MB may be enough for your application, if it is not, you may with to stick with the original RPi 3 Model B.

Update: 05/03/2018 — I have verified that RPi 3 Model B+ does still have 1 GB of RAM.  The reference to 512 MB RAM came from the specifications listed on the RPi Foundation web page when originally released.

2018 SWL Fest Talk Links

Here are the links mentioned in my 2018 SWL Fest presentation, “RTL-SDR: more SDR on the cheap!”

Receiving NRSC-5 by Theori
NRSC-5 Proof of Concept Code
NRSC-5-D Standard
Other NRSC-5 Related Standards
NRSC-5 Metadata GUI by K2DLS
dump1090 blog post
Dire Wolf source code
Xastir wiki
Xastir source code
Raspberry Pi Foundation

Other useful links

SDR#
Digital Signal Decoder+
Virtual Audio Decoder
Unitrunker
HD SDR
Linrad
DAB Player

If you attended my presentation, thank you for your interest. If you have never attended a Winter SWL Fest and are interested in any aspect of radio reception, consider attending next year. All frequencies from DC to Daylight are fair game.

Update: Monitoring NextGen ATC (on the cheap!)

Note: This article was originally published in March 2017. I’ve revisited and updated it in preparation for a talk that I’ll be giving at the 2018 Winter SWL Fest. I’ve simplified the installation process. While doing so, I learned that Google now requires an API key for the application to have access to their maps. My github fork of the dump 1090 code has been updated to account for this development.

A key component of next generation air traffic control is Automatic Dependent Surveillance – Broadcast (ADS-B). The current FAA mandate is for all included aircraft to output ADB-B transmissions no later than January 1, 2020. But you don’t have to wait to receive and map ADS-B. There is a lot of air traffic to be seen.

dump1090 as viewed via a remote web browser.

Some folks are using complete downloadable images that are set up to feed flight tracking services such as FlightAware. If you’re interested in doing this, The SWLing Post featured an article that you’ll enjoy. I wanted to explore whether I could use some items already on hand to see a map of overhead aircraft on any computer on my home network.

I pulled out an older Raspberry Pi Model B and a 4 GB SD-Card and installed a copy of Raspbian Stretch Lite. The Model B has been retroactively called a Raspberry Pi 1 Model B. It is equipped with 512 MB of RAM, two USB ports and a 100mb Ethernet port.

I decided to use a spare older RTL-SDR stick based on the RTL2832U and R820T chips. This USB device comes with a small antenna that I hoped would be good enough to get me started. It is not in any way optimized for the 1090 MHz signals that are used by ADS-B and is roughly 19 parts per million (ppm) off frequency. It cost a bit over $10 at a hamfest a couple of years ago. The designs have improved since the early models were offered. Newer models include a TCXO (thermally compensated crystal oscillator) for stability and accuracy.

I needed software to take signals from the RTL-SDR stick and plot them on a map. That software is “dump1090”, originally written by Salvatore Sanfilippo. I added an install stanza to the Makefile, along with a systemd service file, for a smooth system install. I also needed to install the RTL-SDR USB drivers. The complete installation runs “headless”, meaning no monitor, keyboard or mouse need be connected. Remote management can be done via ssh.

There is a security change that comes along with Stretch. ssh is now disabled by default. After copying the initial Stretch image to the SD card and BEFORE removing it to place the Raspberry Pi, mount the boot partition and create an empty file named “ssh”. If you are not using ethernet, you could also pre-configure wifi settings.

First, bring the Raspbian Stretch installation up to date.

sudo apt-get update
sudo apt-get upgrade

Add some needed packages.

sudo apt-get install git cmake libusb-1.0-0-dev librtlsdr-dev rtl-sdr

You may test by running rtl_test -t. If the device is properly seen by the driver you should see the following:

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 
[R82XX] PLL not locked!
Sampling at 2048000 S/s.
No E4000 tuner found, aborting.

Don’t be concerned by the “No E4000 tuner found” message. The E4000 is an older chipset that is no longer used by today’s RTL-SDR devices.

Compile and install the dump1090 code.

git clone https://github.com/K2DLS/dump1090.git
cd dump1090
make
sudo make install

Configure dump1090 options.

cd /etc/default
sudo vi dump1090

Here’s what I placed in the file.

# Default settings for dump1090.
DUMP1090_OPTS="--quiet --net --lat xx.xxxxx --lon -yy.yyyyy --ppm 19 --gain -10"

–quiet runs in the background
–net starts a webserver so that you can access via a web browser
–lat set to YOUR decimal latitude (negative for South)
–lon set to YOUR decimal latitude (negative for West)
–ppm if you know the ppm tolerance of your device (otherwise omit)
–gain -10 which sets gain automatically

A full parameter list can be reviewed by typing dump1090 --help.

With an antenna connected you can perform a quick device check by typing dump1090 --interactive. If all is well you’ll see a screen like this:

Hex     Mode  Sqwk  Flight   Alt    Spd  Hdg    Lat      Long   Sig  Msgs   Ti/
-------------------------------------------------------------------------------
A39D11  S                                                         6     1    4
A25D36  S                     1775                                7     4    3
AAA593  S                     2575  205  075                      7     2    7
A25238  S                                                         4     1   12
A0480B  S                    19650                                8    28    3
ACF4DD  S                     3825                                7     2   14
A41F61  S           FDX3018   2800  211  025   40.428  -74.332   23    83    0
A6FFFE  S     1753  LXJ550   30475  371  226                      8    63    0
C060B3  S                     4625                                6    14    1
ACF69B  S                    23250                                6    25    1
A2D27C  S                    24000                               13    42    2
A0BF90  S                     9500  249  257                      5     3    9
A7D30A  S                    40000                                8   111    1
AE0192  S           SPAR958  32675                               22    93    0
ACC040  S                     7825                                8   146    2
ACA5DF  S                    26600                                6    79    0
A80C7B  S                     4550                                9   108    1
A7CC00  S                     7825                               35   123    0
ACF841  S     1507           14425                               50   132    0
A8C802  S           NKS149   23575  332  216   39.995  -74.262   12   160    0
A61949  S           UAL1105   2725                               14    60    0
AC2E20  S     1006           19925                               22   130    0
AB766A  S           DAL1526   8525  216  038   40.444  -74.213   81   249    0
AA4440  S                     5400  253  066                      6     6   13

Control-C exits this screen.

Now start the dump1090.service.

sudo systemctl start dump1090.service

If all goes well, a netstat -an will show that there is a binding to port 8080.

tcp        0      0 0.0.0.0:8080            0.0.0.0:*               LISTEN

Now you can start up a web browser from any computer on your home network and see a map of planes overhead. If your router supports internal dynamic DNS you can name the RPi and access via something like http://skynet:8080. Alternatively, use the IP address, which can be obtained via ifconfig.

eth0      Link encap:Ethernet  HWaddr b8:27:eb:12:34:56  
          inet addr:192.168.1.123 Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe80::1234:5678:8765:abcd/64 Scope:Link
          inet6 addr: fd68:bee:1f21:2221::5/128 Scope:Global
          inet6 addr: fd68:bee:1f21:2221:1234:5678:8765/64 Scope:Global
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:990830 errors:0 dropped:418120 overruns:0 frame:0
          TX packets:323700 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:87491798 (83.4 MiB)  TX bytes:207659746 (198.0 MiB)

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

In this case, the URL would be http://192.168.1.123:8080.

Once the map appears, re-position it to your part of the world and enjoy learning about what is flying overhead. You can enhance your enjoyment by listening to your closest airport tower or air traffic control frequencies on a scanner. These transmissions use amplitude modulation (AM) and can be monitored an another RTL-SDR stick or a scanner, even a relatively old model.

A New Kelement

I’ve been a fan of internet radio appliances ever since the AE1 hit the market in 2006.  I still find them to be more convenient than using a smartphone paired with a bluetooth speaker.  However, my Grace models, a few years old now, stopped working with Sirius a couple of years ago.  It was the same with a Logitech Squeezebox.  Google Home provides a decent way to access Pandora and TuneIn, but not Sirius.

Our kitchen counter has added a new Kelement WiFi Internet Radio and I like it.  It is an appliance based upon an Android screen and familiar apps, along with two speakers and a subwoofer.  No, the sound won’t blast you away, but it is fine for the $80 I paid during Black Friday/Cyber Monday.  The price on Amazon is now $90, but I would still recommend it at that price.

It is nice to be able to again listen to Sirius while downstairs and the Android touch screen interface makes sense.

November DV4mini Image Update

The K2DLS DV4mini image for the Raspberry Pi 2 and 3 (only!) has been updated to include the October 12 release of the DV4mini Control Panel.  This includes XRF through letter Z and REF up to 100 for the D-Star users.  The image will fit nicely on an 8 GB SD Card.

Become an APRS Weather Alert Station

Most of us are familiar with the SAME codes used by NOAA Weather Radio All Hazards transmissions.  They allow the radio to be unmuted for Warning/Watch/Advisory (W/W/A) announcements for a county or zone.  I thought it would be a good idea to add W/W/A functionality to my existing APRS station.  I have been transmitting and iGating local weather readings via APRS for a number of years as part of the Civilian Weather Observer Program (CWOP).

My APRS station uses aprx software.  aprx runs under Linux, so I run mine on a Raspberry Pi Model B with Raspbian.  aprx supports the ability to run an external program as a beacon.  I wrote my program (noaacap.py) to be run by the aprx beacon exec function.

noaacap uses the NOAA CAP (Common Alerting) protocol and the Atom feeds published by the National Weather Service.  Installation is quick and simple if you have a running aprx system.

This is what my alerts look like after being iGated to APRS-IS.  They also go out over RF to the region.  I can even map the alerts on an APRS GUI such as Xastir.

Weather alert map @ K2DLS-13 during Hurricane Jose

If you’d like to become an APRS weather alert station for your county, consider running aprx and noaacap. You’ll need a 2 meter transceiver, a TNC (hardware or virtual), and an antenna to tranmsit the data feed via RF.  Help keep fixed and mobile stations, especially those using radios with APRS display screens, well informed and situationally aware.  You don’t have to run a high profile digipeater.  If your APRS signal is receivable by a local digipeater, you could even use an HT, a sound card interface, and an RPi to assemble a low cost station and provide this valuable local service via amateur radio.

More information about noaacap can be found on my github page.

Reducing SD Card Writes With Raspbian

A common concern of those running applications on a Raspberry Pi is SD Card exhaustion.  It seems that after some amount of write activity, some SD cards fail to record further data.  I first noticed this on an APRS system when system updates disappeared upon reboot.

The systemd journal is a useful tool that has largely replaced the syslog in modern Linux systems.  It can also be redirected from the SD card to volatile memory.  Note that by changing this you will reduce the number of SD card writes but your journal will not survive reboots.

The key to changing the storage location of the journal is found in /etc/systemd/journald.conf.  Look for this line:

[Journal]
#Storage=auto

Uncomment the line by removing the #.  Change auto to volatile:

[Journal]
Storage=volatile

Restart the systemd journal and your journal data will be written to /run/log, which is memory resident.

sudo systemctl restart systemd-journald.service

Only use good quality SD cards such, such as the SanDisk Ultra Class 10 memory cards.  I recently had one that failed but was pleased when the SanDisk warranty program replaced the card at no charge.

DV4mini RPi Image Updated to Raspbian Stretch

The K2DLS DV4mini image for the Raspberry Pi 2 and 3 has been updated to Raspbian Stretch.  The DV4mini client and BMXTG 1.3 start automatically upon boot.  VNC has been updated to RealVNC.  Both VNC and ssh are started by default.

The installation fits nicely on an 8 GB SD card and it looks great on my 7″ touchscreen display.

The default password for the pi user is “raspberry” — please change it immediately!

The image may be found here.