Stephen B | 25 Aug 22:55 2014
Picon

LibUsbK Isochronous Write C# example

Hello,

I am trying to write isochronous data to my USB device. I tried the xfer-iso c example but had no luck to compile it, and preferably I want to use C# anyway. So I looked at the C# examples and found Read.Isochronous. This compiles and works, but unfortunately there is no Write example.

I tried to create it myself using the c example and the Read.Isochronous example, but with no luck yet. When writing, the following line always returns error 50 (the request is not supported):
usb.IsoWritePipe(pipeInfo.PipeId, dataBuffer, dataBuffer.Length, ovlkHandle, Iso.Handle);

I also can't find any iso out packets with USBPcap.

Does anyone have any idea what's causing this? I have attached my code along with a descriptor report of my device. There are 5 unnecessary endpoints from my base firmware code, but I decided to keep them in for now to prevent causing more bugs, as my device has worked and transferred iso data with libusb in the past.

Thanks in advance for any help!

Kind regards,
Stephen
-Device:
  bLength             :18
  bDescriptorType     :0x01
  bcdUSB              :0x0200
  bDeviceClass        :0x00 (Defined at Interface level)
  bDeviceSubClass     :0x00
  bDeviceProtocol     :0x00
  bMaxPacketSize0     :8
  idVendor            :0x03EB (Atmel Corp.)
  idProduct           :0x2423
  bcdDevice           :0x0100
  iManufacturer       :1 (LaserFX)
  iProduct            :2 (LaserFX USB Interface)
  iSerialNumber       :3 (9CEF79E83953333838362020FF1816)
  bNumConfigurations  :1
!End Device
-Configuration:
  bLength             :9
  bDescriptorType     :0x02
  wTotalLength        :69
  bNumInterfaces      :1
  bConfigurationValue :0x01
  iConfiguration      :0
  bmAttributes        :0xC0
  MaxPower            :50 (100ma)
 -Interface:
    bLength             :9
    bDescriptorType     :0x04
    bInterfaceNumber    :0x00
    bAlternateSetting   :0x00
    bNumEndpoints       :0
    bInterfaceClass     :0xFF (Vendor Specific Class)
    bInterfaceSubClass  :0xFF (Vendor Specific Subclass)
    bInterfaceProtocol  :0xFF (Vendor Specific Protocol)
    iInterface          :0
 !End Interface
 -Interface:
    bLength             :9
    bDescriptorType     :0x04
    bInterfaceNumber    :0x00
    bAlternateSetting   :0x01
    bNumEndpoints       :6
    bInterfaceClass     :0xFF (Vendor Specific Class)
    bInterfaceSubClass  :0xFF (Vendor Specific Subclass)
    bInterfaceProtocol  :0xFF (Vendor Specific Protocol)
    iInterface          :0
   -Endpoint:
      bLength             :7
      bDescriptorType     :0x05
      bEndpointAddress    :0x81
      bmAttributes        :0x03 (Interrupt)
      wMaxPacketSize      :64
      bInterval           :0x01
   !End Endpoint
   -Endpoint:
      bLength             :7
      bDescriptorType     :0x05
      bEndpointAddress    :0x02
      bmAttributes        :0x03 (Interrupt)
      wMaxPacketSize      :64
      bInterval           :0x01
   !End Endpoint
   -Endpoint:
      bLength             :7
      bDescriptorType     :0x05
      bEndpointAddress    :0x83
      bmAttributes        :0x02 (Bulk)
      wMaxPacketSize      :512
      bInterval           :0x00
   !End Endpoint
   -Endpoint:
      bLength             :7
      bDescriptorType     :0x05
      bEndpointAddress    :0x04
      bmAttributes        :0x02 (Bulk)
      wMaxPacketSize      :512
      bInterval           :0x00
   !End Endpoint
   -Endpoint:
      bLength             :7
      bDescriptorType     :0x05
      bEndpointAddress    :0x85
      bmAttributes        :0x01 (Isochronous, No Synchonization, Data Endpoint)
      wMaxPacketSize      :128
      bInterval           :0x01
   !End Endpoint
   -Endpoint:
      bLength             :7
      bDescriptorType     :0x05
      bEndpointAddress    :0x06
      bmAttributes        :0x01 (Isochronous, No Synchonization, Data Endpoint)
      wMaxPacketSize      :128
      bInterval           :0x01
   !End Endpoint
 !End Interface
!End Configuration
Attachment (Write.Isochronous.rar): application/rar, 10 KiB
------------------------------------------------------------------------------
Slashdot TV.  
Video for Nerds.  Stuff that matters.
http://tv.slashdot.org/
_______________________________________________
Libusb-win32-devel mailing list
Libusb-win32-devel <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libusb-win32-devel
Børge Strand-Bergesen | 22 Aug 14:47 2014
Picon

OvlK_Wait() fails for iso EP poll rate >1ms

Hi guys,

I'm working on a USB ASIO driver based on libusbK. It uses an
isochronous IN endpont for a feedback from the Device. Descriptor dump
is attached.

The ASIO driver fails when the IN endpoint's poll rate becomes >1ms.
(See w5.txt line 220.) Rapid polling isn't needed in the application,
and I'd like to make it slower.

Values of 4 and below work as expected in libusbK and mimic what I see
in Linux. 4 gives 1ms polling rate, 3->1/2ms, 2->1/4ms etc. But on
Linux I also have 5->2ms, 6->4ms, 7->8ms, 8->16ms. (Testing on OS X
roughly tracks what I see on Linux, but with fewer transitions. There
may be bugs in the descriptors which cause libusbK and OS X to
misunderstand them in different ways, where Linux seems to be OK.)

What seems to happen is a failure in OvlK_Wait(). When called,
GetLastErrorInternal(); returns 00000057h.

The calling code is line 138 of:
https://github.com/nikkov/Win-Widget/blob/experimental/uaclib/UsbDevice.h

I use the latest libusbK 3.0.7.0 which I downloaded, linked to and
installed today. The built .dll is a 32-bit application. My system is
Win7-64.

One thing I notice is that OvlK_Wait() parameter TransferredLength is
now PUINT. In the ASIO driver code it was PULONG for a while, but I
believe I have fixed that in all of the code now.

I hope you can help me out with this issue. I hope device performance
will be better on weaker computers with slower polling.

Let me know if you need more details about my system.

Thanks,
Børge
Information for device Henry Audio USB DAC 128      (VID=0x16D0 PID=0x075D): 

Connection Information:
------------------------------
Connection status: Device connected
Device actual bus speed: High 
Device is hub: No
Device adress: 0x0005
Current configuration value: 0x01
Number of open pipes: 4

Device Descriptor:
------------------------------
0x12	bLength
0x01	bDescriptorType
0x0200	bcdUSB
0xEF	bDeviceClass   (Miscellaneous device)
0x02	bDeviceSubClass   
0x01	bDeviceProtocol   
0x40	bMaxPacketSize0   (64 Bytes)
0x16D0	idVendor
0x075D	idProduct
0x1000	bcdDevice
0x01	iManufacturer   "Audio-Widget"
0x02	iProduct   "Henry Audio USB DAC 128     "
0x03	iSerialNumber   "2014082000BSB"
0x01	bNumConfigurations

Device Qualifier Descriptor:
------------------------------
0x0A	bLength
0x06	bDescriptorType
0x0200	bcdUSB
0xEF	bDeviceClass   (Miscellaneous device)
0x02	bDeviceSubClass   
0x01	bDeviceProtocol   
0x40	bMaxPacketSize0   (64 Bytes)
0x01	bNumConfigurations 
0x00	bReserved 

Configuration Descriptor:
------------------------------
0x09	bLength
0x02	bDescriptorType
0x00C1	wTotalLength
0x04	bNumInterfaces
0x01	bConfigurationValue
0x00	iConfiguration
0x80	bmAttributes   (Bus-powered Device)
0xFA	bMaxPower   (500 mA)

Interface Descriptor:
------------------------------
0x09	bLength
0x04	bDescriptorType
0x00	bInterfaceNumber
0x00	bAlternateSetting
0x00	bNumEndPoints
0x00	bInterfaceClass   
0x00	bInterfaceSubClass   
0x00	bInterfaceProtocol   
0x00	iInterface

Interface Association Descriptor:
------------------------------
0x08	bLength
0x0B	bDescriptorType
0x01	bFirstInterface
0x02	bInterfaceCount
0x01	bFunctionClass   (Audio Device Class)
0x00	bFunctionSubClass   
0x20	bFunctionProtocol   
0x00	iFunction

Interface Descriptor:
------------------------------
0x09	bLength
0x04	bDescriptorType
0x01	bInterfaceNumber
0x00	bAlternateSetting
0x00	bNumEndPoints
0x01	bInterfaceClass   (Audio Device Class)
0x01	bInterfaceSubClass   (Audio Control Interface)
0x20	bInterfaceProtocol   
0x07	iInterface   "Henry Audio USB DAC 128     "

AC Interface Header Descriptor:
------------------------------
0x09	bLength
0x24	bDescriptorType
0x01	bDescriptorSubtype
0x0200	bcdADC
0x04	bCategory
0x0040	wTotalLength
0x00	bmControls

AC Clock Source Descriptor:
------------------------------
0x08	bLength
0x24	bDescriptorType
0x0A	bDescriptorSubtype
0x05	bClockID
0x01	bmAttributes
0x07	bmControls
0x03	bAssocTerminal
0x05	iClockSource   "Clock 2"

AC Input Terminal Descriptor:
------------------------------
0x11	bLength
0x24	bDescriptorType
0x02	bDescriptorSubtype
0x11	bTerminalID
0x0101	wTerminalType   (USB Streaming)
0x00	bAssocTerminal
0x05	bCSourceID
0x02	bNrChannels
0x00000003	bmChannelConfig
0x00	iChannelNames
0x00	bmControls
0x08	iTerminal   "Audio-widget"

AC Feature Unit Descriptor:
------------------------------
0x12	bLength
0x24	bDescriptorType
0x06	bDescriptorSubtype
0x12	bUnitID
0x11	bSourceID
0x00000003	bmaControls(0)
0x00000003	bmaControls(1)
0x00000003	bmaControls(2)
0x00	iFeature

AC Output Terminal Descriptor:
------------------------------
0x0C	bLength
0x24	bDescriptorType
0x03	bDescriptorSubtype
0x13	bTerminalID
0x0302	wTerminalType   (Headphones)
0x00	bAssocTerminal
0x12	bSourceID
0x05	bCSourceID
0x0000	bmControls
0x00	iTerminal

Interface Descriptor:
------------------------------
0x09	bLength
0x04	bDescriptorType
0x02	bInterfaceNumber
0x00	bAlternateSetting
0x00	bNumEndPoints
0x01	bInterfaceClass   (Audio Device Class)
0x02	bInterfaceSubClass   (Audio Streaming Interface)
0x20	bInterfaceProtocol   
0x00	iInterface

Interface Descriptor:
------------------------------
0x09	bLength
0x04	bDescriptorType
0x02	bInterfaceNumber
0x01	bAlternateSetting
0x02	bNumEndPoints
0x01	bInterfaceClass   (Audio Device Class)
0x02	bInterfaceSubClass   (Audio Streaming Interface)
0x20	bInterfaceProtocol   
0x00	iInterface

AS Interface Descriptor:
------------------------------
0x10	bLength
0x24	bDescriptorType
0x01	bDescriptorSubtype
0x11	bTerminalLink
0x07	bmControls
0x01	bFormatType
0x00000001	bmFormats
0x02	bNrChannels
0x00000003	bmChannelConfig
0x00	iChannelNames

AS Format Type 1 Descriptor:
------------------------------
0x06	bLength
0x24	bDescriptorType
0x02	bDescriptorSubtype
0x01	bFormatType
0x04	bSubslotSize
0x18	bBitResolution   (24 Bits/sample)

Endpoint Descriptor:
------------------------------
0x07	bLength
0x05	bDescriptorType
0x02	bEndpointAddress   (OUT Endpoint)
0x05	bmAttributes	(Transfer: Isochronous / Synch: Asynchronous / Usage: Data)
0x0188	wMaxPacketSize   (392 Bytes) 
0x02	bInterval

AS Isochronous Data Endpoint Descriptor:
------------------------------
0x08	bLength
0x25	bDescriptorType
0x01	bDescriptorSubtype
0x00	bmAttributes
0x00	bmControls
0x00	bLockDelayUnits   (Undefined)
0x0000	wLockDelay

Endpoint Descriptor:
------------------------------
0x07	bLength
0x05	bDescriptorType
0x81	bEndpointAddress   (IN Endpoint)
0x11	bmAttributes	(Transfer: Isochronous / Synch: None / Usage: Feedback)
0x0004	wMaxPacketSize   (4 Bytes) 
0x05	bInterval

Interface Descriptor:
------------------------------
0x09	bLength
0x04	bDescriptorType
0x03	bInterfaceNumber
0x00	bAlternateSetting
0x02	bNumEndPoints
0x03	bInterfaceClass   (Human Interface Device Class)
0x00	bInterfaceSubClass   
0x00	bInterfaceProtocol   
0x00	iInterface

HID Descriptor:
------------------------------
0x09	bLength
0x21	bDescriptorType
0x0111	bcdHID
0x00	bCountryCode
0x01	bNumDescriptors
0x22	bDescriptorType   (Report descriptor)
0x0043	bDescriptorLength

Endpoint Descriptor:
------------------------------
0x07	bLength
0x05	bDescriptorType
0x84	bEndpointAddress   (IN Endpoint)
0x03	bmAttributes	(Transfer: Interrupt / Synch: None / Usage: Data)
0x0008	wMaxPacketSize   (8 Bytes) 
0x05	bInterval

Endpoint Descriptor:
------------------------------
0x07	bLength
0x05	bDescriptorType
0x05	bEndpointAddress   (OUT Endpoint)
0x03	bmAttributes	(Transfer: Interrupt / Synch: None / Usage: Data)
0x0008	wMaxPacketSize   (8 Bytes) 
0x05	bInterval

Other Speed Configuration Descriptor:
------------------------------
0x09	bLength
0x07	bDescriptorType
0x00C1	wTotalLength
0x04	bNumInterfaces
0x01	bConfigurationValue
0x00	iConfiguration
0x80	bmAttributes   (Bus-powered Device)
0xFA	bMaxPower   (500 mA)

Interface Descriptor:
------------------------------
0x09	bLength
0x04	bDescriptorType
0x00	bInterfaceNumber
0x00	bAlternateSetting
0x00	bNumEndPoints
0x00	bInterfaceClass   
0x00	bInterfaceSubClass   
0x00	bInterfaceProtocol   
0x00	iInterface

Interface Association Descriptor:
------------------------------
0x08	bLength
0x0B	bDescriptorType
0x01	bFirstInterface
0x02	bInterfaceCount
0x01	bFunctionClass   (Audio Device Class)
0x01	bFunctionSubClass   (Audio Control Interface)
0x20	bFunctionProtocol   
0x07	iFunction   "Henry Audio USB DAC 128     "

Interface Descriptor:
------------------------------
0x09	bLength
0x04	bDescriptorType
0x01	bInterfaceNumber
0x00	bAlternateSetting
0x00	bNumEndPoints
0x01	bInterfaceClass   (Audio Device Class)
0x01	bInterfaceSubClass   (Audio Control Interface)
0x20	bInterfaceProtocol   
0x07	iInterface   "Henry Audio USB DAC 128     "

AC Interface Header Descriptor:
------------------------------
0x09	bLength
0x24	bDescriptorType
0x01	bDescriptorSubtype
0x0200	bcdADC
0x04	bCategory
0x0040	wTotalLength
0x00	bmControls

AC Clock Source Descriptor:
------------------------------
0x08	bLength
0x24	bDescriptorType
0x0A	bDescriptorSubtype
0x05	bClockID
0x01	bmAttributes
0x07	bmControls
0x01	bAssocTerminal
0x00	iClockSource

AC Input Terminal Descriptor:
------------------------------
0x11	bLength
0x24	bDescriptorType
0x02	bDescriptorSubtype
0x11	bTerminalID
0x0101	wTerminalType   (USB Streaming)
0x00	bAssocTerminal
0x05	bCSourceID
0x02	bNrChannels
0x00000003	bmChannelConfig
0x00	iChannelNames
0x00	bmControls
0x00	iTerminal

AC Feature Unit Descriptor:
------------------------------
0x12	bLength
0x24	bDescriptorType
0x06	bDescriptorSubtype
0x12	bUnitID
0x11	bSourceID
0x00000003	bmaControls(0)
0x00000003	bmaControls(1)
0x00000003	bmaControls(2)
0x00	iFeature

AC Output Terminal Descriptor:
------------------------------
0x0C	bLength
0x24	bDescriptorType
0x03	bDescriptorSubtype
0x13	bTerminalID
0x0302	wTerminalType   (Headphones)
0x00	bAssocTerminal
0x12	bSourceID
0x05	bCSourceID
0x0000	bmControls
0x00	iTerminal

Interface Descriptor:
------------------------------
0x09	bLength
0x04	bDescriptorType
0x02	bInterfaceNumber
0x00	bAlternateSetting
0x00	bNumEndPoints
0x01	bInterfaceClass   (Audio Device Class)
0x02	bInterfaceSubClass   (Audio Streaming Interface)
0x20	bInterfaceProtocol   
0x00	iInterface

Interface Descriptor:
------------------------------
0x09	bLength
0x04	bDescriptorType
0x02	bInterfaceNumber
0x01	bAlternateSetting
0x02	bNumEndPoints
0x01	bInterfaceClass   (Audio Device Class)
0x02	bInterfaceSubClass   (Audio Streaming Interface)
0x20	bInterfaceProtocol   
0x00	iInterface

AS Interface Descriptor:
------------------------------
0x10	bLength
0x24	bDescriptorType
0x01	bDescriptorSubtype
0x11	bTerminalLink
0x07	bmControls
0x01	bFormatType
0x00000001	bmFormats
0x02	bNrChannels
0x00000003	bmChannelConfig
0x00	iChannelNames

AS Format Type 1 Descriptor:
------------------------------
0x06	bLength
0x24	bDescriptorType
0x02	bDescriptorSubtype
0x01	bFormatType
0x04	bSubslotSize
0x18	bBitResolution   (24 Bits/sample)

Endpoint Descriptor:
------------------------------
0x07	bLength
0x05	bDescriptorType
0x02	bEndpointAddress   (OUT Endpoint)
0x05	bmAttributes	(Transfer: Isochronous / Synch: Asynchronous / Usage: Data)
0x0188	wMaxPacketSize   (392 Bytes) 
0x01	bInterval

AS Isochronous Data Endpoint Descriptor:
------------------------------
0x08	bLength
0x25	bDescriptorType
0x01	bDescriptorSubtype
0x00	bmAttributes
0x00	bmControls
0x00	bLockDelayUnits   (Undefined)
0x0000	wLockDelay

Endpoint Descriptor:
------------------------------
0x07	bLength
0x05	bDescriptorType
0x81	bEndpointAddress   (IN Endpoint)
0x11	bmAttributes	(Transfer: Isochronous / Synch: None / Usage: Feedback)
0x0004	wMaxPacketSize   (4 Bytes) 
0x01	bInterval

Interface Descriptor:
------------------------------
0x09	bLength
0x04	bDescriptorType
0x03	bInterfaceNumber
0x00	bAlternateSetting
0x02	bNumEndPoints
0x03	bInterfaceClass   (Human Interface Device Class)
0x00	bInterfaceSubClass   
0x00	bInterfaceProtocol   
0x00	iInterface

HID Descriptor:
------------------------------
0x09	bLength
0x21	bDescriptorType
0x0111	bcdHID
0x00	bCountryCode
0x01	bNumDescriptors
0x22	bDescriptorType   (Report descriptor)
0x0043	bDescriptorLength

Endpoint Descriptor:
------------------------------
0x07	bLength
0x05	bDescriptorType
0x84	bEndpointAddress   (IN Endpoint)
0x03	bmAttributes	(Transfer: Interrupt / Synch: None / Usage: Data)
0x0008	wMaxPacketSize   (8 Bytes) 
0x05	bInterval

Endpoint Descriptor:
------------------------------
0x07	bLength
0x05	bDescriptorType
0x05	bEndpointAddress   (OUT Endpoint)
0x03	bmAttributes	(Transfer: Interrupt / Synch: None / Usage: Data)
0x0008	wMaxPacketSize   (8 Bytes) 
0x05	bInterval

String Descriptor Table
--------------------------------
Index  LANGID  String
0x00   0x0000  0x0409 
0x01   0x0409  "Audio-Widget"
0x02   0x0409  "Henry Audio USB DAC 128     "
0x03   0x0409  "2014082000BSB"
0x04   0x0409  "Clock 1"
0x05   0x0409  "Clock 2"
0x06   0x0409  "Select clock"
0x07   0x0409  "Henry Audio USB DAC 128     "
0x08   0x0409  "Audio-widget"
0x09   0x0409  "Audio Out Trm"
0x0A   0x0409  "Widget-Lite"
0x0B   0x0409  "Audio In Alt"

------------------------------

Connection path for device: 
Intel(R) 7 Series/C216 Chipset Family USB Enhanced Host Controller - 1E2D
Root Hub
Generic USB Hub
Henry Audio USB DAC 128      (VID=0x16D0 PID=0x075D)

Brought to you by TDD v1.82.0, Aug 20 2013, 17:17:20
------------------------------------------------------------------------------
Slashdot TV.  
Video for Nerds.  Stuff that matters.
http://tv.slashdot.org/
_______________________________________________
Libusb-win32-devel mailing list
Libusb-win32-devel <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libusb-win32-devel
Magnus Therning | 19 Aug 13:13 2014

libusbK: interrupt transfer

I'm feeling a little stupid here, but hopefully this is so simple to
answer that you'll forgive me.

I've been experimenting with LibUsbDotNet, but ran into an issue that
I couldn't figure out so I switched to experimenting with the second
lib on my list: libusbK.

I need to first do a bunch of control transfers, which is easily
handled using UsbK_ControlTransfer.  Then I need to do an interrupt
transfer (a read).  But I can't for the life of me figure out the API
for getting an interrupt endpoint to read from.  What is it that I'm
missing?

/M

--

-- 
Magnus Therning                      OpenPGP: 0xAB4DFBA4
email: magnus <at> therning.org   jabber: magnus <at> therning.org
twitter: magthe               http://therning.org/magnus

------------------------------------------------------------------------------
jebali.aymen | 12 Aug 18:15 2014
Picon

Best example to do isochronous streaming

Hi,

I am implementing a solution for continuous ADC sampling using the SAM3U
microcontroller from Atmel.
In this use case, the SAM3U sends packets of 512 bytes over USB and the PC
is reading this data through libusb.

the sampling rate is 48000 Hz each sample is 16 bits length.

When reading reading the data from USB pipes, I see that sometimes the
number of samples is less that what was sent from the SAM3U.

Even sometimes more :( .

I tried the latest versions of libusb0 and libusbK and both had the same
issues, except that with libusbK the problem is less frequent.

I use:
- a windows 7 32 bits OS.
- a C DLL that wraps teh libsub .

With the libsubK I tried the available examples:
- xfer-stream.c
- xfer-iso-read.c
- xfer-iso.c

and none have fixed the issue.

Could anyone recommend please a solution or send me an example of libsub
implmentation that could fix this problem?

Thanks,
Aymen

--
View this message in context: http://libusb.6.n5.nabble.com/Best-example-to-do-isochronous-streaming-tp5713552.html
Sent from the LibUSB Dev - Win32 mailing list archive at Nabble.com.

------------------------------------------------------------------------------
vancv | 11 Aug 17:30 2014
Picon

Windows HID Control Endpoint

Hello, I have joystick (Saitek X52) with LCD Display and I want to be able to
control it.
For example under Linux I can use this snippet to control brightness:

libusb_control_transfer (
                        devh,
                        LIBUSB_ENDPOINT_OUT | LIBUSB_REQUEST_TYPE_VENDOR |
LIBUSB_RECIPIENT_DEVICE,
                        X52PRO_REQUEST,
                        20,
                        X52PRO_MFDBRI,
                        NULL,
                        0,
                        1000);

Under windows I get following error:
libusb: warning [hid_submit_control_transfer] unsupported HID control
request
Error sending Feature report

If I change USB driver from HID to WINUSB (using Zadig), I can successfully
control display, but joystick itself does not work. Is there a way to have
working joystick with functional control endpoint under windows?

Thanks. 

--
View this message in context: http://libusb.6.n5.nabble.com/Windows-HID-Control-Endpoint-tp5713548.html
Sent from the LibUSB Dev - Win32 mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Pradeepa Senanayake | 6 Aug 13:08 2014
Picon

Generating inf file for multiple devices.

Hello,

I need to support multiple devices with different PID, VID values through libusbK. Currently I am using the InfWizard v2.0 to generate the inf files. 

But rather than having separate driver package per device, is there any way to generate an INF file to install the driver to all the devices? I can change the INF file but then the driver signing will become a problem.

Is there any tool for this? I have no experience in driver signing. How does libusb sign the different INF files? 

Normally if we change INF file the driver needs to be signed again by Microsoft. But here it looks like drivers are already signed. How to achieve that?

Best Regards,
Pradeepa Senanayake.
------------------------------------------------------------------------------
Infragistics Professional
Build stunning WinForms apps today!
Reboot your WinForms applications with our WinForms controls. 
Build a bridge from your legacy apps to the future.
http://pubads.g.doubleclick.net/gampad/clk?id=153845071&iu=/4140/ostg.clktrk
_______________________________________________
Libusb-win32-devel mailing list
Libusb-win32-devel <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libusb-win32-devel
Pradeepa Senanayake | 6 Aug 11:15 2014
Picon

Issue in the LstK_MoveReset API

Hello all,

This may be a documentation issue.

The header of LstK_MoveReset looks like,

KUSB_EXP VOID KUSB_API LstK_MoveReset(
   _in KLST_HANDLE DeviceList);

Here the return type is VOID. But the comments and the doc is such that it returns a BOOL value.

I took the source from "http://usb-travis.googlecode.com/svn/trunk" and checked too. I think it is a small documentation issue. Better to fix.

Best Regards,
Pradeepa Senanayake.
------------------------------------------------------------------------------
Infragistics Professional
Build stunning WinForms apps today!
Reboot your WinForms applications with our WinForms controls. 
Build a bridge from your legacy apps to the future.
http://pubads.g.doubleclick.net/gampad/clk?id=153845071&iu=/4140/ostg.clktrk
_______________________________________________
Libusb-win32-devel mailing list
Libusb-win32-devel <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libusb-win32-devel
Wilhelmsen, Nils_christian | 1 Aug 13:00 2014

URB Incorrect Device Address

Hi,

 

I am currently trying to get my USB device to work with libusb-win32. To do this I have set up a simple program that attempts to send  a test string to a bulk endpoint. However, when I ran the program, no error messages came up but the device did not receive the test string, so I decided to intercept the URBs with USBPcap. In the URBs, the device address is set to 0xFF, whereas from USB view I found the device address to be 0x05, which implies the URB is supplying the incorrect device address.

 

Does anyone know why this occurs? Any help will be appreciated.

 

Best regards,

Nils

 

------------------------------------------------------------------------------
Want fast and easy access to all the code in your enterprise? Index and
search up to 200,000 lines of code with a free copy of Black Duck
Code Sight - the same software that powers the world's largest code
search on Ohloh, the Black Duck Open Hub! Try it now.
http://p.sf.net/sfu/bds
_______________________________________________
Libusb-win32-devel mailing list
Libusb-win32-devel <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libusb-win32-devel
mdimiou | 31 Jul 09:43 2014
Picon

Libusb 0.1.12.1 in Visual Studio express 2010


I follow the directions of this site:
http://en.wikibooks.org/wiki/C%2B%2B_Programming/Compiler/Linker/Libraries/Configuring_Visual_Studio

I have a 64bit system so i put in project
properties->Linker->General->Additional Libraries Directories the path:
C:\Program Files (x86)\LibUSB-Win32\lib\msvc_x64.
In  project properties->Linker->Input->Additional Dependencies -> i type
libusb.lib 

I am trying to build my code in Visual Studio C++ 2010 Express and i have
these msgs.

1>------ Build started: Project: diplomatiki, Configuration: Debug Win32
------
1>  diplomatiki.cpp
1>c:\users\sampson\documents\visual studio
2010\projects\diplomatiki\diplomatiki\diplomatiki.cpp(1): warning C4627:
'#include <usb.h>': skipped when looking for precompiled header use
1>          Add directive to 'StdAfx.h' or rebuild precompiled header
1>c:\users\sampson\documents\visual studio
2010\projects\diplomatiki\diplomatiki\diplomatiki.cpp(2): warning C4627:
'#include <stdio.h>': skipped when looking for precompiled header use
1>          Add directive to 'StdAfx.h' or rebuild precompiled header
1>c:\users\sampson\documents\visual studio
2010\projects\diplomatiki\diplomatiki\diplomatiki.cpp(101): fatal error
C1010: unexpected end of file while looking for precompiled header. Did you
forget to add '#include "StdAfx.h"' to your source?
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

Can you send me some step-by-step directions for linking libusb to VS???

--
View this message in context: http://libusb.6.n5.nabble.com/Libusb-0-1-12-1-in-Visual-Studio-express-2010-tp5713498.html
Sent from the LibUSB Dev - Win32 mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Infragistics Professional
Build stunning WinForms apps today!
Reboot your WinForms applications with our WinForms controls. 
Build a bridge from your legacy apps to the future.
http://pubads.g.doubleclick.net/gampad/clk?id=153845071&iu=/4140/ostg.clktrk
AnTrung.gmail | 30 Jul 12:48 2014
Picon

Problem when read data from USB

Hello All!

  I am new to libusb and this community. I am using windows-backend and

created a small test app with below code. But I get the following error

Always , My error is “IoTimedOur. No more bytes” or “Win32Error:Win32Error:No more bytes” when I plug other USB

 

            public static UsbDeviceFinder MyUsbFinder = new UsbDeviceFinder(0x058F, 0x6387);

public static void Main(string[] args)

        {

            UsbRegDeviceList allDevices = UsbDevice.AllDevices;

            ErrorCode ec = ErrorCode.None;

 

            try

            {

                // Find and open the usb device.

                MyUsbDevice = UsbDevice.OpenUsbDevice(MyUsbFinder);

 

                // If the device is open and ready

                if (MyUsbDevice == null) throw new Exception("Device Not Found.");

 

                // If this is a "whole" usb device (libusb-win32, linux libusb-1.0)

                // it exposes an IUsbDevice interface. If not (WinUSB) the

                // 'wholeUsbDevice' variable will be null indicating this is

                // an interface of a device; it does not require or support

                // configuration and interface selection.

                IUsbDevice wholeUsbDevice = MyUsbDevice as IUsbDevice;

                if (!ReferenceEquals(wholeUsbDevice, null))

                {

                    // This is a "whole" USB device. Before it can be used,

                    // the desired configuration and interface must be selected.

 

                    // Select config #1

                    wholeUsbDevice.SetConfiguration(1);

 

                    // Claim interface #0.

                    wholeUsbDevice.ClaimInterface(0);

                }

 

                // open read endpoint 1.

                UsbEndpointReader reader = MyUsbDevice.OpenEndpointReader(ReadEndpointID.Ep01);

 

 

                byte[] readBuffer = new byte[1024];

                while (ec == ErrorCode.None)

                {

                    int bytesRead;

 

                    // If the device hasn't sent data in the last 5 seconds,

                    // a timeout error (ec = IoTimedOut) will occur.

                    ec = reader.Read(readBuffer, 5000, out bytesRead);

 

                    if (bytesRead == 0) throw new Exception(string.Format("{0}:No more bytes!", ec));

                    Console.WriteLine("{0} bytes read", bytesRead);

 

                    // Write that output to the console.

                    Console.Write(Encoding.Default.GetString(readBuffer, 0, bytesRead));

                }

 

                Console.WriteLine("\r\nDone!\r\n");

            }

            catch (Exception ex)

            {

                Console.WriteLine();

                Console.WriteLine((ec != ErrorCode.None ? ec + ":" : String.Empty) + ex.Message);

            }

            finally

            {

                if (MyUsbDevice != null)

                {

                    if (MyUsbDevice.IsOpen)

                    {

                        // If this is a "whole" usb device (libusb-win32, linux libusb-1.0)

                        // it exposes an IUsbDevice interface. If not (WinUSB) the

                        // 'wholeUsbDevice' variable will be null indicating this is

                        // an interface of a device; it does not require or support

                        // configuration and interface selection.

                        IUsbDevice wholeUsbDevice = MyUsbDevice as IUsbDevice;

                        if (!ReferenceEquals(wholeUsbDevice, null))

                        {

                            // Release interface #0.

                            wholeUsbDevice.ReleaseInterface(0);

                        }

 

                        MyUsbDevice.Close();

                    }

                    MyUsbDevice = null;

 

                    // Free usb resources

                    UsbDevice.Exit();

 

                }

 

                // Wait for user input..

                Console.ReadKey();

            }

        }

Can someone please tell me what is that I am doing wrong here.

Thanks,

AnTrung139.

 

 

------------------------------------------------------------------------------------------------------------------------

 

------------------------------------------------------------------------------
Infragistics Professional
Build stunning WinForms apps today!
Reboot your WinForms applications with our WinForms controls. 
Build a bridge from your legacy apps to the future.
http://pubads.g.doubleclick.net/gampad/clk?id=153845071&iu=/4140/ostg.clktrk
_______________________________________________
Libusb-win32-devel mailing list
Libusb-win32-devel <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libusb-win32-devel
nicolasgagnon | 24 Jul 16:52 2014
Picon

Async bulk transfer question

Hi all,

I am currently using the async API to transfer bulk data.

My problem is that I don`t know the size of the data that i`ll be receiving.
Thus the last portion of my data is never sent because the buffer is never
full (requested size is never matched).

I am wondering if there is a way to retrieve the data contained in the
buffer when the request hits the timeout, like the synchronous bulk read
does.

Thanks for the help.

Nicolas 

--
View this message in context: http://libusb.6.n5.nabble.com/Async-bulk-transfer-question-tp5713466.html
Sent from the LibUSB Dev - Win32 mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Want fast and easy access to all the code in your enterprise? Index and
search up to 200,000 lines of code with a free copy of Black Duck
Code Sight - the same software that powers the world's largest code
search on Ohloh, the Black Duck Open Hub! Try it now.
http://p.sf.net/sfu/bds

Gmane