Left here for archival purposes.

User avatar
By alonewolfx2
#5807
Markus Gritsch wrote:
alonewolfx2 wrote:Can you share your example lua files?

Sure. See attachment. But it's just quick and dirty LUA testing ;)

can you send this file to the esp? which tool?
it have conn:send([[ on the line 24 and i am giving error message. i cant upload.

Edit: i tried tftpd and its working.thank you.
User avatar
By Markus Gritsch
#5808
alonewolfx2 wrote:can you send this file to the esp? which tool?
it have conn:send([[ on the line 24 and i am giving error message. i cant upload.


Yes, this is a shortcoming of most upload tools: They all use [[]] to send a line which causes problems when this long bracket string notation is used in the Lua program.

You can use my 'uploader.py' Python script which does not have this restriction (and which is also orders of magnitude faster than the other delay-based upload tools): viewtopic.php?f=22&t=1026

Alternatively, you can modify the long bracket [[...]] notation of level 0 to something like [=[...]=] or [==[...]==] (long bracket notation of level 1 or higher). http://www.lua.org/manual/5.1/manual.html Section 2.1
User avatar
By picstart1
#5810
Code: Select allSaturday, December 27, 2014  17:03:34


Uploading C:\Electparts\WiFi\flash programmer\lua\server_GPIO0_LED_get.lua

> > > > > > > > > > > > > > > > > > > > > > > > stdin:1: nesting of [[...]] is deprecated near '['
> > > > > > > stdin:1: unexpected symbol near ']'
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > >
> = node.heap()
17704
>

downloaded code ( see prior post) from Markus Gritsch ( file renamed to \server_GPIO0_LED_get.lua) but it has issues so I don't see how it proves that a single send resolves the fact the sever doesn't work with the latest release yet the same code works with earlier releases.
Further sending a full html form via a single send probably may have new issues like max packet length of 1460 being exceeded.