Linux experts - wif...
 

Linux experts - wifi printer

24 Posts
10 Users
0 Reactions
188 Views
Posts: 386
Free Member
Topic starter
 

I have bought an HP 2820 wifi printer so I can put it in the house, not my outside office, where the family can use it. I would still like to access it from my desktop PC which also has a directly connected Epson printer The PC is running Opensuse Leap 15.3 and is connected over eth0 to the router. The HP printer is setup and running in the house, but I can't connect to it from my PC despite both being on the same network. I have the IP address which I have locked to the device.

I have tried an Opensuse forum but find the advice there beyond my knowledge and expertise, and it's a long drawn out process following the thread. It seems that Opensuse adds a firewall on installation which is particularly hard, so I need to open some ports to access the printer. However, I am finding the instructions difficult to follow.

So I'm appealing to STW. Can anyone provide relatively simple instructions? For info, neither YAST nor CUPS seems able to recognise the printer.

 
Posted : 01/05/2024 4:27 pm
Posts: 1818
Full Member
 

Dunno, but for starters have you tried AirPrint from a smartphone or other device to make sure the printer end of things is ok?

 
Posted : 01/05/2024 4:29 pm
Posts: 386
Free Member
Topic starter
 

we can print to the machine from tablets and smartphones in the house. It's just my PC which can't.

 
Posted : 01/05/2024 4:38 pm
Posts: 14611
Free Member
 

Might be worth trying some different flavours of Linux.. Some are more user friendly than others.

I've found Mint and Ubuntu to be pretty good from a newbie perspective.. And you can fire them up from a USB stick to trial them out.

I can't help with the printer though... Printers are arsholes at the best of times!

 
Posted : 01/05/2024 4:50 pm
Posts: 386
Free Member
Topic starter
 

Printers are arsholes at the best of times

Especially , in my experience, with Linux. I've been using it for 20 years and every time I install a new version or distribution it always seems to be printers that cause problems.

 
Posted : 01/05/2024 4:56 pm
Posts: 14611
Free Member
 

We can send man to the moon, but not a document to the printer!

 
Posted : 01/05/2024 5:13 pm
Posts: 1566
Free Member
 

Can you e-print to it? https://www.hpsmart.com/gb/en/cms/HPC/ePrint

 
Posted : 01/05/2024 5:18 pm
Posts: 2503
Free Member
 

A modern printer like that should support driverless printing (so mobiles can print to it) which modern Linuxes also support. For it to work your computer needs to be able to scan the network using dns or mdns, part of the avahi package, and to have CUPS installed and have the cups-browsed service (part of cups, which makes use of dns/mdns) running.

https://doc.opensuse.org/documentation/leap/startup/html/book-startup/cha-print.html#sec-print-net

From the above at section 7.7.1 you do need to make a hole in your local firewall for this unfortunately. It might be possible to turn off the firewall completely for testing purposes then, if CUPS detects the printer, you might be encocuraged to do the firewall fiddling?

I found setting up my recently purchased Canon printer very easy via the CUPS web interface, but I am not running opensuse, or anything like it (Gentoo wierdo here) so can't help with details.

 
Posted : 01/05/2024 5:20 pm
Posts: 386
Free Member
Topic starter
 

avahi and cups installed. maybe need to look at cps-browsed service. Not at the machine just now, will check later.

 
Posted : 01/05/2024 5:37 pm
Posts: 2503
Free Member
 

sudo systemctl stop firewalld

At a guess, the above might disable the firewall, and replacing start with stop (or rebooting) would enable it.

ETA and

systemctl

would list all running services, in which cups-browsed should show up, or if it is too long and confusint

systemctl | grep cups

will weed the output to lines containing cups.

BTW I am not entirely sure cups-browsed is needed on the client, but I rather think it is.

ETA2 there is an element of guesswork on my part here as this is based on the systemd runtime control system that OpenSuse uses, whereas I use OpenRC.

 
Posted : 01/05/2024 5:42 pm
Posts: 76786
Free Member
 

Install Windows? (Sorry, I couldn't resist.)

Can you set up another PC as a print spooler maybe?

What does it do that the Epson doesn't?

 
Posted : 01/05/2024 5:45 pm
Posts: 5822
Free Member
 

Does the printer work if plugged-in direct?

Mine is a pain, it's easier to send the document to a windows PC, sorry, but to do anything else is time I'll never get back 🙂

 
Posted : 01/05/2024 6:55 pm
Posts: 386
Free Member
Topic starter
 

Update time:

What does it do that the Epson doesn’t?

Epson printer is over 5 years old and regularly has cartridge problems.

systemctl | grep cups

shows cups-browsed.service is running

sudo systemctl stop firewalld

makes no difference, still can't see the printer.

 
Posted : 01/05/2024 9:03 pm
Posts: 2503
Free Member
 

Hmmm. If you know the ip address, can you ping the printer?

and if you can, or indeed can't

avahi-browse -at should list a load of devices that use dns/mdns including your printer. Or not.

 
Posted : 01/05/2024 10:12 pm
Posts: 386
Free Member
Topic starter
 

avahi-browse -at - command not available

ping seems to work

 
Posted : 02/05/2024 11:44 am
Posts: 386
Free Member
Topic starter
 

Tried nmap to identify open ports:

mike@linux:~> nmap 192.168.178.43
Starting Nmap 7.70 ( https://nmap.org ) at 2024-05-02 10:49 BST
Nmap scan report for HP021FD6.fritz.box (192.168.178.43)
Host is up (0.0026s latency).
Not shown: 995 closed ports
PORT     STATE SERVICE
80/tcp   open  http
443/tcp  open  https
631/tcp  open  ipp
8080/tcp open  http-proxy
9100/tcp open  jetdirect

Nmap done: 1 IP address (1 host up) scanned in 6.56 seconds

Appears to recognise the printer HPO21FD6 on that IP address.

 
Posted : 02/05/2024 11:52 am
Posts: 2503
Free Member
 

Well it appears to be open for ipp, Zyou could tyr setting it up as an ipp printer via the cups web interface. But I have always found that stuff a bit miss and hit, but genarally a hit after a few misses.

 
Posted : 02/05/2024 2:39 pm
Posts: 1820
Free Member
 

If you have HP LIP installed you should be able to run the HP setup wizard, think the command is just 'hp-setup'

eta- in fact there are suse specific instructions on the docs

https://developers.hp.com/hp-linux-imaging-and-printing/howtos/install

 
Posted : 02/05/2024 2:50 pm
Posts: 386
Free Member
Topic starter
 

I can run hp-setup but then need to temporarily connect by USB to start the process. The printer was not supplied with a cable so i will have to buy one. Then I can try again but I would be concerned that the PC is outside the range of the router wifi. That will be problem for another day!

 
Posted : 02/05/2024 3:37 pm
Posts: 2503
Free Member
 

Also appears avahi and/or avahi-utils are not installed, you could check this.

 
Posted : 02/05/2024 3:40 pm
Posts: 1820
Free Member
 

mikejdFull Member
I can run hp-setup but then need to temporarily connect by USB to start the process. The printer was not supplied with a cable so i will have to buy one. Then I can try again but I would be concerned that the PC is outside the range of the router wifi. That will be problem for another day!

Been a while since I've done it but IIRC the options are USB, network, or wireless with USB.  You should be able to do the network option. I *think* you can then let it search the network or give it an IP address if it doesn't find it. But like I said, been a while. i may be mixing it up with the windows installer.

 
Posted : 02/05/2024 4:02 pm
Posts: 386
Free Member
Topic starter
 

avahi-utils wasn't installed, is now.

avahi-browse -at lists both Epson printer and HP 2820 printer

 
Posted : 02/05/2024 8:33 pm
Posts: 621
Free Member
 

Well you know the IP address of the printer then? You should be able to just run

hp-setup 123.45.67.89

 
Posted : 02/05/2024 9:47 pm
Posts: 8449
Full Member
 

Just give up. Or read the entire Arch Linux wikipedia - it is actually a very good resource even if you don't use Arch.

 
Posted : 02/05/2024 10:18 pm
Posts: 386
Free Member
Topic starter
 

Just to return to this for a last time:

I have connected the printer to the router by the USB port. The printer is connected to the wifi network wih the IP address 192.168.187.43. So both the PC and the printer are directly connected to the same network. Printer Information Report says connected to the network, IP address as above, signal strength is excellent, connected to internet.

Run hp-setup and hp-setup 192.168.178.43. No printer detected. Yast, CUPS no printer detected. HP Smart app shows the printer but not available.

I think it's time to give up!

 
Posted : 08/05/2024 1:54 pm