View Single Post
  #14  
Old November 29th 20, 02:13 AM posted to comp.periphs.printers
Arlen Holder
external usenet poster
 
Posts: 72
Default Printer's IP address

On Sat, 28 Nov 2020 09:22:17 GMT, AnthonyL wrote:

Just did a nice helpful reply - actually I think there are one or two
clues that may have helped - then saw the other thread in which you've
solved it.


Hi AnthonyL,

I thank you and appreciate your purposefully helpful advice.
o All of us are volunteers - we pitch in together to help each other

As you noted, printing has gotten easier over time, at least from Windows &
Linux it has, where Linux (with CUPS) was even easier than Windows years
ago; but both are seamless nowadays (although Windows drivers are a PITA
when HP no longer supplies them on their web site, & neither does Win10):
o Tutorial for the EASIEST (maybe only?) way to install a problematic legacy printer such as the HP LaserJet 2100 on Windows 10 current versions
https://groups.google.com/forum/#!topic/alt.comp.freeware/Qb-fXNOH_8g

Also as you noted, the only requirement for the printer "should" be that
it's on the LAN (no matter _how_ it's hooked up to that LAN subnet).

(1) Cloud solutions
Like you, I found out a lot of the highly marketed solutions require the
cloud, which is, I think, this data flow (I'm not fully sure though)
a. You press a print button which sends your document to a server
b. That server renders that document in the proper format (e.g., PCL-5)
c. That server sends the rendered results (e.g., PCL-5) back to you
d. And then your app sends that PCL-5 to the printer over your LAN

(2) Local PDF solutions
I also found a bunch of so-called "local" solutions, which didn't render
all that much it seems; they just send the PDF directly to the printer,
which would work fine (I guess) for a printer that directly accepts PDF.

(3) OEM Brand-name solutions (e.g., HP, Epsom, Brother, etc.)
I tried the OEM HP-branded solution, but it simply failed for whatever
reason. It only had the choice of Wi-Fi or Wi-Fi direct, so I suspect that
it failed simply because it was designed for a Wi-Fi enabled printer only.

(4) Mopria solutions
I tried a bunch of these until I realized that they're _all_ scams
(AFAICT), since Android _already_ comes, native, with a "Mopria" print
server (as its default print server). Even so, they can't work, I think,
simply because my printer, built in 1999, isn't Mopria compliant.

(5) CUPS Server solutions
I only halfheartedly tried the "CUPS Server" solutions, in that I installed
them on my phone; but they seem to require a cups server somewhere, where I
couldn't find CUPS software for Windows (I found it for Linux). While I
dual boot, it's more often in Windows than it's in Linux, so that's not a
good solution for me unless it was the only way to do it (and it wasn't).

(6) Windows SMB shares solutions
I contacted the Windows newsgroup asking for sharing solutions, but none
were forthcoming, and, besides, it turns out I didn't need to go this far
(although I would have had I not found another solution). It's strange
though, that Windows 10 prints just fine, and Android is so difficult, but,
if you were to ask me today, I could get you up and running in minutes just
because I now know how to do it and I didn't know then.

(7) Windows USB shares solutions
As with the SMB shares, I didn't explore directly connected computers,
although others who posted to the thread claimed they work just fine.

(8) There was only one solution (so far) that actually worked!
This solution turned out to be, as many tend to be, devilishly simple!
o Note: I almost never fail, if ever, in solving technical problems.

*How to print from Android to an Ethernet-only HP PCL-5 printer on your LAN*
a. On Android, I installed a "print server" which outputs PDF level 1.3
https://play.google.com/store/apps/details?id=com.blackspruce.lpd
b. But my printer doesn't accept PDF - my printer wants PCL-5 instead
https://support.hp.com/us-en/product/hp-laserjet-2100-printer-series/25469/model/14918
c. So I added a muPDF "faux printer driver" to "render" the PDF to a bitmap
https://play.google.com/store/apps/details?id=com.blackspruce.mupdf

Somehow, the _combination_ (with judicious settings applied) converts the
PDF to a bitmap and by some magic, then to PCL-5, which is then sent to the
printer via the Android "print server".
o https://groups.google.com/g/comp.mobile.android/c/nTAYljkvVl4/m/qnuazdahCAAJ

I do not profess nor pretend to know _how_ it works; but it works.
o I must say this is documented NOWHERE on the entire Internet (AFAICT).

Since the main purpose of my posts once a problem is resolved is to
leverage that solution to others so that they don't have to go through the
hell I did, here are, physically, the steps that will solve this problem.

A. If necessary, figure out your printer's IP address on your LAN:
o Printer's IP address, by Alex Trishan
https://groups.google.com/g/comp.periphs.printers/c/Y-b186tFKTs

B. Test that the Android device can connect to the printer's IP address:
AndroidTermux: ping 192.168.1.20

C. Determine if your printer can support PDF level 1.3
Note: I don't know programmatically how to determine this information,
but if you try to print from Let's Print Droid, it will pretty much
tell you that it needs Let's Print PDF in order to print PCL-5.

D. If your printer can't support PDF level 1.3 directly, then install
this "faux printer driver" which renders PDFs into bitmaps (I think):
o Let's Print PDF, by BlackSpruce (note it uses muPDF code)
https://play.google.com/store/apps/details?id=com.blackspruce.mupdf
Note: As always, this APK is free, ad free, cloud free, & google free.

E. Then install the companion "Let's Print Droid" print server APK
o Let's Print Droid, by BlackSpruce
https://play.google.com/store/apps/details?id=com.blackspruce.lpd
Note: As always, this APK is free, ad free, cloud free, & google free.

As a side note, I don't use Google Play as I don't ever use Google
products if I don't have to; so I use the Aurora Store, which is better.

F. After installing both programs, you have to also know a few more tricks
in terms of setting up the Let's Print Droid "print service".

I only found out these tricks by pure trial and error; so not only
is there likely a better way, but some of the tricks may be wrong.

a. The first is to disable Apple Bonjour mDNS scanning
(it simply doesn't work and just wastes your time overall)
b. Another is you need to "manually configure" the printer in LPD
(where I hit upon the settings below by almost sheer trial & error)
Printer Name: HP LJ 2100 tn == this isn't critical
Protocol: RAW - Jet Direct == there are 13 protocols to choose from
IP Address/Computer Name: 192.168.0.20 == it's a static IP address
Port Number: 9100 == this was the default, so I kept it that way
Queue/Share/Dir Name: DROID == this was the default, which I kept
Page Description Language: PCL - HP-PCL5 Black/White == 8 choices
c. You need to make sure Let's Print Droid is the _only_ print server
turned on in the Android Settings "Print Service" menu
(which you can easily make a shortcut to if you follow this thread)
o Creating quick-access shortcuts to any Android or App setting page
https://groups.google.com/g/comp.mobile.android/c/_1oTdgCIpkc

Note: The "trial and error" choices for the "protocol" setting above a
o LPR - Line Printer Remote
o RAW - Jet Direct
o SMB - Windows Shared Printer
o GCP - Google Cloud Print
o IPP - IPP/CUPS print server
o IPPS - IPP/CUPS SSL server
o HTTP - Web Server POST
o HTTPS - encrypted POST
o FILE - CIFS/SMB File drop
o FTP - File Transfer
o FTPS - File Transfer SSL
o SHARE - Share PDF with another app
o VIEW - View PDL with another app

Note: These are the trial & error Page Description Language (PDL) choices:
o RAW - image files not rendered to PDL
o Jpeg Image
o PCL - HP-PCL5 Black/White
o PCL-C - HP-PCL5-C Colour PCL
o PS - Postscript
o PDF - Portable Document Format
o PCL-XL - HP PCL 6 colour,b/w
o URF - Apple AirPrint Universal Raster

While there may be other settings that will likewise work, those are what
worked first for me given my Ethernet'd HP LaserJet 2100tn printer which is
connected by CAT5 cable directly to the SOHO router.

Note: I haven't yet tested anything but PDF files as I wanted to keep the
problem set as simple as possible while I'm setting it up & testing.

The printing process that worked first after the setup above was:
1. Tap the homescreen "Let's Print Droid" icon (which I renamed LPD)
2. Inside the "Let's Print Droid" app, tap the "Print A File" icon
3. In the resulting file browser navigate to your PDF file
4. That brings up not the PDF file, but the default print settings
5. Keep or change the print settings as desired, & press [Continue]

That's it.
o Every page of your PDF file to be printed will be rendered on your phone.
o Once all pages are rendered, they will then be sent to the printer
o Note that a huge PDF will consume a lot of your phone's memory
(My 64GB $100 Moto G7 has 4GB of memory so it didn't flinch yet.)

Key technical issues which remain to be resolved:
a. It would be nice to eliminate the Let's Print PDF renderer if possible
(This will likely take trial & error on the protocol settings.)
b. But mainly I need help from experts in figuring out what's going on!
(I need to better understand what's actually happening when I print.)
c. Is either of these two flows what is actually happening to the data?
PDF - LetsPrintPDF - bitmap - LetsPrintDroid - PCL5 - printer
PDF - LetsPrintPDF - bitmap - PCL5 - LetsPrintDroid - printer

See also this Google Group, apparently, for the Let's Print Droid app:
o https://groups.google.com/g/lets-print-droid
--
As always, please improve so all benefit from every action we take.