Multicast packet not reaching phone from ethernet

1.7k Views Asked by At

I am unable to send a udp multicast/broadcast packet, from a laptop 'wired' to a wifi router, to an android phone connected to the same router wirelessly. It works the other way round(phone to laptop). Also, the phone can receive a packet if I explicitly specify the phone ip address in my code. Secondly, there is no issue if both devices are connected via wifi. I have even tried jmdns but the same problem occurs. What could possibly be the issue? Any router misconfiguration? Plz help.

2

There are 2 best solutions below

0
On

Same problem here, but fixed, is a router config issue.

In my case, had to activate "IGMP snooping" on my router config menu (advanced->LAN) AND the "standard mode" instead of blocking mode.

This made my router to transmit all multicast packets from ethernet over wifi.

Anyway, you might not have exactly the same router as me, just try to find similar features in your own model.

11
On

You should acquire a MulticastLock before attempting to receive any multicast data. On some HTC devices, this also applies to receiving broadcast traffic. You can acquire a multicast lock using the WifiManager.