WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: cups remote detection status- fail (cups-browsed)  (Read 6500 times)

aus9

  • Guest
cups remote detection status- fail (cups-browsed)
« on: April 08, 2013, 07:59:40 PM »
Hi

As you know we don't have 1.6 (as yet) so I am posting to this sub-forum so newbies don't get too excited thinking about it.

The first link IMHO explains some cups-browsed issues

https://www.cups.org/newsgroups.php?s25449+gcups.general+v25468+T0

Since cups-browsed related to finding printers that are not on your local network, I found this next link looking at the cups mailing list

http://pig.made-it.com/dns-sd.html

What struck me, being a wireless novice, still waiting on my USB dongle wireless device to arrive is the last line, as we have avahi in repos

Code: [Select]
avahi-browse -t -d example.com _ipp._tcp

and since we have a 1.4 series the network doc looks interesting

http://www.cups.org/documentation.php/doc-1.4/network.html

and section Doing SNMP Queries with Network Printers for this next link
http://www.cups.org/documentation.php/api-filter.html
« Last Edit: May 18, 2013, 08:11:28 AM by aus9 »

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14851
Re: CUPS 1.6 series and cups-browsed......some info
« Reply #1 on: April 20, 2013, 08:23:14 AM »
whilst looking for something else, I saw that a cups-1.6.x client should be able to print to a cups server with only libcups (and deps) installed and an appropriate /usr/local/etc/cups/client.conf

So, using corepure64 (which doesn't have a printing solution as yet) as a client to test with libcups from cups-1.6.2 to a server running cups-1.4.8 and:
Code: [Select]
$ cat /usr/local/etc/cups/client.conf
ServerName 192.168.1.200
.. I was indeed able to print from the opera-12 extension on corepure64 (note that is "ServerName" and not the name of your server) without the full cups installation, ghostscript, hplip or friends.

Note that, even though libcups was compiled with libavahi as a dep, the avahi daemon was not installed/running on the client machine.

aus9

  • Guest
Re: CUPS 1.6 series and cups-browsed......some info
« Reply #2 on: April 20, 2013, 09:08:08 AM »
good stuff

EDIT balance of post no longer relevant and old links to a host site are broken
« Last Edit: May 18, 2013, 02:22:41 AM by aus9 »

aus9

  • Guest
Re: CUPS 1.6 series and cups-browsed......some info
« Reply #3 on: April 20, 2013, 08:33:48 PM »
scripts have changed see later posts
« Last Edit: May 18, 2013, 02:00:42 AM by aus9 »

aus9

  • Guest
Re: CUPS 1.6 series and cups-browsed......some info
« Reply #4 on: May 18, 2013, 02:17:57 AM »
ok had time to try my first test of your way. I have cups-filters already in repo, and have submitted new cups but have loaded my local copy of new cups. I have built cups-browsed.tcz with cups-dev from new cups. It has a new init, actually 2...one for normal wireless and one for bluetooth. Current copy of init now reads
https://www.dropbox.com/s/y1okvhrxlq8m0z0/browsed.txt

2) I have taken your advice...heh heh and disabled WPS wireless router settings and wireless router now connects to my HP wireless signal printer thru WPA2 etc......with ARP table etc static ip for HP to 192.168.1.200
3) I remove eth cable from modem/router and set up wifi thru usb dongle
4) I have a new client.conf with exactly your contents
5) now my daemons are falling over.
when I first started I had all daemons running
I wonder if its a setting in my cups-browsed.conf or my cupsd.conf
as I also did this
Code: [Select]
sudo ifconfig
(my hits)
wlan0     Link encap:Ethernet  HWaddr 00:0D:81:A2:E3:4E 
          inet addr:192.168.1.101

I added to cups-browsed.conf
BrowseAllow 192.168.1.101/255.255.255.0

I added to cupsd.conf
Listen 192.168.1.101
Port 631

I suspect I need to get these setting right. Also avahi-browse -at no longer gives me any hits at all.

I also see we have a gui called=avahi-discover-standalone    currently an empty box for me

EDIT SILLY ME I forgot I enabled a simple firewall when I disabled wireless security with WPS, now that I have MAC filtering with wireless I just disabled software firewall and usb dongle gives me....before trying out cups-browsed

Code: [Select]
avahi-browse -at
+  wlan0 IPv4 box                                           _udisks-ssh._tcp     local
+  wlan0 IPv4 box                                           _ssh._tcp            local
+  wlan0 IPv4 box                                           _sftp-ssh._tcp       local
+  wlan0 IPv4 box [00:0d:81:a2:e3:4e]                       _workstation._tcp    local

and yes I can remember.....that is not yet good enough for cups
« Last Edit: May 18, 2013, 02:44:10 AM by aus9 »

aus9

  • Guest
Re: CUPS 1.6 series and cups-browsed......some info
« Reply #5 on: May 18, 2013, 02:58:34 AM »
ok so reboot and try again....this time use only browsed init to start / stop /restart all services
----woohoo...I modded cups-browsed.conf....and restarted browsed....and htop with filters for cups and avahi show I have 4 hits......something worked!

no change to avahi-browse -at....hits but not the right hits

now mod cupds.conf to allow more ips...no change...........grrrrr

Of course....CUPS 1.6.2 still discovers my wireless HP but thats not remote as my usb wireless dongle is connected wirelessly to wireless router with ethernet cable unplugged
« Last Edit: May 18, 2013, 03:03:36 AM by aus9 »

aus9

  • Guest
Re: CUPS 1.6 series and cups-browsed......some info
« Reply #6 on: May 18, 2013, 08:10:03 AM »
well I am still fumbling in the dark, I forgot we also have the snmp.conf

anyhow, I can get into the wireless hp config page and see this



I am guessing if I do not have wifi connected to my router....and get avahi to browse.....I should see the network name = Bonjour domain name ?

in which case I have not seen this string  HP88607F.local.

but so far I don't know if the problems are :

me  ---yes well I am the local village idiot
some config setting is wrong
a missing config
some wireless setting that I do not have
some wireless feature I do not have using an USB dongle
some feature missing in my cups-browsed.tcz
or what ever

aus9

  • Guest
Re: cups remote detection status- fail (cups-browsed)
« Reply #7 on: May 18, 2013, 08:30:25 AM »
ok so I output a snmp log here
https://www.dropbox.com/s/dftggo3ml8b3lzs/snmp.txt

based on http://www.cups.org/documentation.php/doc-1.6/network.html
Section trouble shooting

but I have an error DEBUG: error-status=2

192.168.1.200 is a static ip I set up in my router

/usr/local/etc/client.conf has contents of----ServerName 192.168.1.200

aus9

  • Guest
Re: cups remote detection status- fail (cups-browsed)
« Reply #8 on: May 18, 2013, 08:39:22 AM »
does anyone know if this looks right for avahi?  I know its supposed to use port 5353 for udp
Code: [Select]
sudo netstat -lu
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       
udp        0      0 0.0.0.0:5353            0.0.0.0:*                           
udp        0      0 0.0.0.0:37351           0.0.0.0:*


I load nmap and
Code: [Select]
sudo nmap -sU -p 161 192.168.1.200

Starting Nmap 6.01 ( http://nmap.org ) at 2013-05-18 20:51 UTC
Nmap scan report for 192.168.1.200
Host is up (0.0054s latency).
PORT    STATE         SERVICE
161/udp open|filtered snmp
MAC Address: 10:1F:74:88:60:7F (Hewlett-Packard Company )

Nmap done: 1 IP address (1 host up) scanned in 13.60 seconds
« Last Edit: May 18, 2013, 08:53:25 AM by aus9 »