2 x ESP-C3s not communicating using ESP-NOW

Firstly I tried Random Nerd's Tutorial Sketches for one way communication. The sender worked as it should but the receiver showed nothing on the serial monitor.

Then I tried the Broadcast Master and Slave sketches under Examples-ESP_NOW

The master output was as follows:

Wi-Fi parameters:
  Mode: STA
  MAC Address: AC:A7:04:D0:58:98
  Channel: 6
ESP-NOW version: 2, max data length: 1470
Setup complete. Broadcasting messages every 5 seconds.
Broadcasting message: Hello, World! #0
Broadcasting message: Hello, World! #1
Broadcasting message: Hello, World! #2

The slave output was:


ESP-NOW Example - Broadcast Slave
Wi-Fi parameters:
  Mode: STA
  MAC Address: AC:A7:04:D0:7C:94
  Channel: 6
ESP-NOW version: 2, max data length: 1470
Setup complete. Waiting for a master to broadcast a message...
Registered masters: 0
Registered masters: 0
Registered masters: 0

The sketches have not been altered, any pointers as to what the issue(s) is/are

I swapped over the esp32s from master to slave with the same results.

You have shown us the printout from your code, but not the code itself.

What you have told us is roughly equivalent to saying, "I looked at a chart and the color is blue." My question is: what is blue?

Please post your complete code using tags, along with an annotated schematic showing exactly how everything is wired. Be sure to include all power sources, voltage levels, and ground connections.

Without the code and schematic, we are left guessing, and there are many possible causes for the problem.

The Broadcast Master sketch is as follows:

/*
    ESP-NOW Broadcast Master
    Lucas Saavedra Vaz - 2024

    This sketch demonstrates how to broadcast messages to all devices within the ESP-NOW network.
    This example is intended to be used with the ESP-NOW Broadcast Slave example.

    The master device will broadcast a message every 5 seconds to all devices within the network.
    This will be done using by registering a peer object with the broadcast address.

    The slave devices will receive the broadcasted messages and print them to the Serial Monitor.
*/

#include <Arduino.h>
#include "ESP32_NOW.h"
#include "WiFi.h"

#include <esp_mac.h>  // For the MAC2STR and MACSTR macros

/* Definitions */

#define ESPNOW_WIFI_CHANNEL 6

/* Classes */

// Creating a new class that inherits from the ESP_NOW_Peer class is required.

class ESP_NOW_Broadcast_Peer : public ESP_NOW_Peer {
public:
  // Constructor of the class using the broadcast address
  ESP_NOW_Broadcast_Peer(uint8_t channel, wifi_interface_t iface, const uint8_t *lmk) : ESP_NOW_Peer(ESP_NOW.BROADCAST_ADDR, channel, iface, lmk) {}

  // Destructor of the class
  ~ESP_NOW_Broadcast_Peer() {
    remove();
  }

  // Function to properly initialize the ESP-NOW and register the broadcast peer
  bool begin() {
    if (!ESP_NOW.begin() || !add()) {
      log_e("Failed to initialize ESP-NOW or register the broadcast peer");
      return false;
    }
    return true;
  }

  // Function to send a message to all devices within the network
  bool send_message(const uint8_t *data, size_t len) {
    if (!send(data, len)) {
      log_e("Failed to broadcast message");
      return false;
    }
    return true;
  }
};

/* Global Variables */

uint32_t msg_count = 0;

// Create a broadcast peer object
ESP_NOW_Broadcast_Peer broadcast_peer(ESPNOW_WIFI_CHANNEL, WIFI_IF_STA, nullptr);

/* Main */

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

  // Initialize the Wi-Fi module
  WiFi.mode(WIFI_STA);
  WiFi.setChannel(ESPNOW_WIFI_CHANNEL);
  while (!WiFi.STA.started()) {
    delay(100);
  }

  Serial.println("ESP-NOW Example - Broadcast Master");
  Serial.println("Wi-Fi parameters:");
  Serial.println("  Mode: STA");
  Serial.println("  MAC Address: " + WiFi.macAddress());
  Serial.printf("  Channel: %u\n", ESPNOW_WIFI_CHANNEL);

  // Register the broadcast peer
  if (!broadcast_peer.begin()) {
    Serial.println("Failed to initialize broadcast peer");
    Serial.println("Reebooting in 5 seconds...");
    delay(5000);
    ESP.restart();
  }

  Serial.printf("ESP-NOW version: %d, max data length: %d\n", ESP_NOW.getVersion(), ESP_NOW.getMaxDataLen());

  Serial.println("Setup complete. Broadcasting messages every 5 seconds.");
}

void loop() {
  // Broadcast a message to all devices within the network
  char data[32];
  snprintf(data, sizeof(data), "Hello, World! #%" PRIu32, msg_count++);

  Serial.printf("Broadcasting message: %s\n", data);

  if (!broadcast_peer.send_message((uint8_t *)data, sizeof(data))) {
    Serial.println("Failed to broadcast message");
  }

  delay(5000);
}

The Broadcast Slave sketch is:

/*
    ESP-NOW Broadcast Slave
    Lucas Saavedra Vaz - 2024

    This sketch demonstrates how to receive broadcast messages from a master device using the ESP-NOW protocol.

    The master device will broadcast a message every 5 seconds to all devices within the network.

    The slave devices will receive the broadcasted messages. If they are not from a known master, they will be registered as a new master
    using a callback function.
*/

#include <Arduino.h>
#include "ESP32_NOW.h"
#include "WiFi.h"

#include <esp_mac.h>  // For the MAC2STR and MACSTR macros

#include <vector>

/* Definitions */

#define ESPNOW_WIFI_CHANNEL 6

/* Classes */

// Creating a new class that inherits from the ESP_NOW_Peer class is required.

class ESP_NOW_Peer_Class : public ESP_NOW_Peer {
public:
  // Constructor of the class
  ESP_NOW_Peer_Class(const uint8_t *mac_addr, uint8_t channel, wifi_interface_t iface, const uint8_t *lmk) : ESP_NOW_Peer(mac_addr, channel, iface, lmk) {}

  // Destructor of the class
  ~ESP_NOW_Peer_Class() {}

  // Function to register the master peer
  bool add_peer() {
    if (!add()) {
      log_e("Failed to register the broadcast peer");
      return false;
    }
    return true;
  }

  // Function to print the received messages from the master
  void onReceive(const uint8_t *data, size_t len, bool broadcast) {
    Serial.printf("Received a message from master " MACSTR " (%s)\n", MAC2STR(addr()), broadcast ? "broadcast" : "unicast");
    Serial.printf("  Message: %s\n", (char *)data);
  }
};

/* Global Variables */

// List of all the masters. It will be populated when a new master is registered
// Note: Using pointers instead of objects to prevent dangling pointers when the vector reallocates
std::vector<ESP_NOW_Peer_Class *> masters;

/* Callbacks */

// Callback called when an unknown peer sends a message
void register_new_master(const esp_now_recv_info_t *info, const uint8_t *data, int len, void *arg) {
  if (memcmp(info->des_addr, ESP_NOW.BROADCAST_ADDR, 6) == 0) {
    Serial.printf("Unknown peer " MACSTR " sent a broadcast message\n", MAC2STR(info->src_addr));
    Serial.println("Registering the peer as a master");

    ESP_NOW_Peer_Class *new_master = new ESP_NOW_Peer_Class(info->src_addr, ESPNOW_WIFI_CHANNEL, WIFI_IF_STA, nullptr);
    if (!new_master->add_peer()) {
      Serial.println("Failed to register the new master");
      delete new_master;
      return;
    }
    masters.push_back(new_master);
    Serial.printf("Successfully registered master " MACSTR " (total masters: %lu)\n", MAC2STR(new_master->addr()), (unsigned long)masters.size());
  } else {
    // The slave will only receive broadcast messages
    log_v("Received a unicast message from " MACSTR, MAC2STR(info->src_addr));
    log_v("Igorning the message");
  }
}

/* Main */

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

  // Initialize the Wi-Fi module
  WiFi.mode(WIFI_STA);
  WiFi.setChannel(ESPNOW_WIFI_CHANNEL);
  while (!WiFi.STA.started()) {
    delay(100);
  }

  Serial.println("ESP-NOW Example - Broadcast Slave");
  Serial.println("Wi-Fi parameters:");
  Serial.println("  Mode: STA");
  Serial.println("  MAC Address: " + WiFi.macAddress());
  Serial.printf("  Channel: %u\n", ESPNOW_WIFI_CHANNEL);

  // Initialize the ESP-NOW protocol
  if (!ESP_NOW.begin()) {
    Serial.println("Failed to initialize ESP-NOW");
    Serial.println("Reeboting in 5 seconds...");
    delay(5000);
    ESP.restart();
  }

  Serial.printf("ESP-NOW version: %d, max data length: %d\n", ESP_NOW.getVersion(), ESP_NOW.getMaxDataLen());

  // Register the new peer callback
  ESP_NOW.onNewPeer(register_new_master, nullptr);

  Serial.println("Setup complete. Waiting for a master to broadcast a message...");
}

void loop() {
  // Print debug information every 10 seconds
  static unsigned long last_debug = 0;
  if (millis() - last_debug > 10000) {
    last_debug = millis();
    Serial.printf("Registered masters: %lu\n", (unsigned long)masters.size());
    for (size_t i = 0; i < masters.size(); i++) {
      if (masters[i]) {
        Serial.printf("  Master %lu: " MACSTR "\n", (unsigned long)i, MAC2STR(masters[i]->addr()));
      }
    }
  }

  delay(100);
}

There are 2 x ESP32-C3s supplied via USB connections and communicating with each other shown on the serial monitor.

I have just put one of the set of sketches up as I’m hoping the if we solve one problem, it may solve the other!

Check out Bill's work at DBWS, here is a link.
Your sketches look weird to me.

Apparently DBWS's ESP-NOW sketches no longer work since the latest ESP-Now update. However, I did try the one way communication sketches and they did not work!

These are simplified sketches from another topic (Help with ESP32 and ESP NOW example) which someone got to work. I tried and the problem persists, the message is sent and this is reflected in the Serial Monitor. In the receive sketch however the Serial Monitor displays "Data received: 0" repeated very quickly.

Sender:

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

uint8_t broadcastAddress[] = {0xAC, 0xA7, 0x04, 0xD0, 0x7C, 0x94}; //put here the MAC adress of the receiver ESP

typedef struct struct_message {
    int command;
} struct_message;

int counter=0;

struct_message myData;

esp_now_peer_info_t peerInfo;

void OnDataSent(const uint8_t *mac_addr, esp_now_send_status_t status) {    //send data callback function
  Serial.print("I sent: ");
  Serial.println(myData.command);
}
 
void setup() {
 
  Serial.begin(115200);
  WiFi.mode(WIFI_STA);

  if (esp_now_init() != ESP_OK) {
    Serial.println("Fail to initialize ESP-NOW");
    return;
  }

  esp_now_register_send_cb(esp_now_send_cb_t(OnDataSent));
  
  memcpy(peerInfo.peer_addr, broadcastAddress, 6);
  peerInfo.channel = 0;  
  peerInfo.encrypt = false;
         
  if (esp_now_add_peer(&peerInfo) != ESP_OK){
    Serial.println("Fail to ad the receiver");
    return;
  }
}
 
void loop() {
   myData.command = counter++;
   esp_now_send(broadcastAddress, (uint8_t *) &myData, sizeof(myData));
   delay(2000);
}

Receiver:

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

typedef struct struct_message {
    int command;
} struct_message;

struct_message myData;

 
// Callback function executed when data is received
void OnDataRecv(const uint8_t * mac, const uint8_t * incomingData, int len) {
  memcpy(&myData, incomingData, sizeof(myData));
}

 
void setup() {
  Serial.begin(115200);
  WiFi.mode(WIFI_STA);
  if (esp_now_init() != ESP_OK) {
    Serial.println("Fail to initialize ESP-NOW");
    return;
  }
  esp_now_register_recv_cb(esp_now_recv_cb_t(OnDataRecv));
  delay(1000);
}
 
void loop() {
  Serial.print("Data received:  ");
  Serial.println(myData.command);
}

try this simple example
transmitter using broadcast

// ESP32 transmit data over ESP-NOW

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

// ESP-NOW setup
esp_now_peer_info_t peerInfo;

// REPLACE WITH YOUR RECEIVER MAC Address
//uint8_t broadcastAddress[] = { 0xCC, 0x7B, 0x5C, 0x27, 0xE5, 0x8C };  //{0x0C,0xB8,0x15,0xEC,0x1F,0xD0};
uint8_t broadcastAddress[] = { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF };  // or use multicast address

// ESP-NOW callback when data is sent
//void OnDataSent(const uint8_t *mac_addr, esp_now_send_status_t status) {
void OnDataSent(const esp_now_send_info_t *tx_info, esp_now_send_status_t status) {
  Serial.print("Last Packet Send Status: ");
  Serial.print(status);
  Serial.println(status == ESP_NOW_SEND_SUCCESS ? " Delivery Success" : " Delivery Fail");
}

void setup() {
  Serial.begin(115200);
  delay(2000);
  Serial.println("\n\nESP32 transmit results over ESP-NOW ");
  // Set device as a Wi-Fi Station
  WiFi.STA.begin();  // required for ESP32 core 3 to get MAC address ??
  WiFi.mode(WIFI_STA);
  Serial.println(WiFi.macAddress());
  // Init ESP-NOW
  if (esp_now_init() != ESP_OK) {
    Serial.println("Error initializing ESP-NOW");
    return;
  }
  // Once ESPNow is successfully Init, we will register for Send CB to
  // get the status of Trasnmitted packet
  esp_now_register_send_cb(OnDataSent);
  // Register peer
  memcpy(peerInfo.peer_addr, broadcastAddress, 6);
  peerInfo.channel = 0;
  peerInfo.encrypt = false;
  // Add peer
  if (esp_now_add_peer(&peerInfo) != ESP_OK) {
    Serial.println("Failed to add peer");
    return;
  }
}

// loop transmitting test data over ESP-NOW
float temperature = 10.0f;
void loop() {
  Serial.printf("transmitting Temperature %.2f\n", temperature);
  // send results over ESP-NOW
  esp_err_t result = esp_now_send(broadcastAddress, (uint8_t *)&temperature, sizeof(temperature));
  if (result == ESP_OK) {
    Serial.print("esp_now_send() - returns success ");
    Serial.println(result);
  } else {
    Serial.print("esp_now_send() - returns error ");
    Serial.println(result);
  }
  temperature += 1.0f;  // increment test value
  delay(2000);
}

receiver

// ESP32 receive test data via ES-NOE

// ESP-NOW
#include <esp_now.h>
#include <WiFi.h>

// callback function that will be executed when data is received
//void OnDataRecv(const uint8_t * mac, const uint8_t *incomingData, int len) {//
void OnDataRecv(const esp_now_recv_info* mac, const uint8_t* incomingData, int len) {
  float temperature=0.0f;
  memcpy(&temperature, incomingData, sizeof(temperature));
  Serial.printf("ESP-NOW received Temperature %.2f\n", temperature);
}


void setup() {
  Serial.begin(115200);
  delay(2000);
  Serial.println("ESP32 ESP_NOW receive data");
  // Set device as a Wi-Fi Station
  WiFi.STA.begin();  // required for ESP32 core 3 to get MAC address ??
  WiFi.mode(WIFI_STA);
  Serial.println(WiFi.macAddress());
  // Init ESP-NOW
  if (esp_now_init() != ESP_OK) {
    Serial.println("Error initializing ESP-NOW");
    return;
  }
  // Once ESPNow is successfully Init, we will register for recv CB to
  // get recv packer info
  esp_now_register_recv_cb(OnDataRecv);
}


void loop() {}

transmitter serial output

ESP32 transmit results over ESP-NOW 
D4:8A:FC:C6:C6:74
transmitting Temperature 10.00
esp_now_send() - returns success 0
Last Packet Send Status: 0 Delivery Success
transmitting Temperature 11.00
esp_now_send() - returns success 0
Last Packet Send Status: 0 Delivery Success
transmitting Temperature 12.00
esp_now_send() - returns success 0
Last Packet Send Status: 0 Delivery Success
transmitting Temperature 13.00
esp_now_send() - returns success 0
Last Packet Send Status: 0 Delivery Success
transmitting Temperature 14.00
esp_now_send() - returns success 0
Last Packet Send Status: 0 Delivery Success
transmitting Temperature 15.00
esp_now_send() - returns success 0
Last Packet Send Status: 0 Delivery Success
transmitting Temperature 16.00
esp_now_send() - returns success 0
Last Packet Send Status: 0 Delivery Success

…..


transmitting Temperature 150.00
esp_now_send() - returns success 0
Last Packet Send Status: 0 Delivery Success
transmitting Temperature 151.00
esp_now_send() - returns success 0
Last Packet Send Status: 0 Delivery Success
transmitting Temperature 152.00
esp_now_send() - returns success 0
Last Packet Send Status: 0 Delivery Success
transmitting Temperature 153.00
esp_now_send() - returns success 0
Last Packet Send Status: 0 Delivery Success
transmitting Temperature 154.00
esp_now_send() - returns success 0
Last Packet Send Status: 0 Delivery Success
transmitting Temperature 155.00
esp_now_send() - returns success 0
Last Packet Send Status: 0 Delivery Success
transmitting Temperature 156.00
esp_now_send() - returns success 0
Last Packet Send Status: 0 Delivery Success

receiver serial output

ESP32 ESP_NOW receive data
5C:01:3B:70:21:E4
ESP-NOW received Temperature 10.00
ESP-NOW received Temperature 11.00
ESP-NOW received Temperature 12.00
ESP-NOW received Temperature 13.00
ESP-NOW received Temperature 14.00
ESP-NOW received Temperature 15.00
ESP-NOW received Temperature 16.00
ESP-NOW received Temperature 17.00
ESP-NOW received Temperature 18.00
ESP-NOW received Temperature 19.00
ESP-NOW received Temperature 20.00
ESP-NOW received Temperature 21.00
ESP-NOW received Temperature 22.00
ESP-NOW received Temperature 23.00
ESP-NOW received Temperature 24.00

…..

ESP-NOW received Temperature 150.00
ESP-NOW received Temperature 151.00
ESP-NOW received Temperature 152.00
ESP-NOW received Temperature 153.00
ESP-NOW received Temperature 154.00
ESP-NOW received Temperature 155.00
ESP-NOW received Temperature 156.00
ESP-NOW received Temperature 157.00
ESP-NOW received Temperature 158.00
ESP-NOW received Temperature 159.00
ESP-NOW received Temperature 160.00
ESP-NOW received Temperature 161.00
ESP-NOW received Temperature 162.00
ESP-NOW received Temperature 163.00
ESP-NOW received Temperature 164.00
ESP-NOW received Temperature 165.00
ESP-NOW received Temperature 166.00
ESP-NOW received Temperature 167.00

This what I get

Sender:

ESP32 transmit results over ESP-NOW 
AC:A7:04:D0:58:98
transmitting Temperature 10.00
esp_now_send() - returns success 0
Last Packet Send Status: 1 Delivery Fail
transmitting Temperature 11.00
esp_now_send() - returns success 0
Last Packet Send Status: 1 Delivery Fail
transmitting Temperature 12.00
esp_now_send() - returns success 0
Last Packet Send Status: 1 Delivery Fail
transmitting Temperature 13.00
esp_now_send() - returns success 0
Last Packet Send Status: 1 Delivery Fail
transmitting Temperature 14.00
esp_now_send() - returns success 0
Last Packet Send Status: 1 Delivery Fail
transmitting Temperature 15.00
esp_now_send() - returns success 0
Last Packet Send Status: 1 Delivery Fail
transmitting Temperature 16.00
esp_now_send() - returns success 0
Last Packet Send Status: 1 Delivery Fail
transmitting Temperature 17.00
esp_now_send() - returns success 0
Last Packet Send Status: 1 Delivery Fail
transmitting Temperature 18.00

and receive

ESP32 ESP_NOW receive data
AC:A7:04:D0:7C:94

I ran the examples of post 7 on ESP32 modules
just tried on a pair of ESP32-C3 modules and it runs OK

no idea what your problem is
what ESP32 core do you have installed - I have 3.3.8
how far apart are your devices?
do you have any wireless devices in the area which may be overloading the signal
can you test the WiFi, e.g. run the WiFi scanner File>Examples>WiFi>WiFiscan

@horace

I am also on ESP32 Core 3.3.8

devices are about 1.5m apart

Nothing untoward showing up on my WiFi Scan.

A couple of questions:

  1. Should I have Arduino ESP32 Boards installed as well as ESP32 by Espressif?
  2. Do I need to include anything on the Additional Boards Manager URLs box in settings?

Incidentally both ESP32s work in transmitting data remotely to Terminal on my iMac.

Just for clarification:

When you say you are using ESP32 Core 3.3.8, do you mean "ESP32 by Espressif Systems" from Boards Manager?

Also, do you currently have both "Arduino ESP32 Boards" and "ESP32 by Espressif Systems" installed, or only one of them?

Since @horace reports the examples working with ESP32-C3 and core 3.3.8, it may be useful to first confirm that the development environment is configured the same way.

@InquisitiveMind

Yes Espressif Systems ESP32 version 3.3.8, This is the only one I have installed at the moment.

Not quite sure what you mean here, could you please explain.

What I meant is that @horace reports the examples working on ESP32-C3 modules using ESP32 by Espressif Systems version 3.3.8, and you are now reporting the same core version.

So that seems to rule out a general ESP32-C3 / core 3.3.8 compatibility problem.

I was therefore wondering what differences still exist between the working setup and your non-working setup. For example, the exact ESP32-C3 boards being used, board selection in the IDE, or anything else that might differ between the two environments.

Just to mention it — I'm not saying it's the solution.

Sometimes it can be helpful to "reset" the flash memory by performing an "Erase Flash", especially after a lot of experimenting with different sketches and configurations. It is probably a long shot, but it is a relatively quick test.

Thanks for clarifying that.

I just chose the ESP32C3 Dev Module in the IDE, I would perhaps need to check the other options with @horace

The second question I asked @Horace was

Do I need to include anything on the Additional Boards Manager URLs box in settings?

Would you know and would it make any difference if it was omitted?

That sounds like a good idea.

Since @horace has a working ESP32-C3 setup with the same core version, I would probably compare the board selection and any other relevant IDE settings first. If there is a difference somewhere, that could provide a useful clue.

Unfortunately I don't know the answer to the Additional Boards Manager URLs question. Hopefully @horace can comment on how his setup is configured.

I have the ESP32 preferences setting
https://espressif.github.io/arduino-esp32/package_esp32_index.json

and my Tools>Board

the ESP32C3 super mini also requires for Serial IO Enable USB CDC on Boot

@InquisitiveMind

Thank you, hopefully @horace will see this and has the time to reply!

I have lost count of the different Send & Receive sketches I've tried, basically all with the same outcome - no message received! it will probably/hopefully be something simple!

BTW,

I did try erasing the flash memory before uploading, it was a longshot, but no joy I'm afraid.

I recently used ESP-NOW on ESP32-C3s but I used the ESPNowProtocol library and the basic_sender and basic_receiver examples.

basic_sender

#include <ESPNowProtocol.h>

ESPNowProtocol protocol;

// The MAC address of the receiver
uint8_t peer[] = { 0xE8, 0xF6, 0x0A, 0x16, 0xEB, 0x04 };

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

  // Initialize the protocol stack and assign this device a logical id.
  protocol.begin();
  protocol.setNodeId(1);

  // Register node 2 as a known peer so unicast traffic can be sent to it.
  protocol.addPeer(2, peer);
}

void loop() {
  // Keep the protocol state machine running.
  protocol.loop();

  const char* message = "Hello ESP32!";

  protocol.sendReliable(2, 1, (uint8_t*)message, strlen(message) + 1);

  delay(1000);
}

basic_receiver

#include <ESPNowProtocol.h>

ESPNowProtocol protocol;

void onData(uint8_t src, uint8_t id, const uint8_t *data, uint8_t len, int8_t rssi){
  Serial.println((const char*)data);
}

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

  // Initialize the protocol stack and assign this device a logical id.
  protocol.begin();
  protocol.setNodeId(2);

  // Register the callback that will receive incoming application payloads.
  protocol.onReceive(onData);
}

void loop()
{
  // Keep the protocol state machine running.
  protocol.loop();
}

To find the MAC address, I used this code:

#include "WiFi.h"

void setup(){
  Serial.begin(115200);
  delay(500);
  WiFi.mode(WIFI_STA);
  Serial.println("");
  Serial.print("ESP32 Board MAC Address:  ");
  Serial.println(WiFi.macAddress());
}

void loop(){}

I hope this helps :)

The esp32 boards are in the ide install and have been for a while. NO additional boards URL is needed, and could cause problems if an unofficial URL was used (I have seen many)