WIP: backport sync2.0 code to speak sync1.5 protocol