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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
|
01-13-2020, 07:07 AM
|
#1
|
Member
Registered: Jul 2012
Location: Down Under
Distribution: Mint 19 Tara
Posts: 138
Rep: 
|
HP Laserjet Pro P1102w
Machine running Mint 19.2 Xfce (intending to upgrade to 19.3)is almost 10 years old. It uses a wireless adapter to connect to an NBN enabled router (uniquely Oz?).
My problem is that I don't understand how to set up the printer so it can also print wirelessly from the same printer which is connected to an Intel NUC box (running Mint 19.2 Cinnamon). The printer works in that setup because it is plugged into the NUC's USB port. Hplip-3.19.12 has been installed in the old machine running Xfce, but it is says that "No installed HP devices found". I've tried adding printer in CUPS but got stuck in using the correct URI.
I do not know how else to describe the problem and am hoping that the experts in this forum can tell me what info (and how to retrieve such info) is required to solve this problem. Do I need a physical wireless adaptor to print over a network? If yes, How to configure a wireless network? etc etc
I apologise for the apparently sketchy (and probably useless) description of the problem. So, thanks in advance for the help I've always been fortunate to receive from this forum's gurus. <thumbs up>
|
|
|
01-13-2020, 09:20 AM
|
#2
|
LQ 5k Club
Registered: Nov 2002
Location: Somewhere inside 9.9 million sq. km. Canada
Distribution: Slackware 15.0, current, slackware-arm-currnet
Posts: 6,354
|
Quote:
I've tried adding printer in CUPS but got stuck in using the correct URI.
|
Here is a device URI I use for my HP printer.
Quote:
ipp://RaspPi/printers/HP_LaserJet_M203-M206
|
A little explanation. //RaspPi/ is the host for my printer. In order for a name to work you need to define the IP address of the host system in your /etc/hosts file on the client. If you do not want to do that, you can use the IP address of the host system. It should not be assigned by DHCP ( your routers DHCP server ) as the address can change with a reset. YOu wan t afixed address.
/printers/ field, I can not tell you why this field is there, it needs to be. I just accepted the fact it was necessary.
/HP_LaserJet_M203-M206, this is the queue name I gave the printer when setting it up on the host Raspberry Pi. You can choose any name that makes sense to you. Mine is just a long version of the company making the printer and the model.
The URI I created works with all my linux systems and its worked with Win 7 and Win 10, all system are clients.
The wireless part I have avoided like the plague. When setting up a WIn 10 system, I did get asked for a "Wi-Fi Direct PIN". I was using a set of instructions I found on the web to add a Win 10 system to a cups printer. After 4 hours of head banging on Win 10, ( user friendly right ) I did get the Win 10 system working with the HP printer run by cups.
After I printed Test page from WIn 10, I found an extra piece of paper in the printer with the Wi-Fi Direct pin, a 7 digit number. The document stated the pin was good for 90 seconds. My printer is in a different room from where I fought Win 10, so the output was useless.
I got out the CD that came with my printer, stuck it in and took a look. Nothing about a linux system at all. Everything is geared toward windows. I feel your pain.
Hope this helps with the device URI. Let us know how it goes.
|
|
1 members found this post helpful.
|
01-13-2020, 09:23 AM
|
#3
|
Moderator
Registered: Aug 2002
Posts: 26,533
|
On the NUC box configure the firewall to allow both TCP and UDP traffic on port 631 i.e cups if enabled.
You then need to share the printer either via cups web page localhost:631/admin page and select share printers connected to this system or you can use the Printers -> right click on the printer icon and select share printer.
The printer should now show up automatically in the printer dialog boxes on your old machine.
The reason ipp works as a url is it is the same thing as port 631.
Last edited by michaelk; 01-14-2020 at 09:01 AM.
|
|
1 members found this post helpful.
|
01-14-2020, 03:31 AM
|
#4
|
Member
Registered: Jul 2012
Location: Down Under
Distribution: Mint 19 Tara
Posts: 138
Original Poster
Rep: 
|
Many thanks to camorri and michaelk. I've followed your instructions but would like more help, so please excuse the silly questions below.
Quote:
you can use the IP address of the host system
|
What is showing in the etc/hosts file are "127.0.0.1 localhost" and "127.0.1.1 plus the name I gave to each machine". Since the defined printer on NUC is working, the URI on the old machine should point to NUC's ip address? Also, should I add another line "127.0.2.1 printers"?
I've tried following the other steps, yet still cannot print from the old machine. Error messages when sending a print job from the old machine include: "hplip.plugin" and "printer may not be connected".
Thanks again!
Last edited by dwhb; 01-14-2020 at 04:25 AM.
|
|
|
01-14-2020, 06:25 AM
|
#5
|
LQ 5k Club
Registered: Nov 2002
Location: Somewhere inside 9.9 million sq. km. Canada
Distribution: Slackware 15.0, current, slackware-arm-currnet
Posts: 6,354
|
This IP address is a loopback address, and is used locally on a system. For example, to access the gui interface for cups, you would enter, in a web browser, http://localhost:631 and press enter. Your web browser connects to 127.0.0.1 to cups. I have no idea what 127.0.1.1 is for.
These addresses can not be connected to from outside the local machine.
Do you have a router in your network? If yes, the address you are looking for will be something like 192.168.xxx.yyy where xxx is you subnet and yyy is the address of a system on your local network.
If you run the command on your NUC, /sbin/ifconfig and press enter, you should get some output like this:
Quote:
/sbin/ifconfig
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.1.22 netmask 255.255.255.0 broadcast 192.168.1.255
inet6 fe80::204:4bff:fe0a:a636 prefixlen 64 scopeid 0x20<link>
ether 00:04:4b:0a:a6:36 txqueuelen 1000 (Ethernet)
RX packets 1018 bytes 607851 (593.6 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 1009 bytes 164451 (160.5 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 1 (Local Loopback)
RX packets 517 bytes 179288 (175.0 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 517 bytes 179288 (175.0 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
|
This is from my system. The interface called eth0 is the externally visible IP address, and lo is the loopback address, used internally so two pieces of software can talk to each other through the TCP-IP stack.
Its the external address your need for configuring printing from a client system to the NUC.
|
|
1 members found this post helpful.
|
01-14-2020, 07:25 AM
|
#6
|
Member
Registered: Jul 2012
Location: Down Under
Distribution: Mint 19 Tara
Posts: 138
Original Poster
Rep: 
|
127.0.1.1 is the name of the old machine which I named "Upstairs2018" in the hosts file.
This is the result from NUC
Code:
/sbin/ifconfig
eno1: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
ether 1c:69:7a:05:80:e1 txqueuelen 1000 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
device interrupt 16 memory 0xc0a00000-c0a20000
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 1000 (Local Loopback)
RX packets 120262 bytes 11967804 (11.9 MB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 120262 bytes 11967804 (11.9 MB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
wlp0s20f3: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.1.108 netmask 255.255.255.0 broadcast 192.168.1.255
inet6 fe80::4122:1e87:3b7b:3ddf prefixlen 64 scopeid 0x20<link>
ether 04:ea:56:21:df:a4 txqueuelen 1000 (Ethernet)
RX packets 195300 bytes 228195244 (228.1 MB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 121141 bytes 18187178 (18.1 MB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
The external address is 192.168.1.255 or 192.168.1.108?
And TCP & UDP in NUC's firewall will be enabled In & Out from 192.168.1.108 to 192.168.1.255 on port 631?
Thanks very much
Last edited by dwhb; 01-14-2020 at 07:42 AM.
|
|
|
01-14-2020, 07:27 AM
|
#7
|
LQ 5k Club
Registered: Nov 2002
Location: Somewhere inside 9.9 million sq. km. Canada
Distribution: Slackware 15.0, current, slackware-arm-currnet
Posts: 6,354
|
This is the address you want. The .255 address is a broadcast address.
|
|
1 members found this post helpful.
|
01-14-2020, 07:45 AM
|
#8
|
Member
Registered: Jul 2012
Location: Down Under
Distribution: Mint 19 Tara
Posts: 138
Original Poster
Rep: 
|
127.0.1.1 is the name of the old machine which I named "Upstairs2018" in the hosts file.
This is the result from NUC
Code:
/sbin/ifconfig
eno1: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
ether 1c:69:7a:05:80:e1 txqueuelen 1000 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
device interrupt 16 memory 0xc0a00000-c0a20000
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 1000 (Local Loopback)
RX packets 120262 bytes 11967804 (11.9 MB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 120262 bytes 11967804 (11.9 MB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
wlp0s20f3: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.1.108 netmask 255.255.255.0 broadcast 192.168.1.255
inet6 fe80::4122:1e87:3b7b:3ddf prefixlen 64 scopeid 0x20<link>
ether 04:ea:56:21:df:a4 txqueuelen 1000 (Ethernet)
RX packets 195300 bytes 228195244 (228.1 MB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 121141 bytes 18187178 (18.1 MB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
The external address is 192.168.1.255 or 192.168.1.108?
And NUC's firewall TCP and UDP will be enabled (In and Out) from 192.168.1.108 to 192.168.1.255 on port 631?
Thanks
|
|
|
01-14-2020, 07:48 AM
|
#9
|
Member
Registered: Jul 2012
Location: Down Under
Distribution: Mint 19 Tara
Posts: 138
Original Poster
Rep: 
|
My apologies. last post was duplicated. Can't delete.
|
|
|
01-14-2020, 07:49 AM
|
#10
|
Moderator
Registered: Aug 2002
Posts: 26,533
|
The LAN address is 192.168.1.108, allowing traffic on port 631 allows any device on the network to connect.
Do not worry about the 192.168.1.255 address at the moment.
|
|
|
01-14-2020, 10:20 AM
|
#11
|
Member
Registered: Jul 2012
Location: Down Under
Distribution: Mint 19 Tara
Posts: 138
Original Poster
Rep: 
|
Quote:
Originally Posted by camorri
This is the address you want. The .255 address is a broadcast address.
|
When it comes to adding printer within CUPS interface, I would select 'Local Printers' (HP Printer HPLIP) and under 'Connection' enter http://192.168.1.108?
No 'Discovered Network Printer' is showing. So none of the 'Other Network Printers (eg http; ipp; LPD/LPR Host or Printer; ipps or https) is be selected instead?
After adding printer, I had the following errors when I send a print job from the old machine: (1) printer may not be connected and (2) hplip plugin missing yet it cannot be downloaded.
When I run hp-setup, no printer is discovered under all 3 possible connection types, ie USB or Network/Ethernet/Wireless network or Wireless/802.11
Device Manager message:
may be due to firewall settings for network services like mdns and slp in firewall. TCP & UDF were allowed in an out on NUC
I am at wit's end. Before migrating printer to be physically plugged in the NUC's USB, I can print from my laptop running Windows7 and a fit4 PC running Mint 18 to the printer plugged in the old machine without having to do any of this. But now it does not print at all after plugging the printer back to its USB port.
I am grateful to camorri and michaelk for your tolerance of my ignorance. I cannot work out what I have done wrong. Is the URI of old machine (192.168.1.103) required to be added in any one of the steps? I have questions galore and more hand-holding. Perhaps upgrading the old machine to 19.3 may solve the plugin issue at least?
Thanks.
|
|
|
01-14-2020, 10:53 AM
|
#12
|
LQ 5k Club
Registered: Nov 2002
Location: Somewhere inside 9.9 million sq. km. Canada
Distribution: Slackware 15.0, current, slackware-arm-currnet
Posts: 6,354
|
You sound confused. Let me see if I can help.
To add a printer in cups, you need root privileges. If you try to 'add printer', were you prompted for root user and password? I'm going to assume yes, if not please clarify.
Click 'add printer' button. That action gives you a page where you can add a local printer or a remote printer. In your case. the Nuc is the remote host, and the machine you are adding the printer on is a client.
There is a list of options.
Quote:
Other Network Printers: Backend Error Handler
Internet Printing Protocol (https)
Internet Printing Protocol (ipp)
LPD/LPR Host or Printer
Internet Printing Protocol (http)
AppSocket/HP JetDirect
Internet Printing Protocol (ipps)
Windows Printer via SAM
|
It doesn't matter if your client can not find the remote printer.
Click the radio button beside the Internet Printing Protocol (ipp).
On the next page you enter on the line provided, beside the ipp, //192.168.xxx.yyy:631/printers/printer-queue-name and continue.
You have the IP address, and the queue name is set on the Nuc.
Next you enter a Name ( your choice ) , Description ( any thing you want ) Location ( what you want ) continue, and a check box for sharing.
Press continue.
Select the driver for your printer. Then click 'add printer'.
This is like adding a local printer, the difference is the client will send the print job to the IP address you specify over port 631, the default port for cups.
If you still can not print, there may be a network problem like firewalls.
Hope this helps.
Last edited by camorri; 01-14-2020 at 11:12 AM.
|
|
|
01-14-2020, 11:57 AM
|
#13
|
Moderator
Registered: Aug 2002
Posts: 26,533
|
since IPP by default is port 631 192.168.0.108:631 is not necessary just use:
ipp://192.168.0.108/printers/printer-queue
Quote:
I am at wit's end. Before migrating printer to be physically plugged in the NUC's USB, I can print from my laptop running Windows7 and a fit4 PC running Mint 18 to the printer plugged in the old machine without having to do any of this. But now it does not print at all after plugging the printer back to its USB port.
|
Did printing every work correctly with the printer connected to the NUC from Windows or your fit4 PC?
|
|
|
01-14-2020, 12:44 PM
|
#14
|
LQ Guru
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 17,276
|
Had one of those printers - exact model. Cost was €50, but a cartridge was €80!
The only way to set an IP is to use the windows driver on that model, unless hplip has improved uncommonly. Then you use hplip-setup <your_ip>.
Grab a windows box. Set the IP. Uninstall the printer. Use hplip-setup <your_ip>
|
|
|
01-14-2020, 12:50 PM
|
#15
|
Moderator
Registered: Aug 2002
Posts: 26,533
|
The OP is using USB and not a network connection. Does that still apply?
|
|
|
All times are GMT -5. The time now is 08:53 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|