Giter Club home page Giter Club logo

Comments (6)

maximkulkin avatar maximkulkin commented on August 30, 2024 1

Implemented new WiFi state monitoring. Should automatically reconnect to known WiFi, exposing reconfiguration interface in meantime.

from esp-wifi-config.

maximkulkin avatar maximkulkin commented on August 30, 2024

Yeah, that make sense, I will look into it.

from esp-wifi-config.

AramVartanyan avatar AramVartanyan commented on August 30, 2024

In some specific circumstances the ESP stops trying to reconnect and the code leads it to AP mode.
It is usually after power outage. (Or also if a network AP repeater is involved and the router is restarted.) The router is not as fast as the ESP at startup. During the "no network" period it goes very fast to AP mode.

While I was trying to understand the mechanism of WiFi-config, I suspected that the real issue is behind the sdk wifi station auto connect function.
But there must be a good solution.

from esp-wifi-config.

AramVartanyan avatar AramVartanyan commented on August 30, 2024

Actually I found out that the auto connect function is still running in the background, and the ESP goes to AP mode.
When the router is ready and the WiFi is available the ESP is getting connected and in the same time still shows in AP mode and the HomeKit server is not started.
Here are some logs:

no Network found, reconnect after 1s
reconnect
scandone
no Network found, reconnect after 1s
reconnect
scandone
scandone
reconnect
scandone
add 0
aid 1
cnt

connected with Network, channel 6
dhcp client start...
ip:172.20.10.11,mask:255.255.255.240,gw:172.20.10.1
scandone
station: 58:b0:35:7f:60:d5 join, AID = 1
wifi_config: http_task: Got 64 incomming data
!!! wifi_config: Unknown endpoint: GET /hotspot-detect.html
wifi_config: http_task: Got 64 incomming data
wifi_config: http_task: Got 3 incomming data
wifi_config: wifi_config_server_on_message_complete: Unknown endpoint
wifi_config: client_send_redirect: Redirecting to http://192.168.4.1/settings
wifi_config: Client disconnected
wifi_config: http_task: Got 64 incomming data
wifi_config: http_task: Got 64 incomming data
wifi_config: http_task: Got 64 incomming data
wifi_config: http_task: Got 64 incomming data
wifi_config: http_task: Got 64 incomming data
wifi_config: http_task: Got 10 incomming data
wifi_config: Client disconnected
wifi_config: http_task: Got 64 incomming data
!!! wifi_config: Unknown endpoint: GET /favicon.ico
...

from esp-wifi-config.

erpayo avatar erpayo commented on August 30, 2024

Hi, my proposed solution:

In wifi_config.c remove the call to sdk_os_timer_disarm in line 620

By calling timer disarm the function wifi_config_sta_connect_timeout_callback is not called again. By removing the call to timer_disarm the function will be called periodically to check if the client connection has been made while the ap mode was on. Once the WiFi client connection to the configured network has been made the ap mode is stopped and the on_wifi_ready() callback is called

from esp-wifi-config.

peros550 avatar peros550 commented on August 30, 2024

Many thanks!!!!!

from esp-wifi-config.

Related Issues (19)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.