Sorry if this is a really basic question but I’ve been trying to write our vision processing code using the raspberry pi as the camera server. My code is based on the example code in the RobotPy Docs (p.51) The code runs but the console logs:
bind() to port 1181 failed: Address already in use
ioctl VIDIOC_REQBUFS failed at UsbCameraImpl.cpp:513: Device or resource busy
USB Camera 0: could not allocate buffers
ioctl VIDIOC_S_FMT failed at UsbCameraImpl.cpp:777: Device or resource busy
USB Camera 0: could not set format 1 res 320x240
ioctl VIDIOC_S_PARM failed at UsbCameraImpl.cpp:798: Device or resource busy
USB Camera 0: could not set FPS to 30
ioctl VIDIOC_REQBUFS failed at UsbCameraImpl.cpp:513: Device or resource busy
USB Camera 0: could not allocate buffers
ioctl VIDIOC_S_FMT failed at UsbCameraImpl.cpp:777: Device or resource busy
USB Camera 0: could not set format 1 res 320x240
ioctl VIDIOC_S_PARM failed at UsbCameraImpl.cpp:798: Device or resource busy
USB Camera 0: could not set FPS to 30
ioctl VIDIOC_REQBUFS failed at UsbCameraImpl.cpp:513: Device or resource busy
USB Camera 0: could not allocate buffers
CS: USB Camera 0: Connecting to USB camera on /dev/video0
CS: ERROR: ioctl VIDIOC_S_FMT failed at UsbCameraImpl.cpp:777: Device or resource busy (UsbUtil.cpp:156)
CS: WARNING: USB Camera 0: could not set format 1 res 320x240 (UsbCameraImpl.cpp:779)
CS: ERROR: ioctl VIDIOC_S_PARM failed at UsbCameraImpl.cpp:798: Device or resource busy (UsbUtil.cpp:156)
CS: WARNING: USB Camera 0: could not set FPS to 30 (UsbCameraImpl.cpp:799)
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)
Does anyone know why the device is busy? Is there some operation running in the background that’s already using the camera?