Перейти до змісту

Мережа

У розділі мережі локального інтерфейсу задають Wi-Fi: ім’я мережі, пароль і запасне ім’я. Адреса станції — DHCP або статичні IP, шлюз і маска.

Ethernet є там, де він виведений на корпус. На brd04 це LAN поруч із LTE. Свій модуль Ethernet — cst02, не brd04. На lab01, brd04 і cst02, і на промислових образах цих плат, у Network є картка Ethernet: DHCP або статична адреса.

Адреса сервера — ім’я bbxGrid або IP вузла в локальній мережі. Режим з’єднання один: None (local), bbxGrid, bbxNode або Remote for bbxTron. Його задають перемикачем Connection. Пароль і виданий ключ у bbxGrid і у bbxNode зберігаються окремо: перемикання їх не стирає. Порожнє поле лишає контролер автономним: реле, коди і mesh працюють з цього інтерфейсу. Що з’явиться після адреси: без сервера.

Якщо мережу задали так, що вхід зник, точку доступу знову піднімають командою SOFTAP ON з порту, з BLE або від сусіда в mesh. Політика точки описана на сторінці першого Wi-Fi.

Ззовні локальної мережі той самий інтерфейс відкривають посиланням remote: віддалений доступ.

Пошук Node не тримає зайвий приймач оголошень після встановлення зв'язку із сервером. Ручний пошук вузлів залишається доступним при активному підключенні. Неповне або розширене оголошення не повинно блокувати приймання наступних повідомлень пошуку.

Для WSS контролер зберігає CA та клієнтські сертифікати протягом роботи з’єднання і повторних підключень. Перехід з mTLS на перевірку лише сервера не використовує попередню пару клієнтського сертифіката та ключа. Відсутність CA не перемикає WSS на незахищений WS.

If the shared state/topology sender cannot write a complete WebSocket frame, the controller closes that connection and uses the normal reconnect delay. It does not append a new state or hello part to the incomplete frame. This protects framing; it is not confirmation that a command was executed, and it does not automatically repeat a control command whose result is uncertain.

Дивіться також

For intermittent controller WS disconnects, the server idle-close log includes handler activity/duration, event-loop scheduling delay and the last local ping send result. A successful ping send alone is not proof of a received PONG. Use these fields with controller and broker logs; periodic online indicators can miss brief reconnects. These diagnostics do not extend connection deadlines.

Local JSON response bodies have a bounded transmit budget: up to one second without progress and five seconds for the whole body, including status chunks. Temporary socket-buffer pressure is retried within that budget. A stalled or failed response is closed and remains incomplete; clients must not interpret it as successful delivery or automatically repeat a control action. This body limit does not change authentication or remote TLS connections, and does not include the HTTP header transmission performed by the server library.

The same body-transfer limits now cover the gzip login/admin page. Successful status completion uses the same bounded writer for the final HTTP chunk; the server library still owns the successful connection's lifetime. A reader that makes no progress for one second, or exceeds the five-second body budget, has its HTTP connection closed. The browser may need to reload the page on a very slow link. Partial responses do not trigger an automatic replay of control actions. HTTP header transmission still uses the Arduino WebServer implementation and remains outside this body budget.

Status responses send each HTTP chunk as one framed write to reduce temporary network-buffer pressure. If memory runs out while constructing a status section, the response remains incomplete; a previously received HTTP 200 header alone does not mean the JSON body is valid. Controller diagnostics report both free heap and the largest allocatable block for these failures. Reloading read-only status is separate from repeating a control action with an uncertain result.

The small low-memory WebSocket status follows the same rule as full status: if a frame cannot be written completely, the connection is discarded before a later message can be sent. Reconnection does not prove that any earlier control action executed and does not automatically replay it.

A controller WS disconnect diagnostic includes free heap, largest allocatable block and the last HTTP/background operation with its age. The task error number is context only and can originate from an earlier operation; it is not a definitive disconnect reason. Correlate it with server-side timestamps. These diagnostics do not extend reconnect delays or change TLS verification.

For ESP32 firmware built with Arduino Core 3.0.7, the WS connection probe clears an error left by an earlier socket operation before checking the current socket. This prevents an unrelated HTTP error from being treated as a WS disconnect. Fresh connection errors still trigger normal disconnection and retry; heartbeat and certificate checks are unchanged. A successful WS connection does not make an incomplete HTTP response valid.

The HTTP accept/wait step uses the same Core 3.0.7 compatibility protection: an error left by another socket operation is cleared before the server checks an incoming client. Newly detected socket errors, request parsing, authentication and the existing wait deadlines still use the normal server implementation. The change requires a firmware update; it does not retry a failed control request.