Naming your /dev/ttyUSBx devices on a Raspberry Pi

Don’t think I will post this anywhere but here in the blog section, as it is well documented, but I recently needed to name the /dev/ttyUSBx devices on one of my Pi’s. This was because on reboot, sometimes my ARPS TNC would get /dev/ttyUSB0, and other times my Icom 4100 Radio would get /dev/ttyUSB0. Rather than checking and re-writing my APRS and D-Star hotspot configurations at each boot, I found that I can create my own static names for these devices.

First, create a file called /etc/udev/rules.d/99-usb-serial.rules file with the contents similar to this:

SUBSYSTEM=="tty", ATTRS{idVendor}=="050d", ATTRS{idProduct}=="0109", SYMLINK+="aprsTNC"
SUBSYSTEM=="tty", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6001", SYMLINK+="icomTAP"

I say similar, because really what you are doing is binding the idVendor/idProduct hardware ID’s to the new name. If you have the same idVendor/idProduct for both devices, you may need to add the Serial Number attribute as well. You can find this attributes by executing:

udevadm info --name=/dev/ttyUSBx --attribute-walk

After you have /etc/udev/rules.d/99-usb-serial.rules configured the way you want to, you can either reboot, or execute the following command to read the new rules and setup the new symbolic links to your devices:

sudo udevadm trigger

Credits

Raspberry Pi AMPRNet IPIP Gateway

Last year I discovered AMPRNet, and how any Licensed Amateur Radio operator can have a set of public IP’s. In my spare time, I have been slowly tinkering with AMPRNet and I have recently had some success with creating a Raspberry Pi AMPRNet Gateway. I will post my configuration / how-to in the Amateur Radio section a bit later on over the Christmas break, but here are the highlights:

  • Auto-update AMPRNet portal with local public IP when a change is detected.
    • When this happens, the AMPRNet is inaccessible for about an hour while things refresh – thankfully it does not happen often.
  • AMPR-RIP4D is used for routing.
  • Basic firewall with iptables protects the local AMPRNet network.
  • Raspberry pi auto-updates weekly.

While the only AMPRNet node I am running currently, other than the gateway, is a D-STAR QnetGateway Hotspot, I will probably use this network segment for APRS andother Amateur Radio use in the near future. Future improvements to my gateway will be to add OpenVPN to allow remote access to my segment of the AMPRNet and a local DNS Resolver.

I look forward to hearing if this information helps anyone (once I post it), so please get in touch with me if you have questions or if this information has been helpful in any way.

Update: I have posted the documentation of how I built/configured this IPIP Gateway here.

Disconnecting and reconnecting Yubikey Nano in Windows without removal

I just added a reference document on how to disconnect and then reconnect a USB device (in my case a Yubikey nano) without actually removing the device from the computer. The documentation can be found here.

Summary

I have two GnuPG smart cards that I use to store GPG authentication keys on. One is a Yubikey nano, which I keep in my device most of the time, while the other is a Yubikey 5 NFC which I keep on my physical key ring. Often I need to use the GPG keys that are on my 5 NFC but GPG4Win seems to have a real hard time with multiple smart cards plugged into the computer at the same time.

The problem I was having is that the Yubikey nano is really hard to physically remove from the PC (as designed), so when I need the keys on the 5 NFC it is preferable not to have to remove the nano. The above linked documentation describes how i got around this.

GnuPG SSH Authentication content added!

I have added two new pages, how exciting. Finally some content.

The first page is pretty self explanatory. It is just my public keys for encryption, etc. For now only my public GnuPG key is there if anyone wants to send me encrypted email. I know, boring.

But my other page is all able a fun little project I just finished. I wanted to use GnuPG keys to authenticate to my Raspberry Pi but I wanted to store my private keys on my Yubikey. Furthermore my client PC is a Windows 10PC using Putty and gpg4win. And after much frustration I did it! The configuration documented is using gpg4win 3.1.11 and a Raspberry Pi using OpenSSH.

I hope that someone else finds this useful. If you do please comment below.

My First Post

Today I have decided to make this website. Over the holidays I have been tinkering a lot with Amateur Radio (D-Star), Yubikeys, Linux and home networking. This resulted in a lot of time searching the depths of the internet to find the answers to some of the issues I faced.

I have realized that I need to start documenting my hobbies. If my past is any indicator life will get in the way and it may be months or years before I come back to what I was doing. My initial plan was to document this information on my local computer, but then I decided to ‘pay it forward’ by making this site.

Today this site is empty with no documentation. It will however become my own technical resources for my hobbies as I add documentation. I hope that some others stumble upon this documentation as well and it can help you too.

I really hope that this is not my only post.