Repository: https://github.com/Alex-Pennington/PC-ALE
Author: Alex Pennington, AAM402/KY4OLB
UI Concept: https://alex-pennington.github.io/pcale-ui-concept/
License: MIT
A modern, production-ready C++17 clean-room implementation of MIL-STD-188-141B Automatic Link Establishment (ALE) and FED-STD-1052 ARQ for HF radio systems.
This implementation is built entirely from public MIL-STD specifications, not derived from proprietary source code. Reference implementations are analyzed only for validation and understanding expected behavior, following clean-room engineering principles.
Key Principles:
- β Specification-first development
- β Modern C++17 standard library usage
- β Comprehensive unit testing (100% pass rate)
- β Zero dependencies on legacy code
- β Cross-platform (Windows, Linux, macOS, Raspberry Pi)
- β Production-ready architecture
- β Community-driven development
git clone https://github.com/Alex-Pennington/PC-ALE.git
cd PC-ALE
mkdir build && cd build
cmake .. -DCMAKE_BUILD_TYPE=Release
cmake --build .
ctest --verbose # All 91 tests should pass./example_complete_stack # Full 2G ALE demonstration
./example_aqc_usage # AQC-ALE enhanced calling
./example_fs1052_transfer # Reliable data transfer
./example_ale_decoder # Basic ALE decoding| Phase | Component | Tests | Status |
|---|---|---|---|
| 1 | 8-FSK Modem Core | 5/5 | β Complete |
| 2 | Word Structure & Protocol | 5/5 | β Complete |
| 3 | Link State Machine | 7/7 | β Complete |
| 4 | AQC-ALE Extensions | 18/18 | β Complete |
| 5 | FS-1052 ARQ Protocol | 19/19 | β Complete |
| 6 | LQA System | 37/37 | β Complete |
| Total | Complete Protocol Stack | 91/91 | 100% |
The protocol stack is complete. What remains are integration layers:
| Module | Purpose | Status |
|---|---|---|
| Audio I/O | Connect modem to soundcard (WASAPI/ALSA/CoreAudio) | β Needed |
| Radio CAT | Tune radios during scanning (Icom, Yaesu, Kenwood, Elecraft) | β Needed |
| Qt6 UI | Cross-platform user interface | β Needed |
| SDR Integration | Direct SDR connection | π In Progress |
PC-ALE 2.0 uses a two-repository architecture:
βββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β PC-ALE (This Repository) β
β βββββββββββββββββββββββββββββββββββββββββββββββββ β
β β Layers 3-7: ALE Protocol Stack β β
β β β’ FS-1052 ARQ (Layer 4) β β
β β β’ ALE State Machine (Layer 3) β β
β β β’ 2G/AQC Protocol, LQA (Layer 3) β β
β β β’ 8-FSK Modem, Golay FEC (Physical) β β
β βββββββββββββββββ¬ββββββββββββββββββββββββββββββββ β
ββββββββββββββββββββΌβββββββββββββββββββββββββββββββββββ
β Uses interfaces from
ββββββββββββββββββββΌβββββββββββββββββββββββββββββββββββ
β PC-ALE-PAL (Platform Abstraction Layer) β
β βββββββββββββββββββββββββββββββββββββββββββββββββ β
β β Layers 1-2: Hardware Abstraction Interfaces β β
β β β’ IAudioDriver - Sound card I/O β β
β β β’ IRadio - Frequency, mode, PTT, power β β
β β β’ ITimer - Millisecond timing β β
β β β’ ILogger - Diagnostic output β β
β β β’ IEventHandler - Threading/callbacks β β
β β β’ ISIS - Serial communication β β
β βββββββββββββββββββββββββββββββββββββββββββββββββ β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Implemented by
ββββββββββββββββββββΌβββββββββββββββββββββββββββββββββββ
β Platform-Specific Repositories (Community) β
β β’ PC-ALE-Linux-DRAWS (ALSA, libgpiod) β
β β’ PC-ALE-Windows (WASAPI, Hamlib) β
β β’ PC-ALE-RaspberryPi-Bare (Circle framework) β
β β’ PC-ALE-SDR (SoapySDR/UHD implementation) β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Why Separate Repositories?
- PC-ALE = Pure protocol stack (no OS dependencies)
- PC-ALE-PAL = Interface contracts (what must be implemented)
- Platform repos = Concrete implementations (ALSA, WASAPI, etc.)
This enables:
- β Same protocol code on Windows, Linux, macOS, bare metal
- β Multiple platforms can be developed in parallel
- β Clean separation: protocol maintainers don't need hardware expertise
- β Community can contribute platform ports without touching core
Get Started:
- Clone PC-ALE (protocol stack) - this repository
- Clone PC-ALE-PAL (interfaces)
- Clone or create a platform implementation (e.g., PC-ALE-Linux-DRAWS)
- Build and run!
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β APPLICATION LAYER β
β (User Interface, Message Handling) β
βββββββββββββββββββββββββββββ¬ββββββββββββββββββββββββββββββββββ
β
βββββββββββββββββββββββββββββΌββββββββββββββββββββββββββββββββββ
β DATA LINK LAYER (Phase 5) β
β FS-1052 ARQ: Reliable transfer, ACK/NAK, Retransmit β
β (Control Frames, Data Frames, CRC-32) β
βββββββββββββββββββββββββββββ¬ββββββββββββββββββββββββββββββββββ
β
βββββββββββββββββββββββββββββΌββββββββββββββββββββββββββββββββββ
β LQA SYSTEM (Phase 6) β LINK ESTABLISHMENT (Phase 3) β
β Channel quality β State Machine: IDLEβSCANNINGβ β
β Sounding analysis β CALLINGβHANDSHAKEβLINKED β
βββββββββββββββββββββββββββββ¬ββββββββββββββββββββββββββββββββββ
β
βββββββββββββββββββββββββββββΌββββββββββββββββββββββββββββββββββ
β PROTOCOL LAYER (Phases 2 & 4) β
β 2G ALE Words: Preamble + 21-bit Payload β
β AQC-ALE Extensions: DE fields, CRC, Slotted Response β
βββββββββββββββββββββββββββββ¬ββββββββββββββββββββββββββββββββββ
β
βββββββββββββββββββββββββββββΌββββββββββββββββββββββββββββββββββ
β PHYSICAL LAYER (Phase 1) β
β 8-FSK Modem: 750-1625 Hz, 125 baud, Golay FEC β
β FFT Demodulator, Tone Generator, Symbol Decoder β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
See docs/ARCHITECTURE.md for detailed documentation.
- FFT-based demodulator with sliding 64-point FFT
- 8 tone generator (750-1625 Hz, 125 Hz spacing)
- Symbol-to-bits decoder with peak detection
- Majority voting (3x redundancy error correction)
- Extended Golay (24,12) encoder/decoder - 3-bit error correction
- Word structure parser (preamble + 21-bit payload)
- Preamble types: DATA, THRU, TO, TWS, FROM, TIS, CMD, REP
- ASCII-64 character encoding/decoding
- Address book with wildcard matching
- Message assembly and call type detection
- 6 states: IDLE, SCANNING, CALLING, HANDSHAKE, LINKED, SOUNDING
- Channel selection, scan list, dwell time management
- Event-driven architecture with callbacks
- Timeout handling (call, link, scan)
- Data Element extraction (DE1-DE9)
- 16 traffic classes (voice modes, data modes, email)
- Transaction codes (ACK, NAK, TERMINATE)
- CRC-8/CRC-16 orderwire protection
- Slotted response timing (8 slots Γ 200ms)
- Selective repeat ARQ with 256-bit ACK bitmap
- CRC-32 frame protection
- Automatic retransmission on timeout/NAK
- Data rates: 75, 150, 300, 600, 1200, 2400, 4800 bps
- Configurable window size and retry limits
- Persistent quality tracking (binary + CSV formats)
- Time-weighted averaging, composite scoring (0-31)
- SNR/BER/SINAD/multipath/noise floor metrics
- Channel ranking and best channel selection
- Sounding analysis and scheduling
| Parameter | Value | Standard |
|---|---|---|
| ALE Standard | MIL-STD-188-141B Appendix A | 2G ALE |
| ARQ Standard | FED-STD-1052 | Data Link Protocol |
| Modulation | 8-FSK (8 tones) | 750-1625 Hz |
| Symbol Rate | 125 baud | 125 symbols/sec |
| Tone Spacing | 125 Hz | Narrowband HF |
| FEC | Golay (24,12) | 3-bit correction |
| Sample Rate | 8000 Hz | Audio sampling |
The build produces these static libraries:
| Library | Purpose |
|---|---|
libale_fsk_core.a |
8-FSK modulation/demodulation |
libale_fec.a |
Golay (24,12) error correction |
libale_protocol.a |
Word parsing, messages, addressing |
libale_link.a |
ALE state machine |
libale_aqc.a |
AQC-ALE protocol extensions |
libale_fs1052.a |
FS-1052 ARQ reliable data link |
libale_lqa.a |
Link Quality Analysis system |
cd build
ctest --verbose
# Or run individual test suites:
./test_fsk_core # Phase 1: FSK modem
./test_protocol # Phase 2: Protocol parser
./test_state_machine # Phase 3: State machine
./test_aqc_parser # Phase 4: AQC-ALE
./test_aqc_crc # Phase 4: CRC validation
./test_fs1052_frames # Phase 5: Frame formatting
./test_fs1052_arq # Phase 5: ARQ state machine
./test_lqa_database # Phase 6: LQA database
./test_lqa_metrics # Phase 6: Metrics collection
./test_lqa_analyzer # Phase 6: Channel analysis- Architecture - System design and layers
- API Reference - Complete API documentation
- Integration Guide - Audio I/O and radio integration
- MIL-STD Compliance - Standards compliance matrix
- Glossary - ALE terminology and acronyms
- Testing Guide - Running and writing tests
This project exists because:
- ION2G has problems and limited development
- PC-ALE 1.x is abandonware
- MARS has excellent tools locked behind membership requirements
- The ham community deserves modern, open, cross-platform ALE software
| Contribution Type | What It Looks Like |
|---|---|
| Direct Funding | Sponsor AI development costs via GitHub Sponsors |
| AI-Assisted Dev | Use your own API access to implement features, submit PRs |
| Testing | Beta test releases, report bugs, validate on your hardware |
| Documentation | Write tutorials, improve guides |
| Hardware Loans | Loan radios or SDRs for compatibility testing |
| OTA Testing | Participate in on-air interop tests |
| Code Review | Review pull requests, audit code quality |
AI-assisted development has real compute costs. If you want to support continued development:
| Method | Link |
|---|---|
| GitHub Sponsors | github.com/sponsors/Alex-Pennington |
| PayPal | paypal.me/prior2fork |
- C++ Compiler: C++17 or later (GCC 7+, Clang 5+, MSVC 2017+)
- CMake: 3.15 or later
- Platform: Windows, Linux, macOS, Raspberry Pi
No external dependencies required for core functionality.
MIT License - See LICENSE file for details.
This clean-room implementation references:
- MIL-STD-188-141B - Official U.S. Department of Defense specification
- FED-STD-1052 - HF Radio Data Link Protocol specification
- LinuxALE (GPL) - Analyzed for validation purposes only
- MARS-ALE - Design patterns studied, no code reused
PC-ALE 2.0 - Professional-grade HF radio ALE implementation
Built from specifications, designed for reliability, open to all
Alex Pennington, AAM402/KY4OLB
Contact: [email protected]
GitHub: github.com/Alex-Pennington