cntools / libsurvive

Open Source Lighthouse Tracking System
MIT License
746 stars 137 forks source link

vive_driver, get_next_device() on Windows 10 fails enumeration for devices that are connected #283

Closed gizmoore closed 1 year ago

gizmoore commented 1 year ago

Describe the bug Connecting a USB_DEV_WATCHMAN1 via wireless dongle and attempting to pair with libsurvive was failing. It listed the device id correctly but was skipping the enumeration.

Data driver_vive.c survive_usb_init()->

844, loop: (d = get_next_device(&e, devs) THIS IGNORES USB WITH INTERFACE_NUM != 0 846, in loop---->calls survive_vive_add_usb_device-> ..which calls: libsurvive\src\driver_vive.hidapi.h survive_open_usb_device, and on line 148, sets interface_num to 0 if < 0

I changed the get_next_device to use the same code as survive_open_usb_device: set interface_num to 0 if < 0. Then I was able to pair the watchman device/wireless dongle and continue.

Desktop (please complete the following information): Windows 10

Additional context Add any other context about the problem here.