76. A Harmony 525 on the bench: two address spaces, a seven byte version block, and arch 9 firmware¶
A Harmony 525 was connected on 8 August 2026, which made architecture 9 the third this project has
hardware for. docs/memory-map-525.md exists so that session was a test rather than a description:
every number in it was published before the remote arrived. Eight of the nine predictions hold
exactly. The ninth is wrong and it is the interesting one, and two things nobody had predicted at
all were what actually stood between us and a config read.
The identity, predicted against measured¶
Enumeration first, opening nothing:
| predicted | measured | |
|---|---|---|
idProduct |
0xC111 |
0xC111 |
bcdDevice |
0x0916 |
0x0916 |
Both hold, so the bcdDevice rule really is generation specific. The Harmony One enumerates
0x1054 and the 600 0x1071, a constant 0x10 followed by the skin in BCD; read that way a 525
would be 0x1022 and it is not. Read as plain hex it is protocol 9 and skin 22, both exact.
Section 57's corroboration of field 5 through bcdDevice therefore holds for the MyHarmony era and
must not be carried back.
Then GET_VERSION, which answered 27 30 25 12 ff 90 16 09:
| field | predicted | measured | |
|---|---|---|---|
| 0 | 0x30 |
0x30 |
firmware 3.0, and the USB vendor string says Harmony Remote 0-3.0.0 |
| 1 | 0x25 |
0x25 |
BOARD 2.5.0 |
| 2 | 0x12 |
0x12 |
flash device id |
| 3 | 0xFF |
0xFF |
flash manufacturer id, so a 25F040, 512 KiB |
| 4 | 0x90 |
0x90 |
PROTOCOL 9 in the high nibble |
| 5 | 0x16 |
0x16 |
SKIN 22 |
| 6 | 0x0C |
0x09 |
the one miss |
Field 4 is the claim that mattered and it holds. Section 57 read its high nibble as the
architecture from four images spanning two architectures. A third architecture is a real test of
that and 0x90 is the whole claim in one byte.
Field 6 is not a constant. It is 0x0C on arch 12 and arch 14, which is why it was predicted
here and why it sits in the open list as "a compiled in 0x0C with no reading". On this remote it
is 0x09, which is the architecture and the protocol. concordance reads that byte as the protocol
when the block is seven long and takes the protocol from the architecture nibble when it is longer,
so on arch 12 and arch 14 nothing reads it and a stale 0x0C would never show. That is a
hypothesis rather than a reading: it would make the 600 claim protocol 12 where its own config
header says 14. What is established is only that the byte is not the same everywhere.
The version block is seven fields, and the nibble says so¶
The reply is 0x27: high nibble 0x2 for a version response, low nibble 7. Every one of those
seven bytes is identified above. On arch 12 and arch 14 the reply is 0x28 while the firmware
copies twelve, which is why this project read the nibble as decoration and matched the whole byte.
concordance reads it as a length and branches on it, accepting 5, 7 or 8 and giving up the architecture and the skin below 6 and the protocol below 7. Both readings are now needed: the nibble is a count where it is small and a floor at 8, where the arch 12 firmware settles the real figure at twelve by copying twelve bytes.
Matching the whole byte meant a perfectly good answer from a working remote decoded as an anonymous data reply, and then a second check refused it for not being twelve bytes long. A remote that answers correctly and is refused twice by the host is the worst shape a protocol bug can take, because every symptom points at the device.
Two address spaces, a megabyte apart¶
This is what actually blocked the read, and nothing had predicted it.
READ_FLASH on this remote is silent at 0x010000, 0x020000 and 0x030000, and answers at
0x800000, 0x810000, 0x820000 and 0x870000. At 0x820000 the first bytes are
41 48 43 4d, which is AHCM. So the config is exactly where concordance's architecture table
says it is, config_base = 0x820000, with flash_base = 0x800000 and firmware_base = 0x810000.
And the container's own pointers are 0x02xxxx. Its end_addr is 0x0002C7F7, section slot 0
points at 0x029609, and the recovered base is 0x020000. Computing the length as
end_addr - config_base gives minus 8337413, which is how this was found rather than assumed.
So both numbers are right and they are different numbers:
| value | what uses it | |
|---|---|---|
| read base | 0x820000 |
the address a READ_FLASH command must name |
| container base | 0x020000 |
what every pointer inside the file counts from |
docs/memory-map-525.md and packages/corpus/src/read.ts both said bit 23 "reads as a flag rather
than an address bit", from concordance's table disagreeing with the config's own arithmetic. It is
the opposite: bit 23 is part of the command's address and absent from the config's. The reasoning
that produced the wrong version was sound and one sided, since only the config was available.
The device refuses by saying nothing. On arch 12 and arch 14 the firmware's validator at
0x13DFE rejects a top address byte outside < 0x20, 0xFE and 0xFF. Whatever arch 9's rule
is, a rejected address produces silence rather than an error, so a wrong base looks like a broken
cable. That is worth stating because the entry in read.ts was written with a comment promising
the failure would be loud, on the grounds that parseHeader refuses anything that is not a
container. It never got that far.
The firmware, which was the prize¶
0x800000 and 0x810000 both hold an image beginning xx xx ff ff 48 47 00 70, where 48 47 is
HG and the first two bytes differ between them, so they are plausibly a checksum. 0x810000 is
the larger, 37912 of 65536 bytes not 0x00 or 0xFF against 8826 at 0x800000.
loadaddr.find_base puts the 0x810000 image at program 0x1000, scoring 717 boundary hits
against 326 for base 0 and 153 for the next candidate, which is the wide separation that module
asks for. Three independent things agree with it:
- Disassembled at
0x1000the first eight bytes are the header and0x1008isGOTO 0x07FB4, with ordinary code from0x1010:MOVLB,CLRF,BTFSS,BRA,BCF LATE,2. 0x07FB4fits inside 32 KiB, which is the program memory of thePIC18LF4550concordance names for this architecture.- A read of internal program memory at
0x000000returns7b ef 07 f0, aGOTO 0x0EF6. That is the reset vector, and it lands below0x1000, so the region under the application image is a bootloader and the application starts exactly wherefind_baseput it.
So the layout is: bootloader in internal flash below 0x1000, the application above it, its update
image in external flash at 0x810000, a second image at 0x800000, and the config at 0x820000.
Internal program memory is at plain low addresses here, not behind the 0xFE and 0xFF window
arch 12 and arch 14 use. This project's cap on internal reads keys on those two top bytes, so on
arch 9 it protected nothing until the region rule learned about the architecture. The cap is now
applied to top byte 0x00 on arch 9 for the same reason it exists elsewhere: an arch 12 remote
leaves the USB bus when such a read ends in a one byte chunk, and nothing establishes that this one
does not.
The internal read, and what it confirms¶
Read deliberately, 529 commands of 62 bytes each, one chunk per command, with a
GET_VERSION health check every 64 reads. No restart, no missed health check, and the remote
answered normally afterwards. That is the arch 12 hazard not reproducing here rather than being
absent, since a single chunk read is what the cap was always meant to permit.
The result is a closure that could not be had any other way. Internal program memory
0x1000 to 0x7FFF and the external image at 0x810000 are byte identical over all 28672
bytes. So the external image is the running application rather than a version of it, and
find_base's answer of 0x1000 is confirmed by the device: a wrong base would have misaligned the
comparison everywhere instead of matching exactly.
Three more things fall out of it:
- The image frames itself.
HGat+4andGHat0x6FFE, so it spans0x7000bytes, which is program0x1000to0x7FFFinclusive. Both external images carry the same frame. - The bootloader is below it,
0x0000to0x0FFF, 3781 of 4096 bytes used. The reset vector at0x0000isGOTO 0x0EF6, inside itself; the high priority interrupt vector at0x0008isGOTO 0x1400, inside the application. So it hands interrupts to the application, and it exists in no external image, which makes it the one part of this remote's code that only the device has. 0x800000is a different firmware, not a copy: 27994 of 28672 bytes differ from the running one, andfind_baseputs it at0x1000too, 182 boundary hits of 183. Safe mode, by position and by the company it keeps.
A second container, in the firmware region¶
Checking what else was in the 0x810000 region found AHCM at offset 0x8000, so flash
0x818000: a safe mode config, 15342 bytes, twenty slots, marker CMAH, architecture 9, and
its trailer checksum recomputes. The first arch 9 safe mode container, and the arch 12 and arch 14
pattern repeating on a third architecture.
Its base is 0x018000, which is 0x800000 below the address READ_FLASH names, exactly as the
user config's 0x020000 is below 0x820000. Two containers, one offset, which is the two
address space finding checking itself on a sample that did not exist when it was made.
It is not in the corpus, and that is deliberate. It contradicts six claims the corpus asserts, and each is a question rather than a count:
| what it contradicts | on this container |
|---|---|
| base slot 1 is seven bytes and slot 2 follows it | slot 2 starts three bytes in, so a seven byte reading overlaps it by four. Every one of the sixteen corpus samples has exactly seven |
| the log area is a region above the config | 0x0F0000 to 0x100000 here, above a 512 KiB flash |
slot 0's frame is a tree under Root |
its first node is named CurrentActivityState_PowerOff_1, and six header bytes differ |
| a font set declares one count per container | four sets declaring 91, 90, 50 and 90, which section 78 confirmed rather than explained away |
| the font header's spare byte is constant per architecture | it is not, here: section 78 read it as the first glyph code |
| the corpus glyph and string totals | both move, which is only a consequence of the above |
Adding it would have turned six properties into six exceptions in one commit, and the honest order is the other way round: re-derive each, then assert against it. An arch 9 firmware exists now, which is what the first two want.
The third is settled, and it was not a fix. The row above says "the root node is named Curr",
which is what the comparison reported, and the reason it reported that is the whole of section 77:
slot 0 was matched against a fixed nine byte prologue, so a container whose first node is not
Root looked like one whose root was renamed. Curr is the first four characters of a state
variable's name. Re-deriving the claim read the section instead, and Root is there, third. Regenerate the file from the flash dump with
gspm.parse(open(dump,'rb').read()[0x8000:]); its checksum is in reference/checksums.md.
The config, and what it settles¶
51195 bytes read over USB with this project's own code and filed in the lab. Every container
prediction holds: AHCM and MCHA, marker CMAH, format 0x1400, 20 pointer slots, architecture
9 in slot 1. The trailer checksum recomputes over all 51195 bytes, which is the closure on the whole
read: a transfer that drifted anywhere would fail it.
The byte accounting reads 77.1% and the emitter round trips it byte for byte. That is the corpus's second arch 9 sample, which is where this project's verification standard starts, and the first that did not come from a stranger.
What it rules out¶
That the USB command layer is MyHarmony era only. GET_VERSION and READ_FLASH both work on an
EasyZapper era remote from this project's own host code, with the same command bytes and the same
length nibble mapping concordance uses.
That packages/usb was ready for a third architecture. Three things had to change and all three
were arch 12 assumptions written as universals: the version reply matched as a whole byte, the
version length fixed at twelve, and the region validator hard coded.
That the first exchange after connecting is reliable. The very first GET_VERSION of the session
returned nothing within three polls of two seconds; every exchange since has answered in 2 ms,
four in a row identical. libconcord sends COMMAND_RESET_USB before anything else to every non
Z-Wave remote with the comment that otherwise "the first communication attempt fails", and
readConfig already retries once on silence, which is why it never saw this. No reset was sent
here and none is proposed, since the rails forbid one and a single retry covers it.
What would falsify it¶
A second 525 whose version block is not seven fields, or whose field 6 is not 0x09. An arch 9
remote that answers a READ_FLASH below 0x800000 other than in internal program memory. A
container on arch 9 whose own pointers count from 0x820000. An 0x810000 image that does not
disassemble at 0x1000.
Where it lands¶
packages/usb/src/protocol.ts:VERSION_REPLY_CODE,VERSION_NIBBLE_LONG,VERSION_FIELD_COUNT_MIN, andvalidateRegionBytetaking an architecture.packages/usb/src/remote.ts:RemoteOptions.architecture, andgetVersionaccepting a block that is not twelve bytes.packages/corpus/src/read.ts: the 525 profile, no longerunverified, andcontainerBase.packages/usb/test/protocol.test.tsandpackages/corpus/test/read.test.ts.docs/memory-map-525.md, rewritten from predictions to measurements.reference/checksums.md: the config, the two flash images, the internal memory and the safe mode container.packages/usb/src/remote.ts: the one chunk cap moved intoreadFlash, so it covers arch 9's internal region as well as the0xFEwindow it was written for.
Section 75 | the archive | section 77. Section 76 of the findings archive, which is frozen; the reference holds the current answer. The archive on GitHub.