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”
Correct me if I’m wrong but ESP8266 merely serves some page, a script and all the printing is done by the browser, right? A window.print() with extra steps?
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.
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.
Could the sd card be mounted in an USB reader?
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.
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?
Note that most printer drivers are just “whatever variant of postscript this printer supports”, and not much more complex than that.
Unless you need to load an entire firmware with each printjob. Looking at you HP 1100.
Today I received the notification that Google Cloud Print is shutting down: https://support.google.com/chrome/a/answer/9633006
Hah! Typical Google.
This article didn’t age well over 12 hours.
Ouch! That’s probably a new record.
That escalated quickly!
191 and counting killedbygoogle.com
Wow. It’s like some Google exec read this article and thought, “Hey, that’s still around? Let’s clean that up.”
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
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?
I use the app that the printer manufacturer made. You can also see if yours accepts jobs via Email.
“…though like most technology, there’s potential for it to be misused.”
Connecting it to Google GUARANTEES misuse! Google = Evil.
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.
Just wait till they cancel search. Bet you all didn’t see that coming.
Please be kind and respectful to help make the comments section excellent. (Comment Policy)