Git Product home page Git Product logo

Comments (9)

NyxCode avatar NyxCode commented on August 18, 2024

Update 1: It's enter_raw_repl() in pyboard.py which blocks...

from ampy.

NyxCode avatar NyxCode commented on August 18, 2024

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.

NyxCode avatar NyxCode commented on August 18, 2024

Update 3: This seems to be closely related to #19, but @markserrano915 fix did not work for me.

from ampy.

PawnDrifter avatar PawnDrifter commented on August 18, 2024

** 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.

tdicola avatar tdicola commented on August 18, 2024

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.

beary avatar beary commented on August 18, 2024

Meet the same problem. I have to pull out my esp32 after any ampy commands.

  • ubuntu 18.04
  • picocom v2.2

from ampy.

thejoeejoee avatar thejoeejoee commented on August 18, 2024

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.

bulletmark avatar bulletmark commented on August 18, 2024

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.

AbhijithHaridas avatar AbhijithHaridas commented on August 18, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.