HamSearch is a Mystic BBS add-on for looking up amateur radio callsigns using FCC ULS data from inside the BBS.
It runs as a Python 3 MPY script in Mystic and uses a local SQLite database for faster lookups, with fallback support for the FCC flat data files.
| Item | Details |
|---|---|
| Project Name | HamSearch |
| Purpose | Amateur radio callsign lookup inside Mystic BBS |
| Platform | Mystic BBS |
| Language | Python 3 |
| Data Source | FCC ULS Amateur Radio database |
| Current Search Script | ``hamserach.mpy`` |
| Database Builder | ``getdb.py`` |
| Header File | ``hshdr.ans`` |
| File | Purpose |
|---|---|
| ``hamsearch.mpy`` | Main Mystic Python 3 search script |
| ``getdb.py`` | Downloads FCC data, extracts files, builds SQLite DB |
| ``hshdr.ans`` | ANSI header / display file |
| ``install.txt`` | Plain text install instructions |
``getdb.py`` downloads the current FCC amateur ULS ZIP archive, extracts the needed files into a local ``data/`` directory, and builds:
data/hamsearch.db
The Mystic script ``hamserach.mpy`` then uses that SQLite database for lookups.
If SQLite is not available, the script can still fall back to the FCC flat files.
The current builder is designed to work with these FCC files when present:
These are used for current license data, operator class, mailing information, and historical references such as previous callsigns and status history.
Create a directory for HamSearch inside your Mystic scripts area.
Example:
/mystic/themes/default/scripts/hamsearch/
Place these files in that directory:
Run the database builder from the HamSearch directory on your host system:
python3 getdb.py
This should:
After it finishes, your directory should look something like this:
hamsearch/
hamserach.mpy
getdb.py
hshdr.ans
hamsearch.log
data/
AM.dat
EN.dat
HD.dat
HS.dat
hamsearch.db
Open ``hamserach.mpy`` and set the ``DB_FOLDER`` value to point to your HamSearch data directory.
Example:
DB_FOLDER = "/home/youruser/mystic/themes/default/scripts/hamsearch/data/"
This path should point to the folder containing:
Make sure the Mystic process/user can read:
In Mystic, create a menu item for HamSearch and use the Python 3 MPY menu command:
GZ
For the script path/data, point it to your HamSearch script.
Example concept:
| Field | Value |
|---|---|
| Command | ``GZ`` |
| Data | ``/full/path/to/hamsearch.mpy`` |
After adding the menu item, log into the BBS and test:
If HamSearch says it cannot find the database:
Check the following:
Try the following:
The main script filename in the repo is currently:
hamsearch.mpy
That spelling is preserved for compatibility with the current repository layout.
At some point, it would be a good idea to rename it to:
hamsearch.mpy
If that rename happens later, make sure to also update:
Things worth remembering:
mystic bbs hamradio amateur_radio python sqlite fcc projects