Reach a server

HTTP Server local page

Serve a page on the device to change settings. Common for small-batch debug.

Reach a server Page on the device ESP32 Wi-Fi parts

Official path: examples/protocols/http_server/simple

01 Overview

Runs HTTP on a connected device. Fits LAN config pages.

  • Use when: engineer debug, local switches, provisioning portal.
  • Skip when: public internet without auth/TLS.

02 Hardware

  • No extra parts. Station or SoftAP must already work.
  • Several browsers need RAM per connection.

03 Software flow

1. Wait for an IP.

2. Start esp_http_server and register URI handlers.

3. Official demo returns simple text/HTML. Products add forms and auth.

4. Persist settings in NVS, not only RAM.

04 Core points

  • A LAN page is not a cloud API.
  • Do not ship debug pages on the public internet.
  • Custom work: portal, auth, NVS binding.

中文

连上服务器

HTTP Server 本地网页

设备开网页改参数。小批量调试和本地控制常用。

连上服务器 设备上的网页 ESP32 Wi-Fi parts

官方路径: examples/protocols/http_server/simple

01 项目概述

在已联网的设备上开 HTTP 服务。适合局域网配置页。

  • 适用: 工程师调试、本地开关、配网门户。
  • 不适用: 公网远程(缺鉴权与 TLS 时不要暴露)。

02 项目硬件描述

  • 无额外器件。需要 Station 或 SoftAP 先通。
  • 若同时服务多个浏览器,RAM 要按连接数留。

03 项目软件流程描述

1. 先拿到 IP。

2. 启动 esp_http_server,注册 URI 处理。

3. 官方返回简单文本/HTML。产品要加表单、鉴权、CSRF 意识。

4. 量产参数应写入 NVS,而不是只改内存。

04 项目核心点

  • 局域网网页 ≠ 云 API。
  • 不要把调试页留在公网固件里。
  • 可定制: 配置门户、权限、与 NVS 绑定。