Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"arduino-cli upload" ignores port setting in "sketch.json" #1605

Closed
ShyLionTjmn opened this issue Dec 24, 2021 · 2 comments · Fixed by #1930
Closed

"arduino-cli upload" ignores port setting in "sketch.json" #1605

ShyLionTjmn opened this issue Dec 24, 2021 · 2 comments · Fixed by #1930
Assignees
Labels
topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project

Comments

@ShyLionTjmn
Copy link

i have sketch.json:

{ "cpu": { "fqbn": "arduino:avr:pro", "port": "/dev/ttyUSB0" } }

Still, every time i run "arduino-cli upload" i have to add "-p /dev/ttyUSB0" option.
Am i doing something wrong?

@per1234 per1234 added topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project labels Jan 12, 2022
@per1234 per1234 self-assigned this Jan 12, 2022
@davegarthsimpson
Copy link

Hi @per1234 are there any further actions on this?

@cmaglie cmaglie added this to the Arduino CLI 1.0 milestone Nov 14, 2022
@cmaglie cmaglie linked a pull request Nov 14, 2022 that will close this issue
5 tasks
@per1234
Copy link
Contributor

per1234 commented Nov 15, 2022

@davegarthsimpson the problem is that the previous sketch.json system requires a URI style protocol+port format like serial:///dev/ttyUSB0. @ShyLionTjmn must have manually added the unsupported port format into the cpu.port field of the file, since if board attach --port is used, the port has the correct format. Unfortunately, Arduino CLI does not communicate the problem to the user.

This problem will be resolved by the pending complete reworking of the board attach command in #1930, which adds support for the more familiar /dev/ttyUSB0 port format supported by all Arduino CLI's --port flags. That change also means the port is passed directly to the upload tool rather than parsing it for a protocol (there is a dedicated flag and field for the protocol), so the user would likely receive a more meaningful error from the upload tool in the event they specify a port of an invalid format in the file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants