Skip to content
This repository was archived by the owner on Oct 1, 2024. It is now read-only.

Commit 1d8c33f

Browse files
authored
Merge pull request #1479 from microsoft/dev/bemcmorr/keep-serial-pins-high
Keep DTR, CTS, and RTS high
2 parents 6d15746 + 1daeb4d commit 1d8c33f

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

src/serialmonitor/serialportctrl.ts

+10-1
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,16 @@ export class SerialPortCtrl {
7272
if (err) {
7373
reject(err);
7474
} else {
75-
resolve();
75+
// These pins are tied to boot and reset on some devices like the
76+
// ESP32. We need to pull them high to avoid unexpected behavior when
77+
// opening the serial monitor.
78+
this._port.set({ dtr: true, cts: true, rts: true }, (err2) => {
79+
if (err2) {
80+
reject(err2);
81+
} else {
82+
resolve();
83+
}
84+
});
7685
}
7786
});
7887
});

0 commit comments

Comments
 (0)