Skip to content

RF Protocol

bggardner edited this page Jan 20, 2018 · 6 revisions

From the timing diagrams on the FCC applications and sniffing the waveforms, the RF protocol was discovered and is described below.

Modulation

The protocol uses amplitude-shift keying (ASK). The RF receiver/transmitter pairs (MICR211,MICR213/MICR112) take care of this modulation, so the waveform seen by the Raspberry Pi (or other digital controller) is a series of high and low pulses of various duration.

Framing

The encapsulating "frames" are comprised of four main elements:

  • SYNC: Multiple periods of a 500 Hz square wave. One period is first low for 1 ms, then high for 1 ms
    • Note that the first low pulse is not observed, due to OOK
  • Preamble: comprised of a 2 ms low pulse, following by a 2 ms high pulse
  • Data: Least significant bit first, most significant byte first, encoded as follows:
    • Logic "1": 1 ms pulse (high or low)
    • Logic "0": 0.5 ms pulse (high or low)
  • End Delimiter (encoded like Data):
    • Base station frames: 0x3F
    • Other frames: 0xF

The elements for the specific device frames are ordered as prescribed below:

Base Station Frames

  1. 150 periods of SYNC
  2. Preamble
  3. Data
  4. End Delimiter (0x3F)
  5. 18 periods of SYNC
  6. Preamble
  7. Data
  8. End Delimiter (0x3F)
  9. 18 periods of SYNC
  10. Preamble
  11. Data
  12. End Delimiter (0x3F)

Keypad Frames

  1. 40 periods of SYNC
  2. Preamble
  3. Data
  4. End Delimiter (0xF)
  5. Preamble
  6. Data
  7. End Delimiter (0xF)

Sensor Frames

  1. 20 periods of SYNC
  2. Preamble
  3. Data
  4. End Delimiter (0xF)
  5. Preamble
  6. Data
  7. End Delimiter (0xF)