Comments on: Get ESP32/ESP8266 MAC Address and Change It (Arduino IDE) https://randomnerdtutorials.com/get-change-esp32-esp8266-mac-address-arduino/ Learn ESP8266, ESP32, Arduino, and Raspberry Pi Tue, 15 Oct 2024 13:54:38 +0000 hourly 1 https://wordpress.org/?v=6.8.2 By: Martin Boere https://randomnerdtutorials.com/get-change-esp32-esp8266-mac-address-arduino/#comment-972250 Tue, 15 Oct 2024 13:54:38 +0000 https://randomnerdtutorials.com/?p=93413#comment-972250 Hi Sara,

I think you do great Work

I have the Arduino Nano ESP32 for witch I tried to get the MAC Address, It didn’t work with your code so after several tries I changed It a bit.

Now It works and I’m able to get the MAC Address of my Board, below you can find the changes in the Code (Look for Changed).

#include <WiFi.h>
#include <esp_wifi.h>

void readMacAddress(){
uint8_t baseMac[6];
esp_err_t ret = esp_wifi_get_mac(WIFI_IF_STA, baseMac);
if (ret == ESP_OK) {
Serial.printf(“%02x:%02x:%02x:%02x:%02x:%02x\n”,
baseMac[0], baseMac[1], baseMac[2],
baseMac[3], baseMac[4], baseMac[5]);
} else {
Serial.println(“Failed to read MAC address”);
}
}

void setup(){
Serial.begin(9600);

WiFi.mode(WIFI_STA);
//WiFi.STA.begin();
WiFi.begin();   //I got an error on WiFi.STA.begin(); so I changed that to WiFi.begin();
delay(1000);    //Changed
Serial.print(“[DEFAULT] ESP32 Board MAC Address: “);
delay(1000);    //Changed
readMacAddress();
}

void loop(){

}

Best regards,

Martin

]]>
By: David Strickland https://randomnerdtutorials.com/get-change-esp32-esp8266-mac-address-arduino/#comment-921500 Tue, 04 Jun 2024 15:24:39 +0000 https://randomnerdtutorials.com/?p=93413#comment-921500 The code to get MAC address does not work. This works:-
#include <WiFi.h>

void setup(){
Serial.begin(115200);
Serial.print(“\Default ESP32 MAC Address: “);
Serial.println(Network.macAddress());
}

void loop(){
}

me_no_dev expressif / arduino esp32 github comment April 14

]]>
By: Shahryar https://randomnerdtutorials.com/get-change-esp32-esp8266-mac-address-arduino/#comment-913491 Tue, 07 May 2024 18:33:40 +0000 https://randomnerdtutorials.com/?p=93413#comment-913491 In reply to Sara Santos.

Sorry for bothering @Sara santos
I’m implementing ESP-NOW for my project.
I want to send 4 analog inputs simultaneously to slave board, does ESP32 master is capable of transmitting this rate of data? According to the 250Mb/s limitation.

Best wishes

]]>
By: Shahryar https://randomnerdtutorials.com/get-change-esp32-esp8266-mac-address-arduino/#comment-913161 Mon, 06 May 2024 13:12:18 +0000 https://randomnerdtutorials.com/?p=93413#comment-913161 ]]> Tnx sara
I did it and worked. 👌🏻

]]>
By: Sara Santos https://randomnerdtutorials.com/get-change-esp32-esp8266-mac-address-arduino/#comment-913130 Mon, 06 May 2024 11:03:42 +0000 https://randomnerdtutorials.com/?p=93413#comment-913130 In reply to sha.

Hi.
You’re probably not setting the right baud rate of 115200 on the serial monitor.
Regards,
Sara

]]>
By: Sara Santos https://randomnerdtutorials.com/get-change-esp32-esp8266-mac-address-arduino/#comment-913127 Mon, 06 May 2024 11:02:23 +0000 https://randomnerdtutorials.com/?p=93413#comment-913127 In reply to Shahryar.

Hi.
Make sure you have set the correct baud rate for the serial monitor: 115200
Regards,
Sara

]]>
By: Shahryar https://randomnerdtutorials.com/get-change-esp32-esp8266-mac-address-arduino/#comment-912763 Sun, 05 May 2024 17:37:02 +0000 https://randomnerdtutorials.com/?p=93413#comment-912763 In reply to Sara Santos.

Hi why when I’m going to get my esp mac address its’s words and letters are unreadable like squares triangles semicolon and etc?

]]>
By: sha https://randomnerdtutorials.com/get-change-esp32-esp8266-mac-address-arduino/#comment-912498 Sat, 04 May 2024 21:06:28 +0000 https://randomnerdtutorials.com/?p=93413#comment-912498 hi @Sara santos
I tried this code for getting my ESP32 mac address but the words are not readable like belove:
@⸮⸮I\
bb⸮x$+⸮A⸮ \⸮B⸮⸮ʬ⸮⸮%⸮⸮$⸮⸮⸮⸮⸮RqzY
⸮⸮NbH

do you know what is the problem?

]]>
By: Sara Santos https://randomnerdtutorials.com/get-change-esp32-esp8266-mac-address-arduino/#comment-905227 Fri, 12 Apr 2024 10:34:10 +0000 https://randomnerdtutorials.com/?p=93413#comment-905227 In reply to dany.

Hi.
It works just fine for me. I just tested it.
What version of the ESP32 boards do you have installed? Tools > Boards > Boards Manager > ESP32 (it should mention which version is installed.)
Regards,
Sara

]]>
By: dany https://randomnerdtutorials.com/get-change-esp32-esp8266-mac-address-arduino/#comment-902399 Sat, 30 Mar 2024 23:14:52 +0000 https://randomnerdtutorials.com/?p=93413#comment-902399 Thanks a lot for this tutorial
However, it gave me an error : not delcared in this scope

So this function worked fine for me:

esp_base_mac_addr_set(newMACAddress);

]]>