Understanding an IR Protocol with multiple mark/space values

Everything related to protocols and IR codes
Post Reply
reklats
Posts: 2
Joined: Sun Sep 30, 2018 6:31 pm

Understanding an IR Protocol with multiple mark/space values

Post by reklats »

I'm trying to understand a IR Protocol captured using the AIR Shield and Analysis IR. It seems different from other protocols I've seen in the samples and shown online in that it I have observed 4 different duration for Marks and Spaces in the same capture. If I reply the capture it performs as expected.

I have attached 2 Analaysis IR session files. Each file contains multiple captures of the same data. The different between the files is that the data being transmitted varied by 1 bit.

The structure of the data being transmitted is:
- 8 bit header
- 8 bit data 1
- 8 bit data 2
- 8 bit XOR checksum between data 1 and data 2.

In both files, the number 37 should be represented in Data 2. The 1 bit difference between the files is in the Data 1 segment and is either a 1 (Red) or 2 (Green).
You do not have the required permissions to view the files attached to this post.
reklats
Posts: 2
Joined: Sun Sep 30, 2018 6:31 pm

Re: Understanding an IR Protocol with multiple mark/space values

Post by reklats »

So I made some progress in decoding this.

- Interpret what AnalysIR showed as: high=0, low=1 (I had been assuming high = 1, low = 0)
- Convert the entire capture into bits assuming each bit is ~600 uS (so ~2400uS would be 4 bits of data).
- Group into 4 10 bit groups
- Throw away the first and last bits of each each grouping
- Read right to left inside of each group

1000000001|0010100001|0101001001|011110100X = Header | 2,3,0,0 | 37 | Checksum
1000000001|0100100001|0101001001|000110100X = Header | 1,3,0,0 | 37 | Checksum

One other thing I noticed is that the lows seem to be consistently ~550 uS, while the highs are closer to ~650 uS.
User avatar
AnalysIR
Site Admin
Posts: 776
Joined: Sat Aug 31, 2013 3:51 pm
Location: Dublin, Ireland
Contact:

Re: Understanding an IR Protocol with multiple mark/space values

Post by AnalysIR »

The base time unit in the pulses seems to be around 624 uSecs.

So it seems like it could be a serial protocol of sorts with a baud rate of 1600bps (assumes the base time unit is 625 instead of 624)

You are right it doesn't look like any of the common IR encoding techniques (other than direct serial, which coincidently has the bits inverted).

If we look at the full duration of a signal (omitting the leading 1000 inserted by analysIR) we get a duration of almost exactly 39 bits (based on a 625 bit length).

Based on that, if we consider the 39 bits as 4 8-bit bytes (32 bits) and then allow for some start and stop bits, it may work out???????

So maybe re-run your anlysis based on the 625 time slot instead of 600 and see what happens.

(also note there may be a lead in on the IR signal...so the first n slots may be just for the benefit of the receivers AGC. Similarly the last bit/pulse if usually ignored.)

Do post about whattype of device you are using and a link to any description of the commands/data fields etc.

PS: You could of course just feed the output of the IR receiver directly into UART @ 1600bps or use the softserial library on the existing input pin.
Post Reply