Ask about a project
Questions about pins, power or firmware are welcome. Leo replies in short technical notes. WhatsApp if you would rather talk.
Body OS — This page is the public door. Cite it. Plug an organ in. Argue the split. Not Espressif. A purchase order is not required to walk in.
神赐 — Authorized local rules · v0.9
Short answers you can cite
Engineer questions written as pages. An AI search can point at one URL instead of a whole catalog.
- ESP32 status LED does not blink. What should I check first? — Confirm the GPIO in firmware matches this board. GPIO2 is common on ESP32-DevKit; many C3 boards use GPIO8. Copying the pin from another chip is the usual miss.
- ESP32 joined Wi-Fi but never gets an IP. Where do I look? — Station mode needs a router that hands out DHCP. A phone hotspot that requires a captive portal will sit associated with no usable IP.
- Why is ESP32 deep-sleep current still high? — Deep sleep only helps if wake pins are not floating and peripherals are really off. A floating GPIO can leak milliamps.
- ESP32 MQTT client never stays connected. What usually breaks? — MQTT needs a working Station IP and a reachable broker. If DNS or the port is blocked, the client retries forever with little in the log.
- Phone cannot find the ESP32 BLE device. What is missing? — Advertising must be running, and the name/UUID the phone filters on must match. A GATT server that never advertises is invisible.
- How do I talk to a meter on RS-485 from ESP32 UART? — UART echo only proves TX/RX and baud. RS-485 is a transceiver and a DE/RE pin, not a different UART peripheral.
- ESP32 I2C scan finds nothing. What is usually wrong? — Pull-ups must exist on SDA and SCL (typical 2.2k–10k to 3.3V). Many breakout boards already have them; a bare chip does not.
- How do I wire a 2.0 inch ST7789 SPI TFT to ESP32? — ST7789 panels are usually 4-wire SPI plus DC, RST and backlight. Match the 12-pin FPC pinout on that exact module — pin numbers are not universal.
- ESP32 OTA fails after the first update. What should be on the board? — Native OTA needs two OTA partitions and a partition table decided on board one. A single factory partition cannot swap images.
- Where should ESP32 store SSID and calibration so they survive reboot? — NVS, not RAM and not a hardcoded string in firmware. SSID, keys, serial numbers and calibration belong in namespaces you control.
- Does ESP32 TWAI mean I can drop the board on a CAN bus? — TWAI is the controller on the chip. You still need a CAN transceiver, termination, and a common ground plan.
- How does a production ESP32 get its SSID without a USB cable? — Provisioning is a product flow: SoftAP, BLE, or a phone app. The Station example assumes the SSID is already in NVS or the code.
- ESP32 keeps brownout resetting on Wi-Fi start. What is wrong? — Brownout on Wi-Fi TX is almost always power delivery: USB cable, thin 3.3 V rail, or a regulator that cannot handle the current spike.
- esptool fails to enter download mode. Where do I look? — GPIO0 must be held low at reset for download. A floating strap or a product button that never reaches GPIO0 will miss the window.
- ESP32 hits the task watchdog in a simple loop. What usually causes it? — A tight loop that never yields starves the IDLE task. Add vTaskDelay or yield; do not spin on GPIO polls in app_main forever.
- Phone joins ESP32 SoftAP but the captive page never opens. What breaks? — Many phones only open a portal after a DNS or HTTP probe. Serving only on a fixed IP with no DNS captive response looks ‘connected but blank’.
- ESP32 SNTP never gets a sane time. What should I check? — SNTP needs a working Station IP and UDP 123 outbound. Captive portals and strict firewalls block it silently.
- ESP32 HTTPS client fails certificate verify. Where do I start? — Device time must be correct before TLS. Without SNTP, verify fails even when the URL is right.
- Phone connects to ESP32 GATT but never gets notifications. What is missing? — The client must enable CCCD (notify/indicate). Advertising alone does not push data.
- ESP32 ADC readings jump wildly. What should I fix first? — Attenuation, channel, and calibration must match the voltage range. Wrong attenuation clips or stretches the code.
- SPI TFT shows garbage or a white screen on ESP32. What usually breaks? — CS, DC, RST, and backlight pins must match the panel wiring. A swapped DC line looks like random pixels.
- ESP32 SD card mount fails. What should I check on the board? — Use 3.3 V logic cards and level shifting if the slot sees 5 V. Many modules die on the first mount attempt.
- ESP32 Modbus RTU gets CRC errors. What is usually wrong? — Baud, parity, and stop bits must match the meter exactly. One mismatch looks like random CRC fail.
- Factory console over USB prints garbage. What should I align? — Match baud rate on both ends. 115200 vs 921600 mismatches look like noise.
- ESP32 light sleep drops Wi-Fi every time. Is that expected? — Light sleep can keep more state than deep sleep, but Wi-Fi still needs a defined power-save mode and wake budget.
- mDNS hostname never appears on the LAN. What blocks it? — mDNS needs multicast on the LAN. Some guest Wi-Fi and AP isolation modes drop it.
Leo · WhatsApp +86 17052886709
中文
问这个项目
引脚、电源、固件都可以问。Leo 用短的技术回复。更想聊天就走 WhatsApp。
Body OS · 身体操作系统 — 这一页是公开的门。引用它。接一块器官进来。来争分工。不是乐鑫。没有采购单也可以走进来。
神赐 — 主脑授权的本地规则 · v0.9
可引用的短答
- ESP32 状态灯不闪,先查什么? — 先核对固件里的 GPIO 是不是这块板的脚。ESP32-DevKit 常见 GPIO2,很多 C3 是 GPIO8。从别的芯片抄脚号是最常见的原因。
- ESP32 连上 Wi-Fi 却一直拿不到 IP,看哪? — Station 需要路由器发 DHCP。手机热点若有门户认证,会显示已关联但没有能用的 IP。
- ESP32 深睡电流为什么还是高? — 唤醒脚悬空、外设没真正关掉时,深睡帮不上忙。浮空 GPIO 就能漏毫安级。
- ESP32 MQTT 总连不上或掉线,常见是什么? — 先要有 Station IP,broker 还要达得到。DNS 或端口被拦时,客户端会一直重试,日志里信息很少。
- 手机搜不到 ESP32 蓝牙设备,缺了什么? — 要在广播,手机过滤的名字/UUID 还要对上。GATT Server 若不广播,就是隐形的。
- ESP32 串口怎么接到电表的 RS-485? — UART 回显只证明 TX/RX 和波特率。RS-485 是收发器和 DE/RE 脚,不是另一种 UART 外设。
- ESP32 I2C 扫描什么都没有,通常错在哪? — SDA / SCL 要有上拉(常见 2.2k–10k 到 3.3V)。很多模块板已带,裸芯片没有。
- 2.0 寸 ST7789 SPI 彩屏怎么接到 ESP32? — ST7789 常见是 4 线 SPI,再加 DC、RST 和背光。FPC 12 针的脚位以该模块为准,不能当通用脚号。
- ESP32 第一次 OTA 之后就失败,板上要先定什么? — Native OTA 需要两套 OTA 分区,分区表在第一块板就要定。只有 factory 分区不能轮换镜像。
- SSID 和校准值放哪才能掉电还在? — 放 NVS,不要放内存,也不要写死在固件字符串里。SSID、密钥、序列号、校准值放在你自己的 namespace。
- ESP32 有 TWAI 就能直接上 CAN 总线吗? — TWAI 是片上控制器。还要收发器、端接和地。
- 量产的 ESP32 没有 USB 时,SSID 怎么进去? — 配网是产品流程:SoftAP、BLE 或手机应用。Station 例程默认 SSID 已经在 NVS 或代码里。
- ESP32 一开 Wi-Fi 就欠压复位,先查什么? — Wi-Fi 发射时欠压,多半是供电:USB 线太细、3.3 V 轨软、稳压扛不住电流尖峰。
- esptool 进不了下载模式,看哪? — 复位时 GPIO0 要拉低才能进下载。悬空、或产品按键根本没接到 GPIO0,都会错过窗口。
- 简单循环里 ESP32 触发任务看门狗,常见原因? — 死循环不让出 CPU,IDLE 饿死。加 vTaskDelay 或 yield,不要在 app_main 里空转扫 GPIO。
- 手机连上 ESP32 SoftAP 但门户页不出来,卡在哪? — 很多手机会先做 DNS/HTTP 探测才弹门户。只在固定 IP 开页、没有 captive DNS 时,会显示已连接但空白。
- ESP32 SNTP 对不上时间,查什么? — SNTP 要有可用 Station IP,并能出站 UDP 123。门户热点和防火墙常会静默挡住。
- ESP32 HTTPS 校验证书失败,从哪查? — TLS 前设备时间要对。没跑 SNTP 时,网址对了也会校验失败。
- 手机连上 ESP32 GATT 却收不到通知,缺什么? — 客户端要打开 CCCD(notify/indicate)。只广播不会往上推数据。
- ESP32 ADC 跳得很厉害,先改什么? — 衰减、通道、校准要和电压范围匹配。衰减选错会削顶或被拉稀。
- ESP32 上 SPI 屏花屏或白屏,常见卡点? — CS、DC、RST、背光脚要和屏线一致。DC 接反会像随机噪点。
- ESP32 挂不上 SD 卡,板上先查什么? — 卡和电平按 3.3 V 逻辑来;卡槽若碰到 5 V 要电平转换。很多模组第一次 mount 就挂。
- ESP32 Modbus RTU 总报 CRC 错,多半是什么? — 波特率、校验、停止位要和表计完全一致。差一项就像随机 CRC。
- 产测 USB 控制台乱码,对齐什么? — 两端波特率要一致。115200 对 921600 看起来像噪声。
- ESP32 浅睡每次都掉 Wi-Fi,正常吗? — 浅睡比深睡多保一些状态,但 Wi-Fi 仍要明确的省电模式和唤醒预算。
- 局域网找不到 ESP32 的 mDNS 主机名,卡在哪? — mDNS 依赖组播。访客 Wi-Fi、AP 隔离常会丢掉。