You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

树莓派4 Ubuntu22.04下Intel RealSense F455摄像头ioctl调用失败

树莓派4 Ubuntu 22.04下读取Intel RealSense ID F455摄像头帧失败

环境信息

  • 硬件:树莓派4(aarch64 Cortex-A72架构)
  • 系统:Ubuntu 22.04 LTS 64位
  • 目标设备:Intel RealSense ID Solution F455摄像头

问题现象

  • 设备可正常打开,但执行ioctl(fd, VIDIOC_DQBUF, &buf)时返回失败,错误提示:
    V4lNode failed dequeue frame from buffer: Resource temporarily unavailable
  • 执行v4l2-compliance命令时出现控制类缺失错误
  • dmesg日志中存在USB URB提交失败、UVC控制查询失败等报错
  • 已尝试Stack Overflow上的相关解决方案,均无效

相关代码

帧读取函数

buffer V4lNode::Read()
{
    buffer res;
    struct v4l2_buffer buf = {0};
    struct timeval tv = {0}; 
    tv.tv_sec = 0; // max time to wait for next frame
    tv.tv_usec =100;

    buf.type = _type;
    buf.memory = V4L2_MEMORY_MMAP;
    buf.index = 0;

    fd_set fds;
    FD_ZERO(&fds);
    FD_SET(_fd, &fds);
    ThrowIfFailed("wait for frame", select(_fd, &fds, NULL, NULL, &tv));

    if (ioctl(_fd, VIDIOC_DQBUF, &buf) == FAILED_V4L){ // dequeue frame from buffer.
        std::cout << "V4lNode failed  dequeue frame from buffer: " << strerror(errno) << std::endl;
        return res; //returns zero-length buffer
    }
    res = _buffers[buf.index];
    res.size = buf.bytesused;
    
    buf.type = _type; 
    buf.memory = V4L2_MEMORY_MMAP;
    ThrowIfFailed("qbuffer", ioctl(_fd, VIDIOC_QBUF, &buf)); // queue next frame

    return res;
}

设备打开代码

fd = open(path.c_str(), O_RDWR | O_NONBLOCK, 0);
std::cout << "V4lNode open files discription: " << strerror(errno) << std::endl;

设备打开成功输出:
V4lNode open files discription: Success

工具检测错误

v4l2-compliance错误输出

Control ioctls (Input 0):
        fail: v4l2-test-controls.cpp(246): missing control class for class 00980000
    test VIDIOC_QUERY_EXT_CTRL/QUERYMENU: FAIL

内容的提问来源于stack exchange,提问作者ZeusBios

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.08.21 22:54:21