PSoC 3 USB descriptors

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

cross mob
Anonymous
Not applicable

Dear PSoCDevelopers

   

 

   

I'm trying to establish communication  between PSoC 3 and PC. I'm using libusb 1.0 from Host side.

   

I was able to find the device (PSoC 3) and get USB descritors from the device, but I cannot change the USB descriptors of the PSoC (for example Vendor ID, Product ID, number of interfaces).

   

I'm trying to change USB descriptors using PSoC Creator by programming USBFS (USB full speed) component. But in the host (PC) I'm always getting the same USB descriptors. My purpose to send and receive som data from the PSoC.

   

What can be the reason that I'm always getting the same descriptors, even I'm changing it in the USBFS component?

   

I'd really appreciate, if someone could help me

   

Best regards,

   

Gurgen

0 Likes
30 Replies
Anonymous
Not applicable

 does the device is listed in the device manager (lsusb in linux) using your custom VID, PID? what is the VIP/PID you are getting?

0 Likes
Anonymous
Not applicable
        When you want to change the VID/PID, Basic process is 1) Change at USB configuration dialog - device descriptor list. 2) Change the VID/PID in driver information file. That's all. the Build was successed so that completed all. When you connect that USB device, the system could be recognize it. This can see on device manager. before your host program connect with that. and can verify the VID/PID by device manager. That is a process in Windows, something be different with Linux, but same same. OK?   
0 Likes
Anonymous
Not applicable

 Thanks for your answers.

   

I'm using windows 7

   

Yes the device is listed in device manager. In my driver program and in the device manager I'm getting the same VID and PID all the time.

   

VID 0x4B4

   

PID 0xF11A

   

I'm trying to change descriptors by changing device descriptors in USBFS component, but again I'm getting the same result.

0 Likes
Anonymous
Not applicable

It's very odd, OK ensure one by one.     

   

Assume your VID/PID is 04B4/ABCD;     

   

1) Change that on USB configurator.     

   

2) Build and check your driver information.     

   

  In your project /Generated_source/psoc3 directory,     

   

  Find the driver inf file "USB_cdc.inf".     

   

  Open it text editor, find this line.     

   

[DeviceList.NTx86]      

   

%DESCRIPTION%=DriverInstall, USB\VID_04B4&PID_ABCD      

   

And same PID discription lines.     

   

     

            

   

3) Connect the device to PC and Find it in device manager.     

   

4) Right-click that USB device and see the property - detail TAB – Hardware ID     

   

Can you see like this.     

   

USB\VID_04B4&PID_ABCD      

   

5) IF NOT;     

   

In the same property page – driver TAB     

   

[delete driver] button. Do this.     

   

And TRY from 3) again.     

   

It will be going well, cheer     

0 Likes
Anonymous
Not applicable

 Thank you very much for your help and time.

   

For not making mistake, I took from example projects USBFS_HID for PSoC 3.

   

I changed VID/PID 04B4/ABCD respectively. and here is the result from USBFS_1_cdc.inf file

   

   

[DeviceList.NTx86]

   

%DESCRIPTION%=DriverInstall, USB\VID_04B4&PID_F232

   

Whatever I'm changing VID and PID I'm getting the same result, even for my own written project I'm getting the same.

   

Then I'm using zadig to replace the driver, in device manager properties/detail/hardware-IDs I'm getting VID_04B4 and PID_F11A.

   

I think some strange things happening.

0 Likes
lock attach
Attachments are accessible only for community members.
Anonymous
Not applicable

OK, My previous post was regarding of BULK Transfer.     

   

I missed but that's correct on BULK.     

   

Your Interface type is HID.     

   

Something strange, there are 3 PID number.     

   

     

            

   

1) VID/PID 04B4/ABCD : your assumed.     

   

2) VID_04B4&PID_F232 : inf file     

   

 Was build wrong?     

   

3) VID_04B4 PID_F11A : actual number     

   

 What is this?     

   

     

            

   

Answer is here     

   

2) Perhaps, HID process make pseudo number     

   

3) There are many device of same name,

   

 So you had look wrong device, Check all HID devices.     

   

     

            

   

First picture is original.     

   

Second picture is changed.     

   

OK?

0 Likes
lock attach
Attachments are accessible only for community members.
Anonymous
Not applicable
        [2]   
0 Likes
Anonymous
Not applicable

 Thank you

   

There is written that build is successful completed.

   

 When I'm plugging and unplugging the device I can see that VID_04B4 and PID_F11A appearing and disappearing in the device manager. I wrote a driver program (using libusb 1.0) where I'm printing all the founded devices. When PSoC is unplug I can see that programm has found 9 devices. When I plug I can see that it found 10 devices and when I compare these 2 result I can see that VID_04B4 and PID_F11A this appears. That's why I think I look correct device.

   

Did you also use the same project?

   

You get different answers, maybe I should use another operating system for example linux?

   

 

   

Gurgen

0 Likes
lock attach
Attachments are accessible only for community members.
Anonymous
Not applicable

OK, We have another way, that can see it more clearly.     

   

I explain the way along use USB Control Center     

   

1) turn on USB Control Center.     

   

 You can see device list left side and description on right side.     

   

2) On Device Class Selection Tab, select HID devices.     

   

 And plug your PSoC USB, then "Mouse" is appear.     

   

 No other device name as "Mouse"     

   

3) Check and see the VID/PID, looks like the picture.     

   

     

            

   

I'm using same example for YOU.     

   

I don't know what "libusb1.0" is.     

   

Basically Control Center is using cypress's CyUSB.dll and "sys"     

   

      

   

The Control Center and suits is here.     

   

http://www.cypress.com/?rID=34870     

   

SuiteUSB 3.4 - USB Development tools for Visual Studio     

   

 CySuiteUSB_3_4_7_B204.exe English 17 MB 11/24/2011     

0 Likes
Anonymous
Not applicable

 @PSoC73 usblib is a library to talk to USB devices, it ued to be ued mainly on linux but works on windows too.

0 Likes
Anonymous
Not applicable
        Thank you zeta-san, I am confusing that HID device not need a particular driver. Anyway, the PID number looked by device manager that is true number.   
0 Likes
lock attach
Attachments are accessible only for community members.
Anonymous
Not applicable

 Thank you for your advise, that was really helpful.

   

I followed the steps you told me, I think my PSoC 3 is not being porgrammed, because I always get the same result.

   

After programming that example porject (mouse), in Device class selection tab It shows under devices served by the CyUSB.sys drive, not HID interface, and there are many interfaces, but I programmed only one.

   

What do you think is this problem connected with my chip or no.

   

I'll send also the picture that I'm getting.

   

Thanks

0 Likes
HeLi_263931
Level 8
Level 8
100 solutions authored 50 solutions authored 25 solutions authored

A simple question - maybe its silly: did you connect your PSoC3-kit with _both_ USB connectors to your PC? You might just see the programmer connected, but not the PSoC itself...

   

(Did you test with one of the example projects, to check whether this works at all?)

0 Likes
Anonymous
Not applicable

 Yes, I checked Capsense slider or Proximity Sensor, It works, I even wrote wrote my own button program using CapSense component it works.

   

Do you mean to connect PC and PSoC3 with the wire?

0 Likes
HeLi_263931
Level 8
Level 8
100 solutions authored 50 solutions authored 25 solutions authored

I meant one of the USB example projects (e.g. from here: http://www.cypress.com/?rID=39404 ). Yes, I meant connecting _both_ USB connectors of the PSoC board to the PC, not just the programming connector.

0 Likes
Anonymous
Not applicable

 Thank you for your massage.

   

Yes I did, here is my steps.

   

1. From PSoC Creator 2.0, I opened example projects, then USBFS_HID for PSoC 3 (this is mouse program).

   

Then I build it

   

2. I connected PSoC to the PC by the wire and press programming. It shows that PSoC pragrammed successfully.

   

Then I turn on the USB Control center. And I always there the same result (PID, VID, number of interface), the same I can see in device manager. (the result I posted by picture 2 massages above) It seems I have not programmed the device. Even I tried without USBFS (USB full speed) component and programmed any capSense programm, again I am getting the same result.

   

  

0 Likes
HeLi_263931
Level 8
Level 8
100 solutions authored 50 solutions authored 25 solutions authored

Did you try that the (unmodified) USBFS-HID example program did work correctly? (by moving your mouse cursor around with the PSoC3) 

   

If it doesn't, then the problem has nothing to do with chaning the PID, but lies deeper / earlier. If it does work indeed, then the problem is changing the PID - and we then can work from that.

0 Likes
Anonymous
Not applicable

Yes I tried, unmodified USBFS-HID example, but it seems not working.

   

I am moving the PSoC 3 but nothing happening with the mouse cursor.

0 Likes
HeLi_263931
Level 8
Level 8
100 solutions authored 50 solutions authored 25 solutions authored

As long as this demo doesn't work, we don't need to think about changing the PID. Get this to run first.

   

So we come back to the question about the 2 USB cables...

   

When using the USB device viewer (from http://www.nirsoft.net/utils/usb_devices_view.html ) it seems to me that the USB device 0x04b4/0xf111 is the programmer, and not the board. The example you tested uses the ID 0x04b4/0xf232. So either you didn't connect the second cable, or something else is amiss.

   

Did you select the proper voltage in the project configuration, and is the board configured the same? (Check the line 'USBFS_1_Start(0, USBFS_1_DWR_VDDD_OPERATION);') It should be 5V, but I think earlier versions of the AppNote project used 3.3V.

   

Are the clocks configured properly? (Check with the AppNote)

0 Likes
Anonymous
Not applicable

 Thank you for your help.

   

I have only one cable. I only used the cable that is comming with the PSoC3 and I have connected PC with the PSoC 3 with one cable.

   

For what used the second cable and how to connect that?

0 Likes
Anonymous
Not applicable
        Today, I'm exhausted cause with a problem of mine. So I might say as simple. 1) What is FTK03-SIM? I presume that is a PSoC Programmer or ICE, Please disconnect it when you try to connect your PSoC-USB. 2) Before you try to change the PID, Do the Example "as is" with no change. 3) If your PSoC-Mouse is start moving, You may change the PID. That is my thought. Thank you.   
0 Likes
HeLi_263931
Level 8
Level 8
100 solutions authored 50 solutions authored 25 solutions authored

The PSoC3 kit has 2 USB connectors. One is connected to the programmer on the board. the other one to the PSoC3 itself. With a single cable, you most likely have it connected to the programmer. But that means the PSoC3 is never connected to the PC at all... So you either need a second cable, or change it between the two USB ports on the PSoC3 board.

   

Please also refer to the documentation of your PSoC3 kit about that.

   

After that, you should get the demo to work properly, and should also see the changed PID.

0 Likes
Anonymous
Not applicable

Dear  PSoC73 and hli

   

Thank you very much, you really help me a lot, now I can understand many things

0 Likes
HeLi_263931
Level 8
Level 8
100 solutions authored 50 solutions authored 25 solutions authored

You're welcome. But please report back when you got it working, so other can learn from your experiences too...

   

 

   

Thanks, hli

0 Likes
Anonymous
Not applicable

 Thanks

   

Finally I was able to make it work.

   

The problem was connected with my PSoC 3, it was starter kit, so I ordered new PSoC 5 and was able to change all the descriptors.

   

Thank you for your help.

0 Likes
HeLi_263931
Level 8
Level 8
100 solutions authored 50 solutions authored 25 solutions authored

You had a PSoC3 first touch starter kit? Yes, that one cannot be used for USB stuff, since the USB lines on its PSoC3 are used as debugging pins...

0 Likes
Anonymous
Not applicable

 Yes, I was using PSoC 3 starter kit, that's was the reason that I was unable to change the descripptors.

   

Now I ordered and am working with CY8CKIT-001 development kit, and the discussion that we had above was really helpful.

   

Thanks for that.

0 Likes
HeLi_263931
Level 8
Level 8
100 solutions authored 50 solutions authored 25 solutions authored
        To clarify that last statement: you were perfectly able to change the USB descriptor, and it have has worked properly. The problem was that you never ever could create an USB connection to the PSoC3 on yout starter kit, since its USB lines are not exposed. You always saw only the programmer on the starter kit - and you cannot manipulate that one...   
0 Likes
Anonymous
Not applicable

 Exactly, I was trying to change the descriptors, but always in a Host I was getting the same descriptors. When I was programming the PSoC 3 starter kit with new descriptors, in Psoc creator I wasn't getting any erorrs.

0 Likes
HeLi_263931
Level 8
Level 8
100 solutions authored 50 solutions authored 25 solutions authored

You never got a USB connection to the PSoC3 you programmed. That was your problem. It just did not matter what you programmed on it (and I guess you did it the right way from the beginning). This had nothing to do with your program, it was a hardware problem.

0 Likes