-
Module Wifi not found
In reference there is setIP function
-
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 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? -
Hi, all!
I`m having trouble with firmware newer than 1.87, no matter which boot version is uploaded (tried 1.6, 1.5, 1.4) the module goes to infinite boot loopets Jan 8 2013,rst cause:2, boot mode:(3,0) load 0x40100000, len 2408, room 16 tail 8 chksum 0xe5 load 0x3ffe8000, len 776, room 0 tail 8 chksum 0x84 load 0x3ffe8310, len 632, room 0 tail 8 chksum 0xd8 csum 0xd8 2nd boot version : 1.6 SPI Speed : 40MHz SPI Mode : QIO SPI Flash Size & Map: 8Mbit(512KB+512KB) no GPIO select! jump to run user1 @ 1000 rf_cal[0] !=0x05,is 0xFF
load 0x40100000, len 1856, room 16 tail 0 chksum 0x63 load 0x3ffe8000, len 776, room 8 tail 0 chksum 0x02 load 0x3ffe8310, len 552, room 8 tail 0 chksum 0x79 csum 0x79 2nd boot version : 1.5 SPI Speed : 40MHz SPI Mode : QIO SPI Flash Size & Map: 8Mbit(512KB+512KB) jump to run user1 @ 1000 rf_cal[0] !=0x05,is 0xFF
On 1.87 the module boots pretty fine even with 1.6 boot version
The module is ESP-01 with 1Mb of flash
Here is the esptool upload terminal string
D:\esp8266\esptool>esptool.py -p COM2 -b 115200 write_flash --flash_freq 40m --f lash_mode qio --flash_size 1MB 0x0000 D:\esp8266\espruino\188\boot_v1.5.bin 0x10 00 D:\esp8266\espruino\188\espruino_esp8266_user1.bin 0xFE000 D:\esp8266\espruin o\188\blank.bin
Any ideas? Thanks in advance!
As I see, ESP8266 with Espruino onboard cant work in station mode without DHCP on AP enabled? (((