Bug 1245 - libsigrok cannot detect devices on threadripper ports under windows 7
Summary: libsigrok cannot detect devices on threadripper ports under windows 7
Status: CONFIRMED
Alias: None
Product: libsigrok
Classification: Unclassified
Component: Common: USB handling code (show other bugs)
Version: unreleased development snapshot
Hardware: All All
: Normal normal
Target Milestone: ---
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-07-07 15:53 CEST by 5b40c20a4202c
Modified: 2018-07-07 15:55 CEST (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description 5b40c20a4202c 2018-07-07 15:53:08 CEST
I am currently testing only a Dreamsource DSLogic Pro as its the only device I have that works with sigrok. Whenever the device is plugged into any USB3.0 or even the USB2.0 ports on my MSI X399 Carbon Pro motherboard its recognized by the operating system in Device Manager however no devices are detected within Pulseview or sigrok-cli. I confirmed the device worked via a second linux laptop

As an attempt to further determine what caused this issue I compiled the entire sigrok stack including pulseview, libusb, libsigrok, and libsigrokdecode on windows using CLion and MYSY2 with mingw64 with all libraries being static to help debugging. I set breakpoints all the way down to inside the libusb code to determine why it was not detecting my device even though windows saw it.

What I first noticed is that libusb_get_device_list within api.c of every "driver" only returned 2 devices. The two devices had a PID of 145C and VID of 1022 which after consulting my device manager appeared to be the threadipper USB3 controllers. The usb 2.0 controller for my board was not returned nor was any devices connected to the USB3.0 controllers. 

Since libsigrok required a particular version of libusb on windows with event abstraction I then compiled the libusb examples both for the event abstraction branch as well as the master branch. The event abstraction branch of libusb did not detect any devices beyond the 2 seen by sigrok however the master branch detected all of my devices which suggest there is some change between the event abstraction branch and master branch which prevents detecting of devices. This is not that surprising as the event abstraction branch is 3 years out of date to the master branch.

I have not tested it but moving to event abstraction v5 instead of v4 might fix the problem however the changes of libusb code are too great to just attempt to look for which revision fixes it.
Comment 1 5b40c20a4202c 2018-07-07 15:55:48 CEST
(In reply to 5b40c20a4202c from comment #0)
> I am currently testing only a Dreamsource DSLogic Pro as its the only device
> I have that works with sigrok. Whenever the device is plugged into any
> USB3.0 or even the USB2.0 ports on my MSI X399 Carbon Pro motherboard its
> recognized by the operating system in Device Manager however no devices are
> detected within Pulseview or sigrok-cli. I confirmed the device worked via a
> second linux laptop
> 
> As an attempt to further determine what caused this issue I compiled the
> entire sigrok stack including pulseview, libusb, libsigrok, and
> libsigrokdecode on windows using CLion and MYSY2 with mingw64 with all
> libraries being static to help debugging. I set breakpoints all the way down
> to inside the libusb code to determine why it was not detecting my device
> even though windows saw it.
> 
> What I first noticed is that libusb_get_device_list within api.c of every
> "driver" only returned 2 devices. The two devices had a PID of 145C and VID
> of 1022 which after consulting my device manager appeared to be the
> threadipper USB3 controllers. The usb 2.0 controller for my board was not
> returned nor was any devices connected to the USB3.0 controllers. 
> 
> Since libsigrok required a particular version of libusb on windows with
> event abstraction I then compiled the libusb examples both for the event
> abstraction branch as well as the master branch. The event abstraction
> branch of libusb did not detect any devices beyond the 2 seen by sigrok
> however the master branch detected all of my devices which suggest there is
> some change between the event abstraction branch and master branch which
> prevents detecting of devices. This is not that surprising as the event
> abstraction branch is 3 years out of date to the master branch.
> 
> I have not tested it but moving to event abstraction v5 instead of v4 might
> fix the problem however the changes of libusb code are too great to just
> attempt to look for which revision fixes it.

Oh one more thing, addition of a Buffalo USB 3.0 2-Port PCI-Express Interface Board (IFC-PCIE2U3S2) to my computer also "fixed" the problem in that devices plugged into this controller could be seen by sigrok without requiring any updated libusb or compiling.