Author Topic: winusb_cs can't find the device  (Read 25430 times)

haoboy

  • Member
  • ***
  • Posts: 7
winusb_cs can't find the device
« on: May 02, 2012, 11:13:16 pm »
i  download the winusb_cs file, and modify the GUID and PID ,VID ,and i match the GUID in the inf with the GUID in pc application .
i want the application to connect my pic32 esk board . the firmware is provided by microchip ,it can find by microchip pc application , but can't finded by the winusb_cs i modified .

Jan Axelson

  • Administrator
  • Frequent Contributor
  • *****
  • Posts: 3033
    • Lakeview Research
Re: winusb_cs can't find the device
« Reply #1 on: May 03, 2012, 11:04:35 am »
Were you using Microchip's WinUSB PC application?

Does the device appear without problems in Windows Device Manager? If not, the setupapi log file might offer a clue:

http://support.microsoft.com/kb/927521

Jan

haoboy

  • Member
  • ***
  • Posts: 7
Re: winusb_cs can't find the device
« Reply #2 on: May 04, 2012, 02:35:12 am »
no ,i use your pc application , the winusb_cs file , i modifed you code ,and modified the .inf . but i failed to use your pc appliation to connect the pic 32 esk  board .

also   in windows Device Mananger  , i can find the usb device .


thx
« Last Edit: May 04, 2012, 02:36:50 am by haoboy »

Jan Axelson

  • Administrator
  • Frequent Contributor
  • *****
  • Posts: 3033
    • Lakeview Research
Re: winusb_cs can't find the device
« Reply #3 on: May 04, 2012, 08:18:17 am »
What I meant was, when you say, "it can find by microchip pc application," are you using Microchip's WinUSB application?

Does Device Manager show the winusb driver?

Jan

haoboy

  • Member
  • ***
  • Posts: 7
Re: winusb_cs can't find the device
« Reply #4 on: May 06, 2012, 09:12:09 am »
yes

i use the microchip winusb application .  the example is winusb highbandwidth demo.
I think if i install the driver and the guid in th .inf is right ,the pc application also have the same guid , then pc application will find the device .
is it correct ?

Jan Axelson

  • Administrator
  • Frequent Contributor
  • *****
  • Posts: 3033
    • Lakeview Research
Re: winusb_cs can't find the device
« Reply #5 on: May 06, 2012, 08:47:55 pm »
Do you have two INF files for the same VID and PID? Change your device's PID.

Jan

haoboy

  • Member
  • ***
  • Posts: 7
Re: winusb_cs can't find the device
« Reply #6 on: May 07, 2012, 04:59:35 am »
first , i use microchip pic32 esk board ,and use microchip firmware application example highbandwidth demo .
then, i  want use your pc application to connet the board , you pc application is winusb_cs .

and , i modify the vid and pid in the firmware application . ( so  no two .inf are same vid and pid)
and i use the .inf in your winusb_cs directory , and modify the vid and pid to match the firmware .
and i install the driver , the guid in the .inf and pc application is same , i don't modify it .

i can find the device in pc device manager .  but your pc application can't find the device . i think in theory , it will find .
so  why ?

thanks .

Jan Axelson

  • Administrator
  • Frequent Contributor
  • *****
  • Posts: 3033
    • Lakeview Research
Re: winusb_cs can't find the device
« Reply #7 on: May 07, 2012, 04:29:28 pm »
I don't know why your application isn't seeing the device.

In FindDeviceFromGuid, what does SetupDiEnumDeviceInterfaces return?

In Device Manager, right-click and select Uninstall. Remove and reattach the device. Then view the

setupapi log file to see if it installed OK. See:

http://support.microsoft.com/kb/927521

Jan

haoboy

  • Member
  • ***
  • Posts: 7
Re: winusb_cs can't find the device
« Reply #8 on: May 08, 2012, 11:33:53 am »
the above trial are based in window7 sysetem ,
just now ,i tried it in xp system , and some defferent penomenon appear .
so may it's the real reason .
i will try continuelly .


thanks very much .

haoboy

  • Member
  • ***
  • Posts: 7
Re: winusb_cs can't find the device
« Reply #9 on: May 08, 2012, 11:27:00 pm »
in  the win7 system ,the function setdienuminterface can't return the right state ,it's error state is 1784 .

Jan Axelson

  • Administrator
  • Frequent Contributor
  • *****
  • Posts: 3033
    • Lakeview Research
Re: winusb_cs can't find the device
« Reply #10 on: May 08, 2012, 11:45:56 pm »
GetLastError() or a web search will tell you that error code 1784 is "The supplied user buffer is not valid for the requested operation."

This is normal for the first call to SetupDiGetDeviceInterfaceDetail. (See the comments in my code.)

If you are getting this error for SetupDiEnumDeviceInterfaces, check your GUID declaration or whatever else you changed in the call.

Jan


haoboy

  • Member
  • ***
  • Posts: 7
Re: winusb_cs can't find the device
« Reply #11 on: May 09, 2012, 09:03:00 am »
but the quesiont is your code can find my board in xp system
and in win7 system ,it can't find .

Jan Axelson

  • Administrator
  • Frequent Contributor
  • *****
  • Posts: 3033
    • Lakeview Research
Re: winusb_cs can't find the device
« Reply #12 on: May 09, 2012, 09:54:23 am »
Is the Win7 system 64 bits?

Also, try this:

Attach the device.

From Windows Device Manager, right-click the device and select uninstall.

Physically remove and reattach the device.

Jan

twhittaker

  • Member
  • ***
  • Posts: 2
Re: winusb_cs can't find the device
« Reply #13 on: June 19, 2012, 11:10:58 pm »
I am having a similar problem with Windows 7, but using a USB viewer I have discovered that when the driver installs for my device, windows will assign it's own GUID for the interface regardless of what I put in the inf file. All the USB devices seem to have the same GUID, but a few seem to have a different Class GUID while the others all have the same generic Class GUID supplied by Microsoft. If I change the Class GUID to one generated by Microsoft and try to declare a custom USB, the driver install fails with Class not found.