Created
May 17, 2020 02:27
-
-
Save tedysaputro/7df7afa026b8635b47ab18a22bc2412f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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