Any update on when we would have the fix for UDP discovery on Android?
Also, I have 3 more simple questions, hope you could help. (Not sure where else to ask these questions).
1. When I try the TcpPortScan (scanning for peers), I cannot find any of the peers (listening on Tcp) on the local network. I am just following the sample provided but instead of UDP I am trying TcpPortScan.
2. When I scan for peers using UDP, I could only find the udp endpoints available, not the TCP open ports. I would assume that this is the normal behaviour, but how would I find out what TCP ports (peers) on the local network?
3. When a peer is found using UDP, it gives 4 different IP addresses (for the found peer), many of which are not usable (0.0.0.0, 127.0.0.1, etc). How could I know which IP Address to use?
I could send us an email to email@example.com we currently have a beta fix for the android peer discovery issue. Unfortunately UDP broadcast appears to be different enough across different platforms that we don’t yet have a fix that we are happy to roll out publicly.
In answer to your questions:
1. Please try running the TCP port scan test from the same machine, i.e. two applications. My guess is that this will work. As such I would ensure your devices are visible to others on the network, i.e. possible firewalls or router security settings.
2. All endpoints that are marked as Discoverable should be visible for a discovered peer. The endpoints used DURING the UDP discovery are created as discoverable. Please ensure when you create the TCP listen endpoints that you provide true for the discoverable parameter.
3. There are more sophisticated ways to determine the correct IP after discovery, such as local subnet detection etc, but the easiest is just to try all ip addresses that are not loopback and use the first one which successfully connects.