Skip to content

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

@GoogleCodeExporter

Description

@GoogleCodeExporter
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 bossanov...@gmail.com on 24 Feb 2014 at 12:06

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions