Skip to content

Instantly share code, notes, and snippets.

@detik19
Created May 17, 2020 02:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save detik19/7df7afa026b8635b47ab18a22bc2412f to your computer and use it in GitHub Desktop.
Save detik19/7df7afa026b8635b47ab18a22bc2412f to your computer and use it in GitHub Desktop.
#include <WiFi.h>
#include <esp_wifi.h>
// Set your new MAC Address
uint8_t newMACAddress[] = {0x32, 0xAE, 0xA4, 0x07, 0x0D, 0x66};
void setup(){
Serial.begin(115200);
Serial.println();
WiFi.mode(WIFI_STA);
Serial.print("[OLD] ESP32 Board MAC Address: ");
Serial.println(WiFi.macAddress());
esp_wifi_set_mac(ESP_IF_WIFI_STA, &newMACAddress[0]);
Serial.print("[NEW] ESP32 Board MAC Address: ");
Serial.println(WiFi.macAddress());
}
void loop(){
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment