|
@@ -451,6 +451,15 @@ static void wifi_config_ap(void)
|
|
|
uint8_t mac[6];
|
|
|
static char ap_ssid[64];
|
|
|
|
|
|
+ // The default SoftAP MAC is totally useless, so try to
|
|
|
+ // set it to something more sensible...
|
|
|
+ WiFi.macAddress(mac);
|
|
|
+ uint8_t add = !!(mac[0] & 2);
|
|
|
+ mac[0] |= 2; // Set local bit
|
|
|
+ mac[5] += add; // Increment last byte if already local
|
|
|
+ esp_wifi_set_mac(WIFI_IF_AP, mac);
|
|
|
+
|
|
|
+ // Read it back to check what we got...
|
|
|
WiFi.softAPmacAddress(mac);
|
|
|
setvar_mac(status_net_ap_mac, mac);
|
|
|
|