ESP32 NOW - without using their mac addresses

Is it possible to connect two ESP32's to each other without having to specify their unique mac addresses in the code?

For example, have a master connect to the first slave device it sees.
I will be setting up many pairs of the ESP32's and more than 1 pair will never be in proximity of each other.

My application: wirelessly send a continuous stream of bytes solely from a master to a slave.

It would not be an efficient process if I have to code each pair uniquely, specifying their unique mac addresses in their respective code.

I would like to put a standard code on all the masters, and a standard code on all the slaves, if possible.

Thank you.

Yes it is possible to do it without specifying a unique MAC address. There is only one little problem they will not work and could possibly cause some interesting network problems. This response is to help you get started in solving your problem, not solve it for you.
Good Luck & Have Fun!
Gil

gilshultz:
Yes it is possible to do it without specifying a unique MAC address. There is only one little problem they will not work and could possibly cause some interesting network problems.

Congratulations on contradicting yourself - such an effective way to teach noobs...

That being said, isn't it possible to have the master setup as an access point so that the other can scan for a given SSID and connect without a MAC address or password?

Why not use locally adminstrated mac addresses?

Like:

uint8_t localCustomMac[] = {0xB6, 0xE7, 0x3D, 0xA9, 0xFE, 0x5D};
...

WiFi.mode(WIFI_AP_STA ); 
esp_wifi_set_mac(ESP_IF_WIFI_AP, localCustomMac);
...

Search for "locally managed mac address" to see which address ranges which can be used.
E.g. first hex byte should end in x6, xA or xE.
Like above address starts with 0xB6.

@Power_Broker & @ardcp,

Thank you both for your suggestions. I did research on both ideas and think I have found explanations on how to make either work.

  1. Create an Access Point: ESP32 Access Point (AP) for Web Server | Random Nerd Tutorials

  2. Set Custom mac address: Get ESP32/ESP8266 MAC Address and Change It (Arduino IDE) | Random Nerd Tutorials

I will try them both out and see which would be simplest to implement for my application... Thank you again...