added fixes for connecting to micropython if it doesn't jump into REPL after boot #209
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 insideread_until
will never stop. Solution: I added ahard_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.