-->
Page 1 of 1

Error while executing some command like get/setphymode()

PostPosted: Sat Aug 06, 2016 2:26 pm
by ma.ag37
Hello,

I am a newbie to ESP8266 and have been using it with Nodemcu 0.9.5 build 20150318. However for certain commands I am getting error. Like

Command: wifi.setmode(wifi.NULLMODE)
Error: bad argument #1 to 'setmode' (number expected, got nil)

Command: =wifi.getphymode()
Error: attempt to call field 'getphymode' (a nil value)

Command: wifi.setphymode(wifi.PHYMODE_B)
Error: attempt to call field 'setphymode' (a nil value)

please help

Re: Error while executing some command like get/setphymode()

PostPosted: Mon Aug 08, 2016 4:46 am
by devsaurus
ma.ag37 wrote:have been using it with Nodemcu 0.9.5 build 20150318. However for certain commands I am getting error

The current docs for master do not apply to such an old version. I'd suggest that you build a recent version of the firmware with http://nodemcu-build.com/. Carefully read the instructions for upgrading firmware.

Re: Error while executing some command like get/setphymode()

PostPosted: Tue Aug 09, 2016 1:10 pm
by ma.ag37
Thanks for the help. Got the issue resolved. Please also let me know if you can help me with setting up proxy for the access point for internet for the ESP8266 station to connect. I could not find it anywhere in the docs.

Re: Error while executing some command like get/setphymode()

PostPosted: Thu Aug 11, 2016 10:49 am
by devsaurus
ma.ag37 wrote:Please also let me know if you can help me with setting up proxy for the access point for internet for the ESP8266 station to connect. I could not find it anywhere in the docs.

Sorry, no idea. I also can't find any reference for this use case.