D
D
dgash22012021-05-26 00:39:01
Arduino
dgash2201, 2021-05-26 00:39:01

How to send data from one device to another knowing only the MAC address?

Hello! I have 2 arduino boards each with esp32 wifi module connected to the same wifi router. Is it possible somehow to send messages from one board to another knowing only the MAC address?

Answer the question

In order to leave comments, you need to log in

5 answer(s)
I
Ivan Shumov, 2021-05-26
@inoise

Just like that - no

M
mordo445, 2021-05-26
@mordo445

You need to find the ip address of the other device. For correct, reliable and easy-to-develop communications, you need to use an ip address. In order for one device to be able to find the ip address of another and communicate with it, they must be in the same broadcast network segment. You have options:
1. Use SSDP. It returns information about the device, the response will be the IP address. For further communication, the addresses must be from the same subnet.
2. Create your own protocol based on multicast, let your device "listen" to a predefined group, and the second one broadcasts to this group. Device addresses are not important, the network should not block the passage of multicast traffic, if IGMP-snooping is not supported, devices will litter the network with their traffic.
3. Use only previously known ip addresses on devices. Internet access will be very difficult, not suitable for serial devices (like avrduino, lol).
Unfortunately, I'm not a programmer-developer, so I can't help with the code, only with ideas.

B
Boris Syomov, 2021-05-26
@kotomyava

You need mDNS and from MAC you can make, at the same time, the hostname of the device, well, or any other unique identifier you wish to use. Fortunately, esp32 has support for this protocol.
You can generally work at the channel level, and not at the network level, but this will be much more difficult to implement and less standard.

Z
Zzzz9, 2021-05-27
@Zzzz9

In this case, Wi-Fi is a wire, an email transmission medium. signals, it all depends on the program that transmits messages, you can write your own wifi-7.0 protocol, which does not need tcp-ip and other addresses at all.

B
Borys Latysh, 2021-07-15
@nava2002

Yes, you can.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question