sharebrained / portapack-hackrf

Portability Add-On for the HackRF Software-Defined Radio.
GNU General Public License v2.0
984 stars 407 forks source link

TPMS raw data analysis #74

Open tortured opened 8 years ago

tortured commented 8 years ago

Looking to analyse the raw data from TPMS. Looks like it currently captures and decodes the data and displays on LCD and dumps into TPMS.txt. Would like to look at raw data before it is decoded to look for the difference in manufacturer of devices. Since there is no real standard at this time. Also anyway to get the decoded data into the TPMS.txt file, or possibly piped via the usb cable to a file on my computer, as it is displayed on the LCD. Maybe it already is and I'm just not opening it in the correct way, I've just been viewing it in gedit.

jboone commented 8 years ago

The LCD shows only packets that pass CRC/checksum validation, and can be decoded to some extent.

The data in TPMS.TXT is after demodulation and packet detection, but before decoding. Before the "/" is the raw bits (in hex) detected after the preamble the code is currently checking for. The bits after the "/" indicate Manchester encoding errors. Packets that have a lot of "0"s immediately after the "/" are clean packets with no Manchester coding errors.

The TPMS code presently only decodes one TPMS variant, due to resource limitations (mostly my time not spent eating or sleeping. :-) ). Packets are at 315MHz, FSK with 38.4kHz deviation, 19.2kHz symbol rate, with a preamble of 32 bits of alternating "01". Additional code can broaden the modulation and coding parameters to receive more flavors of TPMS, but I haven't gotten there yet -- it requires more time spent reverse-engineering captured signals.

As a new feature, a second log file could be created that would save the packets that could be decoded.