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

added fixes for connecting to micropython if it doesn't jump into REPL after boot #209

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

YesterKo
Copy link

@YesterKo YesterKo commented Mar 2, 2023

I had the same problem as in #182, though instead of infinitely printing out info, I ran a loop that didn't print any info and read_until() got stuck at the first serial read. Solution: If no data is in the buffer, instead of reading the minimum number of bytes it will just set data as an empty byte-string.

If the program spits out continuous data however, the while True: loop inside read_until will never stop. Solution: I added a hard_timeout to the function, so that will at some point stop, even if it keeps getting info.

The next problem appeared when after that, rshell wasn't able to get sysinfo from the board. The problem was that enter_raw_repl function was resetting the board, and coincidentally restarting the loop inside boot.py. Solution: Instead of giving an exception if it doesn't get into raw repl, it will first try ctrl-c too.

These changes should fix problems when connecting to boards that don't go to REPL after boot, as in #182.

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

Successfully merging this pull request may close these issues.

1 participant