GUID for PSoC5 with WinUSB Question

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable

I know that there are a few examples using WinUSB vs CyUSB, but I cannot seem to find one that specifically addresses how to get MSOS Extended Properties Description functions working.  I am wanting to add a GUID such that when the device enumerates, it will enumerate with the GUID.

I already have it such that when I plug the device in, I can get it to load the WinUSB using the MSOS Descriptor, and the USB Configuration Descriptor changed from CYUSB to WINUSB.  I can query the registry of the computer, and I find that the device has been enumerated.

I found a project a long while back, though I cannot state where I found it now, that had indicated that it solved this, but after picking the project back up, I realize that it did not fix this issue.  This was debugged by going into the computer registry and manually adding the GUID.  Once this was done, my C# application could pick this device and begin to communicate with it.

In the USBFS_descr.c file that I have been using, it attempts to do this by adding the following:

#if defined(USBFS_ENABLE_MSOS_STRING)

    /******************************************************************************

    *  USB Microsoft OS String Descriptor

    *  "MSFT" identifies a Microsoft host

    *  "100" specifies version 1.00

    *  USBFS_GET_EXTENDED_CONFIG_DESCRIPTOR becomes the bRequest value

    *  in a host vendor device/class request

    ******************************************************************************/

    const uint8 CYCODE USBFS_MSOS_DESCRIPTOR[USBFS_MSOS_DESCRIPTOR_LENGTH] = {

    /* Descriptor Length                       */   0x12u,

    /* DescriptorType: STRING                  */   0x03u,

    /* qwSignature - "MSFT100"                 */   (uint8)'M', 0u, (uint8)'S', 0u, (uint8)'F', 0u, (uint8)'T', 0u,

                                                    (uint8)'1', 0u, (uint8)'0', 0u, (uint8)'0', 0u,

    /* bMS_VendorCode:                         */   USBFS_GET_EXTENDED_CONFIG_DESCRIPTOR,

    /* bPad                                    */   0x00u

    };

    /* Extended Configuration Descriptor */

    const uint8 CYCODE USBFS_MSOS_CONFIGURATION_DESCR[USBFS_MSOS_CONF_DESCR_LENGTH] = {

    /*  Length of the descriptor 4 bytes       */   0x28u, 0x00u, 0x00u, 0x00u,

    /*  Version of the descriptor 2 bytes      */   0x00u, 0x01u,

    /*  wIndex - Fixed:INDEX_CONFIG_DESCRIPTOR */   0x04u, 0x00u,

    /*  bCount - Count of device functions.    */   0x01u,

    /*  Reserved : 7 bytes                     */   0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u,

    /*  bFirstInterfaceNumber                  */   0x00u,

    /*  Reserved                               */   0x01u,

    /*  compatibleID    - "CYUSB\0\0"          */   /*(uint8)'C', (uint8)'Y', (uint8)'U', (uint8)'S', (uint8)'B',

                                                    0x00u, 0x00u, 0x00u,*/

    /*  compatibleID    - "CYUSB\0\0"          */   (uint8)'W', (uint8)'I', (uint8)'N', (uint8)'U', (uint8)'S', (uint8)'B',

                                                    0x00u, 0x00u,

    /*  subcompatibleID - "00001\0\0"          */   /*(uint8)'0', (uint8)'0', (uint8)'0', (uint8)'0', (uint8)'1',*/

                                                    0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u,0x00u, 0x00u,

    /*  Reserved : 6 bytes                     */   0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u

    };

       

    const uint8_t USBFS_MSOS_EXTENDED_PROPERTIES_DESCR[USBFS_MSOS_EXT_PROP_DESCR_LENGTH] =

    {

    // Header Section

    /*  Length of the descriptor 4 bytes       */   0x8E,0x00,0x00,0x00,                     /* dwLength: 142 = 10 + 132 */

    /*  Version of the descriptor 2 bytes      */   0x00,0x01,                               /* bcdVersion: The descriptor’s version number */

    /*  wIndex - Fixed:INDEX_CONFIG_DESCRIPTOR */   0x05,0x00,                                 /* wIndex: Extended property OS descriptor */

    /*  bCount - Count of device functions.    */   0x01,0x00,                               /* bCount: Number of properties */

    // Custom Property Section 1

    /* dwSize:                                 */   0x84,0x00,0x00,0x00,                     /* dwSize: 132 = 14 + 40 + 78 */

    /* dwPropertyDataType:                     */   0x01,0x00,0x00,0x00,                     /* dwPropertyDataType: A NULL-terminated Unicode String (REG_SZ) */

    /* wPropertyNameLength: 40                 */   0x28,0x00,                               /* wPropertyNameLength: 40 */

                                            

    /* bPropertyName: "DeviceInterfaceGUID"    */   'D',0x00,'e',0x00,'v',0x00,'i',0x00,'c',0x00,'e',0x00,

                                                    'I',0x00,'n',0x00,'t',0x00,'e',0x00,'r',0x00,'f',0x00,'a',0x00,'c',0x00,'e',0x00,

                                                    'G',0x00,'U',0x00,'I',0x00,'D',0x00,

                                                    0x00,0x00,

    /* dwPropertyDataLength: 78                */   0x4E,0x00,0x00,0x00,                    

                                            

    /* bPropertyData: "{01234567-2A4F-49EE-8DD3-FADEA377234A}" */

                                                    '{',0x00,

                                                    '0',0x00,'1',0x00,'2',0x00,'3',0x00,'4',0x00,'5',0x00,'6',0x00,'7',0x00,'-',0x00,

                                                    '2',0x00,'A',0x00,'4',0x00,'F',0x00,'-',0x00,

                                                    '4',0x00,'9',0x00,'E',0x00,'E',0x00,'-',0x00,

                                                    '8',0x00,'D',0x00,'D',0x00,'3',0x00,'-',0x00,

                                                    'F',0x00,'A',0x00,'D',0x00,'E',0x00,'A',0x00,'3',0x00,'7',0x00,'7',0x00,'2',0x00,'3',0x00,'4',0x00,'A',0x00,

                                                    '}',0x00,

                                                    0x00, 0x00   

    };

#endif /* USBFS_ENABLE_MSOS_STRING */

There is also a definition of USBFS_MSOS_EXT_PROP_DESCR_LENGTH in USBFS.h. 

My guess is that there is nothing that invokes the array of USBFS_MSOS_EXTENDED_PROPERTIES_DESCR to pass it to the system, but I am not sure where I need to be looking to get this to get passed to the OS at the appropriate time.

Any help would be appreciated.

0 Likes
1 Solution
AnkitaS_51
Employee
Employee
100 likes received 50 likes received 25 likes received
0 Likes
2 Replies
AnkitaS_51
Employee
Employee
100 likes received 50 likes received 25 likes received

Hello Adam,

This link may be useful:

Re: USBFS and WINUSB on CY8C5888LTI-LP097 chip.

0 Likes
Anonymous
Not applicable

Thanks for the thread, I will go and post over there to see if they might be able to help.

Adam

0 Likes