You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Sep 6, 2023. It is now read-only.
Repository navigation
This repository was archived by the owner on Sep 6, 2023. It is now read-only.
Hard time to upload files with ampy and related sw #165
Hi! I had build the last version (with correct idf version) and can get it booting ok. But I can't upload ant files to the device I already tried 2 distinct boards and most of the time I can't even list the files on the devices or read/write most of the times I get errors that it can't open raw repl. With esp8266 I get no problems at all with the same upload softwares
It look like the file system is corrupted. Please try to erase the flash with "make erase" and reload the firmware with "make deploy".
P.S.: Question like this may also be asked at the MicroPython forum https://forum.micropython.org/. There is a special section for this ESP32 port, where you also can find hints.
@Mat-Alm I also had the "can't open repl" problem when I had a terminal program connected to the port simultaneously; closing the serial terminal fixed the issue for me.
There's something about the WiFi subsystem that screws up the state of the UART RX ring buffers when it starts. I've had it happen in MicroPython, but it's not a MP problem. The C project I'm working on now has the same issue, and I've gone with the work-around of not starting Wifi until after I'm done using the UART.
To be clear: I do not mean that the WiFi logging is messing up the parsing of console output (though that can happen). What I mean is there's some sort of deep-seated bug in the IDF (or hardware?) that mucks up the UART when WiFi starts. Seems to be OK if the UART is basically idle, but if it's receiving data, it can get screwed up, and it remains screwed up until a restart.
@MrSurly ah, interesting. Now we have >= 2 problems. :-D
I added some debug code to the place where it throws the exception about the repl mode (and i just read some more bytes, not just the 2 that did not match). Then I saw it is the same stuff as seen on the serial console when initing the wifi.
So, how is everybody working with the esp32 (except the mentioned workaround of not starting the wifi, which is somehow not an option if one wants to develop/debug network apps)?
Is there something more reliable than ampy run / put to run code on the esp32 / upload code to it?
(I am rather new to ESP and micropython, started yesterday with esp32).
I can make it slower ... :-)
Yeah, it is very limited. I have many pie-in-the-sky ideas for how we
could improve this situation, but they're still fermentingOne big limit is the serial speed, but pushing that any higher tends to
cause problems for users on breadboards.I was thinking of adding a "zmodem" like mode to the repl to simplify
file transfers rather than the current repl-bashing approach.
When mpy-watch works it works rather well, sending only the diffs. It
is a more complicated beast though, so more prone to getting confused.
I think the key to this is going to be, when in raw repl mode, to hook
the error/log output which normally goes straight to the UART and either
hide it or escape it in such a way that a raw repl client can not be
confused by it. This is possible in esp idf and I've made some
preliminary progress.
OK, I'm going to add that into mpy-utils as the first thing it runs :-)
What did you think about the idea of adding that to raw mode in general?
Too weird?
One of my painfull issues with ampy is solved with patch & setting osdebug to None. Thanks!
It was with nested dirs - I was unable to rmdir from ampy (it was ending with error) when ESP was connected with STA_IF, os.listdir was showing that dir is gone, but when I was trying to put it again using ampy it was failing with EXISTS.
Activity
robert-hh commentedon Aug 18, 2017
It look like the file system is corrupted. Please try to erase the flash with "make erase" and reload the firmware with "make deploy".
P.S.: Question like this may also be asked at the MicroPython forum https://forum.micropython.org/. There is a special section for this ESP32 port, where you also can find hints.
0xDBFB7 commentedon Aug 18, 2017
@Mat-Alm I also had the "can't open repl" problem when I had a terminal program connected to the port simultaneously; closing the serial terminal fixed the issue for me.
nickzoic commentedon Oct 4, 2017
Can you connect to the REPL with miniterm.py or similar serial terminal program?
ThomasWaldmann commentedon Nov 28, 2017
Not sure if it is it same issue than OP, but also having lots of pain with ampy.
Mostly, it does simply not work. Sometimes hangs for a long time, sometimes aborting with all sorts of exceptions. Sometimes it works.
What I found out is than it seems to stumble over the stuff the wifi subsystem outputs when connecting.
So, can the wifi log be silenced?
MrSurly commentedon Nov 28, 2017
I feel I have to chime in here.
There's something about the WiFi subsystem that screws up the state of the UART RX ring buffers when it starts. I've had it happen in MicroPython, but it's not a MP problem. The C project I'm working on now has the same issue, and I've gone with the work-around of not starting Wifi until after I'm done using the UART.
To be clear: I do not mean that the WiFi logging is messing up the parsing of console output (though that can happen). What I mean is there's some sort of deep-seated bug in the IDF (or hardware?) that mucks up the UART when WiFi starts. Seems to be OK if the UART is basically idle, but if it's receiving data, it can get screwed up, and it remains screwed up until a restart.
ThomasWaldmann commentedon Nov 28, 2017
@MrSurly ah, interesting. Now we have >= 2 problems. :-D
I added some debug code to the place where it throws the exception about the repl mode (and i just read some more bytes, not just the 2 that did not match). Then I saw it is the same stuff as seen on the serial console when initing the wifi.
ThomasWaldmann commentedon Nov 28, 2017
So, how is everybody working with the esp32 (except the mentioned workaround of not starting the wifi, which is somehow not an option if one wants to develop/debug network apps)?
Is there something more reliable than ampy run / put to run code on the esp32 / upload code to it?
(I am rather new to ESP and micropython, started yesterday with esp32).
MrSurly commentedon Nov 28, 2017
I just just https://github.com/nickzoic/mpy-utils, but it is slow (sorry @nickzoic).
nickzoic commentedon Nov 28, 2017
dpgeorge commentedon Nov 29, 2017
I just merged #112 which added esp.osdebug(). You can now silence the logging using esp.osdebug(None).
nickzoic commentedon Nov 29, 2017
dpgeorge commentedon Nov 29, 2017
It would make sense... but even getting into raw mode may not work if the debug messages are there.
PikWay commentedon Nov 29, 2017
One of my painfull issues with ampy is solved with patch & setting osdebug to None. Thanks!
It was with nested dirs - I was unable to rmdir from ampy (it was ending with error) when ESP was connected with STA_IF, os.listdir was showing that dir is gone, but when I was trying to put it again using ampy it was failing with EXISTS.
nickzoic commentedon Dec 5, 2017
nickzoic commentedon Dec 5, 2017
Avi-TelnT commentedon Dec 6, 2017
@nickzoic
Thank you.
Can you also offer how to embeded this module into https://github.com/loboris/MicroPython_ESP32_psRAM_LoBo
?
dpgeorge commentedon Sep 25, 2019
It should be possible to use the "-f" flag to the latest pyboard.py script to access the filesystem on the esp32 over the serial/UART.