Is there a way to get the broadcast ip from ip and subnet in Arduino?
I know if the system has an ip of 192.168.0.2 and subnet of 255.255.255.0, then 192.168.0.255 is its broadcast ip.
But how do I get it programmatically in Arduino, without any kind of hardcoding?
I need this because, I need the Arduino's to report its presence in the network, so that its controller can detect them and control them. The controller will not be a specific machine. It could be an Android app, and whoever has the app installed should be able to identify the Arduino and control it.
Once broadcast ip is known, I can transmit periodic pings over udp, and have the controllers detect them.