The configuration file¶
A Harmony does nothing by itself. Everything it knows about a household, which devices there are, what each button sends, what the screen shows and what happens when an activity starts, comes from one file: Logitech's software compiles it from the choices a person made in Logitech's program or on their website, and writes it into the remote's flash. This reference calls that file the configuration.
A configuration is closer to a program than to a settings file. The remote's firmware is an interpreter and the configuration is what it runs: a button press looks up a short list of instructions and runs it,1 a screen is a small program in a drawing language,2 an infrared code is stored as the timings of a lamp blinking,3 and the state of every device, whether it is on and which input it is set to, is a numbered variable those instructions read and write.4 So the firmware is the authority on what a field means, and most of these pages were found by reading the code that consumes each field.
It is one format across every remote from the Harmony 880 on that has been read, six architectures: each family marks its configuration with four letters of its own, and behind them the layout is the same.56 Where a fact holds for fewer architectures than that, the page says which.
EZHex header XML, read by the host software and never written to the remote
container header cookie, end address, pointer count, the section table
base slot 0 the name tree, the one 0xFEED ... 0xBEEF frame in the container
base slot 1 up to seven bytes stating the architecture
... the other sections, unframed, each reached through the table
checksum and end marker
How to read these pages¶
- A section is named by its base slot, a number from 0 to 19 that means the same section on every architecture; the container says how each architecture's own slot numbers map onto it.
- Addresses are flash addresses, little endian, three bytes wide inside the container, and a container is built for the place in flash it will occupy.7
- Every fact carries a footnote saying what kind of evidence it rests on: read in the firmware, measured on a unit, measured in configurations (counted over compiled configuration files), stated by Logitech, or not checked. The footnote links to the argument, as the reference's introduction describes.
- Logitech's own compiler decides much of what is in a file that the remote does not demand; that is the layout, kept apart from what the format requires.
Pages¶
From the outside in:
- The EZHex wrapper: the file a host receives, and the header that says which remote it is for.
- The container: the header, the cookies, the section table, the checksum, the pointer arrays and the slot map of each architecture.
- Header records: base slots 0, 1 and 3, the names, the architecture and the build time.
- Modes and keys: base slots 6, 8, 9 and 17, tagged lists and the key table.
- Activities and devices: which key starts which activity, which devices a configuration drives, and the structures an activity is built from.
- Actions: base slot 10 and the action list language.
- State: base slots 2, 4, 12, 13, 14, 15 and 16.
- Screens: the screen language, pictures, fonts and text.
- Infrared records: base slot 5.
- Layout: how Logitech's compiler places and orders a container.
- Relocation: what growing a section moves.
The base slots¶
Every one of the twenty base slots is accounted for. Slots 0 and 1 are header records the host reads, slots 2 to 17 are sixteen sections the firmware reads, and 18 and 19 are NULL in every container of the four architectures that share the base layout.89 Each section was named by finding the firmware code that consumes it: the firmware copies each pointer into a variable of the subsystem that uses it, so the code that reads that variable says what the section is for. Every slot from 2 to 19 has a located consumer on the Harmony 700, the 600 and the One.410 On the Harmony 880 and 885 one routine seeks a section by its slot, with a literal at each of its 22 calls, and those calls name base slots 2 to 17 and nothing else.30
| slot | what it is | page | evidence |
|---|---|---|---|
| 0 | the name tree: a 0xFEED framed tree of names, which say what each state variable is for and which device it belongs to |
header records | 11 |
| 1 | the architecture record: up to seven bytes stating the architecture and the model, the only place a configuration states either | header records | 12 |
| 2 | the log area: three numbers reserving a region of flash above the configuration that the firmware appends to and never erases | state | 9 |
| 3 | the build timestamp, which the firmware measures the configuration's age from | header records | 13, 14 |
| 4 | the firmware event map: thirty events, each naming a mode | state | 15 |
| 5 | the infrared database: one group per device, then records | infrared records | 3 |
| 6 | the mode table: a mode carries a screen program and an array of pages, each with a tagged list | modes and keys | 16 |
| 7 | the font table, indexed by opcode 16 of the screen language | screens | 2, 17 |
| 8 | the screen keys' bindings: one leading action list, then every mode page's list | modes and keys | 18 |
| 9 | the key map table: lists of button bindings, pushed onto a key lookup stack when a mode is entered and removed when it is left | modes and keys | 19, 20 |
| 10 | the action list table | actions | 21, 1 |
| 11 | the screen program table: programs in the screen language | screens | 2 |
| 12 | the timer table: wait, then queue one instruction | state | 22 |
| 13 | the state variable table: a range per variable, and transitions carrying one instruction; its first variables are the firmware's own, the clock among them | state | 4, 14 |
| 14 | the state value map: what a state variable's value means, indexed by opcode 0x72 |
state | 19 |
| 15 | the parameter block: numbered groups of 16 bit constants, every length checked by the firmware | state | 23 |
| 16 | the number sender: how a device is sent a number one digit at a time, for favourite channels | state | 19, 24 |
| 17 | the touch screen hit map on the Harmony One, indexed by a mode page's lead byte; elsewhere it names where the picture bank starts. The Harmony 880 and 885's firmware reads it as a digit entry table, empty in every configuration read |
modes and keys | 25, 26, 30 |
| 18, 19 | NULL | the container | 8 |
Most of a configuration's bytes are pictures, in one array from the end of the named sections to the checksum, with no table and no count of its own: screens.27 And six of the sections above are arrays of three byte pointers into the rest, the container.28
Every byte of a configuration belongs to a known structure. On eighteen of the nineteen containers of the corpus no byte is left unclaimed and none is claimed twice; the nineteenth, the Harmony 525's safe mode container, has structures left rather than stray bytes.29 The last bytes to be placed were a screen program's terminator, a section's zero tail and an empty mode record's wide form, each on the page of its structure.29
-
Read in the firmware. Section 34 ↩↩
-
Read in the firmware. Section 40 ↩↩↩
-
Measured in configurations. Section 32 ↩↩
-
Read in the firmware. Section 35 ↩↩↩
-
Measured in configurations. Section 14 ↩
-
Measured in configurations. Section 194 ↩
-
Measured in configurations. Section 20 ↩↩
-
Read in the firmware. Section 47 ↩↩
-
Read in the firmware. Section 38 ↩
-
Measured in configurations. Section 77 ↩
-
Measured in configurations. Section 15 ↩
-
Measured in configurations. Section 21 ↩
-
Read in the firmware. Section 138 ↩↩
-
Read in the firmware. Section 36 ↩
-
Read in the firmware. Section 37 ↩
-
Measured in configurations. Section 46 ↩
-
Measured in configurations. Section 27 ↩
-
Read in the firmware. Section 39 ↩↩↩
-
Read in the firmware. Section 176 ↩
-
Measured in configurations. Section 17 ↩
-
Read in the firmware. Section 43 ↩
-
Read in the firmware. Section 44 ↩
-
Measured in configurations. Section 154 ↩
-
Read in the firmware. Section 45 ↩
-
Measured in configurations. Section 62 ↩
-
Measured in configurations. Section 55 ↩
-
Measured in configurations. Section 16 ↩
-
Measured in configurations. Section 84 ↩↩