Page 1 of 1

WiFi Base MAC and STA MAC address definition

Posted: Wed Mar 13, 2019 12:31 pm
by edwardpangct
Step 1: During Smartconfig, iOS/Android app shows my ESP32 MAC is XX:XX:XX:XX:65:0C

Step 2: I called the following API after ESP32 connected to TP-Link AP using STA mode.

esp_efuse_mac_get_default ( ) -> XX:XX:XX:XX:65:0C
esp_wifi_get_mac (WIFI_MODE_NULL) -> XX:XX:XX:XX:65:0C
esp_wifi_get_mac (WIFI_MODE_STA) -> XX:XX:XX:XX:65:0D

Step 3: In TP-Link Router Admin page, DHCP records shows my ESP32 MAC is XX:XX:XX:XX:65:0C

Can anyone tell me the MAC address definition and expectation?
Should BASE MAC be equal to STA MAC address?

I read the topic
Based on esp32/system_api.c function esp_read_mac ( ) should return Base to STA mode. Why esp_wifi_get_mac looks different?

Code: Select all

    if (esp_base_mac_addr_get(efuse_mac) != ESP_OK) {

    switch (type) {
    case ESP_MAC_WIFI_STA:
        memcpy(mac, efuse_mac, 6);