Hardware-associated snaps - Snap Store search by hardware signature

Device signatures of printers

This is a typical device ID for a printer:

MFG:HP;
MDL:HP OfficeJet Pro 8710;
CMD:PCL3GUI,PCL3,PJL,Automatic,JPEG,PCLM,AppleRaster,PWGRaster,DW-PCL,802.11,802.3,DESKJET,DYN;
CLS:PRINTER;
DES:D9L18A;
CID:HPIJVIPAV9;
LEDMDIS:USB#FF#CC#00,USB#07#01#02,USB#FF#04#01;
MCT:MF;
MCL:DI;
MCV:2.0;
SN:CN67NFT1J0;
S:038080C48440000100580080000441800504518005a461800504118001e;
Z:05000009000009000009000009000009,12000,17000000000000000000000000000000,181;

It is a standard which came with parallel port printers but it is also used on all USB printers and also on many network printers. It comes out as a single line, not containing newline characters. I have split it into several lines for easier readability here in the forum.
The ID is a dictionary, consisting of several key-value pairs. One has a key, colon, then the value and after that a semicolon, which separates from the next keys. The semicolon after the last value, at the very end of the ID is missing sometimes. This also implies that key cannot contain a colon and values cannot contain a semicolon.
For identifying a printer model one usually uses the MFG and MDL fields, manufacturer and model. The SN field is the serial number and is not important for us, selecting the driver, but very useful if you have several printers of the same model and keep them connected always to the same print queue. The CMD field lists the Page Description Languages (PDLs) which the printer understands, this helps associating generic drivers or discovering the presence of a PostScript add-on module. Note also that sometimes the fields are named MANUFACTURER, and MODEL.
The example is from the HP OfficeJet Pro 8710, a multi-function printer made by HP.
You can see the device ID of your printer, depending on how it is connected, try one of these commands:

sudo /usr/lib/cups/backend/usb
/usr/lib/cups/backend/snmp

If your printer advertises itself via DNS-SD in the network, you can find its DNS-SD record with the diagnostic tools of Avahi: avahi-discover and avahi-browse. There are fields named usb_MFG, usb_MDL, and usb_CMD showing the appropriate fields of the device ID, but there are also several other fields showing manufacturer, model, and PDLs.
If you run

sudo /usr/lib/cups/backend/dnssd

You get information extracted from the DNS-SD record, especially the device ID is an artificial composition of information gathered from the DNS-SD record.
Here you see that manufacturer and model can be extracted from printers in different ways, sometimes the output differs a little bit, for example upper vs. lower case, HP vs. Hewlett-Packard, … So do all comparisons after “normalising” the strings, replacing each sequence of non alphanumeric characters by a single space, put a space into each letter/number transition, make all letters lower case, replace Hewlett-Packard by HP, cut manufacturer name from model field. This will not cause mis-recognitions, as no manufacturer would release two products where the name differs only by upper/lower case or non-alphanumeric characters. The hardware signature list of the snap could already contain normalised names.
Do not try to identify printers by their numeric USB Vendor and Product IDs, there was already a big bunch of Epson printers which had all the same pair of Vendor and Product ID.