199. A file based remote states its own filesystem, and that is where its config lives¶
The Harmony 300 and 350 firmware is the only image this project holds for a remote in the file based family, and it carries the filesystem as data: a pool of names, and a table of records giving each name a medium, an offset and a size. So the family's storage layout is firmware derived, which is the standing this project's decision 2 asks for and which nothing about that family had before.
Found by asking what produced the byte 0x0b in the reply a Harmony Touch sent when it refused an
open, section 198. That byte is not an error code and the search was wrong about what it was looking
for: 0x0b is a record size, loaded at 0x12D20 into a multiply against an index and added to a
base of 0x0092A6, which is a table of 11 byte records. Two wrong premises, one useful answer.
The record¶
u8 file id
u16 name pointer, into the pool at 0x00910A
u8 flags
u8 medium, an ASCII letter
u24 offset, little endian
u24 size, little endian
The layout is confirmed by the table's own contents rather than by the code that reads it, which
is the check worth having: /fw/safemode states internal 0x001000 for 0x008000 bytes, and
/fw/normalmode states internal 0x009000, which is the load base this project already derived for
this image independently, section 196, and where the safe mode region ends exactly. Two rows, two
numbers, both already known from elsewhere.
The id is the row index and one id has two rows, which is why the ids read 0, 1, 2, 2, 4 and there
is no 3: /fw/normalmode appears twice, once internal and once external, at the same size. That is the
same resident and copied arrangement arch 9 (Harmony 525) has, section 118, reached here by reading a
table instead of by stranding a remote.
The four media¶
| letter | meaning | files |
|---|---|---|
I |
internal program flash | 12 |
E |
the external medium | 3 |
D |
dynamic: nothing is stored | 7 |
S |
a stream | 1 |
D covers the four directories and also /sys/sysinfo, /cfg/state and /sys/state, which is the
mechanism behind section 198's other surprise: the identity file is generated text, so it has no
offset and no size because there is nothing to have them. S is /ir/ir_cap alone, and a learn
capture being a stream rather than a file is exactly what section 98 measured on the other family from
the opposite end, where the samples are pushed as they arrive.
The row this project wanted¶
/cfg/usercfg is the external medium at 0x020000, 0x040000 bytes. So a Harmony 350 keeps its
configuration in 256 KiB of external flash starting at 128 KiB, and the reason no address appears in
the protocol is that the firmware holds the address and the host names the file. Section 193 said this
family has "no address"; the address exists and the host does not have it, which is a sharper
statement than the one it replaces.
The rest of the map falls out with it, and all of it is internal unless stated:
| region | what |
|---|---|
0x000000 to 0x001000 |
the bootloader, 4 KiB |
0x001000 to 0x009000 |
safe mode, 32 KiB |
0x009000 to 0x01EC00 |
the application, 89088 bytes |
0x01F400 to 0x01F800 |
seven 64 byte records: guid, pid, sku, battery and four flag files |
0x01FFF8 |
config_bits, 8 bytes |
external 0x000000 |
the application again, same size |
external 0x020000 |
/cfg/usercfg, 256 KiB |
The internal total is 128 KiB, which is a part size rather than a coincidence and is the first statement anywhere here of how much internal flash this family's processor has.
What it does not answer¶
Why a Harmony Touch refuses our open, which is what the search set out to find. This table is arch
16 and the Touch is a later generation, so the layout does not transfer and neither does any framing
read off this image. What did turn up on the way is corroboration of the read protocol rather than the
open: 0xFE appears at 0x12A42 as the value a loop compares against, which is the terminator
section 198 records from the templates, so the read's end condition has a firmware source now.
Section 198 | the archive | section 200. Section 199 of the findings archive, which is frozen; the reference holds the current answer. The archive on GitHub.