Git Product home page Git Product logo

Comments (11)

 avatar commented on July 19, 2024 14

Maybe it's about file permissions, open the terminal :
cd /dev
sudo su
...
chmod 777 ttyUSB0
and exit

from ampy.

jerryneedell avatar jerryneedell commented on July 19, 2024 12

You cannot have 2 serial connections at the same time. Either Putty(screen, etc) or ampy. Not both.

from ampy.

ravindradeoray avatar ravindradeoray commented on July 19, 2024 4

I had same issue with my ESP8266 Huzzah board on MacOS. Close terminal with Command + Q and disconnected and connected board. Afterwards I tried to use ampy command and it worked. Hope that helps.

from ampy.

michelepagot avatar michelepagot commented on July 19, 2024 1

hi
Happens to me too. Debian 9.3. Ampy 1.0.3. It is not a linux permission issue. screen works fine without to use sudo. More than this... even ampy ls works at first attempt listing boot.py
Then I try run and it fails. From this point also ls start to fail. Screen is still functional. Unplugging the board does not help.

from ampy.

tdicola avatar tdicola commented on July 19, 2024

If this is Linux double check your user has access to the serial port, i.e. try running the screen command to see that the /dev/ttyUSB0 port exists and you can open the REPL to interact with the board:

screen /dev/ttyUSB0  115200

If that doesn't work then something might be wrong with permissions for the serial port. Try running with sudo (both screen and the ampy command) to override any permission issue and access as root.

from ampy.

VivienGiraud avatar VivienGiraud commented on July 19, 2024

Same issue here !
$ ampy --port /dev/tty.wchusbserial1420 --baud 115200 ls

 Traceback (most recent call last):
 File "/usr/local/bin/ampy", line 11, in <module>
   sys.exit(cli())
 File "/usr/local/lib/python3.6/site-packages/click/core.py", line 722, in __call__
   return self.main(*args, **kwargs)
 File "/usr/local/lib/python3.6/site-packages/click/core.py", line 697, in main
   rv = self.invoke(ctx)
 File "/usr/local/lib/python3.6/site-packages/click/core.py", line 1063, in invoke
   Command.invoke(self, ctx)
 File "/usr/local/lib/python3.6/site-packages/click/core.py", line 895, in invoke
   return ctx.invoke(self.callback, **ctx.params)
 File "/usr/local/lib/python3.6/site-packages/click/core.py", line 535, in invoke
   return callback(*args, **kwargs)
 File "/usr/local/lib/python3.6/site-packages/ampy/cli.py", line 73, in cli
   _board = pyboard.Pyboard(port, baudrate=baud, rawdelay=delay)
 File "/usr/local/lib/python3.6/site-packages/ampy/pyboard.py", line 147, in __init__
   raise PyboardError('failed to access ' + device)
ampy.pyboard.PyboardError: failed to access /dev/tty.wchusbserial1420

from ampy.

leonrenkema avatar leonrenkema commented on July 19, 2024

I have this behavior on Windows when Putty also have an active connection. When I close Putty I can use ampy without any problems.

from ampy.

YashPandit4u avatar YashPandit4u commented on July 19, 2024

You cannot have 2 serial connections at the same time. Either Putty(screen, etc) or ampy. Not both.

The exact same issue here. I even terminated all other applications like putty and screen but still showing the same error.

from ampy.

lalitkumar09 avatar lalitkumar09 commented on July 19, 2024

this issue is because of USB cable we use.... Charging cable that debbug Mobile phone will work fine but not normal cable that do just charging.

from ampy.

LucasCanete avatar LucasCanete commented on July 19, 2024

Have the same issue rn with my esp32. I highly suspect this is because i uploaded a program with a while loop to the board and it just runs endlessly so might have to find a way to kill that program first. If somebody knows how to do this in ubuntu i'd be thankful.

from ampy.

V-Perotto avatar V-Perotto commented on July 19, 2024

@jerryneedell

You cannot have 2 serial connections at the same time. Either Putty(screen, etc) or ampy. Not both.

Thank you very much, that saved me.

I had my board (ESP32) connected by Thonny IDE, when I closed it and tested it in VS Code, I was able to use ampy.

NOTE: Using Windows 10.

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.