• 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.16­8.1.254',netmask:'255.255.255.0'},functi­on(){})
         ^
    

    I am typing into the left panel of WebIDE

    var wifi = require("Wifi")
    wifi.setIP({ip:'192.168.1.71',gw:'192.16­8.1.254',netmask:'255.255.255.0'},functi­on(){})
    

    The spec reference:

    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

  • I thought that too, but apparently it's coming in the next firmware release. You can get a travis build now with it included. @MaBe has more info

  • Hi @Robin,

    have a look at this

  • Thr 2017.02.09

    Thank you MaBe, Ollie and allObjects,

    For those that are new to the ESP8266 and are following along, these are well documented examples that are a must read:

    @MaBe
    web page login to connect to an access point

    @Ollie
    confirmation on missing function and module load verification

    @allObjects
    spiffy template solution to runtime and development start objective

    Robin

  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview
About

Uncaught Error: Function setIP() not found in Wifi module for ESP8266

Posted by Avatar for Robin @Robin

Actions