Short answer

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.
  • 2.4 GHz only on classic ESP32. A 5 GHz-only SSID will not appear as a working join.
  • If RSSI is weak at the antenna keep-out, you get associate-and-drop, not a stable IP. That is a PCB and enclosure problem.
  • After Station works, battery products still need power-save and a provision path. Getting an IP on the bench is not the same as shipping.

中文

短答

ESP32 连上 Wi-Fi 却一直拿不到 IP,看哪?

  • Station 需要路由器发 DHCP。手机热点若有门户认证,会显示已关联但没有能用的 IP。
  • 经典 ESP32 只有 2.4 GHz。纯 5 GHz 的 SSID 连不上。
  • 天线净空不够、RSSI 很差时,常见是关联了又掉,不是稳定拿到 IP。这是结构和 PCB 问题。
  • Station 通了之后,电池产品还要做省电和配网。台上拿到 IP 不等于能出货。