cancel
Showing results for 
Search instead for 
Did you mean: 

USB CDC won't talk to PuTTY

Background: Quick USB stack test on Nucleo F429 with CubeMX-generated USB CDC stack.

Added one line to echo input in CDC_Receive_FS (example here: https://damogranlabs.com/2018/02/stm32-usb-cdc/)

Windows 10 PC sees virtual COM7 port (usual ding-****, shows up in device manager OK).

But this is weird:

PuTTY fails to connect with a message "Unable to open connection to COM7. Unable to configure serial port".

TeraTerm connects fine and the F429 echoes characters as expected.

Any idea what's going on?

Does the USB stack not properly fake the serial port configuration or some other silliness?

PuTTY is normally solid...

Thanks in advance for any pointers,

Best Regards, Dave

2 REPLIES 2
Pavel A.
Evangelist III

This is likely because the code in usb_cdc_if.c does not handle CDC_SET_LINE_CODING & CDC_GET_LINE_CODING.

Some drivers or terminal programs blissfully ignore this and just keep working,

Putty belongs to the pedantic sort.

What needs to be done: on CDC_SET_LINE_CODING, save the info passed by the host. On CDC_GET_LINE_CODING return this data.

-- pa

Yes, I know, possibly additional stuff needs to be recorded and echoed (not just line coding).

I'll write a bug report later; lots of applications and OS won't tolerate this omission.

Thanks,

Best Regards, Dave