Current Lua downloadable firmware will be posted here

User avatar
By Cristi Timofte
#58647 Hello.

I flashed the default firmware from NodeMcu and whatever i want to run i get
stdin:1: '=' expected near 'something

NodeMCU 0.9.5 build 20150318 powered by Lua 5.1.4

Here is an example :
> wifi.setmode(wifi.STATION)
print ap list
function listap(t)
for ssid,v in pairs(t) do
authmodstdin:1: '=' expected near 'ap'
> e, rssi, bssid, channel =
string.match(v, "(%d),(-?%d+),(%x%x:%x%x:%x%x:%x%x:%x%x:%x%x),(%d+)")
print(ssid,authmode,rssi,bssid,channel)
end
end

wifi.sta.getap(listap)
stdin:1: bad argument #1 to 'match' (string expected, got nil)
>

Anyone could help with this as i've been reviewing all online information and flashed different builds but i get the same issue
User avatar
By marcelstoer
#58673
Cristi Timofte wrote:NodeMCU 0.9.5 build 20150318 powered by Lua 5.1.4


0.9.x is ancient, use a recent NodeMCU version: https://github.com/nodemcu/nodemcu-firmware/#releases

However, I suspect the issue has more to do with how you connect to the device. If it's with ESPlorer I suggest you play around with "Turbo mode" and "Dumb mode" in the settings. NodeMCU (in recent versions) uses a default baud rate of 115'200.
User avatar
By Cristi Timofte
#58698 Hello.

I installed a new build

NodeMCU custom build by frightanic.com
branch: master
commit: 7b83bbb2ea134cd85ac9d63108603cc02c4e20f7
SSL: true
modules: adc,am2320,dht,file,gpio,http,i2c,net,node,ow,tmr,uart,wifi
build built on: 2016-11-25 06:30
powered by Lua 5.1.4 on SDK 1.5.4.1(39cb9a32)

Now most of the commands work, but it still sometime get some nil, but I can survive with this,

Thanks for the help