multicast messages

If doesn't fit into any other category ....
User avatar
cicciocb
Site Admin
Posts: 2055
Joined: Mon Feb 03, 2020 1:15 pm
Location: Toulouse
Has thanked: 439 times
Been thanked: 1354 times
Contact:

Re: multicast messages

Post by cicciocb »

Probably you should clarify what is your goal and which device (ESPxx) you want use.

The multicast DNS (mDNS) is a protocol that resolves hostnames to IP addresses within small networks that do not include a local name server.

I implemented the support for the mDNS in the versions 1.51.1 (for the ESP32 series only)

You can find more info in this post :
[Local Link Removed for Guests]

I removed it starting from the versions following replacing it with the NETBIOS (only for windows).

So, if you want test, you need the version 1.51.1 and an ESP32
Monki
Posts: 42
Joined: Mon Feb 27, 2023 12:56 pm
Location: Berlin
Has thanked: 6 times
Been thanked: 6 times

Re: multicast messages

Post by Monki »

hello francesco,
I use an esp32 s3 16mb flash 8mb ram.
The shelly devices send their status and the measured power consumption data via UDP multicast as described above. I would like to display or process this data with the ESP on an SD card memory and on a web interface, hence the question about multicast.
With the b4x app you can do this on PC and Android.
greetings monki
User avatar
cicciocb
Site Admin
Posts: 2055
Joined: Mon Feb 03, 2020 1:15 pm
Location: Toulouse
Has thanked: 439 times
Been thanked: 1354 times
Contact:

Re: multicast messages

Post by cicciocb »

I'm not an expert on that subject, I implemented the mDNS to enable the replacement of the IP address (i.e. 192.168.1.55) with a more practical name (i.e. VGAOUT).

After that, I removed because it was using too much RAM and, aditionally, several people complained about some problems generated on the wifi network.

But, now I understood, you want receive UDP multicast message and not mDNS as described in the link you posted above https://book.hacktricks.xyz/network-ser ... t-dns-mdns :roll:

In any case, the multicast UDP is not supported
Monki
Posts: 42
Joined: Mon Feb 27, 2023 12:56 pm
Location: Berlin
Has thanked: 6 times
Been thanked: 6 times

Re: multicast messages

Post by Monki »

Would it be possible to implement it in a simple way?
User avatar
Electroguard
Posts: 860
Joined: Mon Feb 08, 2021 6:22 pm
Has thanked: 274 times
Been thanked: 322 times

Re: multicast messages

Post by Electroguard »

The way I understand multicast is that the message is only sent to a specified subset of the available devices.
I achieve a similar result by broadcasting to the entire netork, but only the relevant targeted devices process and action the messages.
Are the sender and receiver devices physically able to contact each other on the same subnet and port number ?
It would help to know what exactly it is you want to achieve, and what limitations are preventing you from achieving it at the moment... maybe we can find a way around the problem.
User avatar
cicciocb
Site Admin
Posts: 2055
Joined: Mon Feb 03, 2020 1:15 pm
Location: Toulouse
Has thanked: 439 times
Been thanked: 1354 times
Contact:

Re: multicast messages

Post by cicciocb »

[Local Link Removed for Guests] wrote: [Local Link Removed for Guests]Sat Feb 03, 2024 10:37 pm Would it be possible to implement it in a simple way?
Yes, it should be possible
Monki
Posts: 42
Joined: Mon Feb 27, 2023 12:56 pm
Location: Berlin
Has thanked: 6 times
Been thanked: 6 times

Re: multicast messages

Post by Monki »

@franceco,
If it doesn't take too much trouble, I would be happy if you could install it, it would also be worth a small donation to me. The article linked below also describes what I meant by mDNS.

@Electroguard,
First of all, thank you for your help, like several posts before, I would like to query the status of some of Shelly's smart home devices. These are automatically sent by the Shelly devices via UDP multicast. Here is a link https://github.com/StyraHem/ShellyForHA ... hooting.md from which you can get some information. As already mentioned, I have already programmed this with B4X for Windows and Android.

monki
Post Reply