I just thought I’d post this solution to a problem that has been bedeviling me for quite a while, in case it will help anyone else, since I think I finally figured out what’s going wrong with my setup.
Syncing used to work reliably between my Android device and various Linux machines, some with wired connections and some with wireless, but more recently, the syncing often just stopped working, and I couldn’t figure out what was going wrong. It usually either restarted on its own, or began working again after reboots of the various machines involved.
I finally realized the problem: on my OpenWRT router / switch AP, I have one trusted wireless network that’s bridged to the wired LAN, and another untrusted (“guest”) wireless network that isn’t, and the latter isn’t allowed (by the firewall rules) to connect to the LAN / trusted wireless network. So syncing works fine between the phone and the computers when the phone is connected to the trusted wireless network, which is bridged to the LAN, but when the phone decides (for reasons best known to itself) to connect to the untrusted network (a connection option I think I originally configured for testing purposes), syncing fails. I suppose this is because neither local discovery nor global discovery will work for machines on two separate VLANS behind a single NAT, as discussed here.