<?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 CDC SendNotification of CDC_NOTIFICATION_SERIAL_STATE not working in LPC Microcontrollers</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/CDC-SendNotification-of-CDC-NOTIFICATION-SERIAL-STATE-not/m-p/580178#M20182</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by robert hulsebos on Thu Dec 10 14:44:38 MST 2015&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Hi all,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am using a LPC1769 device to set up a virtual COM port via USB CDC. I got this all working using the example code and the usbd_175x_6x_lib.a library that comes with LPCopen v2.10.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;On my Windows PC I can connect with a terminal program (e.g. Termite, TeraTerm) to the virtual COM port of the device and exchange serial data, no problems there. All works fine.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;However, now I want to emulate to the PC that the DSR signal of the virtual COM port has become active, using the SendNotification function of the CDC API. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;So I issue this call:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;I&gt;ret = USBD_API-&amp;gt;cdc-&amp;gt;SendNotification(g_vCOM.hCdc, CDC_NOTIFICATION_SERIAL_STATE, CDC_SERIAL_STATE_TX_CARRIER);&lt;/I&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This API call always returns with ERR_API_INVALID_PARAM2. I checked the hCdc handle. I also checked the constants in the call against the usbcdc11.pdf specification for CDC. All are correct. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I don't understand this return value, as the usbd_cdcuser.h header file clearly states that the CDC_NOTIFICATION_SERIAL_STATE notification is one of the three notification types that are supported by the CDC driver. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Is this a bug in the library or is the header file wrong?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Other details:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;LPCXpresso 7.9.2&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;LPCopen 2.10&lt;/SPAN&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 15 Jun 2016 20:20:42 GMT</pubDate>
    <dc:creator>lpcware</dc:creator>
    <dc:date>2016-06-15T20:20:42Z</dc:date>
    <item>
      <title>CDC SendNotification of CDC_NOTIFICATION_SERIAL_STATE not working</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/CDC-SendNotification-of-CDC-NOTIFICATION-SERIAL-STATE-not/m-p/580178#M20182</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by robert hulsebos on Thu Dec 10 14:44:38 MST 2015&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Hi all,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am using a LPC1769 device to set up a virtual COM port via USB CDC. I got this all working using the example code and the usbd_175x_6x_lib.a library that comes with LPCopen v2.10.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;On my Windows PC I can connect with a terminal program (e.g. Termite, TeraTerm) to the virtual COM port of the device and exchange serial data, no problems there. All works fine.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;However, now I want to emulate to the PC that the DSR signal of the virtual COM port has become active, using the SendNotification function of the CDC API. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;So I issue this call:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;I&gt;ret = USBD_API-&amp;gt;cdc-&amp;gt;SendNotification(g_vCOM.hCdc, CDC_NOTIFICATION_SERIAL_STATE, CDC_SERIAL_STATE_TX_CARRIER);&lt;/I&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This API call always returns with ERR_API_INVALID_PARAM2. I checked the hCdc handle. I also checked the constants in the call against the usbcdc11.pdf specification for CDC. All are correct. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I don't understand this return value, as the usbd_cdcuser.h header file clearly states that the CDC_NOTIFICATION_SERIAL_STATE notification is one of the three notification types that are supported by the CDC driver. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Is this a bug in the library or is the header file wrong?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Other details:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;LPCXpresso 7.9.2&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;LPCopen 2.10&lt;/SPAN&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 20:20:42 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/CDC-SendNotification-of-CDC-NOTIFICATION-SERIAL-STATE-not/m-p/580178#M20182</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T20:20:42Z</dc:date>
    </item>
  </channel>
</rss>

