3

Code:

MulticastSocket s = new MulticastSocket();
InetAddress addr = InetAddress.getByName("230.230.230.1");
s.joinGroup(addr);
//...

On Ubuntu 14.04, when I run it, I can see IGMPv2 "Membership Report group 230.230.230.1" message out. But on Android, no such packet is seen.

Such packet is a must to notify router about IGMP membership when user calls joinGroup (or setsockopt in C), right?

pengguang001
  • 4,045
  • 6
  • 27
  • 31

1 Answers1

3

It would appear that many devices are shipped without support for multicast built into the kernel. Open an adb shell and do

cat /proc/net/igmp

If it's not there, the kernel has been built without CONFIG_IP_MULTICAST. You're basically SOL without rooting your device and/or flashing custom firmware.

This is a sad state of affairs.

Shrug
  • 46
  • 1
  • @pengguang001 Does NetworkInterface.supportsMulticast() show this incompatibility? Does it return false? – Greelings Nov 27 '18 at 16:22
  • Yes, /proc/net/igmp is absent, and CONFIG_IP_MULTICAST not defined. Kernel still support multicast, without membership reporting. – pengguang001 Jan 04 '19 at 01:43