Giter VIP home page Giter VIP logo

Comments (10)

michaelrsweet avatar michaelrsweet commented on June 20, 2024

Keep in mind that LPrint/PAPPL device URIs don't always match what (legacy) CUPS backends report. In particular, "%5C032" maps to "\032" which would be the escaped form of a space in a DNS name - the CUPS backend unescapes the name but the PAPPL device doesn't.

This log message is the relevant one:

E [2024-04-30T07:10:32.786Z] [Device] Unable to connect to 'AA-EXTREME-2.local:9103': Connection timed out

That is the hostname that the DNS-SD service name resolves to, with port 9103 being reported for the socket port.

Can you run the following command to see what Avahi says:

avahi-browse -r _pdl-datastream._tcp

(You'll need to CTRL-C to break out once you see all of your printers)

from lprint.

brianbarr avatar brianbarr commented on June 20, 2024

As requested:

root@debian12:~# avahi-browse -r _pdl-datastream._tcp

  • ens192 IPv6 DYMO LabelWriter 400 Turbo PDL Printer local
  • ens192 IPv4 DYMO LabelWriter 400 Turbo PDL Printer local

= ens192 IPv4 DYMO LabelWriter 400 Turbo PDL Printer local
hostname = [AA-EXTREME-2.local]
address = [169.254.2.254]
port = [9103]
txt = ["ty=DYMO LabelWriter 400 Turbo" "usb_0503000009414945678" "usb_DESCRIPTION=DYMO LabelWriter 400 Turbo" "usb_CLASS=PRINTER" "usb_MDL=LabelWriter 400 Turbo" "usb_CMD= " "usb_MFG=DYMO" "priority=5" "pdl=U" "product=(DYMO LabelWriter 400 Turbo)" "note=AA-EXTREME-2" "qtotal=1" "txtvers=1"]
= ens192 IPv6 DYMO LabelWriter 400 Turbo PDL Printer local
hostname = [AA-EXTREME-2.local]
address = [169.254.2.254]
port = [9103]
txt = ["ty=DYMO LabelWriter 400 Turbo" "usb_0503000009414945678" "usb_DESCRIPTION=DYMO LabelWriter 400 Turbo" "usb_CLASS=PRINTER" "usb_MDL=LabelWriter 400 Turbo" "usb_CMD= " "usb_MFG=DYMO" "priority=5" "pdl=U" "product=(DYMO LabelWriter 400 Turbo)" "note=AA-EXTREME-2" "qtotal=1" "txtvers=1"]

The ip address(s) of the airport device using the DNS-SD/Bonjour "Discovery app" I run on my mac are (under the _pdl-datastream_tcp:

AA-EXTREME-2.local
192.168.4.122:9103
169.254.2.254:9103
[fe80::66a5:c3ff:fe60:98f1]:9103

As I recall , this behavior was not present in lprint 1.1 ..also is this an avahi issue perhaps?
On MacOS this problem does not exist

from lprint.

brianbarr avatar brianbarr commented on June 20, 2024

It looks like avahi can find an old laserjet 4100 jetdirect card properly so this appears to be an airport/avahi issue:

= ens192 IPv4 HP LaserJet 4100 Series [F00434] PDL Printer local
hostname = [HP4100-CAVE.local]
address = [192.168.4.42]
port = [9100]
txt = ["adminurl=http://HP4100-CAVE.local." "priority=40" "product=(HP LaserJet 4100 Series )" "ty=HP LaserJet 4100 Series " "pdl=application/postscript,application/vnd.hp-PCL,application/vnd.hp-PCLXL" "qtotal=1" "txtvers=1"]

from lprint.

brianbarr avatar brianbarr commented on June 20, 2024

Would it be possible at some point in the future (for this oddball edge case) to allow lprint to add a printer by specifying the ip address and a port..? The lprint web configurator does not allow this currently. Can you manually do this (add printer IP:PORT) with a config file? If I could bypass the avahi stuff and just add the printer manually with IP:PORT I could possibly make this work. As I have lprint working fine with macos on a mac mini as a host -- this avahi disconnect is more of a resource issue. I'm going to try to put macos 11 in a VM and see if it is a workable solution.

from lprint.

brianbarr avatar brianbarr commented on June 20, 2024

Discovered all of this is a known avahi bug:

https://bugs.launchpad.net/ubuntu/+source/avahi/+bug/896688

So apologies for this wild goose chase.
If adding a printer with ip:port is possible that would be a workaround.

from lprint.

michaelrsweet avatar michaelrsweet commented on June 20, 2024

Use "socket://IP-ADDRESS:PORT".

The web interface currently only supports port 9100 for the "Network Printer" device. I'll file a bug for this in the PAPPL project.

from lprint.

michaelrsweet avatar michaelrsweet commented on June 20, 2024

PAPPL issue 360 is tracking the fix for this.

from lprint.

michaelrsweet avatar michaelrsweet commented on June 20, 2024

I've fixed the PAPPL issue. I'll bump the snap shortly.

from lprint.

brianbarr avatar brianbarr commented on June 20, 2024

Thanks for the fix.. it will certainly make configuring lprint for non-standard devices much easier.

I discovered a somewhat elegant solution to the problem. Without delving too deep into avahi vs airport devices and how they report link-local address vs dhcp assigned addresses via DNS-SD-- this fixes the unable to connect issue by adding a route to the link-local net on the lprint server:

route add -net 169.254.0.0 netmask 255.255.0.0 dev ens192 metric 99

This seems to have worked ok. Just need to set it up to be persistent on boot.

from lprint.

michaelrsweet avatar michaelrsweet commented on June 20, 2024

Changes are up on snapcraft...

from lprint.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.