Monitor open request overrides port settings from platform's board definition #2504
Open
3 tasks done
Labels
topic: code
Related to content of the project itself
topic: serial monitor
Related to the Serial Monitor
type: imperfection
Perceived defect in any part of project
Describe the problem
The Arduino boards platform framework allows pluggable monitor port settings to be configured via properties in the board definition:
https://arduino.github.io/arduino-cli/dev/platform-specification/#port-configuration
🐛 When Arduino IDE sends the monitor open request message, it passes an apparently hard coded complete port configuration, overriding any custom port settings from the board definition.
To reproduce
Equipment
A board that has an auto-reset circuit that causes the board to reset when its port's DTR or RTS control signal is asserted:
ⓘ The scope of the bug is not limited to these boards only, but this set was selected for use in the demo.
Demo
All Arduino IDE windows will close.
boards.local.txt
in the following location:<username>
is your Linux username)❗ The
.arduino15
folder may be hidden by default in your file manager and terminal.<username>
is your macOS username)❗ The
Library
folder is hidden by default. You can make it visible by pressing the Command+Shift+. keyboard shortcut.<username>
is your Windows username)❗ If looking for it with your file manager or command line, note that the
AppData
folder is hidden by default. On Windows "File Explorer", you can make it visible by opening the "View" menu, then checking the box next to "☐ Hidden items".🐛 The board is reset, resulting in "
setup
" being printed to Serial Monitor before the "loop
" starts being printed.This reset would not have occurred if the pluggable monitor port settings from the board definition had been honored, and thus we expect to only see "
loop
" in Serial Monitor (since the program has been running for some seconds before Serial Monitor was opened).Clean up
Delete the
boards.local.txt
file you created.Expected behavior
Arduino IDE only controls the Monitor's
baudrate
port setting (according to the menu selection in the Serial Monitor GUI). The platform framework provides all other port settings (either via the defaults or custom settings from the board definition).Arduino IDE version
Original report
2.3.2
Last verified with
1ec0a8c
Operating system
Windows
Operating system version
Win11 Home
Additional context
The fault does not occur when I use
arduino-cli monitor
or thecc.arduino.cli.commands.v1.ArduinoCoreService.Monitor
request directly, specifying only thebaudrate
port setting.When I enable the
arduino.cli.daemon.debug
advanced setting, I see that Arduino IDE sends acc.arduino.cli.commands.v1.ArduinoCoreService.EnumerateMonitorPortSettings
request, and the response contains the customizedrts
anddtr
port setting values (off
):(note the value of the
rts
anddtr
settings isoff
)But then that data is not used in the full configuration that is passed in the subsequent monitor open request message:
(note the value of the
rts
anddtr
settings ison
)Issue checklist
The text was updated successfully, but these errors were encountered: