Metadata-Version: 2.4
Name: PyFT8m
Version: 0.9.7
Summary: All-Python FT8 Transceiver with separable Transmitter and Receiver
Author-email: G1OJS <g1ojs@yahoo.com>
License-Expression: GPL-3.0-or-later
Project-URL: Homepage, https://github.com/G1OJS/PyFT8m
Project-URL: Issues, https://github.com/G1OJS/PyFT8m/issues
Keywords: ham radio,radio,FT8,LDPC,CPMFSK
Classifier: Programming Language :: Python :: 3
Classifier: Operating System :: OS Independent
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: numpy>=1.24.0
Requires-Dist: pyaudio
Requires-Dist: paho-mqtt
Requires-Dist: psutil
Dynamic: license-file

# PyFT8m 
This repo contains a minimised FT8 decoder written entirely in Python, together with a minimal transmitter and GUI which can together comprise a simple transceiver. 

The 'm' at the end of 'PyFT8m' is meant to indicate 'modular', as I've separated the transmitter and receiver from the GUI so that they can run standalone and be swapped out. They communicate with the GUI (or any other software you might want to write) via UDP - see below.

I started building this in October 2026 based on what I'd learned whilst writing [PyFT8](https://github.com/G1OJS/PyFT8). Please see the readme file there for more information.

<img width="790" height="641" alt="Capture" src="https://github.com/user-attachments/assets/7c70f1d4-c72e-4459-9611-7a4ec905d953" />

## Uses
This isn't meant to do anything better than applications like WSJT-x and MSHV, but it illustrates what can be done in a very few lines of Python. Currently, the code comprises:
 - Receiver ~ 300 lines, including LDPC and OSD decoding
 - Transmitter ~ 300 lines
 - Tkinter GUI ~ 500 lines

That's an FT8 transmitter / receiver in about 1100 lines of Python. The Receiver and Transmitter are implemented in single Python files (apart from common use of a small UDP class) and communicate with the GUI *only* via UDP. The point of doing this is to keep the interfaces here minimal, so that in theory it's easy to swap out either transmitter, receiver, or GUI and replace it with something written in any other language, subject to meeting / adapting the UDP commands reference below.

To use it as a 'turnkey' transceiver, just install the project via pip:
```
pip install PyFT8m
```
... and then run the tk_gui either in a Python environment or by using a command like 
```
python -m tk_gui
```
I haven't written too much of a step by step quide here, as the project is really intended for people who want to poke around and maybe modify the code. But hopefully even if you're new to Python or coding, you can have a look and work out how it's done.

## UDP messages
The following shows the main points of the way that the UDP messages are constructed - please see the code for the absolute reference.
1. All UDP messages apart from those sent to pskreporter.info or the waterfall data sent from the receiver to the GUI, are Python dictionaries serialised with JSON and encoded to bytes.
2. All dictionaries start with a key called 'mtype' meaning 'messsage type'. The main ones are 'decode' (indicating that the dictionary contains various entries from a decoded message), 'shutdown', 'waterfall', 'rollover', 'test_info', 'set_tx_Hz', 'generate_tx_audio', 'send_tx_audio', 'stop_tx_audio'.

As the project grows, I might write a more formal spec for these messages.

## Acknowledgements
This project implements a decoder for the FT8 digital mode. FT8 was developed by Joe Taylor, K1JT, Steve Franke, K9AN, and others as part of the WSJT-X project.
Protocol details are based on information publicly described by the WSJT-X authors and in related open documentation.

Some constants and tables (e.g. Costas synchronization sequence, LDPC structure, message packing scheme) are derived from 
the publicly available WSJT-X source code and FT8 protocol descriptions. Original WSJT-X source is © the WSJT Development Group 
and distributed under the GNU General Public License v3 (GPL-3.0), hence the use of GPL-3.0 in this repository.

