Menu

#60 Claim_interface

closed
nobody
None
5
2014-08-24
2011-09-26
Olivier
No

Hello

I am trying to use libusb-win32 under Win7 to deal with a microchip device .

The project involves bulk communication, so I tried to use Bulk.c included in the project.

I did two modifications in order to identify my device which are MY_VID = 0x04D8 and MY_PID = 0x0053

The driver is running and I launched TstLibUsb to watch the configurations of the chip :

DLL version: 1.2.5.0
Driver version: 1.2.5.0

bus/device idVendor/idProduct
bus-0/\.\libusb0-0001--0x04d8-0x0053 04D8/0053
- Manufacturer : Microchip Technology Inc.
- Product : Microchip WinUSB Example Device
bLength: 18
bDescriptorType: 01h
bcdUSB: 0200h
bDeviceClass: 00h
bDeviceSubClass: 00h
bDeviceProtocol: 00h
bMaxPacketSize0: 08h
idVendor: 04D8h
idProduct: 0053h
bcdDevice: 0000h
iManufacturer: 1
iProduct: 2
iSerialNumber: 0
bNumConfigurations: 1
wTotalLength: 32
bNumInterfaces: 1
bConfigurationValue: 1
iConfiguration: 0
bmAttributes: c0h
MaxPower: 50
bInterfaceNumber: 0
bAlternateSetting: 0
bNumEndpoints: 2
bInterfaceClass: 0
bInterfaceSubClass: 0
bInterfaceProtocol: 0
iInterface: 0
bEndpointAddress: 01h
bmAttributes: 02h
wMaxPacketSize: 128
bInterval: 1
bRefresh: 0
bSynchAddress: 0
bEndpointAddress: 81h
bmAttributes: 02h
wMaxPacketSize: 128
bInterval: 1
bRefresh: 0
bSynchAddress: 0

But, when I try to lauch bulk .c in my IDE (Labwindows CVI), an error appears, telling me that the there is a problem in
Libusb0-dll: err [set_configuration] could not set config 1 win err Parameter incorrect.

So, I look for this error on the internet and somme people modified the parameter to 0 . I did it and the error disappeared but, another one occured:
libusb0-dll:err [claim_interface] could notclaim interface 1 , invalid configuration 0.

I thought the identifier of the interfacew as wrong but none of the one I tried worked.

I do not know how to fix this problem.

Could you help me?

Thanks by advance.

Regards,

Olivier

Discussion

  • Olivier

    Olivier - 2011-09-28

    Hello,

    I eventually find out what happened.

    It was a problem in the usb configuration of my chip.

    The wMaxpacketSize of each endpoint has to be put to 64 and wTotalLength to 116.

    The software is able to read bulk informations from the controller.

    Regards

    Olivier

     
  • Xiaofan Chen

    Xiaofan Chen - 2012-01-27

    Thanks for the update.

     
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.