• ×
    Information
    Windows update impacting certain printer icons and names. Microsoft is working on a solution.
    Click here to learn more
    Information
    Need Windows 11 help?
    Check documents on compatibility, FAQs, upgrade information and available fixes.
    Windows 11 Support Center.
  • post a message
  • ×
    Information
    Windows update impacting certain printer icons and names. Microsoft is working on a solution.
    Click here to learn more
    Information
    Need Windows 11 help?
    Check documents on compatibility, FAQs, upgrade information and available fixes.
    Windows 11 Support Center.
  • post a message
Guidelines
The HP Community is where owners of HP products, like you, volunteer to help each other find solutions.
Archived This topic has been archived. Information and links in this thread may no longer be available or relevant. If you have a question create a new topic by clicking here and select the appropriate board.
HP Recommended
Dear,

 

I want to retrieve the serial number of my printer HP laserJet P1102, M1132, P1006... etc. But I don't know how to do it, as my experience, I just get the info such as

$ hp-info
...
"Using device: hp:/usb/HP_LaserJet_Professional_P1102?serial=000000000Q80Q14JPR1a"
...

 

or 

 

I am sure with you the serial number returned from lsusb is the same with hp-info
--> " iSerial 3 000000000QH783J9PR1a " as I indicate below. And indeed, my real serial number (behind my printer) was: "CNJ8DDFF48".

 

< my result from lsusb -v >
Bus 002 Device 004: ID 03f0:042a Hewlett-Packard 
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0 
  bDeviceProtocol         0 
  bMaxPacketSize0        64
  idVendor           0x03f0 Hewlett-Packard
  idProduct          0x042a 
  bcdDevice            1.00
  iManufacturer           1 Hewlett-Packard
  iProduct                2 HP LaserJet Professional M1132 MFP
  iSerial                 3 000000000QH783J9PR1a
  bNumConfigurations      1
  Configuration Descriptor:

But it is not correctly my printer has a difference s/n with the return string "Q80Q14JPR1a" (wrong), instead of"CNJ8DDFF48" (correct s/n). I try some other ways but it is impossible.

 

PS: I am using the Ubuntu 13.10 and with the HPLIP-3.13.5.

 

Wish so could help me to get it.

Thanks and best regards.

7 REPLIES 7
HP Recommended

The attached script should do it. You'll need to have the "nc" (= netcat) and "ascii2binary" commands installed. On Debian, they are available in the distribution's standard package repository, so I expect they are available on Ubuntu too.

 

Run the script without any options, and it will tell you how to use it.

 

 

Another alternative is to use snmpget:

 

snmpget -Oeqv -v 2c -c public <printer-hostname-or-IP>  .1.3.6.1.2.1.43.5.1.1.17.1

 

(The full name of that SNMP OID is:

.iso.org.dod.internet.mgmt.mib-2.printmib.prtGeneral.prtGeneralTable.prtGeneralEntry.prtGeneralSerialNumber.1 )

HP Recommended

Dear Mr. Matti Kurkela,

 

Thanks for your quickly reply. 

 

I wonder that, which  "<printerhost> [port] " should I put in the shell script command. In my scenario, I plug my HP Printer in these usb 2.0 ports and directly connect with my Computer via usb cable (the printer is not network printer). 

 

So, may I run it with the command:

 

$sh pjl-get-serial.sh localhost 9100

or

$sh pjl-get-serial.sh 127.0.0.1 9100

 

PS: How can I check as if the port 9100 is correct with my printer service?

HP Recommended

Oops, I missed the fact that your printer is not networked but connected through USB. That will make things more difficult.

 

Hmm... instead of nc (netcat), you'll need something that can communicate with the appropriate USB printer port device.

Once you have that, you could get the sequence that needs to be piped to the printer from my script.

 

Once you can get the answer from the printer, my script also has the commands that can be used to decode the serial number.

 

9100 is the port number for HP JetDirect network printer adapters (either built-in to many modern printers, or also available as external boxes). Basically, setting up a TCP connection to printer's port 9100 is almost a direct replacement for a parallel cable: all the communication with the actual printer should work just the same as with a traditional, parallel-connected printer. The USB printer device should work about the same.

 

Connecting to port 9100 does not work with most computers: instead of using port 9100, most computers use more complicated printer sharing protocols in different ports. The most common ones, in no particular order, are here:

  • IPP in port 631/TCP (CUPS in Mac OS X and most Linuxes)
  • traditional Unix print spooler protocol (LPD) in port 515/TCP (optional in CUPS, standard in LPRng and other older Unix/Linux print spoolers)
  • Windows printer sharing protocol in port 445 (SMB-over-IP) and/or 135-139 (NetBIOS-over-TCP/IP)

All of those will require proper print job metadata and won't necessarily give you the raw response from the printer - you cannot just open two-way communications with the printer and pipe the commands/print jobs in, as you can do with JetDirect.

 

At the moment, I don't have any USB-connected printers I could test with. Perhaps someone else can help?

 

But if the printer is physically located near to you, how about the old-fashioned method of reading the serial number off the label at the back of the printer? Usually the label should contain the model/product number too.

HP Recommended
Thanks for your explanations.

I know that the easy way to see the S/N is turn the printer back and look at his labels. However, as you know I need to do it remotely by command line from background service to notify the centralization application the s/n for around 3000 clients all over the world. Thus, I need a cmd or tool that help me collect the s/n of printer automatically (which will be install in the client side by the company's policy). By this job, I could easy do it with monitor, cpu, mouse.... but not for the printer :smileysad: . That is why I need your help so far.

Thanks in advantage.
HP Recommended

hi.

I have the same trouble.

Have you got something new?? Do you know as get the printer serial number through the usb port??

Regards,

Thanks you very much.
Edu.

HP Recommended

Still not. I am waiting for an expert from HP/hplib but nothing at all. :smileysad:
Pls, HP driver team !

HP Recommended

Hi dqvn,

 

This is a peer to peer forum, not an official HP support site. HP Experts will show up only Expert Day. 

Have you tried HPSC?
http://www.hp.com/go/hpsc

Archived This topic has been archived. Information and links in this thread may no longer be available or relevant. If you have a question create a new topic by clicking here and select the appropriate board.
† The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the <a href="https://www8.hp.com/us/en/terms-of-use.html" class="udrlinesmall">Terms of Use</a> and <a href="/t5/custom/page/page-id/hp.rulespage" class="udrlinesmall"> Rules of Participation</a>.