I initially had intermittent connection (but it just disconnected rather that having an error) which was a combination of a dodgy usb lead, plus a small amount of fluff in the phone's charge port.
New lead plus a toothpick to remove the fluff sorted it.