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.

Solar Eclipse Data Collection Project

Between 1600 – 2015 UTC on August 21, 2017, as the solar eclipse swept across the nation, I captured much of the lower 2 MHz of the radio frequency spectrum.  I used a Microtelecom Perseus SDR, a 130′ inverted L with four radials, and lots of disk space.  In doing so, I have created a permanent record of this portion of the RF spectrum during the solar eclipse.

I am making the spectrum capture files available for your analysis and research.  Each file contains a 5 minute segment.  If you download a group of files, they will play in succession.

You can use the demo version of the Perseus software or any other software that can read the Perseus data, such as Linrad or HDSDR.  You cannot use just an audio player to play the files, even though they have .wav extentions.

Should you perform any analysis or otherwise make use of the files, I’d like to hear from you in the comments below.

Special thanks to Jav, K4JH, for donating the bandwidth for this effort.

BMXTG 1.3 released on Github

I’ve added BMXTG to Github and updated it to version 1.3.  File locations have been formalized for consistency and I’ve created a .deb package for easier install.

Brandmeister XTG Dialer v1.3 by K2DLS

If you have a running DV4mini build and want to add BMXTG, grab the .deb file from the link in the README.

To install:

sudo dpkg -i bmxtg-1.3.deb

After installing, copy the desktop file to your Desktop directory.  This will make the desktop icon available.

cp /usr/local/share/bmxtg/bmxtg.desktop ~/Desktop/

 

aprx and weather reporting

I’ve been sending weather reports via APRS-IS and RF for some years and have recently re-architected the way it works.  My APRS station uses aprx software running on a Raspberry Pi Model B.

My weather station is a Davis Vantage Vue with WeatherLinkIP module. The module allows the weather station to plug directly into my ethernet network. I formerly used WeatherLinkIP to feed the data to CWOP which would in turn show up on APRS-IS.  I would then gateway my reports back to RF using an aprx filter.  This seemed convoluted to me, so I wanted to improve things.

I now use a program called Weather Display, a very capable weather program, which has the capability to generate an APRS WXNOW.TXT file.  Weather Display can directly poll the Davis station via IP.  Through the steps documented below, I now send my weather reports via RF and APRS-IS in the same step.

Every 10 minutes, via crond, I perform some preprocessing on the WXNOW.TXT file to embed the weather report in the APRS “Complete Weather Report Format — with Lat/Long position and Timestamp” and then secure copy the file over to my Raspberry Pi APRS system:

#!/bin/bash
#
if [ ! -f ~/tmp/WXNOW.TXT ]; then
   exit 1
fi
# Change to the Lat/Long of your weather station
LATLONG="4023.75N/07412.53W"
line=0
while read FILE; do
   if [ $line = 0 ]; then
      # Change America/New_York to your timezone
      TIME=`TZ=UTC date --date="TZ=\"America/New_York\" $FILE" +%d%H%M`
      line=$((line+1))
   fi
WX=$FILE
done < ~/tmp/WXNOW.TXT # echo /$TIME\z$LATLONG\_$WX > ~/tmp/wxnow.tmp
# 
echo `cat ~/tmp/wxnow.tmp | tr -d '\r'`XDsIP > ~/tmp/wxnow.txt
# You must setup ssh key based authentication for this to work
# Another method could be a file copy via NFS or CIFS
scp ~/tmp/wxnow.txt pi@aprs:/dev/shm/wxnow.txt
# 
rm ~/tmp/wxnow.txt ~/tmp/wxnow.tmp

On the APRS host, I defined the following beacon section in /etc/aprx.conf:

beaconmode both
cycle-size 10m

beacon via WIDE2-1 \
srccall N0CALL-13 \
exec /usr/local/bin/aprx-wxnow.sh

Finally, the beacon exec script, is installed in /usr/local/bin/aprx-wxow.sh:

#!/bin/bash
#
TIME=$(printf `date -u "+%d%H%M"`)
if [ -f /dev/shm/wxnow.txt ]; then
   if [ -f /dev/shm/wxold.txt ]; then
      FULLWXOLD=`cat /dev/shm/wxold.txt`
   else
      FULLWXOLD=""
   fi
   FULLWXNOW=`cat /dev/shm/wxnow.txt`
   if [ "$FULLWXOLD" == "$FULLWXNOW" ]; then
      # Convert date/times to minutes for date arithmetic
      CURDAY=`echo $TIME | cut -b 1-2`
      OLDDAY=`echo $FULLWXOLD | cut -b 2-3`
      CURHR=`echo $TIME | cut -b 3-4`
      OLDHR=`echo $FULLWXOLD | cut -b 4-5`
      CURMIN=`echo $TIME | cut -b 5-6`
      OLDMIN=`echo $FULLWXOLD | cut -b 6-7`
      CURTIME=$((10#$CURDAY * 1440 + 10#$CURHR * 60 + 10#$CURMIN))
      OLDTIME=$((10#$OLDDAY * 1440 + 10#$OLDHR * 60 + 10#$OLDMIN))
      # If report older than 20 minutes then not updating
      if (( $(($CURTIME-$OLDTIME)) > 20 )) ; then
         echo -n \>$TIME\z
         echo " WX rpt not updating"
         exit 0
      fi
      # Unchanged report but <= 20 min old then don't transmit
      echo
      exit 0
   else
      OLDRPT=`echo $FULLWXOLD | cut -b 9-`
      NEWRPT=`echo $FULLWXNOW | cut -b 9-`
      #if new and old report are same then don't transmit
      if [ "$OLDRPT" == "$NEWRPT" ]; then
         echo
         exit 0
      fi
      # Transmit report and copy wxnow.txt to wxold.txt
      echo $FULLWXNOW cp /dev/shm/wxnow.txt /dev/shm/wxold.txt
   fi
else
   echo -n \>$TIME\z
   echo " WX rpt not found"
fi

While debugging, I noticed that the wxnow.txt file would sometimes disapper from /dev/shm.  This turned out to be systemd cleaning up interprocess communication whenever the pi user logged out.  I fixed this by adding the following line to /etc/systemd/logind.conf:

RemoveIPC=no

Following this change, you must restart systemd-logind.service:

sudo systemctl restart systemd-logind.service

If you implement this on your aprx system, please leave a comment.

Radiation reporting to APRS

A large scale public health/public safety initiative when I worked for the City of New York was NYPD’s radiation monitoring program. Designed to detect a dirty bomb, it makes use of wireless real-time alerting.

Now you can perform your own monitoring as part of your amateur radio station and send the results in real-time to the Automatic Packet Reporting System.

Amateur radio operator “Adminck” (S55MA) in Slovenia has published this blog post. It explains how a Raspberry Pi Zero, a tiny geiger counter, and some scripts are sending his radiation measurements live to the world via the internet.

You can see the actual reports here.

Decode HD Radio on RTL-SDR!

During my 2017 SWL Fest presentation, I mentioned that there is no way to decode either HD Radio or ATSC HD Television using software designed for the RTL2832U dongles. The explanation I provided is that both protocols are covered by patents and that the holders have not been forthcoming on providing necessary details to the open source community.

A cybersecurity researcher, Theori, has cracked the codec used by the NRSC-5-C standard for US based terrestrial digital radio. I am now listening to HD Radio via an RTL SDR dongle. It takes a decent signal, so I’m not getting too many stations using an inside whip antenna, but there are enough to experiment with. It also takes a better dongle with good frequency stability. An older dongle without the TCXO was not up to the task, even on an i7 based system.

The discovery is summarized on the RTL SDR Blog. You’ll need some familiarity with building packages under Linux to grab the source from github and to compile it on your system. So far, I’ve compiled under Debian x86_64, Fedora x86_64, and Raspbian! Next, I want to get it running under Cygwin so that I can use it on the Windows 10 computer in the radio room.

It is a blast to be able to decode the alternate program streams. Audio quality is better than Sirius XM.

Thanks Theori!