Description
Answers checklist.
- I have read the documentation ESP-IDF Programming Guide and the issue is not addressed there.
- I have updated my IDF branch (master or release) to the latest version and checked that the issue is present there.
- I have searched the issue tracker for a similar issue and not found a similar issue.
IDF version.
v5.2-dev-3065-g272b4091f1
Operating System used.
Linux
How did you build your project?
Command line with idf.py
If you are using Windows, please specify command line type.
None
What is the expected behavior?
When following documentation section Flash onto the Device, as a standard Ubuntu user, I expect the 'idf.py -p "$PORT" -b 460800 flash' command will flash the device.
What is the actual behavior?
Preceding documentation does not advise a 'user' as requiring permissions to access a serial terminal. Consequently, when running "idf.py -p "$PORT" -b 460800 flash" command fails to connect to the serial port with an error "Could not open serial port /dev/ttyACM0" will be displayed.
This bug was found and corrected by googling, discovering that standard Ubuntu users are not automatically placed in 'dialout' group which is required for access to serial ports under /dev/ in the system.
Please update For Linux Users 'Requirements' to reflect that the user wishing to run idf.py, and flash the device successfully, requires permissions to open a serial console under /dev.
For Ubuntu 22.04.3 that means user needs to be added to the 'dialout' group by using the following command:
sudo usermod -G dialout <username>
Preceding documentation when followed logically, does not advise that the 'user' as requiring permissions to access a serial terminal, prior to this particular point of the documentation.
Suggest you include a note or the above command to illustrate this for your users. if idf code generates the error message encountered you may wish to put a permissions hint in it too.
Steps to reproduce.
- Follow install idf per site documentation instructions as a standard Ubuntu user
- Connect device
- Move to esp-idf/examples/getting-started/hello-world directory
- run 'idf.py build'
- run 'idf.py -p "$PORT" -b 460800 flash'
Build or installation Logs.
Host OS = PRETTY_NAME="Ubuntu 22.04.3 LTS"
uname -r = 6.2.0-33-generic
board = ESP32-C3-DevKit-RUST-1
More Information.
preceding the 'idf.py -p "$PORT" -b 460800 flash' command with sudo
also fails as well due to root not having required environment hooks for idf.py to work.
Activity