<?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 Re: LPC54S018 WinUSB driver signing in MCUXpresso General</title>
    <link>https://community.nxp.com/t5/MCUXpresso-General/LPC54S018-WinUSB-driver-signing/m-p/1706691#M5080</link>
    <description>&lt;P&gt;Hi Xu,&lt;/P&gt;&lt;P&gt;We are having problems implementing this for our processor LPC54S018J2MET180. Can you provide information on how to implement for this processor?&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;&lt;P&gt;Alan&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 17 Aug 2023 13:57:42 GMT</pubDate>
    <dc:creator>VegiTech</dc:creator>
    <dc:date>2023-08-17T13:57:42Z</dc:date>
    <item>
      <title>LPC54S018 WinUSB driver signing</title>
      <link>https://community.nxp.com/t5/MCUXpresso-General/LPC54S018-WinUSB-driver-signing/m-p/1703179#M5074</link>
      <description>&lt;P&gt;Not sure which forum to post this in:&lt;/P&gt;&lt;P&gt;Has anyone had any luck signing the winusb.sys driver for their LPC USB based product?&lt;/P&gt;&lt;P&gt;Thank-you.&lt;/P&gt;</description>
      <pubDate>Thu, 10 Aug 2023 18:18:03 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-General/LPC54S018-WinUSB-driver-signing/m-p/1703179#M5074</guid>
      <dc:creator>VegiTech</dc:creator>
      <dc:date>2023-08-10T18:18:03Z</dc:date>
    </item>
    <item>
      <title>Re: LPC54S018 WinUSB driver signing</title>
      <link>https://community.nxp.com/t5/MCUXpresso-General/LPC54S018-WinUSB-driver-signing/m-p/1704243#M5076</link>
      <description>&lt;P&gt;Hi, VegiTech&lt;BR /&gt;Here are some suggestions,I use LPC54S018 and SDK lpcxpresso54114_dev_printer_virtual_plain_text_bm example to implement WinUSB driver device.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Xu_Zhang_0-1692002885469.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/236278i768CF9EBB34ED3BD/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Xu_Zhang_0-1692002885469.png" alt="Xu_Zhang_0-1692002885469.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;The implementation method is as follows:&lt;/P&gt;
&lt;P&gt;To meet the requirements of WinUSB, you need to modify the MCUXpressoSDK USB Stack to meet the following three items:&lt;/P&gt;
&lt;P&gt;1. In response to the string descriptor request, return the OS string descriptor with index 0xEE&lt;/P&gt;
&lt;P&gt;#define bMS_VendorCode ( 0xA0 )&lt;BR /&gt;//"MSFT100" : index : 0xEE : langId : 0x0000&lt;BR /&gt;uint8_tOS_StringDescritpor[ ] =&lt;BR /&gt;{0x12, 0x03, 'M', 0, 'S', 0, 'F', 0, 'T', 0, '1', 0, '0', 0, '0', 0, bMS_VendorCode, 0 };&lt;BR /&gt;When processing a USB string descriptor request, the OS_StringDescritpor response string descriptor is returned when the string index wIndex==0xEE. When this descriptor is returned, the USB device is recognized as a WCID device.&lt;BR /&gt;Note that Windows will only send a request for the OS string descriptor, indexed 0xEE, after the USB device is connected for the first time. The OS descriptor is stored in the registry. HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\UsbFlags\VVVVPPPPRRRR(VVVV-VID; PPPP - PID; RRRR - Version number). If a device cannot be correctly identified as WCID during development, delete the registry key corresponding to the USB device, and then uninstall the USB device in Device Manager so that new device insertion behavior is always available.&lt;/P&gt;
&lt;P&gt;2. Respond to the VendorRequest request provided by the vendor. The bRequest request number is the bMS_VendorCode value defined by the OS character descriptor (0xA0 in this routine). If bRequest== 0xA&amp;amp;&amp;amp;Windex == 0x04, the WCID Extended compatibility feature descriptor: "WINUSB" is returned.&lt;BR /&gt;//"WINUSB\0\0" : wIndex : 0x0004&lt;BR /&gt;uint8_tWINUSB_ExtendedCompatId_Descritpor[ ] =&lt;BR /&gt;{&lt;BR /&gt;0x28,0x00, 0x00, 0x00, // dwLength&lt;BR /&gt;0x00,0x01, // bcdVersion&lt;BR /&gt;0x04,0x00, // wIndex&lt;BR /&gt;0x01, // bCount&lt;BR /&gt;0x00,0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Reserved[7]&lt;BR /&gt;0x00, //bFirstInterfaceNumber&lt;BR /&gt;0x01, // RESERVED ( 0x01 )&lt;BR /&gt;'W','I', 'N', 'U', 'S', 'B', 0x00, 0x00, //compactiableID[8]&lt;BR /&gt;0x00,0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // subCompactiableID[8]&lt;BR /&gt;0x00,0x00, 0x00, 0x00, 0x00, 0x00 // Reserved[6]&lt;BR /&gt;};&lt;BR /&gt;3. Respond to the VendorRequest defined by the vendor. The bRequest request number is the bMS_VendorCode value defined by the OS character descriptor (0xA0 in this routine). If bRequest== 0xA&amp;amp;&amp;amp;Windex == 0x05, the device interface GUID descriptor: WINUSB_ExtendedProperty_InterfaceGUID_Descritpor is returned. This descriptor is used to distinguish between different WinUSB devices.&lt;BR /&gt;//L"DeviceInterfaceGUID" : wIndex = 0x0005&lt;BR /&gt;// L"{1D4B2365-4749-48EA-B38A-7C6FDDDD7E26}"&lt;BR /&gt;//&lt;BR /&gt;uint8_tWINUSB_ExtendedProperty_InterfaceGUID_Descritpor[ ] =&lt;BR /&gt;{ &lt;BR /&gt;///////////////////////////////////////&lt;BR /&gt;/// WCID property descriptor&lt;BR /&gt;///////////////////////////////////////&lt;BR /&gt;0x8e, 0x00, 0x00, 0x00, /* dwLength */&lt;BR /&gt;0x00, 0x01, /* bcdVersion */&lt;BR /&gt;0x05, 0x00, /* wIndex */&lt;BR /&gt;0x01, 0x00, /* wCount */&lt;BR /&gt;///////////////////////////////////////&lt;BR /&gt;/// registry propter descriptor&lt;BR /&gt;///////////////////////////////////////&lt;BR /&gt;0x84, 0x00, 0x00, 0x00, /* dwSize */&lt;BR /&gt;0x01, 0x00, 0x00, 0x00, /*dwPropertyDataType */&lt;BR /&gt;0x28, 0x00, /* wPropertyNameLength */&lt;BR /&gt;/* DeviceInterfaceGUID */&lt;BR /&gt;'D', 0x00, 'e', 0x00, 'v', 0x00, 'i',0x00, /* wcName_20 */&lt;BR /&gt;'c', 0x00, 'e', 0x00, 'I', 0x00, 'n',0x00, /* wcName_20 */&lt;BR /&gt;'t', 0x00, 'e', 0x00, 'r', 0x00, 'f',0x00, /* wcName_20 */&lt;BR /&gt;'a', 0x00, 'c', 0x00, 'e', 0x00, 'G',0x00, /* wcName_20 */&lt;BR /&gt;'U', 0x00, 'I', 0x00, 'D', 0x00, 0x00,0x00, /* wcName_20 */&lt;BR /&gt;0x4e, 0x00,0x00, 0x00, /* dwPropertyDataLength */&lt;BR /&gt;/* {7D9ADCFC-E570-4B38-BF4E-8F81F68964E0}*/&lt;BR /&gt;'{', 0x00, '7', 0x00, 'D', 0x00,'9', 0x00, /* wcData_39 */&lt;BR /&gt;'A', 0x00, 'D', 0x00, 'C', 0x00,'F', 0x00, /* wcData_39 */&lt;BR /&gt;'C', 0x00, '-',0x00, 'E', 0x00, '5', 0x00, /*wcData_39 */&lt;BR /&gt;'7', 0x00, '0', 0x00, '-', 0x00, '4',0x00, /* wcData_39 */&lt;BR /&gt;'B', 0x00, '3', 0x00, '8', 0x00, '-',0x00, /* wcData_39 */&lt;BR /&gt;'B', 0x00, 'F', 0x00, '4', 0x00, 'E', 0x00, /* wcData_39 */&lt;BR /&gt;'-', 0x00, '8', 0x00, 'F', 0x00, '8',0x00, /* wcData_39 */&lt;BR /&gt;'1', 0x00, 'F', 0x00, '6', 0x00, '8',0x00, /* wcData_39 */&lt;BR /&gt;'9', 0x00, '6', 0x00, '4', 0x00, 'E',0x00, /* wcData_39 */&lt;BR /&gt;'0', 0x00, '}', 0x00, 0x00, 0x00, /* wcData_39 */&lt;BR /&gt;4. Modify the MCUXpressoSDK USB routine to support WinUSB.&lt;BR /&gt;NXP's MCUXpresso SDK USB routine dev_printer_virtual_plain_text_bm was originally a printer routine that contained two Bulk transfer endpoints. Support for WinUSB can be quickly modified based on this routine.&lt;/P&gt;
&lt;P&gt;Modify the following macro definition to change the printer device macro definition to the user-defined protocol WinUSB device.&lt;BR /&gt;#defineUSB_DEVICE_DEMO_BCD_VERSION (0x0200U)&lt;/P&gt;
&lt;P&gt;#defineUSB_DEVICE_STRING_COUNT (4U)&lt;/P&gt;
&lt;P&gt;#defineUSB_PRINTER_CLASS (0xFFU)&lt;BR /&gt;#defineUSB_PRINTER_SUBCLASS (0xFFU)&lt;BR /&gt;#defineUSB_PRINTER_PROTOCOL (0x00U)&lt;/P&gt;
&lt;P&gt;#defineUSB_DEVICE_CONFIG_PRINTER_CLASS_CODE (0xFFU)&lt;BR /&gt;Add VendorRequest to the USB protocol stack description request:&lt;BR /&gt;/* Getdevice string descriptor request */&lt;BR /&gt;usb_status_tUSB_DeviceGetStringDescriptor(usb_device_handle handle,&lt;BR /&gt;usb_device_get_string_descriptor_struct_t*stringDescriptor)&lt;BR /&gt;{&lt;BR /&gt;uint8_t languageIndex = 0U;&lt;BR /&gt;uint8_t stringIndex = USB_DEVICE_STRING_COUNT;&lt;/P&gt;
&lt;P&gt;if (stringDescriptor-&amp;gt;stringIndex == 0U)&lt;BR /&gt;{&lt;BR /&gt;stringDescriptor-&amp;gt;buffer = (uint8_t*)g_UsbDeviceLanguageList.languageString;&lt;BR /&gt;stringDescriptor-&amp;gt;length =g_UsbDeviceLanguageList.stringLength;&lt;BR /&gt;}else if(stringDescriptor-&amp;gt;stringIndex == 0xEE) // OSString&lt;BR /&gt;{&lt;BR /&gt;stringDescriptor-&amp;gt;buffer = (uint8_t*)OS_StringDescritpor;&lt;BR /&gt;stringDescriptor-&amp;gt;length =OS_StringDescritpor[0];&lt;BR /&gt;}else&lt;BR /&gt;{&lt;BR /&gt;…………………………………………&lt;BR /&gt;…………………………………………&lt;BR /&gt;}&lt;BR /&gt;return kStatus_USB_Success;&lt;BR /&gt;}&lt;/P&gt;
&lt;P&gt;staticusb_status_t USB_DeviceCallback(usb_device_handle handle, uint32_t event, void*param)&lt;BR /&gt;{&lt;BR /&gt;…………………………………………&lt;BR /&gt;switch (event)&lt;BR /&gt;{&lt;BR /&gt;…………………………………………&lt;BR /&gt;…………………………………………&lt;BR /&gt;case kUSB_DeviceEventVendorRequest:&lt;BR /&gt;if (param)&lt;BR /&gt;{&lt;BR /&gt;status =USB_HandleVendorRequest(handle, event, param);&lt;BR /&gt;}&lt;BR /&gt;break;&lt;BR /&gt;default:&lt;BR /&gt;break;&lt;BR /&gt;}&lt;BR /&gt;return status;&lt;BR /&gt;}&lt;/P&gt;
&lt;P&gt;usb_status_tUSB_HandleVendorRequest(usb_device_handle handle, uint32_t event, void *param)&lt;BR /&gt;{&lt;BR /&gt;usb_status_t error = kStatus_USB_Success;&lt;BR /&gt;uint8_t* pFlash;&lt;/P&gt;
&lt;P&gt;/* Handle the vendor specific request. */&lt;BR /&gt;usb_device_control_request_struct_t*controlRequest = (usb_device_control_request_struct_t *)param;&lt;/P&gt;
&lt;P&gt;if (controlRequest-&amp;gt;setup-&amp;gt;bRequest== WCID_VENDOR_CODE)&lt;BR /&gt;{&lt;BR /&gt;switch(controlRequest-&amp;gt;setup-&amp;gt;wIndex)&lt;BR /&gt;{&lt;BR /&gt;case 4:&lt;BR /&gt;controlRequest-&amp;gt;buffer =(uint8_t*)WINUSB_ExtendedCompatId_Descritpor;&lt;BR /&gt;controlRequest-&amp;gt;length =USB_LEN_OS_FEATURE_DESC;&lt;BR /&gt;break;&lt;BR /&gt;case 5:&lt;BR /&gt;controlRequest-&amp;gt;buffer =(uint8_t*)WINUSB_ExtendedProperty_InterfaceGUID_Descritpor;&lt;BR /&gt;controlRequest-&amp;gt;length =USB_LEN_OS_PROPERTY_DESC;&lt;BR /&gt;break;&lt;BR /&gt;default:&lt;BR /&gt;error = kStatus_USB_InvalidRequest;&lt;BR /&gt;break;&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;return error;&lt;BR /&gt;}&lt;BR /&gt;After responding correctly to the above three descriptor requests, you can successfully enumerate the WinUSB device. In Windows Device Manager you can see that the WinUSB device is working properly:&lt;/P&gt;
&lt;P&gt;The code is attached.&lt;/P&gt;
&lt;P&gt;BR&lt;/P&gt;
&lt;P&gt;Xu Zhang&lt;/P&gt;</description>
      <pubDate>Mon, 14 Aug 2023 09:09:47 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-General/LPC54S018-WinUSB-driver-signing/m-p/1704243#M5076</guid>
      <dc:creator>Xu_Zhang</dc:creator>
      <dc:date>2023-08-14T09:09:47Z</dc:date>
    </item>
    <item>
      <title>Re: LPC54S018 WinUSB driver signing</title>
      <link>https://community.nxp.com/t5/MCUXpresso-General/LPC54S018-WinUSB-driver-signing/m-p/1704396#M5077</link>
      <description>&lt;P&gt;Hi Xu,&lt;/P&gt;&lt;P&gt;We are using the example specified as our starting example. If this information is implemented, will windows load the driver without the need of driver signing for production release?&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;&lt;P&gt;Alan Howard&lt;/P&gt;</description>
      <pubDate>Mon, 14 Aug 2023 14:54:24 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-General/LPC54S018-WinUSB-driver-signing/m-p/1704396#M5077</guid>
      <dc:creator>VegiTech</dc:creator>
      <dc:date>2023-08-14T14:54:24Z</dc:date>
    </item>
    <item>
      <title>Re: LPC54S018 WinUSB driver signing</title>
      <link>https://community.nxp.com/t5/MCUXpresso-General/LPC54S018-WinUSB-driver-signing/m-p/1704950#M5078</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Windows can load the WinUSB driver without signing, because WinUSB is part of the redistributable component of WDK, which is completely possible to do.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Xu Zhang&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 15 Aug 2023 09:38:04 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-General/LPC54S018-WinUSB-driver-signing/m-p/1704950#M5078</guid>
      <dc:creator>Xu_Zhang</dc:creator>
      <dc:date>2023-08-15T09:38:04Z</dc:date>
    </item>
    <item>
      <title>Re: LPC54S018 WinUSB driver signing</title>
      <link>https://community.nxp.com/t5/MCUXpresso-General/LPC54S018-WinUSB-driver-signing/m-p/1706691#M5080</link>
      <description>&lt;P&gt;Hi Xu,&lt;/P&gt;&lt;P&gt;We are having problems implementing this for our processor LPC54S018J2MET180. Can you provide information on how to implement for this processor?&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;&lt;P&gt;Alan&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 17 Aug 2023 13:57:42 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-General/LPC54S018-WinUSB-driver-signing/m-p/1706691#M5080</guid>
      <dc:creator>VegiTech</dc:creator>
      <dc:date>2023-08-17T13:57:42Z</dc:date>
    </item>
    <item>
      <title>Re: LPC54S018 WinUSB driver signing</title>
      <link>https://community.nxp.com/t5/MCUXpresso-General/LPC54S018-WinUSB-driver-signing/m-p/1706786#M5081</link>
      <description>&lt;P&gt;Hi Xu,&lt;/P&gt;&lt;P&gt;We were having issues getting this to work. Then I noticed we were using the lite version of the example. We are moving to the FreeRTOS version of the example (lpcxpresso54s018_dev-printer_virtual_plain_text_freertos). Any tips on getting this to work with the FreeRTOS version?&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;&lt;P&gt;Alan&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 17 Aug 2023 16:24:29 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-General/LPC54S018-WinUSB-driver-signing/m-p/1706786#M5081</guid>
      <dc:creator>VegiTech</dc:creator>
      <dc:date>2023-08-17T16:24:29Z</dc:date>
    </item>
    <item>
      <title>Re: LPC54S018 WinUSB driver signing</title>
      <link>https://community.nxp.com/t5/MCUXpresso-General/LPC54S018-WinUSB-driver-signing/m-p/1708140#M5082</link>
      <description>&lt;P&gt;hi,VegiTech&lt;BR /&gt;I am based on the LPC54S018 development board and lpcxpresso54s018_dev_printer_virtual_plain_text_freertos to do the example, you can refer to it, I hope this can be helpful to you.&lt;/P&gt;
&lt;P&gt;BR&lt;/P&gt;
&lt;P&gt;Xu Zhang&lt;/P&gt;</description>
      <pubDate>Mon, 21 Aug 2023 07:39:11 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-General/LPC54S018-WinUSB-driver-signing/m-p/1708140#M5082</guid>
      <dc:creator>Xu_Zhang</dc:creator>
      <dc:date>2023-08-21T07:39:11Z</dc:date>
    </item>
    <item>
      <title>Re: LPC54S018 WinUSB driver signing</title>
      <link>https://community.nxp.com/t5/MCUXpresso-General/LPC54S018-WinUSB-driver-signing/m-p/1708404#M5083</link>
      <description>&lt;P&gt;Thank you, they got it working.&lt;/P&gt;</description>
      <pubDate>Mon, 21 Aug 2023 13:44:59 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-General/LPC54S018-WinUSB-driver-signing/m-p/1708404#M5083</guid>
      <dc:creator>VegiTech</dc:creator>
      <dc:date>2023-08-21T13:44:59Z</dc:date>
    </item>
  </channel>
</rss>

