LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 08-29-2018, 12:26 AM   #1
turboscrew
Member
 
Registered: Apr 2009
Location: Nokia (town), Finland
Distribution: Mint, Debian
Posts: 601

Rep: Reputation: 46
Adding printer by name


I'm running Linux Mint 17.3 (although I don't think the distro matters here) and I'd like to add HP Color Laserjet Pro m277dw by a name instead of IP. How to do that?

My router shows two different MAC addresses to the printer with the name "NPIB88B68" associated to both of them.

Does anyone know what are the two devices (MAC addresses)?
One seems to be silent and the other seems to have 7 services.
(Tried to probe them with nmap.)

Does anyone know what kind of URI to use?
The manual doesn't tell.

Last edited by turboscrew; 08-29-2018 at 12:30 AM.
 
Old 08-29-2018, 03:22 AM   #2
ferrari
LQ Guru
 
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 5,819

Rep: Reputation: 1144Reputation: 1144Reputation: 1144Reputation: 1144Reputation: 1144Reputation: 1144Reputation: 1144Reputation: 1144Reputation: 1144
Quote:
I'm running Linux Mint 17.3 (although I don't think the distro matters here) and I'd like to add HP Color Laserjet Pro m277dw by a name instead of IP. How to do that?
You should be able to do that, provided the hostname is resolvable. My home router acts as a name server, and so this allows me to reach (DHCP-addressed) hosts by hostname without any additional effort. Similarly, if using Avahi, local hostname resolution using a "hostname.local" naming scheme may also be possible.

Quote:
My router shows two different MAC addresses to the printer with the name "NPIB88B68" associated to both of them.
That may well be the default hostname associated with your HP printer. If the printer has a built-in web-based config server, you should be able to access it via a browser and change the details as you like.

Quote:
Does anyone know what kind of URI to use?
That depends on the printer. If you're using the HPLIP driver though, then the hp backend must be used. The printer URI will look something like
Code:
hp:/net/HP_LaserJet_P3010_Series?ip=192.168.2.50
Edit: You'll have to try 'hp-setup' to see whether it is possible to configure via hostname though. I do recall some user saying HPLIP might not be able to resolve by hostname.

FWIW, my Brother network printer can be reached by DNS hostname or Avahi hostname....both these URIs work
Code:
socket://BRN008077DC419C
Code:
socket://BRN008077DC419C.local

Last edited by ferrari; 08-29-2018 at 04:17 AM.
 
1 members found this post helpful.
Old 08-29-2018, 01:52 PM   #3
turboscrew
Member
 
Registered: Apr 2009
Location: Nokia (town), Finland
Distribution: Mint, Debian
Posts: 601

Original Poster
Rep: Reputation: 46
It looks like HPLIP doesn't give any options without defining the IP.

And the two MAC addresses bother me...
From the ADSL/router DHCP-table (before I made one of the IPs static):
Code:
192.168.0.100	a0:28:ed:85:2f:73	NPIB88B68	2018/08/26 13:20:59 - 2018/08/27 01:20:59
192.168.0.104	30:e1:71:b8:8b:68	NPIB88B68	2000/01/01 00:00:42 - 2000/01/01 12:00:42
It looks like when the printer is in sleep, only the first entry is present.
nmap didn't find any services there, but 7 services in the second "device".
(The date and time of the second "device" is updated soon after the printer is waken.)

Last edited by turboscrew; 08-29-2018 at 01:58 PM.
 
Old 08-29-2018, 08:32 PM   #4
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,342
Blog Entries: 28

Rep: Reputation: 6145Reputation: 6145Reputation: 6145Reputation: 6145Reputation: 6145Reputation: 6145Reputation: 6145Reputation: 6145Reputation: 6145Reputation: 6145Reputation: 6145
If you use HPLIP to install the computer, HPLIP will find the printer by ip address, but show the printer by name once it is installed.
 
Old 08-29-2018, 11:27 PM   #5
turboscrew
Member
 
Registered: Apr 2009
Location: Nokia (town), Finland
Distribution: Mint, Debian
Posts: 601

Original Poster
Rep: Reputation: 46
My goal is to put the printer back behind DHCP, and access it by name.
So if something happens to the router, I don't have to reinstall the printer to all my machines.
I have 6 machines, and a couple of weeks ago thunder broke my ADSL/router.
And my new router has different IP range.
 
Old 08-30-2018, 12:41 AM   #6
ferrari
LQ Guru
 
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 5,819

Rep: Reputation: 1144Reputation: 1144Reputation: 1144Reputation: 1144Reputation: 1144Reputation: 1144Reputation: 1144Reputation: 1144Reputation: 1144
This blog may be of interest to you:
http://blog.thefinalzone.net/2015/06...sue-on-hp.html
It describes an HPLIP URI using hostname using 'hp:/net/name_of_hp_printer?zc=hostname'

Some users claim only 'hp:/net/name_of_hp_printer?ip=ipaddress' works. I don't own HP hardware so can't test this. YMMV.
 
1 members found this post helpful.
Old 08-30-2018, 11:27 AM   #7
turboscrew
Member
 
Registered: Apr 2009
Location: Nokia (town), Finland
Distribution: Mint, Debian
Posts: 601

Original Poster
Rep: Reputation: 46
Quote:
Originally Posted by ferrari View Post
This blog may be of interest to you:
http://blog.thefinalzone.net/2015/06...sue-on-hp.html
It describes an HPLIP URI using hostname using 'hp:/net/name_of_hp_printer?zc=hostname'

Some users claim only 'hp:/net/name_of_hp_printer?ip=ipaddress' works. I don't own HP hardware so can't test this. YMMV.
I think this is exactly the answer to my question "Does anyone know what kind of URI to use?".
I think if I can't get that to work, then it's not possible with my printer. There are other ways but hplip, but probably the URI form is the key in all of them. THANKS!
 
Old 09-04-2018, 10:07 PM   #8
X-LFS-2010
Member
 
Registered: Apr 2016
Posts: 510

Rep: Reputation: 58
it used to be (roughly):

$ echo "lp54: printername@foobar.org" >> /etc/printcap

that's it!

and printers could be logged into with telnet, remote secure, and do vector or bit graphics (postscript), and it was built into the print: and it was the format that high speed publishers accepted

until (they) "improved it" with cheap imports and software to try making it work !

Last edited by X-LFS-2010; 09-04-2018 at 10:09 PM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
adding a printer roscoetsc Linux - Newbie 1 06-07-2013 05:02 PM
Adding a Printer wnkltd Linux - Newbie 3 03-16-2007 05:43 PM
I need help adding a printer rehuntley Linux - Newbie 3 09-11-2005 07:43 PM
Adding a printer krackerroot Linux - Networking 1 10-12-2003 01:14 PM
adding a printer Schizo265 Linux - Hardware 2 12-01-2002 04:49 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 04:51 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration