Print From The ESP8266, Courtesy Of Google

The ESP8266 has become the hacker’s microcontroller of choice because it’s exceptionally easy to get the chip connected to the network and talking to other devices. The fact that it’s also absurdly cheap is just a bonus. Since nearly every piece of electronics you buy today is “smart” enough to include some form of Internet control, that means there’s no shortage of gadgets these MCUs can potentially poke and prod.

In their latest tip, [TecnoProfesor] shows how you can interface the ESP8266 with Google’s Cloud Print, a service that enables simple remote printing over the web without having to worry about having the proper device drivers. Remote printing from the ESP8266 might seem like little more than a gag at first glance, but if you’re the kind of person who likes to have hard copies of data, adding the capability to generate a daily printed report to your weather station could be a nice weekend project.

[TecnoProfesor] provides explanations and source code for printing documents of various sizes from both the ESP8266’s internal flash storage and an SPI-attached SD card. Towards the end of the write-up, there’s even some explanation of how the setPrintDocument() function of the Cloud Print API can be used in more advanced scenarios, such as printing web pages or documents stored in Google Drive.

When we see microcontrollers connected to printers, they’re usually of the small thermal kind. Being able to access “real” printers with such a simple technique offers some interesting possibilities, though like most technology, there’s potential for it to be misused.

[Thanks to Andrew for the tip.]

23 thoughts on “Print From The ESP8266, Courtesy Of Google

    1. This seems to be the case. It would be more interesting if the printer was ‘Cloud connected’ and the ESP8266 used an online API directly; or just talk to the printer directly which to my knowledge with most printers is fairly easy as long as you want “unformatted” text.

  1. For security and privacy protection, prints should never go to any cloud, managed by third parties.

    I would like to buy pretested hardware solution, emulating USB pendrive mass storage, made of ESP8266 shield, Arduino + micro SD card, to let me upload, update files on the micro SD card remotely, via WiFi.
    Call it WiFi USB pendrive mass storage and let me know your price.

    Alike solution, called WiFi SD card, has been on the photography market for 10+ years.

    Since my RGB board can read files via USB OTG pendrive mass storage only, I need WiFi Pendrive.

    Let me know your opinion and your price.

    jack

  2. I clicked into infomercial protagonist mode “There has to be an easier way!”. Some quite minimal devices and old/slow computers manage to use SMB/Samba, but use ESP8266 and samba in the same search phrase and teh interweb is all “No! Use a Pi!!” .. wat?? Not saying it’s not been done, but Google gets progressively worse with it’s “here’s what I think you should be searching for, not actually what you asked” artificial stupidity, and de-powers the remaining operators.

  3. You could just hammer printjobs at an integrated printer with print server if it’s network connected. If it’s local. Beats the heck out of interfacing it on a bus via USB or serial.

    There’s the usual printer problem of formatting, of course. But you can use a printer that understands text or use one with a sane, well documented formatting scheme.

    I figured this was a given at first glance but after reading the article/comments… maybe not? Would anyone be interested in reading a write-up?

    1. What is the replacement for cloudprint on Android?
      I think for every piece of Android that Google abandons they should
      have to release a utility that removes that piece of software from
      Android.

      Bad enough that they force us to have a bunch of software we don’t use on
      our phones. But a bunch of programs for dead services?

  4. Experience has taught me to never depend on a Google service for anything because they’ll likely get rid of it. The announced canceling of Google Print at the end of 2020 proves my point.

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.