Wired http server?

Posted on
  • A project I've got coming up will be using the Espruino and CC3000 module to provide a user interface to some hardware.

    Beyond this, I'm looking at making a youtube series that is going to involve the Espruino quite frequently, to make the presentations simpler (less technically involved for the viewer too) I'd like to be able to use the Espruino to serve up web pages but I won't be needing it to be wireless.

    Is there an easy way to get the Espruino to serve up web pages through a wired connection, either the micro usb or through some of the gpio? I'd like it to work in a similar way to how it works with the CC3000 but using a purely wired connection?

    Thanks in advance

    Lucie

  • Well, the obvious wired solution is to use Ethernet - the WIZnet module does that really well and is by far the most reliable way to get network connectivity as well.

    If you're running Linux you could do something nasty with netcat (nc), like nc -l -p 1234, and then pipe that to and from Espruino's USB serial port, but then you still have to bodge up an interface between USB and Espruino's socket layer (using JSNetwork, a bit like is done in the ESP8266 code).

    Come to think of it, you might be able to get Linux to appear as a kind of ESP8266 device (using AT commands to access the net) - something might exist, or it wouldn't be too hard to write your own ESP8266 faker, there are only a handful of commands it needs to understand. Then you just use the ESP8266 library itself.

  • I might just order another CC3000 to keep things simple!! I was hoping for a really straight forward solution if there was one. The "something nasty" method is a something i'd rather avoid method!!

  • I would second the recommendation to use WizNET. Works way better than the CC3k in general; rock solid stable.

  • ^^^ and it's faster too - no more delays when you first initialise the module.

  • Thanks!

    I've just ordered a WizNET.

    I have lots of things that having some kind of GUI would really enhance, since HTML is essentially a GUI layout system and the Espruino uses Javascript, It's a marriage made in heaven!!

    thanks for the advice

    Lucie

  • Great - you might also want to check out HTML+SVG - there's a very basic tutorial here. Basically you can modify an SVG image in the same way that you would with HTML, so you can design your UI in a vector graphics editor and then just get the various bits and pieces moving as you want them... You then get a UI that doesn't take up much space and can be scaled up or down to whatever screen size it runs on.

  • I got a Wiznet through the post this morning, I'll let you know how i get on with it!

    Thanks for the HTML+SVG, standard HTML elements should be fine for this project but it's definitely something I'll have a play with and keep in mind for the future :)

  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview
About

Wired http server?

Posted by Avatar for Lucie @Lucie

Actions