hi all,
i have a pico connected to a USB host, with the host running a custom application that is not just a simple terminal emulator; essentially, the host acts more like a docking station with a variety of peripherals (keyboard, display, GPIO ports, SD card, RTC) attached.
as part of this setup, i want to be able to do out-of-band signalling between the pico and the application running on the USB host, specifically using RTS and CTS as a means of distinguishing between normal console traffic and commands sent from the pico up to the host (as well as responses flowing back in the other direction).
my plan is/was to use the virtual RTS and CTS lines that normally exist across a CDC serial connection. when the pico wants to send a command up to the host it:
1. asserts CTS,
2. wait for the host to respond by asserting RTS.
at this point we can now use the communications channel for out-of-band communications. when finished we:
3. de-assert CTS,
4. wait for the host to respond by de-asserting RTS, then carry on as before...
the plan was all going well until someone told me, quite authoritatively, that there is no means provided in the SDK to control CTS. their wording, " the TinyUSB cdc_device header does not expose a function for manipulating CTS ".
can any of the experts confirm that CTS can not be controlled by an application running on the pico, and likewise if the state of RTS can or can not be read by said application?
cheers,
rob![Smile :-)]()
i have a pico connected to a USB host, with the host running a custom application that is not just a simple terminal emulator; essentially, the host acts more like a docking station with a variety of peripherals (keyboard, display, GPIO ports, SD card, RTC) attached.
as part of this setup, i want to be able to do out-of-band signalling between the pico and the application running on the USB host, specifically using RTS and CTS as a means of distinguishing between normal console traffic and commands sent from the pico up to the host (as well as responses flowing back in the other direction).
my plan is/was to use the virtual RTS and CTS lines that normally exist across a CDC serial connection. when the pico wants to send a command up to the host it:
1. asserts CTS,
2. wait for the host to respond by asserting RTS.
at this point we can now use the communications channel for out-of-band communications. when finished we:
3. de-assert CTS,
4. wait for the host to respond by de-asserting RTS, then carry on as before...
the plan was all going well until someone told me, quite authoritatively, that there is no means provided in the SDK to control CTS. their wording, " the TinyUSB cdc_device header does not expose a function for manipulating CTS ".
can any of the experts confirm that CTS can not be controlled by an application running on the pico, and likewise if the state of RTS can or can not be read by said application?
cheers,
rob

Statistics: Posted by robert.rozee — Wed Jan 24, 2024 11:59 am