I have an Arduino Uno R3 with a WiFi shield. The WiFi shield has the most current firmware (V1.1.0). In short, I am trying to communicate with the Arduino from an Android smartphone. I have successfully been able to do this locally by using local IPs assigned by the router; however, now I am wanting to extend this by not having the Android on the same network. For example, communicating with the Arduino from anywhere in the world on the Android device. I know I can do this by simply going to my router configurations and setting up a port forward to the Arduino; however, I would like to get around this by using Universal Plug and Play (UPnP). In order to be able to locate an Internet Gateway Device on the network, I must be able to send a UDP message using the multicast address 239.255.255.250:1900. This is where my problem occurs. It seems as if the WiFi shield isn't capable of sending a UDP packet via the multicast address with the latest WiFi library. Is there a way to modify the WiFi library such that this could be possible?
Note: I can successfully send and receive UDP packets using unicast addresses on the Arduino, just not using multicast.
Also, there is a library that does this via Arduino and Ethernet shield located at: https://github.com/deverick/Arduino-Upnp-PortMapping. I have attempted to modify this library to work for the WiFi shield. I assume that the Ethernet library is capable of sending UDP packets using the multicast address since this library does exactly that.
EDIT: When I said the WiFi shield "isn't capable", I meant that as in I am not able to send a UDP packet using the multicast address. I receive no errors that I am aware of; the code runs without error other than the fact that it doesn't actually send a packet. I am using the latest WiFi library for Arduino on GitHub: https://github.com/arduino/Arduino/tree/master/libraries/WiFi. I simply begin a packet with 239.255.255.250 and port 1900, write a string to the socket, and then end the packet to send it. The packet never actually gets transmitted. If I send a packet to my PC using it's local IP, it works like a charm. It appears that the WiFi library doesn't support the ability to send a packet using the multicast address.