ESP32 Arduino IDE with PC change

Hi Guys
First post here. Hope someone can advise.
So I have been happily learning Arduino on ESP32 and have dabbled in lots of areas such as Wifi, IR, I2C. But I recently changed PC and have been having problems running my recently written code.

For example I have a simple get MAC address that is a few lines long.

#include <esp_now.h>
#include <WiFi.h>

void setup(){
  Serial.begin(115200);
  delay(5000); // need slight delay
  Serial.println();
  Serial.print("ESP Board MAC Address:  ");
  Serial.println(WiFi.macAddress());
}
 
void loop(){
}

When I run this on my old PC I get a sensible return but on my new PC it just returns zeros.

The only obvious difference I can see is that my new PC is running IDE 2.3.6 and the old one is 2.3.4.

Any ideas what's going on?

Cheers

Welcome to the forum

Which Arduino board are you using and which board have you got selected in the IDE ?

Have you got the same version of the ESP32 board files on both PCs ?

Difference in the ESP33 board package?

Thanks for the quick reply.
The board is ESP32-VROOM-32D
I've got selected ESP32 Dev Module

I've still got the old PC so I can check back to back
They both have the same boards and selections.

I've also tried a few different boards and they all do the same. I get a sensible MAC value on the old pc but not on the new one.

Thanks for the suggestion. How do I check this?

Use the Board Manager in the left pane of the IDE

If one IDE is 2.3.4 and the other 2.3.6, then you must have auto update turned off. That means a lot of stuff will be out of date.
The MAC is on the esp board, has nothing to do with the PC or IDE.
I am not aware of a change to MAC specifically, but the boards 3 issue may be involved. To fix that use the boards manager and roll back the espressif esp32 boards to 2.0.17.
NOTE: The boards will try to auto-update, so be ready to say no until they fix it. This also means you can't use any of the new boards and software until you can get off 2.0.17 or fix it yourself.

https://www.reddit.com/r/esp32/comments/1et7iol/esp32_mac_adress_shows_0000000000/

I'm getting in a right state now. I uninstalled and reinstalled the IDE. Then added the esp32 link in file - preferences and now nothing works. Not even blink. When I try to compile blink I get this...

arduino\sketches\B32E8EBB60BD2AB5AAD5D229704B6580\build.options.json: Access is denied.

What on earth have I done?

On the old or the new PC?

Check the logs of your anti-virus (if you have one).

Right. Made some progress.

I rolled back the version of the esp32 board manager to the version which matches my old pc (quite older 2.011 vs 3.2.0 which is currently the latest).

Then I matched the version numbers of libraries in the library manager of my new pc to match my old pc.

Interestingly I don't think all the libraries show up on my old pc as I had to manually add them in the libraries folder zip zip files - I don't think the library manager knows about these.

Then I rebooted my new PC.

Not sure which one of these actions was the fix but everything seems back to normal now. Even the GetMAC.ino file seems to be working now and is returning sensible numbers.