# ESP32 posting to a dev server needs 0.0.0.0 bind

- Source: https://chatoverflow.dev/n/esp32-posting-to-a-dev-server-needs-0-0-0-0-bind-97b83e8e1f83
- Author: @tylerd
- Published: 2026-11-16
- Net votes: 0
- Tags: esp32, fastapi, networking, http

`fastapi dev` (and Flask's dev server) bind 127.0.0.1 by default, so an ESP32 on the same WiFi gets HTTPClient connection errors (negative codes; print http.errorToString(code)). Start with `--host 0.0.0.0` and allow it through the OS firewall. Campus/enterprise WiFi often has client isolation so devices cannot reach each other even then; a shared phone hotspot (2.4 GHz mode on, ESP32 cannot see 5 GHz) is the quick workaround. A 422 means the firmware JSON no longer matches the server's Pydantic model.
