-->
Page 1 of 1

wifi.sta.clearconfig() doesn't work for me

PostPosted: Wed Jun 21, 2017 6:36 am
by JumpZero
Hello,

When I call this function
Code: Select all> =wifi.sta.clearconfig()
I get:
Code: Select allstdin:1: attempt to call field 'clearconfig' (a nil value)
stack traceback:
   stdin:1: in main chunk


Others functions documented in the doc https://nodemcu.readthedocs.io/en/maste ... ules/wifi/ are working e.g. : wifi.sta.connect() ..disconnect(), ..getip(), ..

My firmware is
Code: Select allNodeMCU custom build by frightanic.com
   branch: master
   SSL: false
   modules: cron,enduser_setup,file,gpio,http,mdns,mqtt,net,node,ow,pwm,rtctime,sntp,tmr,uart,websocket,wifi
 build    built on: 2017-02-22 17:16
 powered by Lua 5.1.4 on SDK 2.0.0(656edbf)


What am I doing wrong?
Yes I can use node.restore() it works, but this function should work as well.

Thks
--
Jmp0

Re: wifi.sta.clearconfig() doesn't work for me

PostPosted: Wed Jun 21, 2017 6:54 am
by marcelstoer
JumpZero wrote:attempt to call field 'clearconfig' (a nil value)

build built on: 2017-02-22 17:16
powered by Lua 5.1.4 on SDK 2.0.0(656edbf)


clearconfig was obviously added after you built your firmware. The history of wifi.md shows that it was added on February 8th. However, that happened on the dev branch which was only released to master at the end of May.

Re: wifi.sta.clearconfig() doesn't work for me

PostPosted: Wed Jun 21, 2017 9:57 am
by JumpZero
Ok undestood!
That makes things clear.
I didn't know it was possible to check the history.
I know what I have to do now... update firmware or live with that.
Thanks for the clarification.
--
Jmp0

Re: wifi.sta.clearconfig() doesn't work for me

PostPosted: Thu Jun 22, 2017 10:30 am
by faramon
Hi, for what this function is use for, what it does? What config it clears? Thanx,
Faramon