-->
Page 1 of 1

recognize clients leaving range of ESP

PostPosted: Mon Sep 10, 2018 11:13 am
by cmstephan
Hi,
I managed to get the list of connected clients to my AP using wifi_softap_get_station_info().
The problem I have is that the AP does not recognize if a client got out of range.
wifi_softap_get_station_info() still reports the client.

This behaviour is mentioned in some other discussions but I could not find an answer so far.
Is there a way to force wifi_softap_get_station_info to update or any other way to recognize a client leaving range - or at least it is not in range anymore?

I tried to use the "promiscuous mode" to understand if there are packages floating around in the netwpork, but I had two issues. promiscuous mode was only working in Station Mode - I need AP, and second as long as the client is not communicating i do not get any packages in promiscuous mode.

Any ideas and support appreciated.

Cheers
Christopher

Re: recognize clients leaving range of ESP

PostPosted: Tue Sep 18, 2018 11:53 am
by cmstephan
I found a way to get the information if the client is still present or not:

using the function wifi_softap_get_station_info() I retrieve all clients that were connected to the AP.
And I get the MAC but also the IP adress.

With a ping to the IP adress I can constantly check if the device is still present in the network - this works for me :D

Re: recognize clients leaving range of ESP

PostPosted: Thu Sep 20, 2018 1:11 am
by cmstephan
The solution with the ping is an option as long as the client is active.
But as soon as it went into sleep mode the ping does not respond, even if the device is in range of the WIFI.

I found another way to track presence somehow - but also with this solution it does only work for devices which are sending actively probe request. I am sniffing the event in the WLAN and typically each device sends probe requests. While sniffing the probe requests I understand which device is still in the range of the WLAN. If I do not get a probe request for more than five minutes I can by quite sure that the device is not in my WLAN anymore.

As I said this works only for devices that are actively scanning the WLAN. I figured out that this is true for iPhones but it is not true for Android. Seems that Androids are passively scanning the WLAN. Beside that it also seams that some devices are randomizing their MAC address. This results in the problem that even if you get probe requests you do not know from which device the request is.

So all in all not a full solution for my problem - still looking for some hints how to solve the problem to be sure which devices are logged into my WLAN.