I'm attempting to use GDM server discovery in an Android app. All works properly if my device is on the subnet at the Plex server, but I don't receive any responses when it is not. But, under the same circumstances, the Android Plex app discovers the server every time. I thought since GDM is actually using a multicast address (239.0.0.250, port 32414), that it would work across subnets. Also puzzled by what the Plex app could be doing different to discover the server. Any ideas? Thanks.
Ok, so it turns out I was imagining things. I can't get it to work regardless of the subnet. But when I test via a Windows UDP test tool, I get the response. Must be something with Android. Again, any idea? Thanks.
Plex uses gdm for servers that are not paired to an account. Otherwise Plex.TV provides a local IP to search/connect to.
As for multicast, your router needs to be passing on the traffic to the other subnet to make it work.
Sent from my Nexus 5 using Tapatalk
I had been exclusively using the server list from http://plex.tv/pms/servers, but have found that even if a server is signed in, if it cannot be connected to remotely, then it doesn't show up in the list. I have my main server at home with a firewall rule to allow traffic through to it. I also have a development server running. When I expose its port (32401, so as not to collide) through my firewall, it shows up in the XML. When I close its port, it is no longer in the list. So I want to be able to discover what I'm calling "local-only" servers--whether they're signed in to Plex.tv or not. I can use a UDP test tool on Windows to send the GDM request and also see the responses. But I haven't been able to replicate on Android...even using the Android version of the exact same test tool (http://packetsender.com/). Like I said, the Android Plex app can discover a local server that isn't in the servers XML even if it is across subnets. I just can't figure out how.
Silly mistake on my part. I did manage to get GDM discovery working when connected on the same subnet. Still puzzled by Plex Android's ability to find a server across subnets. I tried sniffing for an announcement message, but all I saw was the GDM query initiated by the server. Perhaps I just need to handle that, get the IP address from the packet, and attempt to discover if it is a server. That's all I can think of right now.
Found my answer. Apparently there is a different XML file that I should be using to determine the available servers. It has all of them in it regardless of whether they are exposed remotely or not. All is well here. Carry on.