The ESP8266 Becomes a Terrible Browser

The ESP8266 are making their way over from China and onto the benches of tinkerers around the world for astonishing web-enabled blinking LED projects and the like. [TM] thought he could do something cooler with his WiFi to UART module and decided to turn one into a web browser.

There’s no new code running on the ESP8266 – all the HTML is being pushed through an Arduino Mega, requesting data from a server (in this case our fabulous retro edition), and sending the data to the Arduino serial console. The connection is first initiated with a few AT commands to the ESP module, then connecting to the retro server and finally dumping everything received to the console.

It’s not much – HTML tags are still displayed, and images are of course out of the question. The result, however, isn’t that much different from what you would get from Lynx, meaning now the challenge is open for an Arduino port of this ancient browser.

11 thoughts on “The ESP8266 Becomes a Terrible Browser

  1. This is like one of the first things I did (but with google). Definately not HaD worthy!

    I agree this is an exciting module, but I’d at least expect to see some code either on the module itself or an external micro to parse basic HTML and push it out to a LCD or something!

    1. More wholly incorrect ramblings from Brian Benchoff!

      “The result, however, isn’t that much different from what you would get from Lynx”
      Yeah, not that much different, other than the fact that, you know, Lynx actually renders the HTML it receives into a readable document (complete with headings, paragraphs, links, etc).

      Being able to connect to a web server and download a stream of data only requires a TCP/IP socket and a few lines of request code. This is trivial to do — especially on a platform that has a built-in TCP/IP stack. The challenge is writing the 99.999% of the rest of the code needed to actually render the HTML file into something usable.

      1. Gilchrist’s PIP browser project (http://hackaday.io/project/3116-PIP-Arduino-Web-Browser) might be modifiable to work with the esp8266. Store an abbreviated version of the page to SD card and then parse/render it to LCD offline.

        Until the firmware’s rewritten – perhaps to use GPIO0 & GPIO1 for an SPI interface – more ambitious “browsing” is unlikely to be feasible. At 16MHz, there isn’t enough time (using the Arduino libraries) to to parse and differentiate between command responses and data through the serial text bottleneck.

        As mentioned in the project conclusion, web browsing with an esp8266 and Arduino doesn’t make much (any) sense, but just getting a page of data without hanging is a good first step towards more interesting (& sensible) applications.

        Cheers

  2. This is like one of the first things I did (but with google).

    I agree this is an exciting module, but I’d at least expect to see some code either on the module itself or an external micro to parse basic HTML and push it out to a LCD or something to make it an actual hack!

  3. @Liam,
    You’re right: there’s nothing new here – just a working example for people to build on.

    The Seedstudios tutorial program doesn’t work very well on version 2 modules because the v2 has a 115200bps serial link and the code is full of delay() calls. Consequently it’s hard to distinguish between program logic failures and random hangs due to buffer overflow (either at the module or the Arduino’s 64 byte HardwareSerial.cpp buffer).

    Cheers

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s