Page 1 of 1

Cannot send/receive at CDC with general-purpose terminal

Posted: Sat Jul 05, 2025 7:51 am
by Kogie1022
Dear,

I am using the Blackpill board with the STM32F411.
After enabling serial communication with Serial.begin(115200); Serial.println("HELLO"); and uploading a sketch,
the program runs correctly.

A virtual COM port (COM12) is created via CDC, and the "HELLO" string can be received using the Arduino serial monitor.
However, when I open COM12 with a general-purpose serial terminal (such as Tera Term), no characters are received.
Of course, the communication settings such as baud rate are correct.

I don't understand why communication via CDC works with the Arduino serial monitor but not with general-purpose serial terminals when using the Blackpill.

I would appreciate any advice.

Best regards,

Re: Cannot send/receive at CDC with general-purpose terminal

Posted: Sat Jul 05, 2025 8:18 am
by ag123
show your codes that initialize and use Serial to provide a context.

and try

Code: Select all

void setup() {
    Serial.dtr(false);
    Serial.begin();
}
this is assuming you are using
https://github.com/stm32duino/Arduino_Core_STM32/

if that still doesn't work try another terminal app e.g. putty
https://www.putty.org/

baud rates doesn't matter with USB CDC, the raw speeds is 12 Mbps (usb 2.0 full speed, that is plus all the internal usb framing / headers / turn around etc etc included), but normally due to multiplexing (i.e. polling by the host, shared by keyboards, mouse, hubs etc), you'd normally get about 1 Mbps (may be more) there about.

Re: Cannot send/receive at CDC with general-purpose terminal

Posted: Sun Jul 06, 2025 5:25 am
by ozcar
Do you write to Serial in your loop(), or perhaps only in setup()?

Re: Cannot send/receive at CDC with general-purpose terminal

Posted: Mon Jul 07, 2025 9:36 pm
by ozcar
What's going on with this forum?

Two days ago I saw an update posted by Kogie, which included the sketch (which, for the record, did not write to Serial in setup(), but did write to Serial twice per second in loop() ). Seeing that I did not have a plausible explanation for what is happening, so I did not post any reply.

Now, I can't see that post!

I have occasionally noticed other posts disappearing, but I thought that some administrator had perhaps deleted them because they were considered to be spam, or AI generated rubbish. However, the post here did not look like either of those.

So, what gives? Did anybody else see that post, and can you still see it? Did I just dream that I saw it?

Re: Cannot send/receive at CDC with general-purpose terminal

Posted: Tue Jul 08, 2025 4:59 am
by fpiSTM
Post have hidden links. That's why I deleted the user and the post.