Avatar for Questdoino

Questdoino

Member since Feb 2017 • Last active Mar 2017
  • 2 conversations
  • 9 comments

Most recent activity

    • 9 comments
    • 3,115 views
    • 14 comments
    • 3,383 views
  • in ESP8266
    Avatar for Questdoino

    As I see, ESP8266 with Espruino onboard cant work in station mode without DHCP on AP enabled? (((

  • in ESP8266
    Avatar for Questdoino

    Module Wifi not found

    In reference there is setIP function

  • in ESP8266
    Avatar for Questdoino

    Ok, start from the beginning. At last flashed boot 1.6 and 1.91 firmware but this code doesn`t work

    var wifi = require("Wifi");
    
    console.log ("START");
    
    wifi.connect ("mySSID", {password:"myPWD"}, function (){
    console.log ("Connected to ap");
    }
    );
    
    
    wifi.setIP ({ip:"192.168.1.50", gw:"192.168.1.1", netmask:"255.155.255.0"}, function (){
    console.log ("Ip set");
    }
    );
    

    ESP stays in default AP mode, doesnt connect to "mySSID" AP and cant find wifi.setIP function

     _____                 _ 
    |   __|___ ___ ___ _ _|_|___ ___ 
    |   __|_ -| . |  _| | | |   | . |
    |_____|___|  _|_| |___|_|_|_|___|
              |_| http://espruino.com
     1v91 Copyright 2016 G.Williams
    
    Espruino is Open Source. Our work is supported
    only by sales of official boards and donations:
    http://espruino.com/Donate
    Flash map 1MB:512/512, manuf 0xe0 chip 0x4014
    
    START
    Uncaught Error: Function "setIP" not found!
     at line 1 col 167
    wifi.setIP ({ip:"192.168.1.50", gw:"192.168.1.1", netmask:"2...
                                  ^
    =undefined
    >
    

    The IDE warns that Wifi module not found. Where is it located?

  • in ESP8266
    Avatar for Questdoino

    I`m trying to use it itself

  • in ESP8266
    Avatar for Questdoino

    MaBe,
    I`m a dumb, thanks)

  • in ESP8266
    Avatar for Questdoino

    Still having problems with 1.88, 1.90, 1.91...

  • in ESP8266
    Avatar for Questdoino

    Sure I'm erasing the flash before uploading

  • in ESP8266
    Avatar for Questdoino

    In any tutorial of using ESP8266 written that the module should be called like that

     var wifi = require("Wifi");
    

    But there is no Wifi.js in http://www.espruino.com/modules directory. And the terminal callback

    =undefined
    

    confirms that

    I assume that we need ESP8266WiFi.js, but the module crashes with

    WARNING: Parent must be an object - not a String, Integer, etc.
    Uncaught Error: Field or method "write" does not already exist, and can't create it on String
     at line 1 col 69
    ...og("["+JSON.stringify(a)),l.write(a),­c){var e=setTimeout(fun...
                                  ^
    in function "cmd" called from line 2 col 142
    ...ter AT+RST");else return b})
                                  ^
    in function "reset" called from line 1 col 94
    ...egister("+IPD",n);l.reset(c);return l
                                  ^
    in function "connect" called from line 4 col 1
    );
    ^
    

    trying to complete a simple task

    var wifi = require("ESP8266WiFi");
    
    wifi.connect ("mySSID", {password:"myPWD"}, function (){
    console.log ("Connected to ap");
    }
    );
    
    /*
    wifi.setIP ({ip:"192.168.1.50", gw:"192.168.1.1", netmask:"255.155.255.0"}, function (){
    console.log ("Ip set");
    }
    );*/
    

    Function wifi.setIP is defined in reference but there is no such function in module.
    What I`m doing wrong?

Actions