Reading view

There are new articles available, click to refresh the page.

Share Soundcard between Direwolf and VARA on Linux

I wish I could make this one simple, but we are getting into complex territory. Please read the instructions and follow along carefully. This is not something I recommend doing without knowing your way around Linux, and so the basics are not covered(it would be too long). this should let you share the same soundcard between direwolf and other apps like VARA, and FLDigi as well. I ran into this when I wanted to have VARA and Dire wolf share a soundcard for my BPQ32 node on Linux. By default, Dire wolf takes complete control of the sound card interface, as well as VARA when ran within wine. There are several tweaks and changes needed to make this work, so buckle in. In this guide, I’ve used this post to install VARA within wine on Debian 12. I’ve used this post to install dire wolf.

Splitting the Interface

First, we need to grab your sound cards device name. Enter cat /proc/asound/cards to get a list of sound cards, pay attention to the “Device” or “Device_1” relating to your radios digital audio interface card. I my case, I needed both (one was used for 2m, the other for HF). Note the name somewhere, paying attention to the case as well.

Now, we need to open the “asound” configuration file (or make a new one if it doesn’t exist), and enter some information. First, check if one exists for your current user with : cat ~/.asound. If you get file does not exist, that’s fine. If you instead see file info, enter rm ~/.asound to get rid of it. The reason we did that was because the user configuration file overrides the global (which is the one we will now create/edit).

Enter sudo nano /etc/asound.conf to create/edit the existing global configuration. If your file is empty, awesome. If it contains content, remove everything.

What we will do now, is name our new split soundcard interface. In the following example, I’ve taken the soundcard listed as “Device” from above, and now named it “digirig” in this new interface, and split it into “digirig-rx” for the receive(audio in), and “digirig-tx” for the transmit (audio out)

We will now paste the following template:

Take care to replace the word “Device” with the name you found above (probably the same), and if you would like to rename the interface to something other than “digirig” like I have here, replace all instances of it with something lowercase and simple you will remember.

pcm_slave.digirig {
   pcm {
      type hw
      card Device
   }
   period_time 0
   buffer_size 8192
}

pcm.digirig-dmix {
   type dmix
   ipc_key 2023041901
   slave "digirig"
   bindings.0 0
}

pcm.digirig-dsnoop {
   type dsnoop
   ipc_key 2023041902
   slave "digirig"
   bindings.0 0
}

pcm.digirig-rx {
   type plug
   slave.pcm "digirig-dsnoop"
   hint.description "digirig RX audio plug"
}

pcm.digirig-tx {
   type plug
   slave.pcm "digirig-dmix"
   hint.description "digirig TX audio plug"
}

If you have 2 sound card interfaces, such as I do, you will just paste the above twice, one after the other. You will need to rename all instances of “digirig” (or whatever you called the first one) to something else (to refer to the second card). You will also need to replace “Device” once more with the name of the second sound card (probably “Device_1”).

Great, save that file. Issue the following command to have the changes take effect.

sudo alsa force-reload

If you get command not found, you’re better off rebooting before continuing.

Now, we will now make sure we’ve done this part right. Open up your direrwolf configuration file (probably nano ~/direwolf.conf) and find the “ADEVICE” line and remove it.

Replace it with the following. (Obviously replacing “digirig” if you’ve renamed it in the asound file we made/edited above.

ADEVICE  digirighf-rx digirighf-tx

Save the file, and restart Dire wolf. Dire wolf should start fine, and your audio device should be working as it did before. If not, stop here, somethings wrong.

Getting VARA to use the Split interface

Now that dire wolf is using our split interface, we now need to get VARA on board, which is a little more involved.

First, we need to get your wine prefix to be configured using ALSA. If using VARA in the default prefix, this could be as simple as running “winetricks sound=alsa“. Give it a try, as it won’t hurt either way. Otherwise, you will run the following command, replacing “.wine32” with the wine prefix you’ve made for VARA.

 env WINEARCH="win32" env WINEPREFIX="/home/aspect/.win32" winecfg

Another way you can try to achieve this is by running “winetricks” within desktop mode, selecting the prefix where VARA is installed, choosing “Change Settings”, finding “sound=alsa” and pressing “Ok”

vara wineprefix config
setting vara to alsa in wine

Next we need to set some registry keys on the Wine prefix to identify our split interfaces. Similar to the above, we will enter the following command to open the registry editor for the VARA prefix:

env WINEARCH="win32" env WINEPREFIX="/home/aspect/.win32" regedit

You can also reach the Registry editor using the “winetricks” command, selecting the prefix, and opening the regedit from there.

You will navigate to the following key and leave it it open:

HKCU->Software->Wine->Drivers->winealsa.drv

set input and output devices for alsa in a wine prefix

Just as in the above screenshot, you will right click the empty space, and select new -> multi-string value.

Create one key called “ALSAInputDevices” and another called “ALSAOutputDevices”. In each of them, for the value, make a list of the relative -rx or -tx devices we made before in the asound file. (If you only have 1 sound card interface to use, you only need the one here). (-rx being in the Input devices, and -tx being in the Output.)

set the digirig as an option for vara to use in wine

Save, and close it all out.

Starting VARA

Now start VARA as you normally do in WINE. In the soundcard settings, now chose the interface we specified in the registry relating to the one we created in the asound configuration file.

vara running on debian 12

Direwolf and VARA should now be able to share the sound interface this way!

The post Share Soundcard between Direwolf and VARA on Linux appeared first on TheModernHam.

Host your own FCC Ham Radio Database for Offline Use with HamDB

First, I want to give all credit for this blog post and script to this website(blog.radioartisan.com), and the ham who created it (K3NG). The only reason I am posting it here is to walk through the database installation portion, and show how the database can be expanded onto to include extra information, as well as add some more detailed documentation. His mission seems to align with mine in making database lookup tools for logbooks for accessible, instead of taking user data and selling it back (such as what QRZ does). As such, most of the information here is ripped from his post, and presented in a different way.

exampel of hamdb

This guide is going to assume you are running Debian 12, or Ubuntu 22.04

Creating our User

This section is Linux 101, but I usually go over it anyways just in case. We will be running mostly everything here as a non root user, that is in the sudo group. As such, the following commands below will create our new user, install sudo, and swap to it. If you already have a user created that you would like to use, you may skip this step.

As Root:

add user your-desired-user
apt install sudo
usermod -aG sudo your-desired-user
su kn4mkb

Installing and Configuring MariaDB Database

The following will perform some updates, and install MariaDB. Everything else from here on should be done under the user we just created, not root.

sudo apt-get update
sudo apt-get upgrade
sudo apt -y install mariadb-server
systemctl restart mariadb

Now we will configure it for best security practices:

sudo mysql_secure_installation 

You will be asked several questions. As we are running the command as root, press [Enter](none) when asked for the root password, as we haven’t configured one. We can answer ‘n’ for most of the others until asked if we want to remove anonymous users. From here, we want to say ‘y’, for the rest of the questions.

Enter current password for root (enter for none):
Switch to unix_socket authentication [Y/n] n
Change the root password? [Y/n] n
Remove anonymous users? [Y/n] y
Disallow root login remotely? [Y/n] y
Remove test database and access to it? [Y/n] y
Reload privilege tables now? [Y/n] y
creating secure mysql isntall

Creating the Database User

We will now create the user which will be used to update the database with the latest information from the FCC database. We will start the sql prompt as root, and use the prompt to create the user, giving it privileges to create new databases.

sudo mysql

Replace “hamdbuser” and “SECURE_PASSWORD” with your desired username and password for the database user. Enter the following 3 commands at the MariaDB prompt:

CREATE USER hamdbuser@localhost IDENTIFIED BY 'SECURE_PASSWORD';

GRANT ALL PRIVILEGES ON *.* TO 'hamdbuser'@'localhost' IDENTIFIED BY 'SECURE_PASSWORD';

quit

We now have the database and a user ready to go. Next we will proceed with K3NGs database updating script.

Installing HamDB

First we will install wget, which will allow us to pull the most recent version of the hamdb script form github. unzip is also needed as hamdb uses it for database downloads. We will then pull the script into our current working folder and run a full database build.

sudo apt install wget unzip
wget https://raw.githubusercontent.com/k3ng/hamdb/main/hamdb
sudo chmod +x hamdb
./hamdb full

The script will ask you a few questions. Would you like to create a config file (y), what is your Database sser, database password. afterwards, it gets to work pulling the current database in full.

creating mysql user

Using HamDB to lookup Ham Radio Callsign Information

You can use HamDB in a few ways to lookup information. But the true power will be building third party or external tools to extract information from the database.

offline lookup of ham fcc callsign

Look up a callsign: ./hamdb k3ng
Wildcard Search: ./hamdb like k3ng%
Search for amateurs in a zip: ./hamdb zipcode 17701
Search by last name: ./hamdb lastname Jones

./hamdb -h will give you all of the lookup options built into the application.

Maintaining and Updating the Database

You will want to run and update daily on your database to keep things current. You can use cron to accomplish this.
Take note of where you have downloaded the hamdb script (mine is at /home/kn4mkb/hamdb)

Enter the following command. If you are unsure with what editor to use when asked, go with nano.

crontab -e

Enter the following line at the end of the file to update the database every day at 2:30 am.
Take care to replace /home/kn4mkb/hamdb with the path of your hamdb script.

30 2 * * * /home/kn4mkb/hamdb update

Ctrl X + Y to save (if using nano), and you should be good to go!

The post Host your own FCC Ham Radio Database for Offline Use with HamDB appeared first on TheModernHam.

Connect to a Packet Radio BBS Node with KISS or AGWPE TNC Windows/Linux

As a last post to the BBS portion of the packet radio series, I wanted to give a few ways you can actually connect to a BBS node within Linux and windows. If you want to setup your own node with BPQ, you can follow the guide here.

Connecting to a BBS Node in Windows OR Linux with Paracon

Thanks to a recommendation by a commenter, I’ve added a program called Paracon to the top of this list of programs I recommend to use to connect to radio BBS nodes. Paracon is a cross platform python application used to connect to AGWPE enabled TNC’s. It does not support KISS TNC’s, which means this option limits you to the use of software TNC’s like dire wolf or AGWPE. If you are using a hardware TNC, please see one of the below options instead. If you don’t yet have a TNC, check out this guide to setup Dire wolf.

You will need python 3.7 or above installed. If you are on windows, grab the latest version and install it from here. If you are on Debian/Ubuntu or Raspberry PI OS, you can install it with:

sudo apt install python3

Grab the latest release of Paracom from the release page here. You will want to download the ‘pyz’ file. Linux users can grab it headless by running the following commands:

sudo apt install wget
wget https://github.com/mfncooper/paracon/releases/download/v1.0.0/paracon_1.0.0.pyz

Go ahead and start your chosen AGWPE application (such as direwolf) and note the port. Open a command prompt (on windows) or a terminal (on linux) and run the following command to open Paracon.

#On Linux:
python3 paracon_1.0.0.pyz 
#On Windows:
python paracon_1.0.0.pyz 

You may need to modify the file name above if you have downloaded a newer version (obviously). The application opens with a terminal screen, F1 will show you the help menu, and the mouse can be used to also click various buttons. The Setup screen should appear. Here you will enter your AGWPE server IP and port. If running dire wolf on the same system, the IP will be 127.0.0.1, and probably the default port, 8000.

Connecting to another node is as simple as Pressing “Connect” and then entering your desired NODE/BBS Callsign.

In the end you should be connected to your desired node!

Connecting to a BBS Node in Windows with QtTermTCP:

My choice here without python or Paracon is a program called QtTermTCP by John Wiseman G8BPQ. Although it isn’t perfect, and does crash sometimes, for the most part it works as long as you don’t try anything funny. Grab the download link from here and unzip the file. At this time, your TNC should be started or plugged in, depending if you are running a software TNC or a hardware one. Keep the packaged version, as I’ve noticed when crashes occur, it’s best to delete the extracted folder and replace it with a fresh version. Open the contents, and you should see a “QtTermTCP.exe” file. Open it up.

Once open, navigate to Setup, and choose your desired communication mode. The most popular options are going to be either VARA or KISS. If you don’t yet have a KISS network or serial interface, go check out The Ultimate guide to Direwolf to setup a KISS TNC.

Once open, you will see a few options. either way, we want to check the box to “Enable KISS Interface”. If you are using a hardware Kiss TNC, make sure it’s plugged in, and select the correct port and speed from the “Serial TNC” portion. On the other hand, if you are using a network KISS TNC such as direwolf, select “TCP” under “Select Device”, and enter the IP where it’s running. If direwolf is running on the same windows computer, it will be “127.0.0.1”

Great, click “Ok” and we should be ready to get connected. If all is tight, you should see “KISS Connected on the bottom of the program. Now, Naviagte to the “Connect” button on the top left, and press “KISS Connect”. In the “Call To” Field, enter your destination , and press “Ok” to get connected.

Connecting to a BBS Node in Linux with Kissattach

Linux can be a little more evolved that Windows, but don’t worry it’s not too bad. The instructions are going to assume you are running Debian/Ubuntu or Raspberry Pi OS. If you are using Arch Linux, I’ve already made a guide for this here. If you intend on using a hardware TNC, go ahead and get it connected. If you are using direwolf make sure it’s configured, but don’t start it just yet as we will make a slight change. If you don’t yet have a KISS TNC, check out this to get dire wolf up and running.

Install needed tools

sudo apt-get install ax25-tools ax25-apps

Now we will create a new “ax.25 port” which we will use for connections. Open the file at /etc/ax25/axports as sudo. Add a new line at the bottom below the comemted lines like the following example.

# /etc/ax25/axports
#
# The format of this file is:
#
# name callsign speed paclen window description
#

#1      OH2BNS-1        1200    255     2       144.675 MHz (1200  bps)
#2      OH2BNS-9        38400   255     7       TNOS/Linux  (38400 bps)
ax0     KN4MKB-8        19200   236     7       144.675 MHz (300  bps)

Replace “KN4MKB-8” with your own call.
Replace “19200” with your TNCs serial connection speed (you can leave it as 19200 if using direwolf).
The “236” is the packet length. If using HF, you may want to use “64” here. 236 is fine for VHF.
The “144.675 MHz (300 bps)” at the end is just text, and does not really matter.

Save it.

If you are using a hardware KISS TNC, you will need to gets it’s serial path from /dev. If you are using dire wolf, you will now start it like this in a separate terminal:

direwolf -t 0 -p -c ~/direwolf.conf

Replace “~/direwolf.conf” with the dire wolf configuration file you would like to use.

You will see the following serial path, we will need that in just a moment:

Bind kissatatch to the TNC

Now run the following command, replacing “/dev/pts/4” with your serial /dev path from above.

sudo kissattach -l /dev/pts/4 ax0

If you are using dire wolf, additionally run this command:

sudo kissparms -c 1 -p ax0

Connect Away!

You should now be able to connect to a given callsign within your linux shell. Use the following format, obviously replacing “KN4MKB-4” with the call you’d like to connect to.

axcall ax0 kn4mkb-4

The post Connect to a Packet Radio BBS Node with KISS or AGWPE TNC Windows/Linux appeared first on TheModernHam.

❌