LUA-Based Firmware for esp8266

imageFirstly let me start by saying I have never used LUA before so I have no idea if this is any good. As you may know, armed with not enough time to get into doing my own compilations, I’ve been frantically looking around every night for firmware for the ESP8266 (in my case the inexpensive ESP-01 WIFI board) and I’ve come across a couple of promising developments which I’ve detailed elsewhere. I’m essentially trying to get away from the buggy software that comes with the boards. If you look elsewhere in the blog you’ll see I’ve even made a short video on the subject. It’s driving me nuts.

Anyway after a couple of days breaks as I have to attend business meetings constantly, I’m back and I stumbled across this link this evening. Now, I can tell you that if you use something like the ESPE8266_flasher.exe on the binary file this fellow provides – it WILL work. It seems to work at 9600 and I’ve not yet figured out how to ramp up the speed if indeed that’s been included. Further I can’t tell you if it will work as a WIFI listener as I could not get that to work. I also note on reset you get a worrying message…

> 8ŸŽþŠšƒ�‡‚‚þ�‡‚ŽþX�ö
lua: cannot open init.lua
NodeMcu 0.9.2  powered by Lua 5.1.4

BUT…. it’s worth a few minutes of your time – he’s developed a high level language-based firmware for the board and if he keeps going we might just have another way to access our cheap WIFI boards.. I hope one of you can spend more time on this than I’ve had available – I got it to connect to my router no problem (and that survives powerup) but that’s about it – it just has a feel about it – LOOKS like a winner and there’s no shortage of documentation if you follow the link.

Incidentally for anyone afraid to turn their one and only WIFI board into a brick – I’ve blown so many different options into this board and it always recovers.


13 thoughts on “LUA-Based Firmware for esp8266

  1. Thanks for bringing this to my attention! It is nothing short of awesome. What I’m not understanding is how to get the lua code onto the chip? I flash the bin and connect to the chip at 9600 baud but then what?

  2. Indeed yes, Oscarrp that is correct, it’s a command line interpreter and you can even create and use stored functions. I did find that the web server example falls over but then I think this is pretty new software. I’ve not found contact details yet to report issues but then it was late when I put this to the test.

  3. To really see what this guy is trying to achieve you need to look at the associated Wiki :-

    From my first reading it looks as though he is providing an interactive command line API for the device. In the early days of micro-processors what we called a monitor. Those were the days (goes bleary eyed).

    The fact that he is using LUA has no implications for the user; ie no knowlege of LUA needed!

  4. The LUA implementation is quick & dirty.
    This little program will crash your ESP8266 and cause a hardware reset
    i = 0 repeat print (i) i=i+1 until (i == 800)

    • And this is the problem – several well-meaning folk are doing lots of work on this chip – but no-one actually has a basic, reliable setup. I’m writing another item right now on a communication I had this morning from Espressif themselves.

  5. It appears that you can use serial to update the init.lua file and save it to the device. This way you can insert startup code that does not rely on having the serial port connected (I think).

    • Indeed you can. Right now there is very little info on what you can do with this – ie available memory space etc… is it just good for trivial stuff or can you upload a complex program. There’s a new update apparently – one of the guys is giving it a good hammering as I write this.

Leave a Reply

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

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

Google+ photo

You are commenting using your Google+ 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 )


Connecting to %s