# HamPi

Headless Raspberry Pi 5 ham-radio station installer.

Built for anyone with a **Technician-class** license or higher, using:

- Raspberry Pi 5 + Raspberry Pi OS Lite (64-bit Bookworm)
- AIOC (All-In-One-Cable) + Quansheng UV-K5 (or any HT with a K1 connector)
- Generic USB GPS (u-blox)
- Packet / APRS / keyboard-to-keyboard / Winlink (Pat)

## What you get

| Component        | Role                                      |
|------------------|-------------------------------------------|
| Direwolf         | Software TNC (AGW + KISS)                 |
| Graywolf         | Modern APRS modem + digi + iGate + web UI |
| LinBPQ           | Node + BBS + Chat over RF                 |
| Pat              | Winlink client (web UI)                   |
| gpsd + chrony    | GPS time + optional LAN NTP server        |
| udev rules       | Friendly names `/dev/aioc-serial`, `/dev/gps` |
| ham-launcher     | Switch modems safely, view logs & ports   |

**Important:** Direwolf and Graywolf both take exclusive access to the AIOC sound card. The launcher stops one before starting the other. Only one is enabled at boot.

## Quick start

```bash
# On a fresh Pi (or to reproduce an existing station)
git clone <your-repo-url> HamPi
cd HamPi
cp config.env.example config.env
nano config.env          # set CALLSIGN, GRID, LAT/LON, HAM_USER, etc.
# Make sure your USB devices are plugged in and your radio is turned on with its volume set to around 25%
./install.sh
```

After install:

```bash
source ~/.bashrc         # or log out/in
ham status               # show services + ports
ham graywolf             # or: ham direwolf
```

## Ports (default)

| Service                  | Port  |
|--------------------------|-------|
| Direwolf AGWPE           | 8000  |
| Direwolf / Graywolf KISS | 8001  |
| Graywolf web             | 8080  |
| LinBPQ telnet            | 8010  |
| LinBPQ web               | 8090  |
| Pat web                  | 8081  |
| gpsd                     | 2947  |

## Design notes

- Bash installer so it is easy to read and share
- Personal data lives only in `config.env`
- Templates under `configs/` are filled with `envsubst` / `sed`
- Steps are split under `scripts/` so you can re-run one phase if needed

## License

Use and adapt freely for amateur radio. No warranty — verify Part 97 compliance for your station and license class. In no way affiliated with the offical HamPi

KM7HBN 73
