Harmony One: USB¶
What a computer can ask a Harmony One over its cable, and what this library lets it do. The command
protocol itself is the USB protocol reference, and the rails are
packages/usb/src/rails.ts; this page states what holds on this architecture and links there for the
rest. How the remote presents itself on the bus, its product id and version block, is the model's,
harmony-one/usb.md.
Identity¶
| field | value | from |
|---|---|---|
| USB product id | 0xC121 | PROFILES in packages/remote/src/read.ts |
| first refused flash top byte | 0x40, so external flash ends at 0x400000 | FLASH_TOP_BYTE_BOUND in packages/usb/src/protocol.ts |
| escape sub commands dispatched | 0x01, 0x02, 0x03 | ESCAPE_SUB_COMMANDS in packages/usb/src/protocol.ts |
Generated from packages/remote and packages/usb by make remote-reference-write. Change the source, not this block.
Commands, as this architecture answers them¶
- Reads:
GET_VERSION, andREAD_FLASHover the external flash and both internal pages. An odd count of internal bytes never terminates and hangs the remote, sopackages/usbrefuses one everywhere12. - The internal offset bound is
0xFFF8in this firmware, where the Harmony 600 and 700's is0xFFC0;packages/usbapplies0xFFC0to both, which is stricter here and so safe3. - Live data memory:
READ_MISCselector 7 answers, and the remote is running its configuration while it does, so the clock ticks and the light band, its saved state and its cached level agree with each other through base slot 154. The battery is selector0x0C5. - The escape dispatches
0x01, which ends a session, and0x02and0x03, which restart; it has no0x056. WRITE_MISCservices eight selectors, four of which do nothing here.0x02drops the cached region descriptors and writes no flash;0x0A, the learn and restart command of other models, does nothing67.- A write is an announce, unanswered data packets and an acknowledged end, in transfers of 3150 bytes38. The remote restarts itself afterwards, because it runs its configuration out of the flash an erase clears910.
- Logitech's classic client reading a Harmony One, captured on the wire, sends what this project's encoder sends, 1312 of 1312 requests, and verifies every byte it writes1112.
- A read failure of the form "expected 0xbf, got 0x14" is the host dropping queued reports, not the remote13.
Write standing¶
| path | open on this architecture | list |
|---|---|---|
| erase and write a configuration block | yes | ARCHITECTURES_WITH_A_WRITE_TARGET |
drop the cached region descriptors, WRITE_MISC 0x02 |
yes | ARCHITECTURES_WITH_AN_INVALIDATE_TARGET |
| restart, the escape's 0x02 | yes | ARCHITECTURES_WITH_A_RESET_TARGET |
write a byte of data memory, WRITE_MISC 0x07 |
yes | ARCHITECTURES_WITH_A_RAM_WRITE_TARGET |
| append to the settings store | no | ARCHITECTURES_WITH_A_SETTINGS_WRITE_TARGET, SETTINGS_WRITE_READ_ON |
| ask safe mode to install the staged firmware | no | ARCHITECTURES_WITH_A_REINSTALL_TARGET, REINSTALL_MAX_IMAGE, STATUS_BYTE_READ_ON_APPLICATION |
Every row also needs HARMONY_ENABLE_WRITES=1, its own named door where it has one, and the unit check on the identity block. Which unit may be written is not in this table and cannot be: an architecture names a kind of remote, and the unit check compares the identity block read off the remote with a record of a permitted unit kept outside this repository.
Generated from packages/usb/src/rails.ts by make remote-reference-write. Change the source, not this block.
A configuration write, the drop and the restart have each been sent to a Harmony One14910.
Not checked¶
- What the firmware serves for an internal read whose offset lies between
0xFFC0and its own bound of0xFFF8, sincepackages/usbnever sends one15. - Whether a byte of data memory has ever been written to a Harmony One through
WRITE_MISCselector0x07, the one open path no archive section records as sent15.
-
Read in the firmware. Section 94 ↩
-
Read in the firmware. Section 96 ↩
-
Read in the firmware. Section 175 ↩↩
-
Measured on a unit. Section 111 ↩
-
Read in the firmware. Section 212 ↩
-
Read in the firmware. Section 97 ↩↩
-
Read in the firmware. Section 246 ↩
-
Read in the firmware. Section 245 ↩
-
Measured on a unit. Section 247 ↩↩
-
Measured on a unit. Section 251 ↩↩
-
Measured on a unit. Section 210 ↩
-
Measured on a unit. Section 211 ↩
-
Measured on a unit. Section 223 ↩
-
Measured on a unit. Section 222 ↩