1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Optware and Google Cloud Print

Discussion in 'Tomato Firmware' started by WaylonCovil, Aug 18, 2014.

  1. WaylonCovil

    WaylonCovil Serious Server Member

    I'm running TomatoRAF Version 1.28.9013.
    I have my USB printer plugged in to my ASUS RT-N16 and it's working fine.
    I want to get Google Cloud Print working on my Router.
    I found the following tutorial:
    Which directs me to first install Optware and some other files such as CUPS, Ghostscript, and others.
    I thought I'd stop at this point and ask some questions.
    Is Optware already installed with TomatoRAF?
    If I'm already printing, do I already have CUPS etc. installed?
    The guide has me downloading Optware mipsel packages which I believe are not compatible with my router. Is this correct?
    Can you provide me with some guidance?
    Would Optware be the first step?
  2. mmosoll

    mmosoll Serious Server Member

    I cannot help you but some months ago I installed a similar solution using a Raspberry Pi wired to my router with a CUPS server/airprint service and CUPS's CPU resources are often high when printing tasks. I'm not sure that the CUPS installation on your router is a good idea, but I am awaiting your tests.

    The difference in your tutorial is point 9 (I only need AirPrint) "configuring Google CloudPrint"

    Some links to the alternate solution I use (maybe useful)
  3. quihong

    quihong Serious Server Member


    That's actually my tutorial.

    If you're interesting in setting up a CloudPrint/AirPrint server, my recommendation would be to pick up a Pogoplug Mobile (~$10) and hack it to run Debian. I don't have CloudPrint/AirPrint installation documented yet, but will shortly.

    MIPS based routers such as the RT-N16 doesn't have a lot of processing power and it's best to offload SAMBA/NAS, Torrents, AirPrint/CloudPrint to a Pogoplug and keep your Tomato router as a router.

  4. WaylonCovil

    WaylonCovil Serious Server Member

    I installed Optware last night following this link:
    And it seemed like everything went well.

    mmosoll, thanks for your suggestion regarding the Raspberry PI. That certainly seems like the easiest solution. Cost is probably about $50 for the device and case.

    quihong, thank you for putting together the tutorial I referenced in my earlier post. If you don't recommend proceeding to install it on the RT-N16, I'll stop at this point.
    Thank you for your suggestion regarding the PogoPlug. It looks like these are no longer being manufactured and Pogoplug has moved to a backup service instead. If I had to pay retail for a PogoPlug vs a Raspberry Pi, I suspect I would go for the Pi since it appears to be more flexible. I will seriously look at the PogoPlug solution. $10 sounds like the right price.

    I'm frankly very surprised that there aren't any Google Cloud Print (GCP) adapters that are under $50.

    I looked at the GCP ready printers and there are so few of them, that it's not a real solution. A buyer would be limited in feature sets just because they wanted GCP on their Printer. I looked at HPs ePrint solution which is compatible with GCP. It seems that it functions via email. At first glance, that doesn't look very secure. If I had confidential documents, I would end up emailing them to ePrint (over the open Internet) to get them to print to the printer.

    I tried GCP Service application for Windows, but once I logged out of the user account, the printer went offline. I checked the Windows Service and it had the appropriate username and password in it. I uninstalled it.

    I suspect someone could come out with an OS for the Pi that is already setup to work with GCP and other network features like NAS, etc.

    I do have a few questions about Optware...

    In the link I mentioned above, there is the following line:
    wget http://tomatousb.org/local--files/tut:optware-installation/optware-install.sh -O - | tr -d '\r' > /tmp/optware-install.sh
    Is the Optware code that is on the tomatousb.org the most recent?
    If I wanted to install it from the Optware site itself, which project would I use? Is anyone aware of a how to to install Optware from the Optware site for Tomato?

    I noticed that some of the packages on the Optware site are older versions of applications. CUPS, for example. If I wanted to use a new version, what would I do? Could I download it from the CUPS website and just install it under Optware?

  5. koitsu

    koitsu Network Guru Member

    Optware is old and not really maintained.

    Entware is more recent and is maintained (and maintained by some folks who hang out here on this forum, and also by people who actually understand how to build software and not just "hack up a solution"), but it may not have the software you need, and the "configuration steps" in whatever document you're following may not be correct (newer software = possibly different config format, Entware pathnames may be different than Optware, etc.). You can always file Github tickets for packages you want or issues you run into, however.

    If you want to try Entware, please start over from the mkfs.ext2 commands in the previous document you followed (and obviously don't name the volume label "optware", that's misleading). You can try deleting all the files if you want (rm -fr), but be aware Optware tends to install dotfiles and other crap on the filesystem that you'll have to find by hand (ls -al) and delete. And be sure to log out + log back in (to your router) once you've deleted Optware, because some of those dotfiles tinker with $PATH and other things that no longer apply.
  6. quihong

    quihong Serious Server Member

    Entware is preferable, but doesn't have the necessary packages (at least as far as I know) to support AirPrint/Google Cloud Print.

    @OP, setting up Google Cloud Print (or AirPrint) isn't trivial hence why there is no such thing as a "AirPrint" or "Google Cloud Print" adapter - too many printers and print drivers to deal with.

    Just stick with the tutorial or my recommendation on the Pogoplug Mobile.
  7. ghoffman

    ghoffman Addicted to LI Member

    my printer is externally accessible via port-forwarding on my tomatousb network as my.dynamic.ip:9100.
    is there a way to tell google cloud print to use an ip p9100 port directly?
  8. mmosoll

    mmosoll Serious Server Member

    Excuse me if I don't understand your question. I am using a CUPS print server remotely accessible and it is possible to add a configured printer to your Google Cloud Print account. If you can use directly your my.dynamic.ip_port to print something forget the following and try to add this printer to your Google Cloud Print account.

    1. You need a print server as CUPS and configure it to be accesible from outside using http://my.dynamic.ip_port/printers/id_printername_cups. You can found information to configure a remote access here:


    And add a new printer using http://my.dynamic.ip_port/printers/id_printername_cups in your remote computer, for example in Windows.


    Check if you can print to this printer. In my case I don't need more.

    2. Add this printer to your Google Cloud Print account, print a document and check jobs in your print server with http://my.dynamic.ip_port/job. Note: All remote jobs are listed, tonight I will see the results.

    Last edited: Aug 20, 2014
  9. ghoffman

    ghoffman Addicted to LI Member

    as you suggested, google cloud print looks for a print server to connect to (cups or a windows share have been documented).
    each of these solutions requires a server to be running. putting cups on tomato is one way to do it.
    what i was trying to ask was: can google cloud print be configured to use a jetdirect port (or internet printing protocol) as the print server, bypassing the need for another layer of print server locally (on the pc, or on the router)

  10. WaylonCovil

    WaylonCovil Serious Server Member

    Thank you everyone for your suggestions. Pogoplug or Raspberry PI seem the easiest solutions for me to maintain. I'll pursue those routes at this point.
  11. quihong

    quihong Serious Server Member

    No you can not. As previously stated, it isn't a trivial setup and requires print drivers, not just access to the jet direct port.

    BTW, opening your jetdirect port to the internet doesn't seem to be the wisest decision. Some day someone might print a bunch of gibberish to your printer one day :)
    koitsu likes this.
  12. shredhead

    shredhead Networkin' Nut Member

    I know I'm replying to an old thread, but I would like to get some help if possible.

    I want to get CUPS to work on my R7000 running Advanced Tomato with the ultimate goal of running Avahi/Dbus/HPLIP/Ghostscript to set up AirPrint. I did this before successfully on my NAS device but that has a slower processor than the router does; I'm hoping this will mean the pages come out of the printer faster. Right now it can take 10-15 minutes. We won't be printing that often so I'm not concerned about resource usage.

    Here are the problems I've observed in setting up cups.
    1) I install it using ipkg install cupsXXXX (a local file I've downloaded) and ipkg insists on downloading it, not using my local file. the local file is newer than what is on all the repositories in ipkg.conf. supposedly whoever set up this .ipk, they compiled it for ARM which is what I need.
    2) when the install is done, cupsd has trouble finding one of its libraries which is supplied by uclibc which is supplied with the firmware. I have to use export LD_LIBRARY_PATH="/lib:/opt/lib" to fix this. /opt points to my USB3 hard drive. I installed uclibc-opt so that the three libraries I needed ended up in /opt/lib. Once this is done, cupsd launches without a problem.
    3) After the daemon is running, when you go to the web gui (http://hostname:631), it gives you a 404 error. What I found is that the web gui files are in the wrong place. I took the step of doing a symlink but in hindsight, I think changing the DocumentRoot in cups.conf would be better. I say that because I got the main web page to come up but then the links to everything else didn't work.

    I have uninstalled and wiped all traces from the hard drive so I can start over. Any tips for me when I give this another try? Has anyone else run into the same issues?
  13. quihong

    quihong Serious Server Member

    @shredhead - unless you enjoy banging you head on a wall, I would recommend picking up the Pogoplug Mobile ($10) and using Arch Linux ARM. It's well documented and tested.

    Not saying it's not possible on the R7000, but getting CUPS working is just one of many steps.
  14. shredhead

    shredhead Networkin' Nut Member

    I figured out why ipkg is insisting on downloading the various packages. What I have locally are mipsel, not ARM. Also I found lots of problems with CUPS specifically. It was not packaged correctly. The web gui files are in the wrong place and I noticed some other issues. I did ultimately get CUPS to run but it took a lot of effort. The roadblock for me was that one of my printers is an HP and HPLIP is not available for ARM.

    For now I am going to use all of this on my old Netgear router that ran Tomato before I bought the R7000. No point in buying a Pogoplug when I have a perfectly good device to use. It still takes too long to print though.
  15. shredhead

    shredhead Networkin' Nut Member

    Someone bought the old router from me, go figure. so I'm back to square one with the R7000.

    But I have found another solution after much searching, to use Entware instead of ipkg.

    Someone went and compiled a whole bunch of packages for ARM. This includes cups, gutenprint, hplip, avahi, and the libraries.

    And someone else wrote a nice little script to install Entware for me here: http://www.dd-wrt.com/phpBB2/viewtopic.php?t=284490&sid=a30d6832e34e65fa3a9d14320d81a35d

    If I could code, I would definitely give back but all I can do is say thanks to these fine people.
  16. jeremiahbarrar

    jeremiahbarrar New Member Member

    For future google searchers that find thier way here:
    github /Entware-ng/
    This version of Entware and it's accompanying repository of ~1800 packages works with armv5, armv7, mipsel, x86-32 and x86-64 hardware.
    There is even a working cups-filters package!

Share This Page