Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lightpack (USB) with Windows/Darwin will crash #79

Open
GoogleCodeExporter opened this issue Apr 7, 2015 · 2 comments
Open

Lightpack (USB) with Windows/Darwin will crash #79

GoogleCodeExporter opened this issue Apr 7, 2015 · 2 comments

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
1. Run boblightd with usb lightpack on Windows/Darwin
2.
3.

What is the expected output? What do you see instead?
It crashes

What version of the product are you using? On what operating system?
trunk, on windows

Please provide any additional information below.
The issue is that libusb_detach_kernel_driver is not available on 
Windows/Darwin, so this block of code needs to be guarded:

        if ((error=libusb_detach_kernel_driver(devhandle, LIGHTPACK_INTERFACE)) != LIBUSB_SUCCESS) {
          LogError("%s: error detaching interface %i, error:%i %s", m_name.c_str(), LIGHTPACK_INTERFACE, error, UsbErrorName(error));
          return false;
        }

(lines 100 to 103 of  devicelightpack.cpp)

See: 
http://libusb.sourceforge.net/api-1.0/group__dev.html#ga21bd343325f558987ca57e4e
281a6d47


If that block is removed, then boblightd works as expected *AS LONG AS THE USB 
DRIVER FOR THE DEVICE IS REPLACED VIA ZADIG TO WINUSB* - it does not work with 
the default HIDUSB driver that gets installed when you just plug it in.

Hope that helps someone - fixing it properly is beyond my c++ skills I am 
afraid!

Original issue reported on code.google.com by [email protected] on 24 Feb 2014 at 12:06

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant