-
I have a project I would like to make, where a RP2040-based board is connected to a PC, and becomes a CDC device; besides transferring simple text back and forth, I need to send data to the host via control lines - specifically, DCD (data carrier detected), and RI (ring indicator). I believe such functionality exists in tinyusb, but please let me know if it does not. While I am comfortable to write most of the code based on the 'examples/device/cdc_msc' example, there are no examples which manipulate such control lines - so it might be useful to also update the cdc_msc example to demonstrate this. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 5 replies
-
in USB, device can only response to host request (cannot actively send anything). You need to run the run PC script to get the DCD, RI to see which command it send to device (similar to how DTR RTS is done with SET/GET CONTROL LINE STATE) then response accordingly. https://github.com/hathach/tinyusb/blob/master/src/class/cdc/cdc_device.c#L352 The ACM functional descriptor may need some change to indicate support for those parameter, you could find more detail in the USB CDC PSTN specs |
Beta Was this translation helpful? Give feedback.
-
While working with a separate theoretically-complete stack and library (PyFTDI and FTDI's VCP drivers), I was unable to get RI or DCD to respond reliably, so I will abandon this approach to communication (virtual COM port), as there seem to be too many other pieces missing from end to end, regardless of the status of tinyUSB. I will close this line of inquiry. |
Beta Was this translation helpful? Give feedback.
While working with a separate theoretically-complete stack and library (PyFTDI and FTDI's VCP drivers), I was unable to get RI or DCD to respond reliably, so I will abandon this approach to communication (virtual COM port), as there seem to be too many other pieces missing from end to end, regardless of the status of tinyUSB.
I will close this line of inquiry.