wifi.eventmon.register(wifi.eventmon.STA_CONNECTED, function(T)
print("\n\tSTA - CONNECTED".."\n\tSSID: "..T.SSID.."\n\tBSSID: "..
T.BSSID.."\n\tChannel: "..T.channel)
end)This is a direct copy/paste from the documentation here. When I run this, I get the following error:
lua: init.lua:55: attempt to index field 'eventmon' (a nil value)I used the cloud serviceto build myself an image with all of the modules loaded, to make sure I'm not missing a module (adc,bit,bmp085,cjson,coap,crypto,dht,enduser_setup,file,gpio,hx711,i2c,mqtt,net,node,ow,pwm,rc,rtcfifo,rtcmem,rtctime,sntp,spi,tmr,tsl2561,u8g,uart,ucg,wifi,ws2801,ws2812).
Any ideas what I'm doing wrong?