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

Timeout error that feels almost immediate, I may have a solution #151

Open
frank26080115 opened this issue Aug 7, 2024 · 0 comments
Open

Comments

@frank26080115
Copy link

I ran into a problem where erase_flash was throwing a timeout, but it's supposed to be a timeout of 120000 and it felt like it was immediate.

Investigating with the debugger, it seems like the call const {value, done} = await reader.read(); was making done equal true on the very first call.

Going back a bit, the thing that happens before sending the erase flash command is main_fn finishing up with a call to change_baud.

At the bottom of change_baud, there's a line that says await this.transport.rawRead({timeout:500}); that has no purpose that I can think of, there's no code comments

Disabling that line await this.transport.rawRead({timeout:500}); will fix the timeout problem.

Another solution is to simply not call change_baud ever, and use baud rate 115200, equaling rom_baudrate, so the change is redundant anyways

I hope somebody finds this useful and maybe the code logic gets changed a bit in a release.

I am wondering if this will help the fellas in this issue #96

NOTE: using https://espressif.github.io/esptool-js/ never has this problem but that doesn't mean the problem doesn't exist, it's likely some sort of timing/threading issue, perhaps due to inclusion or absence of xterm. We should aim for a solution that works on all platforms of all variations, not just ignoring an issue because one demo works.

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

1 participant