Xiaofan Chen | 1 May 11:10 2015
Picon

Fwd: Main outstanding Windows backend patches

Not so sure if anyone here is interested in the following
work for libusb Windows backend. I myself can help on
the testing but I do not know much about programming
and will not be able to review the patches.

It will also be good that someone can work on to help
to improve the integration of libusb0.sys support under
libusb Windows backend. Right now it is not really usable.

Regards,
Xiaofan

---------- Forwarded message ----------
From: Xiaofan Chen <xiaofanc <at> gmail.com>
Date: Fri, May 1, 2015 at 5:08 PM
Subject: Main outstanding Windows backend patches
To: "libusb-devel <at> lists.sourceforge.net" <libusb-devel <at> lists.sourceforge.net>

There are a few major outstanding Windows backend patch series.
1. Hotplug
2. Isochronous transfer for libusbK (not yet WinUSB under Windows 8.1)
3. UsbDk backend

Hopefully someone will step in and work on the integration. Pete
mentioned that he would not have much time on libusb.

--
Xiaofan

------------------------------------------------------------------------------
(Continue reading)

Isaac Abbott | 30 Apr 15:28 2015

WinUSB WCID driver automatically installs but libusbK does not see the device

After following the steps outlined by Pete Patard here (https://github.com/pbatard/libwdi/wiki/WCID-Devices), my device successfully enumerates as a “WinUSB Generic Device” on my Windows 7 Pro x64 system. Unfortunately LstK_Init in lisbusbK no longer finds the device. It works correctly when I use Zadig to install the driver (non-WCID).
 
I did not implement the Device Interface GUID descriptor, is this necessary?
 
~Isaac
 
------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud 
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Libusb-win32-devel mailing list
Libusb-win32-devel <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libusb-win32-devel
Pradeepa Senanayake | 24 Apr 13:06 2015
Picon

LibusbK debug messages

Hello,

I have been using the libusbK library for more than one year for one of the projects I am involved in. It works very well. Recently I have encountered an issue in one of the devices. I still could not find the origin of the issue. 

I have access to the low level device firmware and the application which communicates with it. We decided to go with libusbK as the USB driver for the devices.

Basically what should happen is when we switch on the device it should ideally enumerate three USB devices in the device manager. This is not a composite USB device. But a device which has three separate child devices connected to an internal hub. First it enumerates as bootloader devices and when the PC application sends it the relevant data it will switch to the firmware. . 

Sometimes I can see that one of these three deivce does not get enumerated properly. It gives a code10 error in device manager. I think it comes when DeviceEntry fails in the driver code. May be the firmware is not responding to a standard query properly.

I would like to know to which query it is not responding properly. I was wandering whether there is any method to enable some sort of debug messages in the libusbK. What are the debugging options available in the library? I basically would like to see where the driver fails to enumerate the device. 

Since this is not always happening I am still unsure where the issue is.

Best Regards,
Pradeepa Senanayake.
------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud 
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Libusb-win32-devel mailing list
Libusb-win32-devel <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libusb-win32-devel
Simon Thiebaut | 23 Apr 09:00 2015
Picon

WinUSB Microsoft OS descriptors

Hi,

Please forgive me if this has already been answered, but I was not able to fin any related topic inside the previous posts.

I'm writing an application for monitoring sensor data through a USB link.
I can modify both the PC application (USB host) and the acquisition board firmware(USB device).

The PC app USB part is written with libusb, as the app is intended to be cross platform, though it is first developed under Windows.
The first version of the board firmware implements the HID class, but this is too limitating for the requirements of the app, and I want to change the class.

Therefore I was looking for a generic USB device driver that would automatically loads when the device is plugged in.
I have to do a choice between WinUSB or libusbK drivers.

After a few researches on WinUSB, I found this:
https://msdn.microsoft.com/en-us/library/windows/hardware/hh450799%28v=vs.85%29.aspx

That states that a WinUSB generic device must have in its firmware specific Microsoft OS Descriptors to work.

My question is: does libusbK have such requirements ? Will I have to add specific descriptors to make my device work ? Or nothing special is required (other than configuring properly the existing common descriptors) ?
The point is I do not wish to embed useless and not generic code in the firmware if there a is generic enough PC driver (for the Windows portage)...


Thank you very much for your answers.

Have a nice day,



Simon THIEBAUT

------------------------------------------------------------------------------
BPM Camp - Free Virtual Workshop May 6th at 10am PDT/1PM EDT
Develop your own process in accordance with the BPMN 2 standard
Learn Process modeling best practices with Bonita BPM through live exercises
http://www.bonitasoft.com/be-part-of-it/events/bpm-camp-virtual- event?utm_
source=Sourceforge_BPM_Camp_5_6_15&utm_medium=email&utm_campaign=VA_SF
_______________________________________________
Libusb-win32-devel mailing list
Libusb-win32-devel <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libusb-win32-devel
Xiaofan Chen | 16 Apr 08:25 2015
Picon

Re: Iso ep Issue : win xp on virtualbox4.2 in ubuntu-14.04-x64, iso endpoint receive error frames.

On Wed, Apr 15, 2015 at 3:00 PM, linucos <8967983 <at> qq.com> wrote:
> hi, there
>      A strange issue with libusbk: not all frames are error, only some
> frames is error.
>      Logs like:
>      "ISO StartFrame=0009771Ah NumberOfPackets=64 ErrorCount=7
> Transferred=969
> ISO StartFrame=0009775Ah NumberOfPackets=64 ErrorCount=7 Transferred=969
> ISO StartFrame=0009779Ah NumberOfPackets=64 ErrorCount=8 Transferred=952
> ISO StartFrame=000977DAh NumberOfPackets=64 ErrorCount=7 Transferred=969
> ISO StartFrame=0009781Ah NumberOfPackets=64 ErrorCount=7 Transferred=969
> ISO StartFrame=0009785Ah NumberOfPackets=64 ErrorCount=4 Transferred=1020
> ISO StartFrame=0009789Ah NumberOfPackets=64 ErrorCount=5 Transferred=1003
> ISO StartFrame=000978DAh NumberOfPackets=64 ErrorCount=6 Transferred=986"
>    .
>    Other endpoints work well.
>
>    Thans for any idea.
>    By the way, same xp iso, same application, same driver, not work on
> VMWare.

Could you test on a real PC and not virtual machine? If the problem
does not exist on a real PC, I will think it is a problem with the
Virtual Machine's simulated USB driver stack.

--

-- 
Xiaofan

------------------------------------------------------------------------------
BPM Camp - Free Virtual Workshop May 6th at 10am PDT/1PM EDT
Develop your own process in accordance with the BPMN 2 standard
Learn Process modeling best practices with Bonita BPM through live exercises
http://www.bonitasoft.com/be-part-of-it/events/bpm-camp-virtual- event?utm_
source=Sourceforge_BPM_Camp_5_6_15&utm_medium=email&utm_campaign=VA_SF

Best round trip time possible over USB

Hi ,
 
We are developing a USB device for Windows PC and Libusb is considered device access.
 
Need to do some benchmarking tests to check the performance of this complete solution.
In this regard, We has a test app ( C++ console app) which writes 50 bytes of data using Libusb API and on device side once this data is simply looped back to PC.  When the round trip time from Transmit to receives is measured it is around 400 microseconds.
 
THE DEVICE IS A HIGH SPEED DEVICE and END POINTS ARE BULK MODE. NO OTHER USB DEVICE IS CONNECTED TO PC.
 
Is this the best performance possible for ?
 
Thanks
srinivas
 
------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the 
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
Libusb-win32-devel mailing list
Libusb-win32-devel <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libusb-win32-devel
Alexander Stohr | 16 Mar 10:48 2015
Picon
Picon

add device port number, usb_device

refering to this old topic: https://sourceforge.net/p/libusb-win32/mailman/libusb-win32-devel/thread/20121212191459.GL24678 <at> trikaliotis.net/
 
the creator of the topic wrote:
> If I could translate a libusb0 symbolic index path to an interface’s DevicePath > (i.e. SP_DEVICE_INTERFACE_DETAIL.DevicePath, ex. > \\?\usb#vid_[VID]&pid_[PID]#[serialNumber]#{[GUID]}), > then I could use the DevicePath to get its SPDRP_ADDRESS property > (which is the port number).
a participant responded:
 
> BTW, take note the format of DevicePath is not fixed since some USB device may not have a serial number.
 
in fact the Windows OS demands that the DevicePath is unique.
in case there is no serial number then the OS decides to use the (still unique but not "moveable") connetor path.
this path is dependent on the topology and can for USB devices include the hub and port numbers plus a bit more.
 
if looking to the dumps from a later on added posting in that thread then you will see a real world example: C:\libusbK-dev-kit>klist Loading USB ID's maintained by Stephen J. Gowdy <linux.usb.ids <at> ...>.. 1. STMicroelectronics STLink dongle (SGS Thomson Microelectronics) [Connected] Service : libusb0 ClassGUID : {EB781AAF-9C70-4523-A5DF-642A87ECA567} DeviceID : USB\VID_0483&PID_3748\8&23117AA8&0&1 DeviceInterfaceGUID : {47C9C148-9738-1A9B-2CB6-86C13FA48892} SymbolicLink : \\?\usb#vid_0483&pid_3748#8&23117aa8&0&1#{47c9c148-97 38-1a9b-2cb6-86c13fa48892} DevicePath : \\.\libusb0-0001 SerialNumber : 8&23117AA8&0&1 BusNumber : 0 DeviceAddress : 1
as you can see the serial number is not really something a USB device would typically export
(probably it's device stored and provided string constant is just an empty property)
but it is rather a concataneted sequence of hub and port numbers.

conclusion: there is (in theory) always a string that forms a valid (and hopefully unique) serial number.
the contents of the OS used serial number entry is never empty/missing even if the low-level physical device layer does not provide one.

BTW there are some USB-JTAG debugger devices from a certain vendor around that all have the same serial.
with this setup at least the Windows OS will only allow to access one of these devices at a certain time.
it can be guessed that the vendor wanted this unit to be for some single-target demo use only. (and production might be a bit cheaper...)
the professional fully featured debuggers for that vendor can be optained from third parties at a noticeably higher price.
(the sales volum is low compared to the numbers of units on consumer markets.)
 
-Alex.
------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the 
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
Libusb-win32-devel mailing list
Libusb-win32-devel <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libusb-win32-devel
Marcel Houben | 10 Feb 14:57 2015
Picon

Bulk stream: reading old data

Dear Sir/Madam,

 

I am using LibUsbK to read chunks of Bulk stream data (not all data is supposed to be read), sent from a USB 3.0 device. The USB device obtains and passes live data to the PC at 10 MHz, without caching/buffering.

Program works as follows:

1)      Initialize USB

2)      Clear pipe

3)      Get overlap

4)      Read variable amount of data (in KB)

5)      Wait and release

6)      Process

7)      Optional restart for new data, from step 2) onwards

 

During testing with this program I encountered an issue whereby old data is obtained for the first ~64 KB of every read. Only after reading more than 64 KB the actual live data is obtained. I made a workaround by obtaining 64 KB + requested amount data and removing the first 64 KB, but I am looking for a better solution. Physically disconnecting and reconnecting the device clears this buffer (while the device remains powered and the program is still active).

 

Could anyone shed some light on this issue? Is there perhaps some kind of buffering going on in the driver? Can this buffer be cleared before the read?

 

Best regards,

 

Marcel


The information sent with this e-mail is exclusively intended for the addressee.
If anyone has received this e-mail in error, the receiver is requested to indicate this to the sender and to destroy the e-mail completely without taking notice of the contents in any way or saving it.
Publication, copying, distribution and/or disclosure of the contents to third parties are not permitted.
NTS-Group is not liable for the correct and complete dispatch of the contents, nor for the prompt receipt of this e-mail.
If this e-mail contains so-called computer viruses, NTS-Group is not liable for any damage occurring as a consequence.
------------------------------------------------------------------------------
Dive into the World of Parallel Programming. The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net/
_______________________________________________
Libusb-win32-devel mailing list
Libusb-win32-devel <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libusb-win32-devel
hustxyj | 28 Jan 13:22 2015

Re: A bug with libusb0

>> In file ioctl.c, function dispatch_ioctl, case LIBUSB_IOCTL_CONTROL_WRITE:
>> It's possible for transfer_buffer_mdl to be NULL. So the check is
>> unnecessary.

>Why do you think transfer_buffer_mdl can be NULL ?

I met a device which send a control packet without data.

Yongjian Xu
------------------------------------------------------------------------------
Dive into the World of Parallel Programming. The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net/
Sid Price | 15 Jan 19:57 2015

Checking Filter driver

Hello,

I have an application that uses a libusb-win32 filter driver, it works well thank you!

 

One problem we have is that our users sometimes forget to install the filter driver and our application fails. What is the best way to check if the required filter driver is loaded with our application so we can prompt users to do it!

Sid.

 

Sid Price

Desktop Application and Embedded System Design

 

------------------------------------------------------------------------------
New Year. New Location. New Benefits. New Data Center in Ashburn, VA.
GigeNET is offering a free month of service with a new server in Ashburn.
Choose from 2 high performing configs, both with 100TB of bandwidth.
Higher redundancy.Lower latency.Increased capacity.Completely compliant.
http://p.sf.net/sfu/gigenet
_______________________________________________
Libusb-win32-devel mailing list
Libusb-win32-devel <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libusb-win32-devel
hustxyj | 15 Jan 10:16 2015

A bug with libusb0

Hi all:


In file ioctl.c, function dispatch_ioctl, case LIBUSB_IOCTL_CONTROL_WRITE: It's possible for transfer_buffer_mdl to be NULL. So the check is unnecessary.


Yongjian Xu

------------------------------------------------------------------------------
New Year. New Location. New Benefits. New Data Center in Ashburn, VA.
GigeNET is offering a free month of service with a new server in Ashburn.
Choose from 2 high performing configs, both with 100TB of bandwidth.
Higher redundancy.Lower latency.Increased capacity.Completely compliant.
http://p.sf.net/sfu/gigenet
_______________________________________________
Libusb-win32-devel mailing list
Libusb-win32-devel <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libusb-win32-devel

Gmane