-
Notifications
You must be signed in to change notification settings - Fork 139
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
Fails to connect to ESP32 #83
Comments
rshell doesn't need it to start in the raw repl. It sends Control-C to interrupt any running program and a Control-D to enter the raw reply. So far I've only tested with the loboris port. I'll try with the official port and see what happens. |
Oh then I did not look at the code carefully enough and I'm out of ideas. |
Some people have added a small sleep to pyboard.py, which I think works around the problem that you're running into. I haven't been able to reproduce the problem locally. In particular, see this comment: #27 (comment) I have some ideas on how to improve this so that it will work without an explicit delay but rather waits for the REPL, and I just need to find some time to implement and test it. |
I'm wondering if the esp32's that people are having issues with are being reset when the serial port is opened. I've been unable to reproduce this on my SparkFun Esp32 Thing. I've ordered a DOIT ESP32 DEVKIT V1 so that I can see if I can reproduce this. |
This workaround indeed works! Thanks a lot. My ESP certainly resets everytime I connect to the repl, doesn't matter if I use rshell or putty. |
ok - that helps to understand what's going on then. My SparkFun ESP32 Thing doesn't reset when I connect to it. When the ESP32 resets, it prints out a bunch of text similar to the following:
and rshell is trying to talk to the board while that reset process is happening. Since the way rshell works is essentially to type some commands and parse the response, it gets confused by this initial burst of text. And this is evident in your very first comment:
In the comment this prints as a very long single line. Adding the delay allows this text to go by, but I think that a better solution is to wait for the '>>>' prompt so that we don't delay when we don't need to. |
I just released 0.0.21 which now tries to get a REPL prompt before continuing, I was able to simulate a device which resets (by twiddling the RTS & DTR lines just after opening the serial port) and it now skips that text looking for the >>> prompt. |
Thanks for the quick fix! It works great now. Interesting observation: I had some things connected and it didn't reset on serial connect, so there's some interference from pin usages/states. |
I know there was a similar issue #67 but this is lightly different.
I can connect to the esp32 directly after flashing it but after that, I'm unable to do so.
Putty connects fine every time so I'm sure there isn't a hardware problem.
I'm using a "doit esp32 devkit v1" (at least that's what's written on its back) with the mainline esp32 daily firmware.
I'm not running a main.py and I use the precompiled firmware available for download.
This is my error trace:
To me it looks like the board doesn't start in raw_repl after a reset but goes straight to repl. As rshell expects it to start in raw_repl, it fails.
The text was updated successfully, but these errors were encountered: