Skip to content

tools/mpremote: Feature add control for rts / dts running in linux #17517

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

Closed
wants to merge 4 commits into from

Conversation

poWer4aiX
Copy link

Summary

mpremote is not working on my laptop running Ubuntu 24.04.2 LTS when trying to connect to an ESP32-CAM with the CAM-MB. This board has DTR connected to RST and requires DTR to be LOW for the ESP to be running. By adding the new options --dtr [0|1|off|on] and --rts [0|1|off|on] you can steer the logical level of the two lines.

In addition, many drivers seem to pull the signals up either when the device is closed or opened. This causes the ESP32 to perform a hard reset, which can take more than 1s. A special loop has been added if entering raw REPL mode is required.

The PR also solves #11451.

Testing

For the test I'm using the modified code since some weeks with an ESP32-CAM and MB, ESP32 NodeMCU Dev Kit C V2 and ESP8266 NodeMCU with ESP-12F module. I used it to copy files, install modules and with the REPL, or cause.

Trade-offs and Alternatives

When running without providing one of the new options, the code runs as before.

@robert-hh robert-hh added the tools Relates to tools/ directory in source, or other tooling label Jun 17, 2025
Copy link

Code size report:

   bare-arm:    +0 +0.000% 
minimal x86:    +0 +0.000% 
   unix x64:    +0 +0.000% standard
      stm32:    +0 +0.000% PYBV10
     mimxrt:    +0 +0.000% TEENSY40
        rp2:    +0 +0.000% RPI_PICO_W
       samd:    +0 +0.000% ADAFRUIT_ITSYBITSY_M4_EXPRESS
  qemu rv32:    +0 +0.000% VIRT_RV32

@poWer4aiX poWer4aiX closed this Jun 18, 2025
@poWer4aiX poWer4aiX deleted the feat-mpremote-dtr-rts branch June 18, 2025 07:06
@poWer4aiX
Copy link
Author

FYI, I closed this one as I did not knew how to solve the pre-commit errors... I have opened a new one (#17532) after cleaning up my local fork...

@robert-hh
Copy link
Contributor

You can always fix the commit errors locally and the force-push to the existing branch on your fork. The PR will then updazed.

@poWer4aiX
Copy link
Author

You can always fix the commit errors locally and the force-push to the existing branch on your fork. The PR will then updazed.

Good to know; this is something I have never done till now. I will give it a try the next time (hopefully not required :-D).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tools Relates to tools/ directory in source, or other tooling
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants