Cannot send/receive at CDC with general-purpose terminal

Post here first, or if you can't find a relevant section!
Post Reply
Kogie1022
Posts: 1
Joined: Wed Jul 02, 2025 3:39 pm

Cannot send/receive at CDC with general-purpose terminal

Post 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,
ag123
Posts: 1918
Joined: Thu Dec 19, 2019 5:30 am
Answers: 30

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

Post 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.
ozcar
Posts: 186
Joined: Wed Apr 29, 2020 9:07 pm
Answers: 5

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

Post by ozcar »

Do you write to Serial in your loop(), or perhaps only in setup()?
ozcar
Posts: 186
Joined: Wed Apr 29, 2020 9:07 pm
Answers: 5

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

Post 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?
fpiSTM
Posts: 1955
Joined: Wed Dec 11, 2019 7:11 pm
Answers: 108
Location: Le Mans
Contact:

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

Post by fpiSTM »

Post have hidden links. That's why I deleted the user and the post.
Post Reply

Return to “General discussion”