Description
Describe the problem
I can use the arduino-cli board attach
command to specify the default FQBN and serial port attached to a sketch. However, if I then try to run the arduino-cli monitor
command (without any other options) I get the following error.
required flag(s) "port" not set
I expected the monitor command would pick up the default port set in the sketch.yaml file, but that does not appear to be the case.
To reproduce
Create a sketch that includes serial output.
Attach a board to the sketch.
$ arduino-cli board attach --fqbn arduino:renesas_uno:unor4wifi --port /dev/cu.usbmodemDC5475C3BE142
Compile and upload the sketch to the board.
$ arduino-cli compile --upload
Display the board's serial output.
$ arduino-cli monitor
Expected behavior
I expected the
$ arduino-cli monitor
command to display the board's serial output. Instead, I received the required flag(s) "port" not set error. Adding the port specification to the command
$ arduino-cli monitor --port /dev/cu.usbmodemDC5475C3BE142
shows the expected serial output.
Arduino CLI version
arduino-cli Version: nightly-20230827 Commit: f5a9b7c Date: 2023-08-27T01:27:51Z
Operating system
macOS
Operating system version
13.5.1
Additional context
No response
Issue checklist
- I searched for previous reports in the issue tracker
- I verified the problem still occurs when using the nightly build
- My report contains all necessary details