<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic How to determine that CDC VCOM was opened or closed? in LPC Microcontrollers</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/How-to-determine-that-CDC-VCOM-was-opened-or-closed/m-p/752019#M30264</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've third party board for controlling LCD display with UART control interface.&amp;nbsp;The board is accompanied with Windows application&amp;nbsp;that controls the board via custom protocol over the serial port (i.e. it uses Windows API to open and read from/write to a selected COM port).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In my final design, there's no physical serial port, but only an USB port connected to my board with LPC11U24/301. My board is also connected to the UART of the 3rd party board. So I'm trying to setup a virtual serial port over USB and forward the traffic between the control application and the 3rd party board via my board.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There're examples of UART &amp;lt;-&amp;gt; USB VCOM forwarding in LPCOpen sources which I copied and adapted to my needs. My problem is that the state machine doesn't account for the situation where&amp;nbsp;the 3rd party board sends&amp;nbsp;something and there's no reader on&amp;nbsp;the USB host, e.g. no when no application is using the serial port.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What I need is a way to tell that the remote side has opened and closed the virtual serial port. The&amp;nbsp;USB_IRQHandler is called when the virtual COM port is opened and closed in Windows, but I can't find any change in USB status registers, that would inform the firmware on MCU about this information.&amp;nbsp;The IRQ handler must be called for a reason so there must be some changes I presume.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What should I read in USB_IRQHandler to figure out that CDC VCOM was opened or closed?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 16 Feb 2018 15:35:19 GMT</pubDate>
    <dc:creator>vnovak</dc:creator>
    <dc:date>2018-02-16T15:35:19Z</dc:date>
    <item>
      <title>How to determine that CDC VCOM was opened or closed?</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/How-to-determine-that-CDC-VCOM-was-opened-or-closed/m-p/752019#M30264</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've third party board for controlling LCD display with UART control interface.&amp;nbsp;The board is accompanied with Windows application&amp;nbsp;that controls the board via custom protocol over the serial port (i.e. it uses Windows API to open and read from/write to a selected COM port).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In my final design, there's no physical serial port, but only an USB port connected to my board with LPC11U24/301. My board is also connected to the UART of the 3rd party board. So I'm trying to setup a virtual serial port over USB and forward the traffic between the control application and the 3rd party board via my board.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There're examples of UART &amp;lt;-&amp;gt; USB VCOM forwarding in LPCOpen sources which I copied and adapted to my needs. My problem is that the state machine doesn't account for the situation where&amp;nbsp;the 3rd party board sends&amp;nbsp;something and there's no reader on&amp;nbsp;the USB host, e.g. no when no application is using the serial port.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What I need is a way to tell that the remote side has opened and closed the virtual serial port. The&amp;nbsp;USB_IRQHandler is called when the virtual COM port is opened and closed in Windows, but I can't find any change in USB status registers, that would inform the firmware on MCU about this information.&amp;nbsp;The IRQ handler must be called for a reason so there must be some changes I presume.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What should I read in USB_IRQHandler to figure out that CDC VCOM was opened or closed?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Feb 2018 15:35:19 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/How-to-determine-that-CDC-VCOM-was-opened-or-closed/m-p/752019#M30264</guid>
      <dc:creator>vnovak</dc:creator>
      <dc:date>2018-02-16T15:35:19Z</dc:date>
    </item>
    <item>
      <title>Re: How to determine that CDC VCOM was opened or closed?</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/How-to-determine-that-CDC-VCOM-was-opened-or-closed/m-p/752020#M30265</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Vasek,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Are you using the on-chip USB drivers? You could check for a DTE activation and deactivation in the SET_CONTROL_LINE_STATE request call-back function.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Hope it helps!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;BR /&gt;Carlos Mendoza&lt;BR /&gt;Technical Support Engineer&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Mar 2018 21:48:07 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/How-to-determine-that-CDC-VCOM-was-opened-or-closed/m-p/752020#M30265</guid>
      <dc:creator>Carlos_Mendoza</dc:creator>
      <dc:date>2018-03-08T21:48:07Z</dc:date>
    </item>
  </channel>
</rss>

