Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

TPMS USB Serial Decoder

Python decoder for TPMS (Tire Pressure Monitoring System) USB serial receivers.

Hardware

TPMS USB Receiver

USB Receiver: Uses CH340 USB-to-Serial chip

Device Manager

In Windows Device Manager, the device appears as USB-SERIAL CH340.

Overview

This tool decodes tire pressure and temperature data from USB TPMS receivers. The protocol was reverse engineered from a decompiled Android APK.

Installation

pip install pyserial

Usage

# List available COM ports
python tpms_decoder.py --list

# Run decoder (default 19200 baud)
python tpms_decoder.py --port COM3

# Show raw data as received
python tpms_decoder.py --port COM3 --raw

# Custom baud rate
python tpms_decoder.py --port COM3 --baud 9600

Display

Display

The decoder shows a visual dashboard with all 4 tires + spare:

  • Pressure in PSI
  • Temperature in Celsius
  • Status alerts (OK, Leak, Low Battery, No Signal)

Protocol Details

Reverse engineered from Android TPMS APK (com.tpms package).

Frame Format

Offset Field Description
0 Header 0x55
1 Header 0xAA
2 Length Total frame length
3 Command Command type
4+ Data Payload (varies)
Last Checksum XOR of bytes[0..length-2]

Tire State Command (0x08)

Offset Field Calculation
3 Tire ID 0=FL, 1=FR, 16=BL, 17=BR, 5=Spare
4 Pressure raw * 3.44 = kPa
5 Temperature raw - 50 = Celsius
6 Status Bit flags (see below)

Status Flags (byte 6)

Bit Flag
5 No Signal
4 Low Power
3 Leakage

Other Commands

Cmd Name
0x06 Pairing/Heartbeat
0x07 Tire Exchange
0x09 Query Sensor ID

Serial Settings

  • Baud Rate: 19200 (default for this device)
  • Data Bits: 8
  • Stop Bits: 1
  • Parity: None

Source Files Referenced

Protocol extracted from decompiled APK classes:

  • FrameDecode3.java - Tire state parsing
  • FrameEncode3.java - Command encoding
  • PackBufferFrameEn3.java - Checksum calculation

License

For educational/personal use.

About

Python decoder for generic USB TPMS receivers (CH340 based). Reverse engineered from Android APK to read tire pressure & temperature.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages