COM port disconnect from USB way to know it STM32F205
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2014-11-16 10:29 PM
Posted on November 17, 2014 at 07:29
I use today the USB OTG with ST example stm32_vcp_1.3.1.
I want to know if there a way to know that a connection I made with teh PC by openning COM port close.
I use today the functionDCD_OTG_ISR(USB_OTG_CORE_HANDLE *pdev)
but it only tell me whne a phisical connection was remove.ThanksBar. #stm32f205-usb-otg-stm32_vcp_1.3.
Labels:
- Labels:
-
USB
This discussion is locked. Please start a new topic to ask your question.
2 REPLIES 2
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2014-11-17 2:44 AM
Posted on November 17, 2014 at 11:44
Hi
I do not think there is any way to tell on a USB CDC device if the host VirtualCOM port has been closed. ''I use today the functionDCD_OTG_ISR(USB_OTG_CORE_HANDLE *pdev)
but it only tell me whne a phisical connection was remove.'' Yes, that is correct. The USB device can tell if it has been unplugged. A way you will be able to tell is to implement a message protocol that includes a 'ping' and detect if the 'ping' stops.Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2015-01-29 8:14 AM
Posted on January 29, 2015 at 17:14
Hi Strauss,
If I have well understood your query, you need to know when user opens/closes the com port? If so, this is possible from USB point of view but host terminal dependent.Which terminal are you using ?Note that with some terminal, it may be impossible to report com port open/close events.With regards,