WiFi network broadcast on Big Sur and iOS 14

I am seeing the sending of broadcast packets,
e.g. stuff which includes:
destAddr.sinfamily      =  AFINET;
destAddr.sinaddr.saddr =  INADDR_BROADCAST;
sendto(...)
which work just fine on Catalina and iOS 13,
fail on Big Sur and/or iOS 14.

This behavior causes discovery of local networked devices that respond to broadcast packets to ID themselves to fail. These device are then never found by apps that use this mechanism.

Perhaps this is happening to some WiFi adapters, but other networked peripherals use this mechanism as well, such as openHPSDR radios.

Is this intended behavior?


On iOS 14 you have the adding complexity of local network privacy. See WWDC 2020 Session 10110 Support local network privacy in your app for the fully story there.

Beyond that, my experience is that sending broadcasts is an exercise fraught with gotchas. I’ve posted a snippet of how I do that here. The critical part is the use of IP_BOUND_IF to specify the interface on which you want to broadcast.

Finally, the 2020 OS releases include a new NWConnectionGroup API that’s specifically designed to make this whole process much easier.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@apple.com"
WiFi network broadcast on Big Sur and iOS 14
 
 
Q