I have 3 local devices in a cluster, all behind the same router.
(1) Android Phone
(2) Windows laptop
(3) Synology NAS (linux)
The method Android Syncthing uses to discover the other 2 devices appears to be totally random. Each time I fire it up I see a different ip address for the other 2 devices. Sometimes it employs LOCAL DISCOVERY, sometimes GLOBAL DISCOVERY on port 22000, and sometimes very slowly via relay server.
Is there a hard algorithm used to prioritize the discovery method, or is this entirely random?
My preference would be Local Discovery for local devices, and relay used as the method of last resort.
My android phone is unrooted, not sure I can run the “STTRACE=discovery” command on it. I’ll try this later when I am on the windows laptop - to see if we can get any meaningful output.
You can set the debug argument in the wrapper, then enable developer mode on the phone, and connect it to your desktop using ADB. I am sure there is enough material on Google to help you with this.
The version upgrade to v.0.12.4 appears to have corrected my prior discovery issues. Local devices are now using LAN addresses on “dynamic”, and also the correct IP addresses for remote devices on “dynamic”. I’m no longer getting discovery time-outs pushing me to the relay servers.
Looks good.
Meanwhile, I have installed the Java SDK + Android Suite (with ADB); I will start learning how to generate output logs the for next time I need them.