简体   繁体   中英

creating a udev rule to get data from a symlink for a usb barcode scanner(ls2208)

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.

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM