From: Bob S. <bo...@gm...> - 2014-10-23 12:42:55
|
I'm getting the following error whe I try to open a USB ANT stick, vendor = 0fcf, product = 1008. libusb: error [_get_usbfs_fd] libusb couldn't open USB device /dev/bus/usb/003/026: Permission denied libusb: error [_get_usbfs_fd] libusb requires write access to USB device nodes. I think that this worked a few weeks ago. I was working on the Windows version of my application, then came back to the linux version to test it and now I get this. What is the best way to fix this? This is on Ubuntu 14.04. Summary of the libusb calls minus error checking code: libusb_init(&ctx); libusb_set_debug(ctx, 3); libusb_get_version(); n = libusb_get_device_list(ctx, &list); for(k=0; k<n; k++){ libusb_device_descriptor desc = {0}; libusb_device *device; device = list[k]; status = libusb_get_device_descriptor(device, &desc); config = NULL; status = libusb_get_config_descriptor(device, 0, &config); if (config->bNumInterfaces==0) { libusb_free_config_descriptor(config); config = NULL; continue; } if (desc.idVendor == 0x0fcf && desc.idProduct == 1008)) { libusb_device_handle *handle = NULL; status = libusb_open(device, &handle); switch(status) { case 0: break; case LIBUSB_ERROR_NO_MEM: break; case LIBUSB_ERROR_ACCESS: // <<<<<<<<<<<<< user has insufficient permissions **** FAILS HERE **** break; case LIBUSB_ERROR_NO_DEVICE: break; default: break; } } |