I am running Micropython on a Feather ESP32 with the tft 2.4 Feather Wing. I am using ampy v 1.0.5 on my iMac 10.13.6 to "put" files to the ESP32. Ampy works very inconsistently. Sometimes it works flawlessly. But often it returns a long error message ending in "PyboardError('could not enter raw repl')" The only way around this that I have found is to repeatedly try to execute the same command until it works. This can be a long, patience exhausting, procedure. The same thing occurs with other ampy commands.
I am probably missing something perfectly obvious to every one but me. But any suggestions on how to get around this would be appreciated.
Jim
ampy - "could not enter raw repl" error on ESP32
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- jimwims
- Posts: 68
- Joined: Tue May 28, 2013 2:17 pm
- adafruit_support_bill
- Posts: 88097
- Joined: Sat Feb 07, 2009 10:11 am
Re: ampy - "could not enter raw repl" error on ESP32
I don't know the answer to your question about Ampy. But I will move this thread to the Python forum where our MicroPython team will be more likely to see it.
- jimwims
- Posts: 68
- Joined: Tue May 28, 2013 2:17 pm
- adafruit2
- Posts: 22148
- Joined: Fri Mar 11, 2005 7:36 pm
Re: ampy - "could not enter raw repl" error on ESP32
hiya we don't support micropython on esp32, we didn't write that code and so we don't guarantee it works well - in fact we haven't even tried it ourselves so we have no solution for this. ampy works most of the time :) you may want to check the micropython forums!
- jimwims
- Posts: 68
- Joined: Tue May 28, 2013 2:17 pm
Re: ampy - "could not enter raw repl" error on ESP32
The problem has nothing to do with Micropython. It is clearly a problem with ampy and/or your hardware.
- adafruit2
- Posts: 22148
- Joined: Fri Mar 11, 2005 7:36 pm
Re: ampy - "could not enter raw repl" error on ESP32
its probably not a hardware issue - if you are getting data back and forth then the hardware is working. it could be ampy isn't tuned to ESP32 micropython, there's some timing tweaks necessary.
ampy is a hack where we pretend to 'type' out commands, there's other tools you can try to use for micropython on esp32 like rshell and some IDEs, but we haven't tried any of them! we only support circuitpython on boards that have mass storage for this reason, its really annoying to use !
ampy is a hack where we pretend to 'type' out commands, there's other tools you can try to use for micropython on esp32 like rshell and some IDEs, but we haven't tried any of them! we only support circuitpython on boards that have mass storage for this reason, its really annoying to use !
- jimwims
- Posts: 68
- Joined: Tue May 28, 2013 2:17 pm
- jerryn
- Posts: 1869
- Joined: Sat Sep 14, 2013 9:05 am
Re: ampy - "could not enter raw repl" error on ESP32
FWIW - just tried ampy to an esp32 with micropython on my Mac (MacOS 10.13.6) and it works:
You might want to try using a delay (-d parameter) but it worked for me without it
You might want to try using a delay (-d parameter) but it worked for me without it
Code: Select all
[Jerry-desktop-mini-8:/Volumes/CircuitPythonBuild/esp-open-sdk] jerryneedell% ampy --version
ampy, version 1.0.5
[Jerry-desktop-mini-8:/Volumes/CircuitPythonBuild/esp-open-sdk] jerryneedell% ampy -p /dev/tty.SLAB_USBtoUART ls
boot.py
stuff.py
main.py
test_boot.py
[Jerry-desktop-mini-8:/Volumes/CircuitPythonBuild/esp-open-sdk] jerryneedell% ampy -d 1.0 -p /dev/tty.SLAB_USBtoUART ls
boot.py
stuff.py
main.py
test_boot.py
[Jerry-desktop-mini-8:/Volumes/CircuitPythonBuild/esp-open-sdk] jerryneedell%
- jerryn
- Posts: 1869
- Joined: Sat Sep 14, 2013 9:05 am
Re: ampy - "could not enter raw repl" error on ESP32
just to be sure I had the latest version, I cloned the current ampy repository and installed it -- Note - it is also 1.0.5, but has some changes. It still works on my Mac
I also verified that "put" works for me - at least for some small files.
Code: Select all
[Jerry-desktop-mini-8:~/projects/ampy] jerryneedell% ampy -p /dev/tty.SLAB_USBtoUART ls -r
/boot.py
/main.py
/stuff.py
/test_boot.py
[Jerry-desktop-mini-8:~/projects/ampy] jerryneedell% ampy -p /dev/tty.SLAB_USBtoUART ls
/boot.py
/main.py
/stuff.py
/test_boot.py
[Jerry-desktop-mini-8:~/projects/ampy] jerryneedell% ampy --version
ampy, version 1.0.5
[Jerry-desktop-mini-8:~/projects/ampy] jerryneedell%
I also verified that "put" works for me - at least for some small files.
Code: Select all
[Jerry-desktop-mini-8:~] jerryneedell% ampy -p /dev/tty.SLAB_USBtoUART get stuff.py junk.py
[Jerry-desktop-mini-8:~] jerryneedell% ampy -p /dev/tty.SLAB_USBtoUART put junk.py
[Jerry-desktop-mini-8:~] jerryneedell% ampy -p /dev/tty.SLAB_USBtoUART ls
/boot.py
/junk.py
/main.py
/stuff.py
/test_boot.py
- jimwims
- Posts: 68
- Joined: Tue May 28, 2013 2:17 pm
Re: ampy - "could not enter raw repl" error on ESP32
Thanks very much for taking the time to post these very helpful replies. I also think my problem may be that I was trying to use ampy while a script was running on the ESP32. I have recently found that there is a way to terminate a running script which may help. Thanks again.
- jerryn
- Posts: 1869
- Joined: Sat Sep 14, 2013 9:05 am
Re: ampy - "could not enter raw repl" error on ESP32
AH - I have run into problems if I have a "main.py" running on my esp8266 boards with CircuitPython -- I have not had much experience with the esp32 and MicroPython.
In general, I remove/rename main.py and make sure that I can access the REPL via a terminal session before using ampy.
It is a bit cumbersome, but it works...
Good luck!
In general, I remove/rename main.py and make sure that I can access the REPL via a terminal session before using ampy.
It is a bit cumbersome, but it works...
Good luck!
Please be positive and constructive with your questions and comments.