Protocol
For developers: how the phone and the computer talk.
Transport
- WebSocket on TCP port 1978, path
/ws. - Discovery over Bonjour, service
_remotepc._tcp, with TXT recordsproto=1,os,verandid. - Protocol version 1.
Messages
Control messages are JSON text frames with a t field. Commands that want confirmation carry an id and are answered with ack or nack.
Pointer movement and scrolling are compact binary frames, so the cursor never waits behind a JSON message:
| Byte | Direction | Payload |
|---|---|---|
0x01 | phone → computer | move: two signed 16-bit deltas |
0x02 | phone → computer | scroll: two signed 16-bit deltas |
0x04 | computer → phone | live screen tiles |
0x05 | computer → phone | cursor position |
From the phone: hello, pair_request, click, button, key_text, key_combo, media, power, ping, clip_get, clip_set, clip_set_image, clip_watch, apps_list, macro_run, screen_watch.
From the computer: welcome (with its capabilities, system, version and volume), approval_pending, pair_required, pair_ok, pair_fail, ack, nack, pong, focus, volume, apps, clipboard, macro_progress, screen_status, error.
Pairing
An unknown phone gets approval_pending while the computer asks; then pair_ok with a token, or pair_required for the code. The token is sent in hello on every later connection.