Skip to content

CAT control for the TYT TH-9800 radio using the serial protocol between the radio body and the radio head.

License

Notifications You must be signed in to change notification settings

SleepyNinja0o/TH9800_CAT

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TYT TH-9800 CAT Control via Remote Head Serial Protocol

Research

There was no documentation on the remote radio head protocol so I had to reverse engineer it. Here is what I used:

  • Hardware:
  • Software
    • Logic software used with the Logic Analyzer to decode packets to/from radio
    • SerialTool software used to capture, modify and replay packets
  • Issues
    • You can NOT connect 2 TX pins together (radio head + USB adapter) at the same time since they both will be a normally high state (5v). You will need a TX switch or another type of circuit if you want to control radio from both devices.

Required

Software Buy Me A Coffee

  • Python (written in v3.13)
  • Python modules (Install using "pip install -r requirements.txt" for Windows + Linux x64):
    • asyncio module
    • pySerial-asyncio module
    • DearPyGui module
      • If you're running an ARMv7/ARMv8 processor (Common in SBCs), you will have to manually build the DearPyGui module.
        (Grab some coffee, the build can take a while on lower end boards)

        apt update
        apt install git cmake python3 python3-dev libglu1-mesa-dev libgl1-mesa-dev libxrandr-dev libxinerama-dev libxcursor-dev libxi-dev
        git clone --recursive https://github.com/hoffstadt/DearPyGui
        cd DearPyGui
        
        #Build for ARMv7 (Ex: Raspberry Pi 2)
        python3 -m setup bdist_wheel --plat-name linux_armv7l --dist-dir ../dist
        pip install ../dist/dearpygui-2.0.0-cp312-cp312-linux_armv7l.whl
        
        #Build for ARMv8 (Raspberry Pi 3 and above, also works on my Orange Pi Zero 3)
        python3 -m setup bdist_wheel --plat-name linux_aarch64 --dist-dir ../dist
        pip install ../dist/dearpygui-2.0.0-cp312-cp312-linux_aarch64.whl
        

How to Run

  • Right click "TH9800_CAT.py" file and start with Python.
  • Open command line, CD to directory, and run "python.exe TH9800_CAT.py".

Setup

Logic Analyzer

TH9800 Serial USB Setup

RJ12 Pinout at Radio Body

TH9800 Serial USB Closeup

74LS157 - Quad 2-Input Multiplexer IC Setup (Software TX Switch)

74LS157 TX Switch

Screenshots of Python App

Serial Connection Window

Screenshot 2025-04-22 214317 Screenshot 2025-05-02 010311

Radio Interface with All Labels Enabled

Screenshot 2025-05-02 010658

Regular Radio Interface

Screenshot 2025-05-02 010505

Python App Demo

TH9800.CAT.Demo.mp4

Disclaimer

This software is provided "as is", without warranty of any kind, express or implied, including but not limited to the warranties of merchantability, fitness for a particular purpose, and noninfringement. In no event shall the authors or copyright holders be liable for any claim, damages, or other liability, whether in an action of contract, tort, or otherwise, arising from, out of, or in connection with the software or the use or other dealings in the software.

Use at your own risk.

About

CAT control for the TYT TH-9800 radio using the serial protocol between the radio body and the radio head.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages