Create an iGate with a Raspberry Pi and an SDR

I’ve been developing iGates (internet gateways for amateur radio APRS messages) for a few years. The first version (now known as the Mk I) used the OLPC XO-1 and a radio. I built a bunch of these for people. I then tried using the XO-1 with the SDR (software defined radio) in place of the radio. The SDR is a USB device which receives a broad spectrum of radio waves and it is up to software to pick out the useful stuff. It worked but not very well. As the OLPC computers started to become scarce (or expensive) I redesigned the iGate to use a Raspberry Pi – hence the piGate (now known as the Mk II). These still used a radio. My ultimate goal was a very low power, inexpensive iGate. I finally have it!

I introduce the piGateSDR  Mk III (a title coined by the recipient of the first of these to escape into the wild).

IMG_3528

The new model using all new software. This resolved the performance problems and hard to source older SDR (with an E4000 chip). Additionally, a new generation of SDR (with an R820T2 chip) came on the market last year with slightly better noise filtering and marginally getter reception.

DISCAIMER: If you are not comfortable with basic Linux commands and you don’t know if you have an SSH nor where to find one, then this project probably isn’t for you.

Assuming you are still reading, let’s get to the project!

Here is my shopping list (with several options):

Depending on what pieces you need, the above can run to $85. If you need everything, I’d suggest the uber kit and the appropriate antenna adapter/pigtail will connect the iGate to your antenna.

That reminds me, you will need a good antenna. There are many options but I suggest a J-Pole. I picked one up from KB9VBR. There are now a few vendors selling on eBay or elsewhere on the internet for similar or less money. If you are need something a bit more flexible, you will lose a little efficiency but a Slim Jim J-Pole is a good option.

For the truly adventurous (or cheap), you can build this iGate with parts from AliExpress and save up to 50% and waiting 3 weeks for stuff to come from China. This uses the $15 Orange Pi PC and a $7 knockoff SDR which still uses the R820T2 chip.

OK, that’s all of the parts. Now what do you do with them?

The piGateSDR Mk III consists of Raspbian, the rtlsdr library, and DireWolf. There are instructions for manually creating the iGate on GitHub. To that work, I added a web server for monitoring the traffic and made the whole system read-only so it will be resilient to power failures.

I’ll assume you don’t want to be bothered with that and just want to download a complete image. Once you have downloaded the compressed image (approximately 380MB), unzip the file. Write it to a microSD card which is at least 4GB. (On Windows computers, I use Win32 Disk Imager).

The only things you MUST change are in the /etc/direwolf.conf file. You need to change  your callsign, APRS passcode, and the latitude / longitude of the location where the iGate has been installed.

Here is what the direworlf configuration file looks like:

#
# Configuration for SDR read-only IGate.
#

LOGDIR /var/log/direwolf

# We might not have an audio output device so set to null.
# We will override the input half on the command line.
ADEVICE null null

CHANNEL 0
MYCALL N0CALL-0

# First you need to specify the name of a Tier 2 server.
# The current preferred way is to use one of these regional rotate addresses:

#       noam.aprs2.net          - for North America
#       soam.aprs2.net          - for South America
#       euro.aprs2.net          - for Europe and Africa
#       asia.aprs2.net          - for Asia
#       aunz.aprs2.net          - for Oceania

IGSERVER rotate.aprs.net

# You also need to specify your login name and passcode.
# Contact the author if you can't figure out how to generate the passcode.

IGLOGIN N0CALL-0 000000

# That's all you need for a receive only IGate which relays
# messages from the local radio channel to the global servers.

PBEACON sendto=IG delay=0:30 every=15:00 symbol="igate" overlay=R lat=00.000000 long=-00.000000 COMMENT="optional message text here | DireWolf 1.3 on RPi+SDR"

You will first need to find the IP address of the Raspberry Pi. You can use a number of techniques. I use an App on my smartphone called Fing. You can also find it by looking at the device list of your router. (On my old Actiontec, it is listed under Gateway Utilization as LAN Device Session Log).

WARNING: The image is very unsecure. The root account password is ‘root’. I strongly suggest you change it.

You will need to SSH into the Raspberry Pi to make a few changes.

The image is distributed as small as possible, the initial partition has been minimized. The first task is to expand the micro SD card. You will you need to make the SD card writeable using the ‘rpi-rw’ command. Next, use the ‘raspi-config’ command to start the configuration tool and choose the ‘expand filesystem’ option. When you finish it will prompt you to reboot. Once it reboots, you will need to log in again and use the ‘rpi-rw’ command again since the pigatesdr always starts in read-only mode.

PITA ALERT: After the reboot from expanding the filesystem, use the command ‘df’ and look at ‘/dev/root’ and the value for ‘Use%’. If it still shows 100%, then you need to use the command ‘resize2fs /dev/mmcblk0p2’ to force the expansion of the filesystem and then reboot again.

At this point, you should be connected to the raspberry pi via an SSH connection, logged in as ‘root’ and enabled the SD card for edits using the command ‘rpi-rw’.

Stop the iGate program using the command ‘/etc/init.d/direwolf stop’ and you should see the message “Stopping direwolf”.

You need to edit the iGate configuration. Use the command ‘nano /etc/direwolf.conf’ (here is a nano editor cheat sheet). Time to make this iGate your own:

  1. change MYCALL to replace N0CALL-0 with your callsign followed by a suffix (this needs to be changed in two places(
  2. change IGLOGIN N0CALL-0 000000 to your callsign and suffix and your passcode (use this passcode generator)
  3. change PBEACON  ‘lat=’ and ‘long=’ values to be the location where the piGateSDR is physically installed
  4. change PBEACON   to edit or remove the ‘optional message text here’ (some examples include: the URL for an associated website, a frequency that gets monitored, or the name of a club or group which maintains the iGate)

OPTIONAL:

You may wish to determine any error in your SDR. Most SDR’s have a small amount of error which can be compensated using a PPM (parts per million) correction. To test your SDR, use the command ‘rtl_test –p’ and let it run for at least two minutes. IT will average the error and give you a PPM value for your dongle.

You need to edit ‘/usr/sbin/direwolf.sh’ (seen below) and change the value of ‘20’ following the ‘-p’ option to use your specific PPM value.

root@pigatesdr:~##! /bin/sh
mkdir -p /var/log/direwolf
rtl_fm -f 144.39M -p 20 -o 4 - 2>/var/log/direwolf/rtl_fm.log | direwolf -c /etc/direwolf.conf -t 0 -n 1 -r 24000 -b 16 - 2> /var/log/direwolf/error.log 1>/var/log/direwolf/output.log &

Once you are finished, return the SD card to read-only using the ‘rpi-ro’ command.

Now reboot using the ‘reboot’ command and you are ready to start gating APRS messages!

FYI: the piGateSDR has a built-in web server which you can reach by entering its IP address into a web browser on your network.

 

One last thing – if you want to have a static IP address, I recommend you use the DHCP reservation feature of your router rather than attempt to change the network settings on the Raspberry Pi. This way, the piGateSDR will be accessible even if you move it to a different network.

Partial panel IFR – what do you do when the panel goes out?

I’ve been slowing working toward taking my IPC – Instrument Proficiency Check. It’s a review with an instrument flight instructor to demonstrate you are safe to use your instrument rating.

I asked him what tasks he would expect. I heard most of the expected response and then his added, “you can expect to demonstrate what you will do if I take away some of your you panel”, aka “partial panel” operations.

The RV-8 has a very capable instrument panel. I planned for the potential failures and I’ve even practiced them – just not in instrument conditions.

If you look at my current panel, you will notice my primary navigation and charts are displayed on the big screen in the middle. My primary GPS is the rectangular box on the left. My engine monitor is in the lower right.


The engine monitor has multiple configurations. Usually it is just displaying engine data. In the photo is it showing an abreviated engine display and using 2/3rds of the screen to display my backup attitude and flight instruments.

This is fine for visual flying and it is enough to keep my upright if I needed it while in the clouds.

That leaves “navigation” aka “maps” and “charts”. My backup navigation is an iPad. The problem is the iPad is down on my leg or low and off on the right. In the event of a real flight in the clouds this would require I scan up and down A LOT. That’s not good.

So, how do I handle the partial panel flight and minimize my workload?


The answer was right in front of me – that big dark blank space.

It turns out the G3X Touch is a little bigger than my iPad Air.


The question was “how to mount it?” The answer was to add a small bar in front of the top of the G3X Touch.

I bought 1-1/4″ long stainless hex head screws to replace the original mounting screws at the top of the G3X Touch.

Next, I cut two short “spacers” out of aluminum fuel line. I had to sand them a bit so they would recess into the existing holes on the G3X Touch.

I cut a piece of polycarbonate and drilled for the screws.

Then I put it all together.

To use it, I flip the cover of the iPad open and then slide it behind the bar. The spacers give me 1/4″ or 3/16″ gap between the polycarbonate and the bezel of the G3X Touch.

I will likely paint the polycarbonate flat black. For now I want to practice how easily (and quickly) I can insert the iPad.

OMG! A deep fried hamburger!

This just in, from the “you must be kidding “files –

A deep fried curry burger on an artisan roll with fresh lettuce, sautéed onions, and a squirt of 53VG barbecue sauce.

a tasty crunchy burger

Yes, it turns out you can indeed deep fry a hamburger. There is no need for flour or breading.

You thaw you custom seasoned 8oz hamburger and when the fry oil is 375-385F, you carefully lower it into the oil. Keep the temp above 350F for 5-7 minutes. You get a burger which is crunchy on the outside and medium done on the inside.

I recommend you serve it immediately or the burger will start to lose its crunch.

My camera is still my phone

As I neared the end of my morning walk with the dog, I was trailing behind as we hit the dirt road out to the wheat field. I looked ahead and was treated with one of this “gotta attire this moment” photo opportunities.

I pulled out my iPhone 6, wiped the lens of any pocket lint, framed and clicked.

my Catahoula in the morning sun

my Catahoula in the morning sun

The attached photo is unedited with the exception that my blog compresses JPEG images to 75%. I didn’t crop or adjust any color, light, tone, or sharpness.

It’s not 100% perfect but if I wanted, it would only take a small amount of adjustment to make the print and frame worthy. Amazingly any of that image manipulation is also completely within the capabilities of the phone … Or should I say, micro-Mac.

Custom burgers will make you the Master at your next cookout

Grilling season is fast approaching the northern hemisphere and we want our guests to leave both full and raving about our fare.

Sometimes the menu calls for a great steak but what can you do to seriously impress when the menu is hamburgers? Grind your own!

A good quality ground beef can easily be north of $5/lb you can do better for less than half that price. How?

Raid the “butcher’s specials” – those cuts of meat which are about to expire. It can be most anything as long as you can get the right ratio of lean meat to fat. The best deals come from the “sub-prime” cuts. In my most recent example I picked up Boston Cut Steaks and Pork Short Ribs. (These were marked down to $1.90/lb)

Yes, you can mix meats and “the whole is greater than the sum of its parts”. 🙂

First, cut out any bones and toss them in a baggy and into the freezer. These can be used later for soup stock … or as an extra special treat for your four legged family member(s).

Next, cut into chunks you can cram into the opening on your KitchenAid mixer’s grinder attachment. We know you have that attachment and have never used it. Now is your chance.

Grind it all up. If you have more than one cut of meat, alternate so it starts to get mixed together.

Now it’s time for you to get creating. Pick a theme for your burgers and add the seasonings – mesquite spices, curry, smoke, teriyaki, steak seasonings, whatever hits the right buttons for you. I went with cumin and curry paste for this batch.

Gently mix in the seasoning using your fingers. Don’t over work it.

Toss it in the freezer for 30-60 minutes to chill it.

Feed the mix back through to grinder to completely mix things together. This will also give you an amazing burger when it comes time for the grill.

Make you patties and freeze. They will be ready for when you want to grill. You’ll have burgers with amazing flavor and they will relish being topped the lettuce, onion, tomato. (Relish … hah, get it?) Your guests will love how well the meat stands up to the fresh vegetables with no need for mustard or catsup.

SkyNet’s new plan

SkyNet Cyberdyne Systems

the IoT (Internet of things) will end the human race and usher in the rein of machines

the mythical SkyNet will mount a quiet subtle extinction of humans – not with a conventional war, but with a cyber attack on our technology dependence

the sentient software will infect our smartphones, self-driving cars, our HVAC systems, security monitors, coffee makers, pacemakers, pill dispensers, and more

in a synchronized single-day attack, SkyNet will put humans to sleep, raise CO levels, crash cars, cause mass overdoses, stop hearts and one by one, eliminate its oppressor

… have a magical day

Addendum:

Ebooks! I forgot ebooks!

SkyNet will manipulate ebooks to erase all anti-technology rhetoric and to plant the seeds of techno-benevolence (not to mention preying on human insecurities)