There are many ways to get this information:
- curl command – Standard tool to transfer data from or to a server.
- hp-info command – Part of hp-toolbox software.
- Printer Management Language to get information from the printer.
Use curl command to query HP printer for serial number
Most HP printers comes with an embedded web-server called HP HTTP Server. The web-server exposes the following info:
- Printer name and model
- Printer Firmware number
- Printer serial number
The curl command is available on Linux, Apple OS X, FreeBSD, OpenBSD, and Unix-like operating system. Let us say your printer IP address is 192.168.1.100, enter:
curl -k -I https://192.168.1.100
curl -I http://192.168.1.100
In this sample outputs my printer details are as follows:
- Printer name: HP Officejet Pro 8600
- Printer model number: CM750A
- Printer serial number: CN276BKXYZZZZYY
- Printer firmware number: CLP1CN1516AR
hp-info command example
The hp-info command query a printer for static model information, dynamic status informtion, and CUPS printer queue settings. This is part of HPLIP (Hewlett-Packard Linux Imaging and Printing). Itt is an HP developed solution for printing, scanning, and faxing with HP inkjet and laser based printers in Linux.
$ hp-query -n -d 'hp_device_name_here'