automatically disconnect before trying to upload firmware and automatically connect right after successful update