Score:0

How to get device model from /dev/usb/xxx?

hu flag

lsusb shows me this:

Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 004: ID 0461:4e22 Primax Electronics, Ltd USB Optical Mouse
Bus 001 Device 003: ID 413c:2107 Dell Computer Corp. Dell USB Entry Keyboard
Bus 001 Device 002: ID 04b8:0e27 Seiko Epson Corp. TM-T20X
Bus 001 Device 013: ID 1753:c902 GERTEC Telecomunicacoes Ltda. PPC930 Pinpad Terminal
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

I also have a udev .rules files that contains:

SUBSYSTEMS=="usb", DRIVERS=="usblp", MODE="0660", GROUP="lp", SYMLINK+="printer"

That works nicely and I have a /dev/printer

I want to issue a shell command to get printer info to pass to a program, so it knows which thermal printer it's dealing with (there are some differences in fonts, etc).

How do I query which devide (name or id) is on /dev/printer that would output something like 04b8:0e27 or TM-T20X?

ar flag
So what exactly is your question?
hu flag
made the question more clear, thanks.
oldfred avatar
cn flag
Does this show detail you want? `/usr/sbin/lpinfo -v`
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.