what the baud

method

How to take apart an unknown signal

Every signal on this site gets the same treatment, in the same order. Each step answers one question, and the answer decides what the next step looks like. Skipping ahead is how you spend a weekend decoding noise.

1. Capture more than you think you need

Record raw I/Q, not audio. An audio recording has already been through somebody’s demodulator and filter, and both threw information away.

2. Measure before you guess

Look at the capture three ways before touching a demodulator.

View What it tells you
Spectrogram Bandwidth, burst length, hopping, whether the energy sits in one lump or two
Amplitude against time On-off keying shows up here immediately; a constant envelope rules it out
Instantaneous frequency Two flat levels mean 2-FSK, four mean 4-FSK, a smooth wander means something else

Then get the symbol rate. Measure the shortest gap between two transitions across a few bursts; the symbol period is that gap, and everything longer is a multiple of it. A spectrum of the squared or magnitude signal will show a line at the symbol rate and confirms the number. Real products favour round figures: 1200, 2400, 4800, 9600, 38400, 50000, 100000. A measurement of 9.58 kBd is 9600 with a cheap crystal.

3. Get bits, any bits

Demodulate with the simplest thing that works and slice at the symbol rate. Do not worry yet about which level is a one. Write the bits out as text, one burst per line, and line the bursts up under each other.

4. Find the frame

Most packets start the same way:

  1. A preamble, usually alternating bits (0xAA or 0x55), so the receiver can settle its clock.
  2. A sync word, a fixed pattern that marks where the data starts. It is the first thing after the preamble that is identical in every burst.
  3. A length or a fixed size, then the payload, then a check value.

If the bits after the sync word look random in every capture, including captures that should be identical, the data is probably whitened or encoded. Check for Manchester coding first (the bit stream never has more than two equal bits in a row), then for whitening (XOR two captures that should differ by one field: the whitening cancels and the difference is left).

5. Diff your way to the fields

This is where the notes from step one pay for themselves. Change one thing on the device, capture, and compare.

6. Prove it with the checksum

A field map is a theory until the check value agrees with it. Try the common ones over every plausible span of the frame: an 8-bit sum, an XOR, CRC-8, CRC-16 with the CCITT and IBM polynomials, each with both bit orders and both usual initial values. When one of them matches on every capture, you know where the frame really starts and ends, which bit order is right and that your whitening guess was correct, all at once.

After that you can build a frame of your own, compute the check value and see whether a receiver you own accepts it. A decoder that only reads has been tested against your assumptions. One that can also write has been tested against the device.

← All posts