Create an USB composite device with two VCP and one 'custom' interface

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

cross mob
RaAl_264636
Level 6
Level 6
50 sign-ins 25 sign-ins 10 solutions authored

Hello,

   

 

   

I want to create an USB device with two virtual COM ports and one custom interface. Since a VCP consumes three endpoints, two endpoints will remain for the custom interface.

   

I want to control the custom interface by CYUSB.DLL which is part of the SuiteUSB package.

   

So, my question is if anybody can help how to setup the USB_FS component the right way and how to create the correct INF file.

   

 

   

Regards,

   

 

   

Ralf

0 Likes
10 Replies
lock attach
Attachments are accessible only for community members.
AnkitaS_51
Employee
Employee
100 likes received 50 likes received 25 likes received

Several changes had to be made to the descriptor files, driver .inf files and API for the existing USBUART component

   

The component no longer automatically generates the required .inf files that are required. As such, if the Product String, Manufacturer String, VID or PID change, both .inf files must be manually edited

   

Editing the files is simple and can be done at the bottom of each descriptor file(IMAGE ATTACHED)

   

The descriptor file had to be edited manually .

   

CDC interfaces have a Interface Association Descriptor (IAD) to define the functionality.

0 Likes
RaAl_264636
Level 6
Level 6
50 sign-ins 25 sign-ins 10 solutions authored

Hello Anks,

   

 

   

thank you for the reply. However, it seems that there's a missunderstanding: The PSoC 5LP has eight endpoints (aside of the Control endpoint 0). Two CDCs will consume six endpoints, leaving two endpoints. What I want to have is two CDCs and one additional interface with an IN and an OUT endpoint, controllable by the CYUSB.DLL.

   

So, beside of your modifications of the INF file, I need to have:

   
        
  • the correct USBFS component setup for the remaining two endpoints (composite device?)
  •     
  • an INF file which binds the USBSER.SYS driver to the CDCs and the CYUSB.SYS to the other two endpoints
  •    
   

I already managed to have the two CDCs working (at least the first evaluation seems to work), but I've no idea how to setup the USBFS component correctly and how the INF file has to be modified.

   

 

   

Regards,

   

 

   

Ralf

0 Likes
himam_31
Employee
Employee
50 likes received 25 likes received 10 likes received

Hello

   

For a device that uses the iADs, the device is recognized with the PID-VID-and-MI (multiple interface number) combination of the interface in the inf file. Thus, the appropriate inf files have to be altered to include the MI number of the interface. For our example project, the vendor specific interface has MI_00 and the CDC class has MI_01. Thus, we will alter the inf file USBFS_1_CDC .inf to include the MI of the CDC class interface: From: %DESCRIPTION%=DriverInstall, USB\VID_04B4&PID_8051 To: %DESCRIPTION%=DriverInstall, USB\VID_04B4&PID_8051&MI_01

   

Similarly, the CyUSB.inf will be altered to include the VID and PID and MI of the vendor specific interface: From: %VID_XXXX&PID_XXXX.DeviceDesc%=CyUsb, USB\VID_XXXX&PID_XXXX To: %VID_04b4&PID_8051.DeviceDesc%=CyUsb, USB\VID_04b4&PID_8051&MI_00

   

The altered inf files can be used to point to the driver for a device. In case if you use the wrong inf file for a device, like using the MI_00 inf file for MI_01 interface. It will throw up the error saying that the inf file does not contain the information for your device

   

Thanks,

   

Hima

0 Likes
RaAl_264636
Level 6
Level 6
50 sign-ins 25 sign-ins 10 solutions authored

Hello Hima,

   

 

   

thank you for the explanation. With the MI_xx entries, I got it to work (or at least I think so). Now, the remaining problem is the CYUSB.SYS file. My Win7 64-bit doesn't accept it because it's not signed.

   

So, is there a signed driver package available? Or do you know another way to get it to work? I'll also check if it would be possible to use WinUSB as driver - this wouldn't be my preferred solution, but...

   

 

   

Regards,

   

 

   

Ralf

0 Likes
himam_31
Employee
Employee
50 likes received 25 likes received 10 likes received

Hello

   

 CYUSB.SYS and the driver from http://www.cypress.com/documentation/software-and-drivers/ez-usb-fx3-software-development-kit gives signed drivers. But if you are modifying the .inf file then the signature will get lost.

   

We do not have a signed driver suitable for multi interface.You will have to use Disable Driver Signature Enforcement which is not preferred.

   

Thanks,

   

Hima

0 Likes
RaAl_264636
Level 6
Level 6
50 sign-ins 25 sign-ins 10 solutions authored

Hello Hima,

   

 

   

you're right, the signature will get lost in this case. I saw that the USBFS component supports Microsoft OS descriptors which enables access by WinUSB driver. So I assume that Cypress have tested this feature and hopefully can provide an example application?

   

 

   

Regards,

   

 

   

Ralf

0 Likes
AnkitaS_51
Employee
Employee
100 likes received 50 likes received 25 likes received

Presently,we dont have example project as we do not have a signed driver suitable for multi interface.

0 Likes
RaAl_264636
Level 6
Level 6
50 sign-ins 25 sign-ins 10 solutions authored

Hi Anks,

   

 

   

are there any plans to release a generic driver with signature in the near future?

   

 

   

Regards,

   

 

   

Ralf

0 Likes
AnkitaS_51
Employee
Employee
100 likes received 50 likes received 25 likes received

Hello,

   

Currently I cant provide you with a definite timeline,but I can make request to other teams for that.

   

Sorry for the inconvenience.

0 Likes
RaAl_264636
Level 6
Level 6
50 sign-ins 25 sign-ins 10 solutions authored

Hello Anks,

   

 

   

no inconvenience, currently I'm experimenting with LibUSB, but it would be nice if there was a out-of-the-box solution provided by Cypress. I think other users might also be interested.

   

 

   

Regards,

   

 

   

Ralf

0 Likes