Lightpack (USB) with Windows/Darwin will crash
Opened this issue · 2 comments
GoogleCodeExporter commented
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
GoogleCodeExporter commented
Does it work for you on osx when you comment that block out? I can just #ifdef
it out for osx in that case.
Original comment by bob.loo...@gmail.com
on 14 Jan 2015 at 8:09
GoogleCodeExporter commented
I'm sorry but I don't have access to OSX anymore, got rid of my old mac mini,
so I can't be sure. I am not currently using my lights either, as I moved my
TV.
Original comment by jdaal...@gmail.com
on 15 Jan 2015 at 1:08