Skip to content

Disable DTR on connect - #376

Closed
elral wants to merge 2 commits into
MobiFlight:mainfrom
elral:dtr_disable
Closed

elral wants to merge 2 commits into
MobiFlight:mainfrom
elral:dtr_disable

Conversation

@elral

@elral elral commented Mar 31, 2026 •

Copy link
Copy Markdown
Collaborator

Description of changes

When connecting to AVR boards with DTR enabled, these boards get resettet on connect. After resetting the boards respond at least with 17,OK; (not processed from the connector). Other board types which are used for community devices might also respond with additional messages which could lead to an unrecognized board or set them into bootlaoder mode (could happen for some ESP32 boards).

This PR disables setting DTR line on connect for all boards except for ProMicro and Pico which requires setting the DTR line.

See also PR #2870 and issue #2849 in the connector repo.

@elral
elral requested a review from DocMoebiuz as a code owner March 31, 2026 06:35
@github-actions

Copy link
Copy Markdown

Board and firmware folder for this pull request:
Mobiflight-Firmware.zip

@ccrawford

Copy link
Copy Markdown

Thank you! Community device authors will be pleased.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates board definition files to prevent unintended device resets (and subsequent unexpected startup messages) by disabling the DTR line on initial connect for boards where it is not required, while keeping DTR behavior for the Pro Micro unchanged.

Changes:

  • Set Connection.DtrEnable to false for Arduino Uno, Nano, and Mega board definitions.
  • Set Connection.DtrEnable to false for Raspberry Pi Pico board definition.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
_Boards/arduino_uno.board.json Disables DTR on connect to avoid auto-reset/bootloader side effects.
_Boards/arduino_nano.board.json Disables DTR on connect to avoid auto-reset/bootloader side effects.
_Boards/arduino_mega.board.json Disables DTR on connect to avoid auto-reset/bootloader side effects.
_Boards/raspberrypi_pico.board.json Disables DTR on connect to avoid unintended behavior on connect.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@github-actions

github-actions Bot commented Apr 6, 2026

Copy link
Copy Markdown

Board and firmware folder for this pull request:
Mobiflight-Firmware.zip

@elral

elral commented Jun 29, 2026

Copy link
Copy Markdown
Collaborator Author

I will close this PR as the plain Arduino Mega with 32u4 chip on board as USB-seriell converter needs the DTR line enabled to work.
If we want to disable the DTR line for CH340 chips, we have to set up two different board.json files and figure out all VID/PID's for CH340 chip.

@elral elral closed this Jun 29, 2026
@elral
elral deleted the dtr_disable branch June 30, 2026 12:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants