Another idea I have had is to retain all the commands and set to mode 2 (with a standard handset having full control), but inject commands from the reduced handset on mode 1 and translate them in ir3.map. Are the actual codes listed anywhere?
I hope I'm not treading on any toes, but I can't find this discussed/listed anywhere so I've done some digging and dissection:
IR Code Patterns Reported by the "ir3/debugon" Diagnostic
With the
ir package installed, and the
ir3/debugon diagnostic run (and rebooted), the humaxtv.log file accumulates the IR codes received by the HDR (even codes not meant for it - for example I can see codes reported from my TV handset). For example:
Let's take line 489:
Real IR code: 0x000001 0xf90610fa (6) [foreign=0]
- "Real IR code:" is a constant prefix;
- "0x000001" is a repeat flag;
- "0xf90610fa" is the actual code;
- "(6)" is the extracted function;
- "[foreign=0]" indicates whether the code is applicable to the 'FOX in its current mode.
Repeat Flag
This field is either "00000000" or "0x000001"; "0x" is a prefix indicating what follows if a hex string, and I guess "00000000" is a bug and should read "0x000000".
"00000000": This is the first transmission of this code;
"0x000001": This is a subsequent transmission of this code in continuous sequence.
Code
The "0x" prefix indicates what follows is a hex string, in this case 8 digits (32 bits). The hex string comprises three fields (using the example above):
f9: Check (1 byte)
06: Function (1 byte)
10fa: Mode (two bytes)
The check byte is the logical inversion of the function byte; thus: 0xF9 + 0x06 = 0xFF. Any codes received which do not meet this condition will probably be rejected.
The mode bytes filter out IR commands sent to other devices or 'FOXes operating on different modes. By experiment, the relevant modes appear to be:
Mode 1: 0x1000
Mode 2: 0x10fa
Mode 3: 0x10fb
Mode 4: 0x10fc
Mode 5: 0x10fd
Mode 6: 0x10fe
The Humax remote also sends 0x10ff in the process of changing mode.
"Foreign" Flag
This indicates whether the mode bytes correspond with the current mode of the 'FOX, or are rejected as "foreign":
"[foreign=0]": The mode bytes correspond with the current mode of the 'FOX;
"[foreign=1]": The mode bytes do not correspond with the current mode of the 'FOX, and the function will not be acted on.
Function
The mapping between function bytes and button names can be obtained by the CLI command
ir -l
. However, for convenience, here is an edited version of the output (eliminating duplications):
Code:
HEX FUNCTION
*** ********
00 POWER
02 SOURCE
03 ONE
04 TWO
05 THREE
06 FOUR
07 FIVE
08 SIX
09 SEVEN
0A EIGHT
0B NINE
0C ZERO
0D TV/RADIO
0E MENU
0F P-
10 P+
11 UP
12 LEFT
13 OK
14 RIGHT
15 DOWN
16 EXIT
18 MUTE
1A YELLOW
1B GUIDE
1C RED
1D GREEN
1E BLUE
1F VOL+
40 VOL-
41 BACK
42 OPT+
43 INFO
45 AUDIO
46 SUB
4B PORTAL
4C SLEEP
4D LIST
4E WIDE
4F V-FORMAT
60 PLAY
61 REC
62 PAUSE
63 STOP
64 FF
65 REW
66 SKIP/BACK
67 SKIP/FORW
6A ADDBOOKMARK
6B BOOKMARKS
6C SLOW
6E TEXT
6F MEDIA
70 MODE
71 MODE1
72 MODE2
73 MODE3
74 MODE4
75 MODE5
76 MODE6
7F CURMODE
80 PVR
81 TV
82 DVD
83 AUDIOD
What's all this worth? Well, by picking up button presses in other modes or from other remotes, they can be translated to actual functions in the /mod/boot/ir3.map file, and by turning the function on in
WebIF >> Settings >> Settings for ir package >> Use custom map file? = YES they should act on the 'FOX.