Comments (9)
Update 1: It's enter_raw_repl()
in pyboard.py
which blocks...
from ampy.
Update 2: It's the 7th line in enter_raw_repl()
: data = self.read_until(1, b'raw REPL; CTRL-B to exit\r\n>')
.
It seems like the serial port is not properly closed. If I open a serial port to the esp, the command always fails at data = self.read_until(1, b'raw REPL; CTRL-B to exit\r\n>')
, but I can see raw REPL; CTRL-B to exit
in the console.
from ampy.
Update 3: This seems to be closely related to #19, but @markserrano915 fix did not work for me.
from ampy.
** Removed info on incorrect behavior so as not to lead anyone reading on the wrong path **
I had a definite problem as a result of using serial communication programs like putty or picocom while running ampy. They conflict on the returned character streams that putty expects. Hence, my deletion above.
Once I killed putty, I also had to apply the fix from #19 . That helped but didn't fix everything.
After board reboot, I can run sudo ampy -p/dev/ttyUSB0 ls
- but only once successfully. I then get same behavior as described by NyxMC above.
Hope I haven't made a mess of your issue.
Platform:
- Windows 10 | Virtual box running guest: Ubuntu 16.04 LTS.
- Espressif DevkitC Hardware
- MicroPython v1.9.1-394-g79feb95.
- USB permissions verified by code execution and programming with Espressif Blink and manual MicroPython.
** Update: 08/12/17 **
I can get it to work once, good enough for one 'put' or 'ls' etc. so I can limp along, but haven't determined why it is not repeatably functional. Via a 'print' debug line, I see it does go into REPL and execute, but it fails after the fact and ampy is done from then on. I will investigate more as time allows.
from ampy.
Thanks for raising the issue! It's hard to act on this though--I haven't seen the same issue in Linux (Ubuntu) and can't investigate. Let's close the issue for now but folks can chime in or re-open if more reports occur. Thanks!
from ampy.
Meet the same problem. I have to pull out my esp32 after any ampy
commands.
- ubuntu 18.04
- picocom v2.2
from ampy.
same problem, first is OK, second fails
ampy -p /dev/ttyUSB0 put config.json
ampy -p /dev/ttyUSB0 put _install.py
b'\x03\x03 \x07\xe7;\xe4'
Traceback (most recent call last):
File "/home/thejoeejoee/.local/bin/ampy", line 11, in <module>
sys.exit(cli())
File "/home/thejoeejoee/.local/lib/python3.6/site-packages/click/core.py", line 764, in __call__
return self.main(*args, **kwargs)
File "/home/thejoeejoee/.local/lib/python3.6/site-packages/click/core.py", line 717, in main
rv = self.invoke(ctx)
File "/home/thejoeejoee/.local/lib/python3.6/site-packages/click/core.py", line 1137, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/home/thejoeejoee/.local/lib/python3.6/site-packages/click/core.py", line 956, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/thejoeejoee/.local/lib/python3.6/site-packages/click/core.py", line 555, in invoke
return callback(*args, **kwargs)
File "/home/thejoeejoee/.local/lib/python3.6/site-packages/ampy/cli.py", line 263, in put
board_files.put(remote, infile.read())
File "/home/thejoeejoee/.local/lib/python3.6/site-packages/ampy/files.py", line 208, in put
self._pyboard.enter_raw_repl()
File "/home/thejoeejoee/.local/lib/python3.6/site-packages/ampy/pyboard.py", line 192, in enter_raw_repl
raise PyboardError('could not enter raw repl')
ampy.pyboard.PyboardError: could not enter raw repl
versions
- micropython 1.10
- ampy 1.0.7
- ubuntu 18.10
from ampy.
For me, the first two ampy
commands work (after a board reset) then the 3rd and any subsequent always fail(!) with the could not enter raw repl
error, or it just hangs. Exact same thing happens using pyboard.py
(latest version) from MicroPython.
from ampy.
I was using another REPEL instance using picocom in the background and I didn't notice it.
I had this same error which leads me to this issue.
The issue went away by closing the other picocom instance
from ampy.
Related Issues (20)
- possibility to put files to a subdirectory
- not neccessarily working on esp32-cam-mb HOT 1
- Ampy cannot execute some commands due to various errors
- GET fails with CircuitPython
- On Ubuntu 22.04: ampy runs into an errror, ab ttyUSB0 is after then never available, till replugin the USB wire.
- put includes hidden folders like .git
- 未找到 'ampy' 命令
- timeout waiting for first EOF reception HOT 1
- Fix location of progress_bar
- How do printing and debug at minicom while ampy run? HOT 1
- I can run my main.py (blinky_1.py) test but the put command does not work
- new feature: add a STOP command HOT 1
- The reason why ampy is unreliable for a large number of boards, like ESP32CAM etc... HOT 2
- CAUTION - THIS PROJECT IS STALE (UNMAINTAINED). There is no point submitting PRs into it - nobody merges any of them... HOT 11
- Cannot upload file with specific starting character on Windows HOT 2
- `rmdir --missing-okay` not working on ESP32 w. MicroPython HOT 1
- infuriating behaviour of recursive put HOT 1
- ampy.pyboard.PyboardError: could not enter raw repl HOT 5
- ampy not working after raspberry pi 4 dist-upgrade
- Make a new release to PyPI please HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ampy.