• Wed 2017.02.08

    While trying each of the available Wifi functions, ran into this 'documentation inconsistency' ;-)

    Interestingly, wifi.getIP() functions as expected, trying to force a known IP addr using setIP() casues an error:

    Uncaught Error: Function "setIP" not found!
     at line 1 col 6
    wifi.setIP({ip:'192.168.1.71',gw:'192.168.1.254',netmask:'255.255.255.0'},function(){})
         ^
    

    I am typing into the left panel of WebIDE

    var wifi = require("Wifi")
    wifi.setIP({ip:'192.168.1.71',gw:'192.168.1.254',netmask:'255.255.255.0'},function(){})
    

    The spec reference:

    http://www.espruino.com/Reference#Wifi

    Currently this library is ESP8266 specific

    Wifi.setIP
      Call type:
        Wifi.setIP(settings, callback)
    Description
      The settings object must contain the following properties.
        ip IP address as string (e.g. "192.168.5.100")
        gw The network gateway as string (e.g. "192.168.5.1")
        netmask The interface netmask as string (e.g. "255.255.255.0")

    >process.env
    ={
      "VERSION": "1v84.tve_master_363580f",
      "BUILD_DATE": "Jan 10 2016",
    

    Is the reference ahead of the intended functionality, or have I missed a glaring typo?
    Robin

About

Avatar for Robin @Robin started