Format of IR codes captured with Broadlink RM4 Mini

I have been capturing IR codes using the RM4 mini (no issues - thanks for a great integration).

However I wanted to understand the format of the codes (I realize they are Base64 encoded).

After decoding I think I understand most of the encoding, except for the first 7 bytes in each capture, I recorded a number of different button presses shown in the graphic.

I think that, lines:

  • [0,1] - Are just the protocol (38 Khz is the IR carrier).
  • [2,3,4] - I have no idea what these lines are for.
  • [5,6] - I think this is the 9ms burst at the beginning of an NEC protocol - however I don’t understand how they are encoded / what the encoding is.
  • [7] - If the previous lines are correct, then this would be the 4.5 ms blank before the data.
  • [8…] - The rest of the file is the data transmission. In this case 4 total bytes of data + a postfix - too long to show in the graphic.

Could anyone enlighten me (or point me in the direction of documentation) about what these first few bytes are / the format used.

TIA.

PS Based on the timings, it looks like the mini is sampling at 32 KHz - not sure if that is relevant to the header format above / if the mini samples at different rates.

Bubble card can work with Lightern ??

Lines 2 & 3 will be the length of data - little endian. e.g. 0 * 256 + 120.

Lines 4,5 & 6 will be part of the data. Large value so encoded with a leading zero. e.g. 1 * 256 + 28 = 284. i.e. 9ms.

Here is the site that helped me Additional info for generating data for IR/RF from LIRC DB etc. ... · Issue #57 · mjg59/python-broadlink · GitHub

Thank you,

I captured some codes from additional remotes and they make so much more sense with this understanding.