Comments (18)
Do you use avahi/mDNS?
from androidcupsprint.
Hi
I am not sure. Do you mean on Android or Linux? I did not anythign special myself, all the server printer stuff is as is.
from androidcupsprint.
I mean on the (Linux) server. This enables auto-discovery of printers.
For the search button for manual "discovery", I haven't tested this lately so it may not work. I'll definitely test this.
from androidcupsprint.
Not sure if this is the same issue, but if I enter the hostname manually in the "add printers" view, and click the search button (https://github.com/BenoitDuffez/AndroidCupsPrint/blob/master/app/src/main/res/layout/add_printers.xml#L20), nothing happens. I don't see anything relevant in the logcat either.
If I enter nothing in the field and click the button, I get
04-14 17:36:36.941 26470 26584 W System.err: java.net.UnknownHostException: http://:631/printers/
(which I expected).
Entering http://<host>:631/printers/
in my browser on my PC shows me the CUPS web page with the printers on this host. Sharing is enabled for the relevant printer.
On the other hand:
In the "main view" (Settings -> Print -> Android CUPS print) I get a logcat message
04-14 17:42:28.967 26470 27018 V CUPS : No answer in mDNS response: java.net.DatagramPacket@66d1f9b
from androidcupsprint.
You need to type an IP address / host name there. Then the app will try to scan that host for printers.
If you don't want to type anything you need to use mDNS.
from androidcupsprint.
Regarding the automatic configuration, I activated the avahi service on my Raspberry Pi, where CUPS is running (and the printer is connected). The printer was found.
The search for printers on the entered host, however, didn't return any results. I guess I'll install Android Studio in the course of the next days and try to debug it to find out what goes wrong.
from androidcupsprint.
Yeah that feature is flaky at best. I think that mDNS is so good that only it should be used. I didn't test the scan host feature to be honest.
I'd be glad to accept your contributions though!
from androidcupsprint.
Automatic discovery of printers not working still not working!
I have correct setup. Linux client successfully discovers cups server with no cups* packages, only avahi-daemon.
That time I switch "Android CUPS Print" service in "Printing" settings I got in logcat:
V CUPS : No answer in mDNS response: java.net.DatagramPacket@186e79d
V CUPS : No answer in mDNS response: java.net.DatagramPacket@170a412
D CUPS : onPrintersDiscovered({})
but "tcpdump -vni br-lan udp and port 5353" show answers:
10.8.8.4 - phone
10.8.8.1 - cups server with avahi-daemon
10.8.8.6 - printer, accessible only from 10.8.8.1, 10.8.8.4 doesn't see it
IP 10.8.8.4.5353 > 224.0.0.251.5353: 0 PTR (QM)? _ipp._tcp.local. (33)
IP 10.8.8.6.5353 > 224.0.0.251.5353: 0*- [0q] 1/0/5 PTR Samsung ML-2160 Series (SEC001599E1EEE9)._ipp._tcp.local. (654)
IP 10.8.8.1.5353 > 224.0.0.251.5353: 0*- [0q] 5/0/0 PTR Samsung ML-2160 Series @ roo._ipp._tcp.local., (Cache flush) TXT "txtvers=1" "qtotal=1" "rp=printers/printer" "ty=Samsung ML-2165, 2.0.0" "adminurl=https://roo.local:631/printers/printer" "priority=0" "product=(ML-2165)" "pdl=application/octet-stream,application/pdf,application/postscript,image/jpeg,image/png,image/pwg-raster,image/urf" "URF=DM3" "UUID=3154c96e-9ce7-33ae-6523-7381f61a1601" "TLS=1.2" "Duplex=T" "Copies=T" "printer-state=3" "printer-type=0x3056", (Cache flush) SRV roo.local.:631 0 0, (Cache flush) AAAA fe80::20d:b9ff:fe4a:f806, (Cache flush) A 10.8.8.1 (520)
IP 10.8.8.4.5353 > 224.0.0.251.5353: 0 PTR (QM)? _ipps._tcp.local. (34)
IP 10.8.8.1.5353 > 224.0.0.251.5353: 0*- [0q] 5/0/0 PTR Samsung ML-2160 Series @ roo._ipps._tcp.local., (Cache flush) TXT "txtvers=1" "qtotal=1" "rp=printers/printer" "ty=Samsung ML-2165, 2.0.0" "adminurl=https://roo.local:631/printers/printer" "priority=0" "product=(ML-2165)" "pdl=application/octet-stream,application/pdf,application/postscript,image/jpeg,image/png,image/pwg-raster,image/urf" "URF=DM3" "UUID=3154c96e-9ce7-33ae-6523-7381f61a1601" "TLS=1.2" "Duplex=T" "Copies=T" "printer-state=3" "printer-type=0x3056", (Cache flush) SRV roo.local.:631 0 0, (Cache flush) AAAA fe80::20d:b9ff:fe4a:f806, (Cache flush) A 10.8.8.1 (521)
When I add printer manually by https://roo.local:631/printers/printer or http://roo.local:631/printers/printer all works fine.
from androidcupsprint.
Is this still active? I've been using mDNS for years and it's working like a charm, and I haven't got so many feedback about this issue. I'm tempted to close this.
from androidcupsprint.
Yes, this is still active!
I can make a qemu/virtualbox image with cups and avahi.
from androidcupsprint.
BTW, "Default Print Service" from the lineageos 15.1 sucessfully founds the printer.
from androidcupsprint.
Gah. Sorry but I don't like lineage. I've used it on a very old device to get a more recent version of Android, and it breaks a lot of internal APIs. I'm afraid I won't be providing support on non-stock versions.
from androidcupsprint.
Have you reproduced this on recent beta builds? If you have the Play Store, please reproduce on the version that will be released tomorrow, and post logs here. If you don't have the Play Store, please compile an apk from the latest commit in develop and post logs. Thanks
from androidcupsprint.
ok, I'll test it again within a week
from androidcupsprint.
Please let me know whether this can be closed.
from androidcupsprint.
Sorry for late response. I still experience this issue. I'll do more tests for research.
from androidcupsprint.
I've done more tests for research and now I don't experience this issue more (:
The main change was an upgrade from debian stretch to buster (cups 2.2.1-8+deb9u3 -> 2.2.10-6, avahi-daemon 0.6.32-2 -> 0.7-4+b1)
from androidcupsprint.
So it can be closed.
from androidcupsprint.
Related Issues (20)
- CupsPrinterDiscoverySession.java line 163
- IppOperation.kt line 186
- UntrustedCertActivity.kt line 21
- CupsPrinterDiscoverySession.java line 253
- CUPS encryption. HOT 1
- CupsPrinterDiscoverySession.java line 441
- CupsPrinterDiscoverySession.kt line 449
- Password protected printer not reachable HOT 1
- Development setup guide HOT 2
- CUPS printer becomes unavailable HOT 1
- SSL cert from Let's Encrypt not trusted
- Can't manage CUPS certificates
- Screenshots for F-Droid
- New release when? HOT 1
- androidcupsprint does not recirds the printer
- "Couldn't find job #, is it already finished?" after each Job HOT 1
- Old gradle version is been used, fix breaking changes in build.gradle HOT 1
- spanish strings.xml is faulty HOT 1
- can I send prints via rest api? HOT 1
- "printer is not responding" but it is on HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from androidcupsprint.