-->
Page 5 of 7

Re: SoftAP - getting a list of connected clients

PostPosted: Tue Mar 15, 2016 12:09 pm
by piersfinlayson
Phil colbert wrote:Yes I know, is the SDK released or open source, obviously a bug somewhere :(

Would like to have a look :)


No it's closed source. You'll need to raise this with espressif on their site: http://bbs.espressif.com/.

Re: SoftAP - getting a list of connected clients

PostPosted: Wed Mar 16, 2016 1:19 pm
by dana
Phil colbert wrote:This code nearly works for me.....

If theres only one station connected then stat_info comes back as null...

If theres more than one it comes back with the info, any ideas ?


I suspect that "wifi_softap_get_station_info" is updated a short time after "wifi_softap_get_station_num".

So that if you call "wifi_softap_get_station_info" immediately after "wifi_softap_get_station_num", you don't get the correct results because whatever internal connection table hasn't been updated yet.

Perhaps "wifi_softap_get_station_num" is updated immediately after connection, but "wifi_softap_get_station_info" isn't updated until after the IP address, subnet mask, etc. is sent to the client a fraction of a second or so later.

I added a 1 second delay between the call to "wifi_softap_get_station_num" and "wifi_softap_get_station_info" and I get the correct results. I know it's kind of hackish, but maybe someone has a more elegant solution.

Re: SoftAP - getting a list of connected clients

PostPosted: Fri Mar 18, 2016 12:56 pm
by Phil colbert
Hi

I think your are quite correct, I have checked this and yes it happens later on.

Totally useless for me as I am dealing with streaming data coming and and need to handle that before the tiny buffer overflows..

Will raise it as a bug when I have time

Thanks

Re: SoftAP - getting a list of connected clients

PostPosted: Sat Sep 03, 2016 4:27 pm
by gamecompiler
Maybe i found sth usefull in the Source files:

WiFi.softAPgetStationNum() returns the number of connected stations/clients to SoftAP.

Greetings,
gamecompiler