wifi.sta.sethostname("NodeMCU")
Posted: Sun Apr 24, 2016 3:42 am
I try to give a name to each device on the network to which I am connected
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
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