struct ?

Hi Guys,

with the help of google i found the code to make an softap for my esp32.
now i want to have some more info like the connected stations.

i found something that might do the trickm but i am complete lost now.

i found this:


struct wifi_sta_list_t

List of stations associated with the ESP32 Soft-AP.

Public Members

wifi_sta_info_t sta[ESP_WIFI_MAX_CONN_NUM]

station list

int num

number of stations in the list (other entries are invalid)


and this:


struct wifi_sta_info_t

Description of STA associated with AP.

Public Members

uint8_t mac[6]

mac address

int8_t rssi

current average rssi of sta connected

uint32_t phy_11b

bit: 0 flag to identify if 11b mode is enabled or not

uint32_t phy_11g

bit: 1 flag to identify if 11g mode is enabled or not

uint32_t phy_11n

bit: 2 flag to identify if 11n mode is enabled or not

uint32_t phy_lr

bit: 3 flag to identify if low rate is enabled or not

uint32_t reserved

bit: 4..31 reserved


How do i use this in my sketc to get the output in the monitoring window ?

That doesn't look like real code. Post a link to where you found it.

sprokkie:
i found this:

struct wifi_sta_list_t

struct wifi_sta_info_t

How do i use this in my sketc to get the output in the monitoring window ?

I think you get this from https://github.com/espressif/esp-idf/blob/master/components/esp32/include/esp_wifi_types.h
This is wrong way.

Try this ESP32 Arduino: Obtaining MAC address of stations connected to soft AP - techtutorialsx