Comments (11)
Maybe it's about file permissions, open the terminal :
cd /dev
sudo su
...
chmod 777 ttyUSB0
and exit
from ampy.
You cannot have 2 serial connections at the same time. Either Putty(screen, etc) or ampy. Not both.
from ampy.
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.
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.
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.
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.
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.
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.
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.
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.
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)
- 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.