Skip to content

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