Protocol Specification
Binary transport reference for the device-side protocol used by Plynx.
Message structure
Every message starts with a fixed 5-byte header, followed by a body where fields are separated by 0x00.
protocol.h
struct BlynkHeader { uint8_t command; uint16_t msg_id; uint16_t length;};- Byte
0: command code. - Bytes
1..2: big-endian message id. - Bytes
3..4: big-endian body length.
Typical command flow
- Board or app opens TCP/SSL connection.
- Client sends login/auth packet.
- Server responds with status code.
- Hardware and app exchange
HARDWARE,APP_SYNC, widget property and ping packets.
Command examples
login.hex
02 00 01 00 20 59 6F 75 72 41 7574 68 54 6F 6B 65 6E 48 65 72 6530 31 32 33 34 35 36 37 38 39 4142 43 44 45 46hardware-write.hex
14 00 02 00 0A 76 77 00 30 00 31Core facts
Command header is always 5 bytes.
Body fields are null-separated.
The same route supports both app traffic and board traffic.
Response codes
200— OK2— ILLEGAL_COMMAND5— NOT_AUTHENTICATED9— INVALID_TOKEN11— DEVICE_NOT_IN_NETWORK13— NO_ACTIVE_DASHBOARD
Packet path
App tap → PlynxConnector actor → 5-byte header + null-separated body → TCP/SSL socket → server → device BLYNK_WRITE() callback. Echo returns on the same socket for app sync.
Where to inspect implementation
PlynxConnector/Protocol/CommandCode.swiftPlynxConnector/Protocol/ResponseCode.swiftPlynxConnector/Events/Event.swift
MCP usage
If you want AI tooling to explain packets or generate firmware, use the MCP snippets from the right rail and wire credentials later in the web dashboard.