D-STAR


Computers and D-STAR and Ham Radio28 Jul 2017 07:27 pm

This issue came up at work this week.

I received two phone calls from customers who were having issues with their Raspberry Pi-based D-STAR Hotspot: something was corrupting the microSD card.

One wanted to get the built-in halt/reboot options working, and he eventually did with the help of the image’s site.

The second brought his RPi and laptop in for me to check on, and luckily he was using the same image as me, D-STAR Commander. After I set a new microSD card up for him, I popped it into my laptop, which runs Arch Linux, to do some modifications to /etc/fstab to allow for essentially hot unplugging of power. It involves RAM disks.

The procedure is quite easy and can be done before the RPi is booted up if you have an SD-card reader-equipped Linux machine.

If you’re already booted up on the RPi, connect to it via VNC (or SSH), open the Terminal, and follow the following steps:

1. Type “sudo nano /etc/fstab” and hit Enter.
2. Add the following lines to the file:

tmpfs /tmp tmpfs defaults,noatime,nosuid,size=100m 0 0
tmpfs /var/tmp tmpfs defaults,noatime,nosuid,size=30m 0 0
tmpfs /var/log tmpfs defaults,noatime,nosuid,mode=0755,size=100m 0 0
tmpfs /var/spool/mqueue tmpfs defaults,noatime,nosuid,mode=0700,gid=12,size=30m 0 0

(the last two lines are really one line. you can copy and paste if you need to)

3. Hit Ctrl-X and hit “Y” when prompted to exit and save the file.

Now reboot the RPi if it is running or unmount the microSD card and insert it into the RPi.

What this has done is crate three RAM disks: one 30 MB in size, one 100 MB in size, and one 30 MB in size. The directories listed there often are continually written to, which can be catastrophic if power is removed while the microSD card is being written to. If they are in RAM, they disappear once the power is removed.

This solves the corruption issue with the D-STAR images.

Computers and D-STAR and Ham Radio24 Apr 2016 09:08 pm

Hi there! This is a landmark first post in almost four years here on w4jdh.net!

Today we’re diving into the realm of amateur (ham) radio and Linux, specifically how to set Arch Linux up as both an APRS I-Gate and a dual-band D-STAR hotspot using the G4KLX software compiled from source.

Assuming you don’t have Arch installed, take a look at their spectacular Beginners’ Guide. Once you have the machine set up, head back over here.

You will need to add a non-root user to complete this task. Once that’s done, it’s time to do some fun things.

In order to add software you have to be logged in as root, so use that to get the framework built up by inputting the following command on one single line:

# pacman -S git tigervnc sudo openssh wxgtk portaudio libusb webkitgtk webkitgtk2

After this use visudo to add your user to the sudo permissions by adding a line similar to the following:

<user> ALL=(ALL) ALL

which will require password entry to execute the command. If you wish for passwordless sudo change the final “ALL” to “NOPASSWD:ALL”. Once this is complete, log out from root and log into the user account.

The first order of business is to get XASTIR installed for APRS. Issue the following commands to prepare the environment:

git clone https://aur.archlinux.org/libax25/
git clone https://aur.archlinux.org/xastir/
git clone https://github.com/dl5di/OpenDV/

I added the OpenDV github repository to the end there to prepare for the next step.

To complete the installation of XASTIR, type cd libax25 then type makepkg -sri to install the AX.25 library, which is a dependency of XASTIR. After that, type cd ../xastir to enter XASTIR’s folder. Repeat makepkg -sri to install XASTIR.

Now it’s time for D-STAR. If you are still in the “xastir” directory, type cd ../OpenDV/ to enter the OpenDV repository clone. The first piece of this software suite you should install is ircDDBGateway, so type cd ircDDBGateway and follow it up with ./configure && make and sudo make install once it’s finished building. After installation, type cd ../DStarRepeater and repeat ./configure && make and sudo make install.

The OpenDV suite does something a bit odd now with log files and configuration. Both are put with a prefix of /usr/local, so it is necessary to create folders and change ownership. Use sudo su - to become root and execute the following commands:

mkdir /usr/local/etc/opendv
chown <user>:<user> /usr/local/etc/opendv
mkdir /usr/local/var
mkdir /usr/local/var/log
mkdir /usr/local/var/log/opendv
chown <user>:<user> /usr/local/var/log/opendv

This will set appropriate permissions for the installed software. Why the team did this change I have no idea.

With this, it’s time to select a window manager or desktop environment. I personally like the tiling window manager i3, though there are many many choices. A second choice would be LXDE. Both are available in Arch’s repository. I won’t cover installation of these as this is personal preference and covered quite well by the ArchWiki.

My personal recommendation for a relatively inexperienced user is to use LXDE as it resembles Windows in many ways. Use the “Run” command to start ircddbgatewayconfig to configure ircDDBGateway and dstarrepeaterconfig to configure DStarRepeater. If you have more than one DVAP or GMSK Board, you can use the configuration as dstarrepeaterconfig B for example.

Now the base system for D-STAR is built, and you can launch the software. Run ircddbgateway and dstarrepeater however many times you need to, and enjoy D-STAR!

Moving right along to XASTIR. It is far simpler: simply launch xastir from “Run” and configure it. It is reasonably straightforward.

That is it! While it’s not as “easy” as getting a Raspberry Pi image for D-STAR or installing XASTIR from Ubuntu’s repositories, it is very much more fun in my opinion. For one thing, the system is not nearly as heavily laden with “unnecessary” packages, so it needs far less memory to run. Secondly, as it is built from the most recent sources, it will usually have more features than a premade image. Finally, as it’s not a premade image, it will have a (hopefully) unique login and password for the account running the software. This is especially vital if used on any sort of public network, cellular included.