// ES-range (Ethernet-to-Serial) — complete reference template, all keys explained. // // Values shown are the FACTORY DEFAULTS where the firmware defines one // (verified against Brainboxes.ES.Firmware @ master, E2Sv2 codebase); // otherwise a typical value captured from a live ES-522, marked "typical". // // Template semantics: a null field or omitted section means "don't touch". // This file is documentation — the CLI's `template apply` parses strict JSON, // so strip the comments (or copy the shape) before feeding it to the tool. // Ranges cited are what the DEVICE FIRMWARE enforces; bb-eco may guard more // tightly where noted. { // ---- Envelope (metadata; suppressed from `bb-eco config` output) ---- "version": 1, // Template schema version. Only 1 exists. "family": "ES", // "ED" | "ES" | "BB" | null (any). Apply refuses a family mismatch. "compatibleModels": ["ES-522"], // Optional allow-list; null = any model of the family. "description": "Reference template — every ES key with defaults and ranges", "createdAt": "2026-08-13T00:00:00Z", // ---- identity: READ-ONLY snapshot (export artifact) ---- // Never applied by TemplateApplicator, never compared by DriftDetector. "identity": { "mac": "00:0A:4F:05:28:DB", // Read-only. "ip": "192.168.2.97", // Read-only (IP at export time). "model": "ES-522", // Read-only. "modelVariant": null, // Read-only. "firmwareVersion": "4.69", // Read-only. "firmwareType": null, // Read-only (ED concept; null on ES). "firmwareDate": "07/10/2015" // Read-only. }, // ---- network (network.cgi; applied LAST — can drop the connection) ---- "network": { "dhcp": true, // true = DHCP (wire: any non-zero usedhcp), false = static. // Static requires staticIp+subnet+gateway; the applicator // fills omissions from the device's current config. "staticIp": null, // Dotted quad. Device masks each octet & 0xFF — no validation. "subnet": null, // Dotted quad. "gateway": null, // Dotted quad. 0.0.0.0 = no gateway. "dns": null, // Not supported by ES firmware at all — always null here. "webPort": null, // wport.cgi: 1–65535, rejected if the TCP port is already in // use by another service on the device. Change = device reset. // Factory: 80. "upnp": true // wport.cgi "Upnp": true/false (wire 1/0). MANDATORY companion // of webPort on the wire — always sent, filled from the // device's devinfo when the template is silent. // UPnP-only change applies live (no reset). Factory: true. }, // ---- device (dev.cgi) ---- "device": { "name": "Brainboxes ES-522", // devname. ES firmware truncates at 40 chars (DEV_NAME_LEN=40), // BUT bb-eco enforces ≤10 family-wide because the device web UI // caps at 10 and overlong writes wedge ED units. Factory: // "Brainboxes ". Note: ES dev.cgi has NO loc param. "location": null, // Not supported by ES firmware — always null here. "checkConnectivity": false // READ-ONLY (no CGI write path). }, // ---- security (security.cgi — registered and active on ES) ---- // The firmware demands ALL non-checkbox params in one request and stores // whatever arrives (an empty password param CLEARS the password), so bb-eco // read-modify-writes: null fields are filled from the device's current // values, identical state is skipped, masked passwords abort with an error. // NOTE: the device starts requiring authentication the moment a USERNAME is // non-empty (the password may be blank). Once credentials are set, manage // security settings via the device web UI. "security": { "adminUsername": "", // ≤20 chars (USER_NAME_LEN). Empty = no admin account name. "adminPassword": null, // ≤20 chars. Never exported unless IncludePasswords=true. "userUsername": null, // ≤20 chars. "userPassword": null, // ≤20 chars. "adminPasswordSet": false, // READ-ONLY export indicator, not a setting. "userPasswordSet": false, // READ-ONLY export indicator. "adminMacFilterEnabled": null, // Checkbox on the wire ("1" or omitted). "adminMacAddress": "000000000000",// Exactly 12 hex digits, no separators; must differ from every // user-MAC-list entry. 000000000000 = unset. "userMacFilterEnabled": null, // Checkbox semantics. "userMacAddresses": null, // READ-ONLY via templates: managed one-at-a-time by // maclistadd.cgi / maclistmod.cgi (max 32 entries, 12 hex each). "authentication": "Basic", // "Basic" | "Digest" (wire 0 | 1). Factory: Basic. "resetProtection": "Everybody" // "Everybody" | "AdminOnly" (wire 0 | 1). Controls who may // factory-reset/restart AND whether those pages need admin auth. }, // io: ED-only concept (null = don't touch). "io": null, // ---- serialPorts (port.cgi — one compound request per port) ---- // The firmware treats port.cgi as FULL-REPLACE: baud, parity, stopbits, // databits, flow, protocol, timeout, tcpport, trel, rip1-4, rtcpport (and // duplex on non-RS232 hardware) must all be present. The applicator // read-modify-writes from the device's current portinfo, so a template may // set only the fields it cares about. A port with a connected TCP client // rejects config with 503 — disconnect first. "serialPorts": [ { "index": 1, // 1-based port number. Identity — cannot be changed. "portMode": "RS232", // "RS232" | "RS422/485" (wire 0 | 1). Only settable on // switchable hardware; fixed-mode ports ignore it. "overrideAppSettings": false, // true = device settings beat client (RFC2217) settings. // Omitting it on the wire silently clears it — bb-eco always sends it. "baudRate": 115200, // REAL baud in bps (no code table on ES). Firmware range: // 60–1,000,000 (ES52201 hardware: up to 3,000,000); arbitrary // non-standard rates in range are legal. Factory: 115200. "dataBits": 8, // 5–8. Factory: 8. "parity": "None", // "None" | "Odd" | "Even" | "Mark" | "Space" // (wire 1|2|3|4|5). Factory: None. "stopBits": "One", // "One" | "Two" | "OnePointFive" (wire 1|2|3). // 1.5 only on LM3S9B90-based models. Factory: One. "flowControl": "None", // "None" | "CtsRts" | "DtrDsr" | "XonXoff" // (wire 1|2|3|4). Factory: None. CTS/RTS and DTR/DSR require // the port hardware to support those lines — the firmware // rejects unsupported modes with "This port does not support …". "duplex": "None", // "None" | "FullDuplex" | "HalfDuplexAutoGating" (wire 0|1|2). // Only parsed on RS422/485-capable ports; RS232 forces None. "protocol": "TelnetRfc2217Server", // "RawTcp" | "TelnetServer" | "TelnetRfc2217Server" // (wire 0|1|2). Firmware silently rewrites 1 → 2, so // TelnetServer becomes TelnetRfc2217Server on the device. "tcpPort": 9001, // Listening TCP port, 1–65535; 0 and in-use ports rejected. // Factory: 9001 for port 1, 9002 for port 2, … "idleTimeout": 0, // Idle disconnect, seconds, 0–65535. 0 = never. Factory: 0. "fifoEnabled": true, // UART FIFO. Omitting it on the wire silently clears it — // bb-eco always sends it. Changing it resets the device. "tunneling": { // Port-to-port tunnel across the network. "enabled": false, // Wire: "tunneling=1" when true, param OMITTED when false // (the firmware rejects tunneling=0). "isMaster": true, // true = master (initiates), false = slave (wire trel 1 | 0). "remoteIp": "192.168.0.0", // Peer IP (wire rip1..rip4, one octet each). Typical. "remotePort": 9001 // Peer TCP port (wire rtcpport, unvalidated by firmware). } }, { // Second port of an ES-522 — same key semantics as above. "index": 2, "portMode": "RS232", "overrideAppSettings": false, "baudRate": 115200, "dataBits": 8, "parity": "None", "stopBits": "One", "flowControl": "None", "duplex": "None", "protocol": "TelnetRfc2217Server", "tcpPort": 9002, "idleTimeout": 0, "fifoEnabled": true, "tunneling": { "enabled": false, "isMaster": true, "remoteIp": "192.168.0.0", "remotePort": 9002 } } ] }