Skip to main content
Associate
June 21, 2024
Question

The Server made with STM32 with ESP8266 is refusing to connect

  • June 21, 2024
  • 1 reply
  • 1160 views

hi im making a project to detact rain and sunlight to give decision to close the curtain refusing the user to change the value of the curtain closed. i am currently using NUCLEO-F411RE board with NodeMCU v3 using the NodeMCU just as middle man to connect them into my home wifi. Currently, the problem is everything seems working fine until securing the connection between STM and wifi router, but when i use my phone or laptop to get connection to the webpage that STM builds, ERR_CONNECTION_REFUSED occurs. I have tested that both board is working fine, i have disconnected all the sensors as i am just testing on the wireless connection. I have attached the main.c file the ESP8266 file and the ringbuffer file so that it might be easier for me to get some help

    1 reply

    February 25, 2026

    Great project idea. Rain and sunlight–based automation is exactly the direction modern smart curtain systems are moving toward.

    The ERR_CONNECTION_REFUSED error usually means the web server isn’t actually listening on the port, or the IP/port you’re accessing doesn’t match what the ESP is serving. I’d double-check that server.begin() is properly executing, confirm the correct local IP from the serial monitor, and make sure you’re calling the right port (for example :80 or :8080). Also verify that the ESP is acting as the actual web server, not just relaying data from the STM.

    We’re seeing strong demand for smart curtain automation in window curtain projects across Dubai and Abu Dhabi, so it’s great to see embedded-level solutions like this being developed. You’re likely just one configuration step away from resolving it.