Harmony Touch: USB¶
The Touch speaks the file protocol, not the command protocol of the Harmony One, 525, 600, 650 and 700: a host opens a named path, reads through a handle and closes it1. The protocol is the file protocol, from Logitech's own specification, and what this generation does with it, its write check and its provisioning, is the platform's usb.md. The Harmony 300 and 350 speak the same family's protocol, their architecture's usb.md, which is where the transport's rails are argued.
Identity on the bus¶
| field | value | from |
|---|---|---|
| USB product id | 0xC12B, file based | FILE_BASED_PRODUCTS in packages/usb/src/transport.ts, and the model's row in REMOTES |
| flash addresses and escape sub commands | none: a file based remote is read by file name, and openHarmony refuses it |
isFileBasedRemote in packages/usb/src/transport.ts |
Generated from packages/usb and REMOTES in packages/silhouettes/bin/remotes.ts by make remote-reference-write. Change the source, not this block.
The product id comes from FILE_BASED_PRODUCTS in packages/usb/src/transport.ts, which lists it as
"Harmony Touch, and the Harmony Ultimate", and the command protocol's profiles hold no entry for it.
| field | value | evidence |
|---|---|---|
| vendor and product id | 046D:C12B, which FILE_BASED_PRODUCTS also names for the Harmony Ultimate |
2 |
bcdDevice |
0x1099, skin 99 |
3 |
| product string | Logitech Harmony Remote, with no firmware version in it, where a Harmony 350 states Harmony Remote 0-1.4.0 |
2 |
/sys/sysinfo |
arch 0x11, 17; skin 0x63, 99; fw_ver 4.15.330; fw_type 0x00; link_packet_length 64; and a serial, among fourteen fields. The identifying values never appear here |
4, 5 |
Telling one Touch from another¶
A Touch has no identity block to read: it refuses /sys/guid at open4. What tells one unit from
another on the cable is the identity file's serial_number, which the remote's native program copies at
start out of the unit's manufacturing record, the unitid key of its mfg partition, at most 63
characters13. When the partition is missing, or its record holds no unitid, the program
states the empty string instead, which is then the same on every such unit, so an empty serial identifies
nothing13. Whether
two units' records can hold the same unitid is not read: the record is written at manufacture, and nothing
on the image makes one9.
The protocol, as far as it was used¶
The packet, how a request and a reply encode their parameters, what a refusal looks like and why one malformed packet silences a session are the file protocol, measured there on a Touch. What is this model's own:
- This library sends the Touch five commands: a bare ping, open, read and close, to read its identity
file4, and the write,
0x03, only into/sys/hlapithrough the request rail below14, one request line a session, byte for byte as Logitech's client wrote the same request in the recorded syncs15. This said "This library has sent the Touch four commands", and only to read, until the request rail answered its first sync. - In every recorded sync, Logitech's client worked through one file,
/sys/hlapi, and sent no request and response command0x08; in the two syncs down it also tried to write/sys/time, and the remote refused that write both times78. Changes made on the remote travel up through the same file: a change of settings went up as aputof the whole settings document. What the exchanges carry is the platform's usb.md78. - Through the charging dock the remote is not detected by a computer; only a direct cable is6.
Paths¶
Nineteen paths were probed and eight open, with the sizes in memory.md4. On this
protocol a path can be an action: /sys/factoryreset and /sys/reboot both open for reading, so a mode of
R says what a handle will be used for and nothing about what the path does4. Read in the remote's
native program, both act on a write and run nothing when opened, the names10;
what any other path does is known only where its handler has been read. That is why INERT_PATHS is an
allow list of paths rather than a check on the mode.
The configuration is not one of them. /cfg/usercfg, the Harmony 300 and 350's configuration path, does
not exist on a Touch, nor do five other spellings4, and Logitech's own template carries the read of a
user configuration commented out1.
What this library does with a Touch¶
| evidence | |
|---|---|
openHarmony refuses it, by product id, and make remotes lists it separately |
2 |
openFileBasedRemote opens it read only: a bare ping, an open for reading, a read and a close, and only for the paths on INERT_PATHS. Two of those twelve answer on a Touch, /sys/sysinfo and /rf/deviceinfo; the other ten are refused at open |
4, 5 |
and one name of the Touch's own beside them, its power source, /tde/powerstate, opened for reading on the Touch's product id alone and never for writing, INERT_PATHS_OF_PRODUCT in packages/usb/src/filepipe.ts and readTouchPowerSource beside it: its open for reading reads the power controller's file and writes nothing to it, the names. The library's answerer reads it before a sync and refuses unless the remote is on usb, the one source its screens take part in a sync on. A unit on usb answered that name and a line feed, four bytes; the other sources are not measured |
12, 11 |
any other path needs HARMONY_FILE_PATH_EXPERIMENT=1, because a path can be an action, except eight that are never opened whatever the flags, NEVER_OPENED_PATHS in packages/usb/src/filepipe.ts: the four names that act on a write, the two that act on an open and the two that take firmware, the names |
4, 10 |
requests to its software go through a rail of their own: openTouchRequestSession in packages/usb/src/touchsession.ts writes request lines into /sys/hlapi behind assertTouchRequestAllowed in packages/usb/src/rails.ts, with HARMONY_ENABLE_WRITES=1 and HARMONY_TOUCH_REQUESTS=1. It opens /sys/hlapi and nothing else for writing, refuses any unit but the one it is meant for, told apart by its serial as above, and carries two reads, the provisioning information and getconfighash, and the four requests of a sync, answering a sync; and behind HARMONY_TOUCH_RECOVERY=1 as well, three recovery requests, the abort of a sync, the delete of every stored document and the restart, recovery; the transport refuses every other request name off the bytes of the line it is about to send, and a recovery name without that flag |
14 |
| no configuration is written as a file: the file write path is the Harmony 300 and 350's, and it refuses a remote whose identity file states any architecture but 16, which a Touch's does not; no request and response command is implemented | 1 |
The last row said no write list in
packages/usb/src/rails.tsnames this model, until the request channel's rail was added there.
So beyond those three the read only route opens nothing on a Touch without the named door5. This said
there was nothing left to read without it with two files read, until the power source's open was read
in the firmware. What the remote asks for during
a sync goes through /sys/hlapi, which is not on INERT_PATHS, so the library reaches it only through the
request rail above, writing a request line and reading its answer14; that rail has answered thirty five
syncs on one unit, answering a sync16.
This said the library "opened it once, behind the named door,
to learn its size, and has never read it", until the rail's first reads.
This page said a sync rides on the request and response command,
0x08, until a recorded sync through Logitech's client sent no0x08at all7.
Not checked¶
- The files
INERT_PATHSpermits and the Touch refuses, beyond their refusal9. - The provisioning session, which none of the recorded syncs ran9.
-
Stated by Logitech, in their client. Section 198 ↩↩↩
-
Measured on a unit. Section 193 ↩↩↩
-
Measured on a unit. Section 195 ↩
-
Measured on a unit. Section 201 ↩↩↩
-
Stated by Logitech, in the manual. The Harmony Touch user guide ↩
-
Chosen by this project. Decision 29 ↩↩↩