Usb Camera Busy

I have been getting this error:
CS: ERROR: ioctl VIDIOC_REQBUFS failed at UsbCameraImpl.cpp:513: Device or resource busy (UsbUtil.cpp:156)
CS: WARNING: USB Camera 0: could not allocate buffers (UsbCameraImpl.cpp:514)

My camera code:

UsbCamera camera = CameraServer.getInstance().startAutomaticCapture(0);
UsbCamera camera1 = CameraServer.getInstance().startAutomaticCapture(1);
camera.setResolution(128, 96);
camera1.setResolution(128, 96);
camera1.setFPS(5);
camera.setFPS(5);

It was previously working and then it simply quit and started giving the error. I have independently tried both cameras on both USB ports on the roborio.

That error indicates something else is using the video device. Scrub your code for other places that might be calling startAutomaticCapture or “new UsbCamera”.

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.