ESP-NOW: What happens if all peers are given the same MAC address.

rajunamburi
Posts: 3
Joined: Wed Jan 04, 2017 2:26 pm

ESP-NOW: What happens if all peers are given the same MAC address.

Postby rajunamburi » Wed Jan 04, 2017 2:48 pm

Hello,

I have been experimenting with ESP NOW and could successfully use it to transfer small data across the controller and slaves. As the transfers are based on mac address and as we can set custom mac address for esp8266, what happens if all the peers are given the same mac address? will the controller send the data to all the peers? can we use this for broadcasting the data?


Thanks,
Raju

User avatar
pratik
Posts: 467
Joined: Wed Jun 29, 2016 7:17 pm
Location: India
Contact:

Re: ESP-NOW: What happens if all peers are given the same MAC address.

Postby pratik » Wed Jan 04, 2017 9:38 pm

The results of having the MAC address same on multiple networking devices will depend on the software implementation. The case is not usually handled in a specific way, because the specifications say that MAC addresses should be unique for every device.
Now if you still force the same MAC on multiple units, the behavior will be depending on the switch/router or the internal SDK code (if there is other router connected).
Your data may only reach one, or reach all/many of the devices or just not be sent at all. Some routers will refuse to add another device with same MAC address. And this behavior may change when the software is updated (as there is no standard defined behavior).

So please use a broadcast message using the broadcast IP, or just forward messages individually, whatever the case may be.
Regards,
Pratik Panda
Website: http://www.PratikPanda.com

Custom firmware, Knowledge base and freelancing (ESP8266/ESP32):
http://www.iot-bits.com

rajunamburi
Posts: 3
Joined: Wed Jan 04, 2017 2:26 pm

Re: ESP-NOW: What happens if all peers are given the same MAC address.

Postby rajunamburi » Wed Jan 04, 2017 11:57 pm

Pratik,

Thanks for your reply. I understand that having duplicate mac is not the right thing in a wifi network. But when using ESP NOW where there is no router - client relationship ( if i am correct) , how does this impact the network? When i add a peer in the controller and give the same mac to all my slaves, will the controller msg reach all the slaves?


Thanks,
Raju Namburi

User avatar
pratik
Posts: 467
Joined: Wed Jun 29, 2016 7:17 pm
Location: India
Contact:

Re: ESP-NOW: What happens if all peers are given the same MAC address.

Postby pratik » Fri Jan 20, 2017 2:05 pm

You may try to assign duplicate temporary MAC addresses to all units and experiment to see what happens.
But on such a network, assuming that it works as expected in some specific case... is likely to fail when the environment changes. As long as there is a physical layer involved (as is the case with all WiFi devices), having unique MACs is important to ensure data is correctly sent to all devices.
Without unique MAC, how will a transmitter know which device received the message and which device is acknowledging it?
Regards,
Pratik Panda
Website: http://www.PratikPanda.com

Custom firmware, Knowledge base and freelancing (ESP8266/ESP32):
http://www.iot-bits.com

Who is online

Users browsing this forum: No registered users and 13 guests