Re: LibusbK debug messages

Xiaofan Chen <[email protected]> Sat, 25 Apr 2015 10:18:45 +0800
Newsgroups gmane.comp.lib.libusb.devel.windows
Message-ID <CAGjSPUAcfHeehBanokLKR3-aJiBStpok64NqoeRjrYZNewCj=w@mail.gmail.com>
On Fri, Apr 24, 2015 at 7:06 PM, Pradeepa Senanayake
<[email protected]> wrote:
> 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.

You can install the debug version of libusbK and then use DebugView
(run as admin and tick kernel logging option) to capture all the debug
messages from libusbK.
https://technet.microsoft.com/en-us/library/bb896647.aspx

On the other hand, if it is before libusbK got loaded, you may want to
use the Windows ETW event tracing functionality (Windows 7 and later).
http://blogs.msdn.com/b/usbcoreblog/

If it is not code 10 and it is an enumeration problem, then you have
to use a HW USB analyzer.


-- 
Xiaofan

------------------------------------------------------------------------------
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