3

I have a game that runs on mobile devices and connects two of them together by using UDP Broadcast and simultaneously listening and broadcasting. On most home WiFi networks, this works well (corporate networks are a different story). However, on others, the devices just can't find each other.

I'm not well versed enough in home networking to know why this would be the case, but I'd love to know some possible causes so I can provide some possible fixes to folks that have this issue.

Hennes
  • 65,804
  • 7
  • 115
  • 169
Vexir
  • 133

1 Answers1

6

There are lots of reasons that multicasts (which includes broadcasts) are unreliable on cheap 802.11 gear.

Multicast support is a tricky-to-implement part of the 802.11 protocol that many implementers get wrong and their QA teams fail to catch. The way it interacts with WPA/WPA2 and 802.11 Power Save mode makes it even trickier. It also isn’t Ack’d, so it has to be sent at a low data rate (simple modulation scheme) to help clients receive it more reliably.

Some things to try:

  • Disable “Client Isolation” on the AP.
  • Disable WPA; use pure WPA2 only.
  • Adjust your multicast rate on the AP so it’s low enough that everyone gets them, but not so low that they take too much airtime and start getting dropped.
  • Lower your DTIM interval on the AP down to 1.
  • Make sure your multicast receivers are doing IGMP properly. Otherwise disable IGMP Snooping on the AP.
  • Move your clients closer to the AP.
  • Pick a cleaner channel.
  • Disable 802.11 Power Save mode in the advanced driver properties of your 802.11 drivers. Barring this, consider running your clients off AC power ( some clients are less likely to use Power Save mode when they’re not using their batteries ).
  • This is a drastic measure, but try making sure all your clients are on the same band of the same AP. This may require configuring each radio of each AP to use a different SSID.
  • Upgrade to better AP firmware, even if that means Linux router distros like LEDE.
  • Buy better equipment with a reputation for handling multicasts well like Apple AirPort base stations and other Apple products (Bonjour, which is multicast, is a very important protocol for the Apple ecosystem, so Apple almost always gets it right).

For more information, look here: Why do some WiFi routers block multicast packets going from wired to wireless? (That Answer was written for the wired to wireless case, but applies to the wireless-to-wireless case as well. )

DavidPostill
  • 162,382
Spiff
  • 110,156