ESP32 MAC Address Example
Introduction
MAC Address stands for Media Access Control Address and it is a hardware unique identifier that identifies each device on a network. MAC Addresses are made up of six groups of two hexadecimal digits, separated by colons, for example: AA:AE:AA:AA:AA:AA. MAC Addresses are assigned by manufacturers and can not be changed, but user can programmatically give a custom MAC Address. However, every time the board resets, it will return to its original MAC Address.
MAC Address -
Step 1: Connect Board to Laptop
Step 2: MAC Address Example Code
Select boar ESP32 DEV Module from Tools >> Boards menu, then select appropriate com port. Upload this program to ESP32.
After uploading the code, open the Serial Monitor at a baud rate of 115200. Press the on-board RESET or EN button.
The MAC Address should be printed in the Serial Monitor
#include <WiFi.h>
void setup(){
Serial.begin(115200);
Serial.print("ESP Board MAC Address: ");
Serial.println(WiFi.macAddress());
}
void loop(){
}