wifi.setmode(wifi.STATION)
wifi.sta.config("........","..........")
if (wifi.sta.sethostname("NodeMCU") == true) then
print("hostname was successfully changed")
else
print("hostname was not changed")
end
And I receive:
> dofile("pwm_analog_on_off_1.lua");
pwm_analog_on_off_1.lua:1: attempt to call field 'sethostname' (a nil value)
So what 's wrong ?
Thank you
Calin