❌

Normal view

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

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

By: KN4MKB
23 May 2024 at 17:51

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.

The Matrix HAM Radio Community continues to grow

By: M0AWS
10 June 2024 at 10:12

A couple of years ago I built a Matrix Synapse server and connected it to the decentralised global Matrix chat network that is federated world wide by enthusiasts who host their own Matrix servers. Due to the enthusiasm for a decentralised network the Matrix has grown exponentially and is now an established force in the world of Opensource global communication services.

When I built my server and configured it online my aim was to bring together an enthusiastic group of Radio Amateurs (Radio HAMs) who could build a friendly, welcoming community where people could share, learn and have fun with other liked minded individuals without all the nonsense you see on commercial social media platforms.

Overtime we’ve increased the number of rooms available in the HAM Radio space and the number of subjects covered. This has grown organically as our community has grown and we’ve ventured together into new areas of the hobby.

Global Matrix Ham Radio Space hosted on the M0AWS Matrix Server
Global Matrix Ham Radio Space hosted on the M0AWS Matrix Server

From the community a number of projects have spawned including the Opensource.radio Wiki that Mike, DK1MI is sponsoring that aims to detail all the Opensource HAM Radio software, Hardware and projects in one centralised site on the internet. This is a great project and one I am very happy to contribute to.

Thanks to Mike, DK1MI we now also have our own Matrix AllStarLink node available. This is a great resource for the community as it is often not possible for all of us to communicate via the radio waves due to geo-location, time zones, local planning regulations etc. Having this 24/7 internet based resource makes it a lot easier for the community to chat at any time even when propagation on the HF bands isn’t in our favour.

Mike, DK1MI has written an excellent article on the Matrix AllStarNode and more, I highly recommend you take a look at it.

We also have a very active satellite room with regular nets on the QO-100 satellite. With such a great range of rooms and subjects there’s plenty to read and talk about with the community.

If you fancy being part of this growing, enthusiastic group of Radio Amateurs and Short Wave Listeners (SWLs) then click on the link below and come and say hello, a warm welcome awaits!

https://m0aws.co.uk/matrix

More soon …

❌
❌