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 09-27-2020, 01:45 PM   #16
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

Ok, this checks out as expected (with respect to mdns)...
Code:
hosts: files mdns4_minimal [NOTFOUND=return] dns myhostname
However, I would like you to have demonstrated a ping response using the Avahi hostname (foo.local) rather than by IP address.
 
Old 09-27-2020, 02:19 PM   #17
shakespeare1
Member
 
Registered: Nov 2019
Location: Nokia, Finland.
Distribution: Xubuntu
Posts: 50

Original Poster
Rep: Reputation: Disabled
And what command do I use.
Be as explicit as you like.
 
Old 09-27-2020, 03:14 PM   #18
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
Well the printer Avahi hostname (along with other hosts on the network) should be discovered using something like...
Code:
avahi-browse -art
You may need to install 'avahi-utils' package first.

Running the CUPS dnssd backend manually might also return useful info...
Code:
sudo /usr/lib/cups/backend/dnssd
 
Old 09-27-2020, 03:26 PM   #19
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
Once you have the printer hostname eg Brother_DCP-9055CDN.local, then you could do something like
Code:
ping Brother_DCP-9055CDN.local
*Don't copy/run this blindly though, you need to use the relevant Avahi hostname for your printer.

If you can ping successfully, that would be a good sign. Alternatively you could just manually configure the printer URI using 'socket://<Printer_IP_address>'
 
Old 09-27-2020, 05:25 PM   #20
computersavvy
Senior Member
 
Registered: Aug 2016
Posts: 3,345

Rep: Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484
Quote:
Originally Posted by shakespeare1 View Post
There is an [unknown] error in the IP addresses.
99 becomes 109. Is this related to the CUPS-SD which relies on mDNS to work.
shakespeare@RYZEN:~$ ping 192.168.2.99
PING 192.168.2.99 (192.168.2.99) 56(84) bytes of data.
From 192.168.2.109 icmp_seq=1 Destination Host Unreachable
From 192.168.2.109 icmp_seq=2 Destination Host Unreachable
From 192.168.2.109 icmp_seq=3 Destination Host Unreachable
From 192.168.2.109 icmp_seq=4 Destination Host Unreachable
^C
--- 192.168.2.99 ping statistics ---
4 packets transmitted, 0 received, +4 errors, 100% packet loss, time 4525ms
pipe 4
shakespeare@RYZEN:~$
No, Ping is in no way related to cups or it's network foibles. Since the 2 IPs are on the same local network you are seeing what is probably the IP of your machine you are pinging from. Most networks are designed so that if a ping is unable to reach the destination the last reachable address in the route returns the unreachable reply because it does not know where to go. For example, if I ping my laptop from my workstation while the laptop is powered off the reply comes from my workstation IP.
You would need to check at the printer and see if the network is actually properly configured and if the printer can see other devices from that end. If your local network is using DHCP then the printer needs either a fixed IP or a reserved DHCP address to prevent an address change which can happen at some point.
My HP printer is capable of printing a network status sheet which has the assigned IP as well as testing network connectivity. I use a reserved DHCP address so it stays static.

As has been said, mDNS is known to be flakey at best, especially with dynamic DHCP addresses.
 
Old 09-27-2020, 05:36 PM   #21
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
I agree that the best idea is to allocate a static IP address for the printer, or a DHCP reserved address (configured in gateway router). That's what most experienced admins would do. However, mDNS should work (firewalls allowing) too. I've used Avahi for years with no issues.

Last edited by ferrari; 09-27-2020 at 06:50 PM.
 
1 members found this post helpful.
Old 09-28-2020, 02:37 PM   #22
shakespeare1
Member
 
Registered: Nov 2019
Location: Nokia, Finland.
Distribution: Xubuntu
Posts: 50

Original Poster
Rep: Reputation: Disabled
Here is the answer I get to the command I entered
It's about an Epson M200 which I also have.
shakespeare@RYZEN:~$ sudo /usr/lib/cups/backend/dnssd
[sudo] password for shakespeare:
DEBUG: Querying "EPSON\032AL-M200DN\032\04079\05813\05849\041._pdl-datastream._tcp.local"...
DEBUG: Querying "EPSON\032AL-M200DN\032\04079\05813\05849\041._printer._tcp.local"...
DEBUG: sent=0, count=2
DEBUG2: query_callback(browser=0x5598de41e010, interfaceIndex=2, protocol=1, event=0, fullName="EPSON\032AL-M200DN\032\04079\05813\05849\041._pdl-datastream._tcp.local", rrclass=1, rrtype=16, rdata=0x5598de41f55c, rdlen=128, flags=5, context=0x5598de41d300)
DEBUG2: query_callback: "ty=EPSON AL-M200DN".
DEBUG2: query_callback: "product=(EPSON AL-M200DN)".
DEBUG2: query_callback: "usb_MFG=SEIKO EPSON CORPORATION".
DEBUG2: query_callback: "usb_MDL=EPSON AL-M200DN".
DEBUG2: query_callback: "note=".
DEBUG2: query_callback: "qtotal=1".
DEBUG2: query_callback: "priority=10".
DEBUG2: query_callback(browser=0x5598de41e010, interfaceIndex=-1, protocol=-1, event=2, fullName="EPSON\032AL-M200DN\032\04079\05813\05849\041._pdl-datastream._tcp.local", rrclass=1, rrtype=16, rdata=(nil), rdlen=0, flags=0, context=0x5598de41d300)
DEBUG2: query_callback(browser=0x5598de41d6e0, interfaceIndex=2, protocol=1, event=0, fullName="EPSON\032AL-M200DN\032\04079\05813\05849\041._printer._tcp.local", rrclass=1, rrtype=16, rdata=0x5598de41f918, rdlen=127, flags=5, context=0x5598de41d180)
DEBUG2: query_callback: "ty=EPSON AL-M200DN".
DEBUG2: query_callback: "product=(EPSON AL-M200DN)".
DEBUG2: query_callback: "usb_MFG=SEIKO EPSON CORPORATION".
DEBUG2: query_callback: "usb_MDL=EPSON AL-M200DN".
DEBUG2: query_callback: "qtotal=1".
DEBUG2: query_callback: "rp=printer".
DEBUG2: query_callback: "note=".
DEBUG2: query_callback(browser=0x5598de41d6e0, interfaceIndex=-1, protocol=-1, event=2, fullName="EPSON\032AL-M200DN\032\04079\05813\05849\041._printer._tcp.local", rrclass=1, rrtype=16, rdata=(nil), rdlen=0, flags=0, context=0x5598de41d180)
network dnssd://EPSON%20AL-M200DN%20(79%3A13%3A49)._pdl-datastream._tcp.local/ "SEIKO EPSON CORPORATION EPSON AL-M200DN" "EPSON AL-M200DN (79:13:49)" "MFG:SEIKO EPSON CORPORATION;MDL:EPSON AL-M200DN;" ""
DEBUG: sent=2, count=2
DEBUG: sent=2, count=0
shakespeare@RYZEN:~$

How do I get the thing to work?
Here is my /etc/hosts (with garbage at the front).
# The following lines are desirable for IPv6 capable hosts
127.0.0.1 1-edge-chat.facebook.com
127.0.0.1 2-edge-chat.facebook.com
127.0.0.1 3-edge-chat.facebook.com
127.0.0.1 4-edge-chat.facebook.com
127.0.0.1 5-edge-chat.facebook.com
127.0.0.1 6-edge-chat.facebook.com
127.0.0.1 7-edge-chat.facebook.com
127.0.0.1 8-edge-chat.facebook.com
127.0.0.1 9-edge-chat.facebook.com
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
127.0.0.1 localhost kissmetrics.com

# Local router, DNS, DHCP
192.168.2.1 Router Router.local

# DHCP pool 192.168.2.96-127
# Nodes on LAN with fixed IP addresses
# Note:
# Netmask=192.168.2.0/25 restricts to 192.168.2.1-127 (LAN and internet)
# Netmask=192.168.2.0/27 restricts to 192.168.2.1-95 (internet, no LAN)
# Netmask=192.168.2.96/27 restricts to 192.168.2.96-127 (LAN, no internet)
192.168.2.96 WwwStation
192.168.2.97 M200 AL-M200DN
192.168.2.98 FileStation FS
192.168.2.99 DCP9055 DCP9055CDN
192.168.2.100 WebStation WS
192.168.2.101 HP7410 HP49BDF9
192.168.2.102 MediaStation MS
192.168.2.103 RYZEN
192.168.2.104 CRUZ
192.168.2.106 Tarja
192.168.2.107 NEXUS
192.168.2.110 Private2020
192.168.2.111 BraviaTV TV
192.168.2.112 PlayStation PS3
192.168.2.114 Pi1
 
Old 09-28-2020, 07:19 PM   #23
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
The CUPS dnssd backend only picked up your Epson printer. The 'avahi-browse -art' command should enumerate all Avahi-capable hosts. Or just consider manually configuring as I suggested before.
 
Old 09-29-2020, 04:10 AM   #24
shakespeare1
Member
 
Registered: Nov 2019
Location: Nokia, Finland.
Distribution: Xubuntu
Posts: 50

Original Poster
Rep: Reputation: Disabled
A problem arose during the command earlier run, it has to do with the net address of the host.
eno1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.2.109 netmask 255.255.255.0 broadcast 192.168.2.255
inet6 fe80::c8ad:64f0:cdcf:e0da prefixlen 64 scopeid 0x20<link>
ether 00:d8:61:d8:fe:34 txqueuelen 1000 (Ethernet)
RX packets 790479 bytes 677902643 (677.9 MB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 345532 bytes 53445387 (53.4 MB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
device interrupt 16 memory 0xa3200000-a3220000

Here's the output from 'avahi-browse -art'

+ eno1 IPv6 RYZEN Microsoft Windows Network local
+ eno1 IPv4 RYZEN Microsoft Windows Network local
+ lo IPv4 RYZEN Microsoft Windows Network local
= eno1 IPv6 RYZEN Microsoft Windows Network local
hostname = [RYZEN.local]
address = [fe80::c8ad:64f0:cdcf:e0da]
port = [445]
txt = []
= eno1 IPv4 RYZEN Microsoft Windows Network local
hostname = [RYZEN.local]
address = [192.168.2.109]
port = [445]
txt = []
= lo IPv4 RYZEN Microsoft Windows Network local
hostname = [localhost]
address = [127.0.0.1]
port = [445]
txt = []
+ eno1 IPv6 Private2020 Web Site local
+ eno1 IPv4 Private2020 Web Site local
= eno1 IPv6 Private2020 Web Site local
hostname = [Private2020.local]
address = [fe80::211:32ff:fec8:9a4b]
port = [5000]
txt = ["mac_address=00:11:32:c8:9a:4b|00:11:32:c8:9a:4c|00:11:32:c8:9a:4d|00:11:32:c8:9a:4e" "secure_admin_port=5001" "admin_port=5000" "version_build=25426" "version_minor=2" "version_major=6" "serial=2020R5RGP1QY2" "model=DS1819+" "vendor=Synology"]
= eno1 IPv4 Private2020 Web Site local
hostname = [Private2020.local]
address = [192.168.2.110]
port = [5000]
txt = ["mac_address=00:11:32:c8:9a:4b|00:11:32:c8:9a:4c|00:11:32:c8:9a:4d|00:11:32:c8:9a:4e" "secure_admin_port=5001" "admin_port=5000" "version_build=25426" "version_minor=2" "version_major=6" "serial=2020R5RGP1QY2" "model=DS1819+" "vendor=Synology"]
 
Old 09-29-2020, 04:46 AM   #25
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
I see no evidence of the Brother printer reported. However, I note that you have an entry for your Brother printer added to /etc/hosts
Code:
192.168.2.99 DCP9055 DCP9055CDN
So why not just manually configure the CUPS URI?
 
Old 09-29-2020, 05:55 AM   #26
shakespeare1
Member
 
Registered: Nov 2019
Location: Nokia, Finland.
Distribution: Xubuntu
Posts: 50

Original Poster
Rep: Reputation: Disabled
It doesn't work.
I have tried and failed to do it.
 
Old 09-29-2020, 07:52 AM   #27
shakespeare1
Member
 
Registered: Nov 2019
Location: Nokia, Finland.
Distribution: Xubuntu
Posts: 50

Original Poster
Rep: Reputation: Disabled
I have two other laptops and they work adequately enough.
 
Old 09-29-2020, 12:39 PM   #28
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:
Originally Posted by shakespeare1 View Post
It doesn't work.
I have tried and failed to do it.
I'm not sure what you have tried and failed with here. Use the CUPS web interface to change the URI to 'socket://192.168.2.99' or 'lpd://192.168.2.99/BINARY_P1' (of course making sure that the printer really can be reached at that IP address first).
 
Old 09-29-2020, 03:29 PM   #29
shakespeare1
Member
 
Registered: Nov 2019
Location: Nokia, Finland.
Distribution: Xubuntu
Posts: 50

Original Poster
Rep: Reputation: Disabled
I have tried the CUPS web interface
'socket://192.168.2.99' and 'lpd://192.168.2.99/BINARY_P1'
neither one will work as both give the same result.
"Unauthorized"
"Enter your username and password or the root username and password to access this page. If you are using Kerberos authentication, make sure you have a valid Kerberos ticket."
The web page doesn't tell me any more than that (I'm not using Kerberos).

I've also tried to use lpoptions
shakespeare@RYZEN:~$ lpoptions -p socket://192.168.2.99
lpoptions: Unable to add printer or instance: No such file or directory
shakespeare@RYZEN:~$ lpoptions -p lpd://192.168.2.99/BINARY_P1
lpoptions: Unable to add printer or instance: No such file or directory
shakespeare@RYZEN:~$
 
Old 09-29-2020, 03:32 PM   #30
shakespeare1
Member
 
Registered: Nov 2019
Location: Nokia, Finland.
Distribution: Xubuntu
Posts: 50

Original Poster
Rep: Reputation: Disabled
I have a username and password.
 
  


Reply

Tags
printer driver



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
VI & VIM are borked! d33pdream Linux - Software 4 11-15-2004 02:57 AM
x is borked Enigma Linux - Newbie 3 01-18-2003 07:45 PM
I've borked over a superblock...uh oh Null Linux - Hardware 8 01-08-2003 12:52 PM
Samba - it got borked good bkeating Linux - Networking 2 09-15-2002 03:43 AM

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

All times are GMT -5. The time now is 12:54 PM.

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