I'd like to give all devices in my ESPNOW network the same MAC address, so all devices would receive all messages. This would constitute a private broadcast (so packets can be shorter). Crucially, LMK encryption would work (as I understand it).
So, is this viable? I don't think ESPNOW will cause problems, but Wifi may? What does Wifi do while ESPNOW is active?
I reused the title of this question: https://bbs.espressif.com/viewtopic.php?t=3227. Hope this time round there are more answers. Thanks.
ESP-NOW: What happens if all peers are given the same MAC address?
Re: ESP-NOW: What happens if all peers are given the same MAC address?
What is length difference for unicast and broadcast packets?
Re: ESP-NOW: What happens if all peers are given the same MAC address?
When using broadcast packets, packets are received from _all_ devices, including those not belonging to the network. So a field must be allocated stating to which network the transmission belongs, and that field must be verified to discard messages not from devices on the network.WiFive wrote:What is length difference for unicast and broadcast packets?
When using unicast, a specific MAC address is chosen instead of the generic broadcast address. That address differentiates the network from any other, so only packets from the network are received by the devices on the network, (ideally) no others.
So using "unicast" (really private broadcast) means:
- a smaller packet
- fewer callbacks (potentially many)
I want to use broadcasts, because that allows devices to snoop on transmission for content of interest (taking advantage of the nature of the medium, broadcast, not unicast). That will reduce the overall number of transmissions.
Re: ESP-NOW: What happens if all peers are given the same MAC address?
Broadcasts are not encrypted and devices don't have to use same PMK to communicate?
Re: ESP-NOW: What happens if all peers are given the same MAC address?
I'm afraid I don't fully understand your question/suggestion.WiFive wrote:Broadcasts are not encrypted and devices don't have to use same PMK to communicate?
The terminology seems lacking. I speak of private broadcasts, which espnow sees as unicasts.
It's hard to find info on what PMK and LMK actually do, and therefore the requirements for them to work. For all I know they may not work in private broadcasts.
I want to know if there are any impediments to using the same mac. I want to snoop on traffic so content can go to multiple devices at once, which is not possible if I give them different macs, unless I use the "broadcast" mac. But that has its own downsides.
Re: ESP-NOW: What happens if all peers are given the same MAC address?
Ok I found
Esp-now should add support for multicast groups
This could be supported with Robust Management Frame Protection?Do not support encrypting multicast vendor-specific action frame.
Esp-now should add support for multicast groups
Re: ESP-NOW: What happens if all peers are given the same MAC address?
I'm out of my league when it comes to radio (types of packets, encryption, authentication etc).WiFive wrote: This could be supported with Robust Management Frame Protection?
I intend to implement a non-trivial protocol with some obfuscation to prevent casual eaves dropping. But if there are existing solutions, I'm all ears
Re: ESP-NOW: What happens if all peers are given the same MAC address?
I'm also interested in using the same MAC for all nodes, but is it possible to use encryption with this system? Does the encryption system have some kind of a separate counter or state machine for each node, so it would break if there were multiple nodes with the same MAC address?
Besides, I haven't been able the change the MAC address (esp_wifi_set_mac(ESP_IF_WIFI_STA, network_mac)) yet - the call returns 0, but the MAC address doesn't change. I'm using idf v4.4.6.
I need more than 6 or 10 or 20 nodes with encryption and I can put my own addresses in the esp-now payload, but how to get encryption working with an "unlimited" number of nodes? It's not supposed to work with broadcast addresses, so maybe it doesn't work with all nodes using the same MAC, either?
I really wish the documentation was better. Lots of time is being wasted googling, testing, guessing, ripping hair...
Besides, I haven't been able the change the MAC address (esp_wifi_set_mac(ESP_IF_WIFI_STA, network_mac)) yet - the call returns 0, but the MAC address doesn't change. I'm using idf v4.4.6.
I need more than 6 or 10 or 20 nodes with encryption and I can put my own addresses in the esp-now payload, but how to get encryption working with an "unlimited" number of nodes? It's not supposed to work with broadcast addresses, so maybe it doesn't work with all nodes using the same MAC, either?
I really wish the documentation was better. Lots of time is being wasted googling, testing, guessing, ripping hair...
Who is online
Users browsing this forum: Gaston1980 and 127 guests