PIC18F4550 + libusb + MAC OS X
I am trying to develop an USB HID Board and communicate with it on MAC OS X with the libusb library.
My board work perfectly with the MCHID.DLL on windows.
I have start my project on this example (http://www.roboticus.org/index.php/carte-dinterface-sur-port-usb-protocole-hid-part-2.html)
I have do a simple program in C to send data to the board but when I do a usb_claim_interface I got an error (Claim Failed) and I can't send data to my board.
I have do a lot off search on web since 1 month and I the result is bad.
Can you help or send me a simple program in C for mac os and the program for the PIC18F4550
I thanks you for all help that you can give me.
I post you my code in C :
struct usb_bus *bus;
struct usb_device *dev;
i = 0;
printf("Detection of the board :\n\r");
for (bus = usb_busses; bus; bus = bus->next)
for (dev = bus->devices; dev; dev = dev->next)
if ((dev->descriptor.idVendor == 0x04D8) && (dev->descriptor.idProduct == 0x0005))
printf("Board is found\n\r");
udev = usb_open(dev);
if (usb_set_configuration(udev, 1))
if (usb_claim_interface(udev, 0))
usb_bulk_write(udev, 1, "N", 1, 1000);