I am trying to send raw data to a set lights from my computer through a USB to DMX512 interface using libusb-win32. So far everything seems to be working well, except for some reason the program doesn't recognize any endpoints on the adapter. Here is a snippet of my code:
// initialize
usb_init();
usb_find_busses();
usb_find_devices();
usb_bus busses = *usb_get_busses();
// open the device
struct usb_device *dev = busses.devices;
usb_dev_handle *h = usb_open(dev);
usb_claim_interface(h, 0);
...
// close the device
usb_release_interface(h, 0);
usb_close(h);
When I look through the structs in the debugger, this is the data within them:
dev {
next //<NULL>
prev //<NULL>
filename //0x008a9938
bus //0x008a9710
descriptor //{bLength = 18 ... }
config {
bLength //9
bDescriptorType //2
wTotalLength //18
bNumInterfaces //1
bConfigurationValue //1
iConfiguration //0
bmAttributes //128
MaxPower //250
interface {
altsetting {
bLength //9
bDescriptorType //4
bInterfaceNumber //0
bAlternateSetting //0
bNumEndpoints //0
bInterfaceClass //0
bInterfaceSubClass //0
bInterfaceProtocol //0
iInterface //0
endpoint //<NULL>
extra //<NULL>
extralen //0
}
num_altsetting //1
}
extra //<NULL>
extralen //0
}
dev //<NULL>
devnum //1
num_children //0
children //<NULL>
}
As can be seen, there are no endpoints recognized, and on top of that there is only one device, one configuration, one interface, and one altsetting which is why I am at a dead end.
So I am trying to figure out what endpoint address to use for writing to the USB, or if it's possible that the adapter I have is just not compatible with this library.
Thanks in advance