Measured baseline
The protocol baseline was measured against an LG OLED C8 from 2018 running webOS 4.x. The product direction changed after testing showed that general remote control worked reliably while arbitrary text input did not work in every TV app.
| Primary API | LG webOS SSAP over secure WebSocket |
|---|---|
| Pointer input | Separate one-way secure WebSocket with line-delimited frames |
| Power off | SSAP system/turnOff |
| Power on | Wake-on-LAN magic packet using a previously saved interface MAC |
Discovery, trust, and pairing
Discovery locates awake TVs on the local network. The app connects to the secure SSAP endpoint, presents the permission manifest, and waits for approval on the TV. The returned client key is stored through an Android Keystore-backed implementation and reused with the same permission manifest.
- The TV certificate is self-signed, so the design uses first-use fingerprint trust rather than a public CA chain.
- The pairing state machine distinguishes first approval, key reuse, rejection, and reconnect.
- The client key is authorization material; it is not included in diagnostics or UI text.
- An IP address can change under DHCP, so saved device identity includes stronger local evidence.
Control channels and read-back
SSAP requests cover volume, mute, channel information, app launch, power, and subscriptions. Pointer movement, click, scroll, and remote-button frames use the pointer socket, which returns no command acknowledgement.
Send success is not state success. Where webOS exposes a query or subscription, the app reads back volume, channel, power, or foreground-app state. Pointer-only commands cannot offer the same proof.
Movement is accumulated and coalesced before pointer frames are emitted. Gesture handling is a deterministic state machine for move, tap, two-finger scroll, and flick, allowing tests to use a virtual clock rather than physical timing.
Power round trip
An awake TV can be turned off through SSAP. A deeply sleeping TV closes SSAP and may stop answering discovery, so it cannot provide its MAC at wake time. The app saves the active wired or Wi-Fi MAC while the TV is awake and sends a WoL magic packet to wake it later.
- The TV setting that allows mobile power-on must be enabled.
- The MAC must match the interface actually used by the TV.
- An open SSAP port during active standby is not, by itself, proof that the panel is on.
- After a command, power and connection state are reconciled instead of inferred from one socket event.
Verification and known limits
The code separates pure core state machines from Android transport adapters and includes a fake-TV harness, virtual scheduler, SSAP codec tests, pairing and transport tests, pointer and gesture tests, WoL packet tests, UI tests, and measured-device probes.
- webOS behavior varies by model year, firmware, region, and active app.
- Text insertion works only when the foreground TV app participates in the webOS IME contract.
- Some overlay actions have no reliable read-back and remain capability questions.
- Deep standby removes discovery; wake requires identity saved earlier.