Page 1 of 1

with USB CDC on ESP32-S3 and S2, how can I read and set DTR and RTS lines?

Posted: Mon Mar 10, 2025 9:15 am
by greengnu
I see in esp32-arduino that there's at least some callback providing dtr and rts lines (https://docs.espressif.com/projects/ard ... b_cdc.html ARDUINO_USB_CDC_LINE_STATE_EVENT)

in ESP-IDF, how can I read (in device mode) and write (in host mode) the (virtual) dtr and rts lines?

Re: with USB CDC on ESP32-S3 and S2, how can I read and set DTR and RTS lines?

Posted: Wed Mar 12, 2025 9:44 am
by nopnop2002
You can use this to know when the state of DTR and RTS changes.
callback_line_state_changed
This is the same function as ARDUINO_USB_CDC_LINE_STATE_EVENT.

How to use:
https://github.com/nopnop2002/esp-idf-s ... ain.c#L172

I don't know of any functions that change the state of DTR and RTS.

Re: with USB CDC on ESP32-S3 and S2, how can I read and set DTR and RTS lines?

Posted: Wed Mar 12, 2025 4:33 pm
by chegewara