Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uploads to Moddable Zero often fail under Windows 10 #18

Closed
wdimmit opened this issue Dec 18, 2017 · 7 comments
Closed

Uploads to Moddable Zero often fail under Windows 10 #18

wdimmit opened this issue Dec 18, 2017 · 7 comments

Comments

@wdimmit
Copy link
Contributor

wdimmit commented Dec 18, 2017

Uploading code (in this case the "drag" example) to the Moddable Zero fails more than 50% of the time.
This is under Windows 10 x64.

Two examples follow:

image

image

@phoddie
Copy link
Collaborator

phoddie commented Dec 18, 2017

Not our code. ;) Try turning the baud rate down in make.esp.mk. It defaults to 921600 on Windows, which esptool considers safe (no warning at the speed, though the same speed on Mac does give a warning). Good rates to try: 460800, 230400, and 115200. That last one should be reliable, if slow.

@phoddie
Copy link
Collaborator

phoddie commented Dec 18, 2017

FWIW - the maximum baud rate appears to be a function of the computer, USB driver, and perhaps USB cable. We held a workshop recently using only Windows computers and there were no upload failures at 921600.

@wdimmit
Copy link
Contributor Author

wdimmit commented Dec 18, 2017

Thanks. I'll try some more options. Do the docs that calls out that config option somewhere?

Also, sometimes the transfer fails before it actually starts (the second screenshot). I'm sometimes seeing the following error printed to terminal a few seconds after a failure or after terminating xsbug. Could xsbug be holding the port open?

C:\Users\retro\src\moddable\tools\serial2xsbug\win\serial2xsbug.c(489): The I/O operation has been aborted because of either a thread exit or an application request.

@wdimmit
Copy link
Contributor Author

wdimmit commented Dec 18, 2017

Sorry, need to revise that description. The message about serial2xsbug.c appears after disconnecting the usb cable. As a general rule, does the device need to be disconnected and reconnected between flashes?

@phoddie
Copy link
Collaborator

phoddie commented Dec 18, 2017

We've not seen a failure on Windows because of the baud rate. If that turns out to be your problem, how to change the baud rate should be documented.

There is no need need to disconnect before flashing.

@wdimmit
Copy link
Contributor Author

wdimmit commented Dec 18, 2017

Alright - USB cable #3 is much better than the first two I tried - I'm back up at 921600. For users who haven't used an ESP in a few years, it might be worth calling out that the situation is sensitive to cable selection.

With the good cable, I now see the serial2xsbug.c error immediately after closing xsbug if I happen to terminate the batch script first. With my first cable, the message was not appearing until I disconnected the device. Retrying the upload before the message appears seems to always fail.

I apparently had a Goldilocks cable to get exactly this problem, but wanted to describe it here in case someone in the future asks about it.

@phoddie
Copy link
Collaborator

phoddie commented Dec 20, 2017

Failures were due to a cable that couldn't handle high speed data. Closing as that is the primary issue here. The batch behavior is being addressed separately.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants