esp8266 / Arduino

ESP8266 core for Arduino
GNU Lesser General Public License v2.1
16.04k stars 13.33k forks source link

WiFi Events handler issue #3832

Closed Tareq-Sulaiman closed 4 years ago

Tareq-Sulaiman commented 6 years ago

Hi everyone. I actually have two problems with the WiFi events that are available as in the example at : https://github.com/esp8266/Arduino/blob/master/libraries/ESP8266WiFi/examples/WiFiEvents/WiFiEvents.ino The first problem is that the onSoftAPModeStationConnected handler is being called whenever anyone tries to associate with the access point even if they don't have the password, or they try to connect by accident, the esp8266 will register their device as connected for a while until the authentication fails, it will disconnect that station and call the onSoftAPModeStationDisconnected. So are there any more specific connection events in AP mode (like authentication or IP address acquiring) ?? If not, is that something you are working on or considering working on??

The second problem is with the onSoftAPModeProbeRequestReceived , as the esp8266 is receiving multiple probe requests if a device nearby does a WiFi scan, and I didn't find anything in the 802.11 specifications about repeated probe requests. Is the chip maybe receiving probe requests on channels other than the channel the AP is operating in? I'm not quite sure what is going here but the number of requests picked is not consistent and I found it generally depends on the distance (the further away the station that is sending the request, the lesser they are), also the RSSI is not consistent as well, and there is a difference in the order of 30dB between the requests from the same station!!

Thank you, and your help would be appreciated.

Tareq-Sulaiman commented 6 years ago

Anybody?

tablatronix commented 6 years ago

I see the probes, and they have different RSSIs from both requests printed and the other thing. What do the SDk docs say about these.

Tareq-Sulaiman commented 6 years ago

Unfortunately, I couldn't find any further information about what's going on anywhere. It is also worth mentioning that I tried using some WiFi sniffer sketches available online(they use promiscuous mode), and none of them had this kind of problems. Do you have any idea about the possible cause of such an issue?

tablatronix commented 6 years ago

I guess one could setup another esp to generate beacon frames on demand, and test it, or use wireshark and confirm there are not 2 from router. Maybe the rtos docs mention this.

I have to assume events are coming from the SDK, doubt it would be esp core bug, but worth investigating

d-a-v commented 6 years ago

@Tareq-Sulaiman regarding your first question, a callback with a macaddress could be added and called by the dhcp-server (network layer, not link layer) when an IP address is offered or confirmed to a client.

devyte commented 4 years ago

This isn't a core issue, but rather questions about behavior of SDK functionality. @d-a-v I would close this, except for the last comment from you. What is the current status? if not available, do you intend to pursue?

devyte commented 4 years ago

Closing due to lack of feedback.