创建 udev 规则以从 USB 条形码扫描仪的符号链接获取数据 (ls2208)

发布于 2025-01-21 00:45:55 字数 315 浏览 3 评论 0原文

我有这个UDEV规则,它创建了符号链接 subsystem ==“ usb”,action ==“ add”,attrs {product} ==“符号条形码扫描仪”,symlink+=“ scanner1”> 但是,当我像cat/dev/scanner1 cat symlink时 我得到此file: /dev /scanner1< binary> │尺寸:0 b我希望像cat/dev/dev/input/mice

ps:预先感谢。

I have this udev rule which creates the symlink
SUBSYSTEM=="usb", ACTION=="add", ATTRS{product}=="Symbol Bar Code Scanner", SYMLINK+="scanner1"
but when i cat the symlink like so cat /dev/scanner1
I get this File: /dev/scanner1 <BINARY> │ Size: 0 B I was hoping for somthing like when you do cat /dev/input/mice

ps: thanks in advance.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

风和你 2025-01-28 00:45:55

我找到了我需要使用action ==“添加”的解决方案,然后将子系统更改为输入,我可以通过使用cat barcode scanner symlink看到扫描仪输出。

I found the solution I needed to use ACTION=="add" when I did that and changed the subsystem to input it worked and I could see scanner output by using cat barcode scanner symlink

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文