unable to receive udp packets when using beginMulticast

so i’ve recently gotten into working with the esp8266 for use as an led controller, and i’ve run into the following problem:

setting up my network the same way, when i call WiFiUDP.beginMulticast i don’t receive udp packets, and when i call WiFiUDP.begin i do, but not at the broadcast address.

i’m using arduino 1.8.12 running on linux mint, and i’ve tested on ESP-01 and NodeMCU boards with the same result.

i used “echo -n “junk” | nc -4u -w1 192.168.1.X 4210” as my test command with .123 as the device ip, and .255 as broadcast

all devices are connected to the same router, and the router responds to a ping of the broadcast address

here’s the code i used to test:

// https://arduino-esp8266.readthedocs.io/en/latest/esp8266wifi/udp-examples.html

#include <ESP8266WiFi.h>
#include <WiFiUdp.h>


const char* ssid = "dd-wrt";
const char* password = "";

WiFiUDP Udp;
IPAddress multicastAddress(192,168,1,255);
unsigned int localUdpPort = 4210;  // local port to listen on
char incomingPacket[255];  // buffer for incoming packets
char  replyPacket[] = "Hi there! Got the message :-)";  // a reply string to send back


void setup()
{
  Serial.begin(115200);
  Serial.println();

  Serial.printf("Connecting to %s ", ssid);
  WiFi.begin(ssid, password);
  while (WiFi.status() != WL_CONNECTED)
  {
    delay(500);
    Serial.print(".");
  }
  Serial.println(" connected");

  Udp.begin(localUdpPort);
  //Udp.beginMulticast(WiFi.localIP(), multicastAddress, localUdpPort);
  Serial.printf("Now listening at IP %s, UDP port %d\n", WiFi.localIP().toString().c_str(), localUdpPort);
}


void loop()
{
  int packetSize = Udp.parsePacket();
  if (packetSize)
  {
    // receive incoming UDP packets
    Serial.printf("Received %d bytes from %s, port %d\n", packetSize, Udp.remoteIP().toString().c_str(), Udp.remotePort());
    int len = Udp.read(incomingPacket, 255);
    if (len > 0)
    {
      incomingPacket[len] = 0;
    }
    Serial.printf("UDP packet contents: %s\n", incomingPacket);

    // send back a reply, to the IP address and port we got the packet from
    Udp.beginPacket(Udp.remoteIP(), Udp.remotePort());
    Udp.write(replyPacket);
    Udp.endPacket();
  }
}