So, you already put some effort in the research. very good. Let’s go from there.
At first, the manuals says:
LSX works with universal programmable remote control
provided that the remote control controls. manufacturers
have implemented KEF IR command codes in their
remote.
What are KEF IR codes? I thought is kind of a protocol, on top of the NEC header. But lets take a look, deeper in the rabbit hole.
I opened a spreadsheet (excel, calc, …) and copy and pasted the values from the manual in the first row.
‘Libre Office Calc’ is not very handy, the result was:
1 Power On/Off Toggle 0x40 so I started in row 2, with =RIGHT(A9;4) → 0x04
Then I used the given IR file and started to match the buttons:
| Maual |
Extract |
FZ_IR |
BtnName |
| 1 Power On/Off Toggle 0x40 |
0x40 |
02 00 00 00 |
Power |
| 2 Mute/ Unmute Toggle 0x20 |
0x20 |
04 00 00 00 |
Mute |
| 3 Play/Pause 0x18 |
0x18 |
18 00 00 00 |
Play_pause |
| 4 Next 0x52 |
0x52 |
4A 00 00 00 |
Next |
Not very helpful. But in the end it is all zero and one. Most spreadsheets got a function, like ‘Hex2Bin’
Convert manual codes: =REPT("0";8-LEN(HEX2BIN(RIGHT(A9;2))))&(HEX2BIN(RIGHT(A9;2)))
Convert IR file codes: =REPT("0";8-LEN(HEX2BIN(LEFT(C9;2))))&(HEX2BIN(LEFT(C9;2)))
| Maual |
Extract |
FZ_IR |
BtnName |
h2b_man |
h2b_ir |
| 1 Power On/Off Toggle 0x40 |
0x40 |
02 00 00 00 |
Power |
01000000 |
00000010 |
| 2 Mute/ Unmute Toggle 0x20 |
0x20 |
04 00 00 00 |
Mute |
00100000 |
00000100 |
| 3 Play/Pause 0x18 |
0x18 |
18 00 00 00 |
Play_pause |
00011000 |
00011000 |
| 4 Next 0x52 |
0x52 |
4A 00 00 00 |
Next |
01010010 |
01001010 |
| 5 Source toggle 0x58 |
0x58 |
1A 00 00 00 |
Source |
01011000 |
00011010 |
| 6 Volume Up 0x60 |
0x60 |
06 00 00 00 |
Plus |
01100000 |
00000110 |
| 7 Volume Down 0xA0 |
0xA0 |
05 00 00 00 |
Minus |
10100000 |
00000101 |
| 8 Previous 0xD2 |
0xD2 |
4B 00 00 00 |
Previous |
11010010 |
01001011 |
The 8 codes are just Reversed?
Reversing in Spreadsheet is crap. But luckily we have only 8 digits:
=RIGHT(E17;1)&LEFT(RIGHT(E17;2);1)&LEFT(RIGHT(E17;3);1)&LEFT(RIGHT(E17;4);1)&LEFT(RIGHT(E17;5);1)&LEFT(RIGHT(E17;6);1)&LEFT(RIGHT(E17;7);1)&LEFT(RIGHT(E17;8);1)
And back to a flipper zero .ir file code: =BIN2HEX(F17)&" 00 00 00"
Result in Row ‘FZ_IR’:
| Manual |
Extract |
FZ_IR |
BtnName |
h2b_man |
h2b_ir |
| 1 Power On/Off Toggle 0x40 |
0x40 |
02 00 00 00 |
Power |
01000000 |
00000010 |
| 2 Mute/ Unmute Toggle 0x20 |
0x20 |
04 00 00 00 |
Mute |
00100000 |
00000100 |
| 3 Play/Pause 0x18 |
0x18 |
18 00 00 00 |
Play_pause |
00011000 |
00011000 |
| 4 Next 0x52 |
0x52 |
4A 00 00 00 |
Next |
01010010 |
01001010 |
| 5 Source toggle 0x58 |
0x58 |
1A 00 00 00 |
Source |
01011000 |
00011010 |
| 6 Volume Up 0x60 |
0x60 |
06 00 00 00 |
Plus |
01100000 |
00000110 |
| 7 Volume Down 0xA0 |
0xA0 |
05 00 00 00 |
Minus |
10100000 |
00000101 |
| 8 Previous 0xD2 |
0xD2 |
4B 00 00 00 |
Previous |
11010010 |
01001011 |
| 9 Power ON 0x38 |
0x38 |
1C 00 00 00 |
|
00111000 |
00011100 |
| 10 Power OFF 0x3A |
0x3A |
5C 00 00 00 |
|
00111010 |
01011100 |
| 11 Mute 0x48 |
0x48 |
12 00 00 00 |
|
01001000 |
00010010 |
| 12 Un-Mute 0x4A |
0x4A |
52 00 00 00 |
|
01001010 |
01010010 |
| 13 Source: Wi-Fi 0x30 |
0x30 |
C 00 00 00 |
|
00110000 |
00001100 |
| 14 Source: Bluetooth 0x2A |
0x2A |
54 00 00 00 |
|
00101010 |
01010100 |
| 15 Bluetooth Pairing 0x98 |
0x98 |
19 00 00 00 |
|
10011000 |
00011001 |
| 16 Source: AUX 0x02 |
0x02 |
40 00 00 00 |
|
00000010 |
01000000 |
| 17 Source: Optical 0x0A |
0x0A |
50 00 00 00 |
|
00001010 |
01010000 |
| 18 Source: USB 0x1A |
0x1A |
58 00 00 00 |
|
00011010 |
01011000 |
| 19 Preset Volume (30%) 0x78 |
0x78 |
1E 00 00 00 |
|
01111000 |
00011110 |
The leading 0 is missing at the code ‘13 source:Wifi’ … but it should be good enough.
Brute force is never a solution. It is the sledge hammer, if the situation is not enough analyzed 