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

The reason why ampy is unreliable for a large number of boards, like ESP32CAM etc... #124

Open
gitcnd opened this issue Jan 16, 2024 · 2 comments

Comments

@gitcnd
Copy link

gitcnd commented Jan 16, 2024

Many boards use the serial RTS and DTR pins to control the MCU reset and GPIO0 lines - to enable "hardware reset" and firmware uploads for your board.

For example - here's a simple, working, perl terminal-emulator for all boards which do this:

https://github.com/gitcnd/mcu_serial

Unfortunately, ampy doesn't control either of those lines, so you're at the random mercy of whatever your host device decides to do with them... and if either of those 2 are held in the wrong state, this "locks up" your MCU, preventing ampy from talking to it.

See my above perl code for examples of how to properly control those lines. I don't know enough python to work out how to do the equivalent to fix this bug...

@gitcnd
Copy link
Author

gitcnd commented Jan 16, 2024

update: turns out this is a python deficiency, but it can be worked-around:

pyserial/pyserial#729

See micropython/micropython@f27593e

@gitcnd
Copy link
Author

gitcnd commented Jan 16, 2024

fixed: #126

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