【问题标题】:Having error: -22 while developing usb hid device出现错误:-22 开发 USB 隐藏设备时
【发布时间】:2022-06-29 19:13:50
【问题描述】:

您好,我们正在尝试让 USB-hid 设备在 linux 系统上运行。(目前为 Rpi-2B Buildroot 64bit)

但是 dmesg 在插入的设备上显示错误,而其他键盘/鼠标工作正常。

谷歌搜索没有发现错误-22,所以我卡在这里。

想知道代码的含义或在哪里可以找到完整的错误列表。或者我们的硬件团队可以做些什么来解决这个问题。

有人可以帮忙吗?提前致谢。

【问题讨论】:

标签: usb linux-device-driver hid usb-hid


【解决方案1】:

-22EINVAL defined as:

#define EINVAL      22  /* Invalid argument */

(usb 子系统返回负错误代码)

此错误文本来自these lines

ret = hid_add_device(hid);
if (ret) {
    hid_err(hid, "can't add hid device: %d\n", ret);
    goto err_connection_disable;
}

您可以尝试increase linux kernel loglevel查找确切原因。

【讨论】:

    猜你喜欢
    • 2014-11-18
    • 1970-01-01
    • 1970-01-01
    • 2014-01-16
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-11-03
    • 2019-05-12
    相关资源
    最近更新 更多