-->
Page 1 of 1

wifi.ap.setmac() always fails

PostPosted: Thu Jun 16, 2016 10:11 am
by jarkman
I'm trying to change the AP mac address, but wifi.ap.setmac always fails for me

Demo code:

wifi.setmode(wifi.SOFTAP)
cfg={}
cfg.ssid="ESP_STATION"
cfg.pwd="the_ESP8266_WIFI_password"
wifi.ap.config(cfg)
ap_mac = wifi.ap.getmac()

newmac=ap_mac
print(newmac)
wifi.ap.setmac(newmac)

Sample output:
1A-FE-34-15-40-5B
> wifi.ap.setmac(newmac)
stdin:1: wrong arg type

I've only been doing Lua for an hour at this point, am I making a silly Lua error, or is this a problem with setmac() just not working ?

Thanks!
Richard

Re: wifi.ap.setmac() always fails

PostPosted: Sun Jun 19, 2016 5:19 am
by jarkman
Fixed by upgrading to the current nodeMCU build.