diff --git a/.travis.yml b/.travis.yml
index a5b7633d..374f9024 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -11,27 +11,15 @@ before_install:
before_script:
- "export DISPLAY=:99.0"
- sleep 3 # give xvfb some time to start
- - wget http://downloads.arduino.cc/arduino-1.6.5-linux64.tar.xz
- - tar xf arduino-1.6.5-linux64.tar.xz
- - mv arduino-1.6.5 $HOME/arduino_ide
+ - wget http://downloads.arduino.cc/arduino-1.6.8-linux64.tar.xz
+ - tar xf arduino-1.6.8-linux64.tar.xz
+ - mv arduino-1.6.8 $HOME/arduino_ide
- cd $HOME/arduino_ide/hardware
- mkdir esp8266com
- cd esp8266com
- - wget https://github.com/esp8266/Arduino/releases/download/2.1.0/esp8266-2.1.0.zip
- - unzip esp8266-2.1.0.zip
- - mv esp8266-2.1.0 esp8266
- - wget http://arduino.esp8266.com/versions/2.1.0/package_esp8266com_index.json
- - mkdir esp8266/package
- - mv package_esp8266com_index.json esp8266/package/package_esp8266com_index.template.json
+ - git clone https://github.com/esp8266/Arduino.git esp8266
- cd esp8266/tools
- python get.py
- - cd ..
- - head -11 ./platform.txt > pt.txt
- - echo 'runtime.tools.xtensa-lx106-elf-gcc.path={runtime.platform.path}/tools/xtensa-lx106-elf' >> pt.txt
- - echo 'runtime.tools.esptool.path={runtime.platform.path}/tools/esptool' >> pt.txt
- - tail -110 ./platform.txt >> pt.txt
- - rm -fr platform.txt
- - mv pt.txt platform.txt
script:
@@ -41,7 +29,7 @@ script:
- arduino --board esp8266com:esp8266:generic --save-prefs
- arduino --get-pref sketchbook.path
- build_sketch esp8266/esp8266.ino
-
+
notifications:
email:
on_success: change
diff --git a/README.md b/README.md
index b6e0111f..e3b224b1 100644
--- a/README.md
+++ b/README.md
@@ -1,63 +1,45 @@
# ESP8266
+Firmware for ESP8266 used with 3D printer using [arduino core version](https://github.com/esp8266/Arduino)
+This firmware allows not only to have a cheap bridge between Wifi and serial, but also to have a web UI to configure wifi, to monitor 3D printer and even control it, and to make things easy,
+UI is fully customizable without reflashing FW.
+Firmware should work with any 3D printer firmware (repetier/marlin/etc..) if serial connection has correct setup.
+I currently use it with my personnal flavor of [repetier for Due based boards](https://github.com/luc-github/Repetier-Firmware-0.92).
+Please use ESP with at least 1M flash, for ESP with 512K there is limited version [here](https://github.com/luc-github/ESP8266/tree/ESP-512K-64KSPIFFS)
-[](https://gitter.im/luc-github/ESP8266?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
-FW for ESP8266 used with 3D printer
-Development version:
-Arduino ide 1.6.5 with stable 2.1.0 from ESP8266 : [](https://travis-ci.org/luc-github/ESP8266)
-Stable version:
-Arduino ide 1.6.5 with stable 2.0.0 from ESP8266, please use https://github.com/luc-github/ESP8266/releases/tag/v0.5.1
+Stable version:
+Arduino ide 1.6.5 with stable [2.0.0](http://arduino.esp8266.com/versions/2.1.0/package_esp8266com_index.json) from ESP8266, please use https://github.com/luc-github/ESP8266/releases/tag/v0.5.1
-Both version seems having instability if compiled/flashed under linux (https://github.com/luc-github/ESP8266/issues/64) - so consider to use windows to compile/flash until core is fixed.
+Development version:
+Arduino ide 1.6.8 with git from ESP8266 : [](https://travis-ci.org/luc-github/ESP8266)
-##Description
-Thanks to @disneysw for bringing this module idea
-Thanks to @lkarlslund for suggestion about independant reset using GPIO2
-Thanks to all contributors (treepleks, j0hnlittle , and feedbacks owners)
+[All releases](https://github.com/luc-github/ESP8266/wiki)
-Have a bridge configurable by web (implemented) and optionally by printer (not yet implemented)
-Have a front end to know what is the wifi status (implemented) or know what is the print status (not yet implemented) - this part can be optional and removed by compilation directive if no need
+:question:Any question ?[](https://gitter.im/luc-github/ESP8266?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
+:exclamation:Any issue ? [submit ticket](https://github.com/luc-github/ESP8266/issues)
-Should be compatible with reprap printer (Marlin FW/Repetier FW) as soon as you can make both serial to communicate.
+:warning: All versions seem having instability if compiled/flashed under linux (https://github.com/luc-github/ESP8266/issues/64), so consider to use windows to compile/flash until core is fixed.
-Current release listed here: https://github.com/luc-github/ESP8266/wiki
+:+1:Thanks
+* to @disneysw for bringing this module idea
+* to @lkarlslund for suggestion about independant reset using GPIO2
+* to all contributors (treepleks, j0hnlittle, all feedbacks owners and donations)
-Master is using 2.1.0 of https://github.com/esp8266/arduino
-use http://arduino.esp8266.com/versions/2.1.0/package_esp8266com_index.json in arduino 1.6.5 IDE preferences
+Every support is welcome: [
](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=Y8FFE7NA4LJWQ)
+Especially if need to buy new modules for testing.
-If you use an ESP with 512K flash like ESP01 please go here : https://github.com/luc-github/ESP8266/tree/ESP-512K-64KSPIFFS, it is dedicated to low memory device.
-If you use an ESP with more than 512K flash please use master.
-
-##Hardware connection
---Use GPIO2 to ground to reset all settings in hard way - 2-6 sec after boot / not before!! Set GPIO2 to ground before boot change boot mode and go to special boot that do not reach FW. Currently boot take 10 sec - giving 8 seconds to connect GPIO2 to GND and do an hard recovery for settings
---Use GPIO0 to ground to be in update mode
---Use a switch to reset/disable module
-For ESP01:
-
-
-For ESP12E:
-
-
-For Davinci Board:
-
-
-##Development
-Currently using [Arduino IDE 1.6.5](http://arduino.cc/en/Main/Software) with the esp8266 module from board manager added from [github.com/esp8266/Arduino](https://github.com/esp8266/Arduino)
-please use 2.1.0 relased version (http://arduino.esp8266.com/versions/2.1.0/package_esp8266com_index.json)
-staging version (http://arduino.esp8266.com/staging/package_esp8266com_index.json) is not yet stable neither compatible with current master please check dev branch https://github.com/luc-github/ESP8266/tree/devt
-
-Additionnaly:
---Use minimal css from http://getbootstrap.com/examples/theme/
-
-##Flash the Module
-*Tools:
---Use IDE to upload directly (latest version of board manager module generate one binary)
--- to flash the htm files present in data directory you need to use another tool, installation and usage is explained here: https://github.com/esp8266/Arduino/blob/master/doc/filesystem.md
-Once flashed you also can use the web updater to flash new FW in System Configuration Page
-
-*Connection
---Connect GPIO0 to ground to be in update mode
-
-































](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=Y8FFE7NA4LJWQ)
-Especially if need to buy new modules for testing.
+-- Printer EEPROM management
diff --git a/TODO.txt b/TODO.txt
new file mode 100644
index 00000000..8b50ccf1
--- /dev/null
+++ b/TODO.txt
@@ -0,0 +1,5 @@
+TODO
+MONITORING_FEATURE : temperatures
+INFO_MSG_FEATURE
+ERROR_MSG_FEATURE
+STATUS_MSG_FEATURE
diff --git a/keywords.txt b/docs/keywords.txt
similarity index 100%
rename from keywords.txt
rename to docs/keywords.txt
diff --git a/esp8266/config.cpp b/esp8266/config.cpp
index f09639a9..4aac9af2 100644
--- a/esp8266/config.cpp
+++ b/esp8266/config.cpp
@@ -236,6 +236,7 @@ void CONFIG::print_config()
{
//use biggest size for buffer
char sbuf[MAX_PASSWORD_LENGTH+1];
+ uint8_t ipbuf[4];
byte bbuf=0;
int ibuf=0;
if (CONFIG::read_byte(EP_WIFI_MODE, &bbuf )) {
@@ -257,7 +258,6 @@ void CONFIG::print_config()
} else {
Serial.println(F("Error reading SSID"));
}
- //if (CONFIG::read_string(EP_PASSWORD, sbuf , MAX_PASSWORD_LENGTH))Serial.println(sbuf);
if (CONFIG::read_byte(EP_IP_MODE, &bbuf )) {
Serial.print(F("IP Mode: "));
@@ -272,23 +272,23 @@ void CONFIG::print_config()
Serial.println(F("Error reading IP mode"));
}
- if (CONFIG::read_buffer(EP_IP_VALUE,(byte *)sbuf , IP_LENGTH)) {
+ if (CONFIG::read_buffer(EP_IP_VALUE,(byte *)ipbuf , IP_LENGTH)) {
Serial.print(F("IP: "));
- Serial.println(wifi_config.ip2str((byte *)sbuf));
+ Serial.println(IPAddress(ipbuf).toString());
} else {
Serial.println(F("Error reading IP"));
}
- if (CONFIG::read_buffer(EP_MASK_VALUE, (byte *)sbuf , IP_LENGTH)) {
+ if (CONFIG::read_buffer(EP_MASK_VALUE, (byte *)ipbuf , IP_LENGTH)) {
Serial.print(F("Subnet: "));
- Serial.println(wifi_config.ip2str((byte *)sbuf));
+ Serial.println(IPAddress(ipbuf).toString());
} else {
Serial.println(F("Error reading subnet"));
}
- if (CONFIG::read_buffer(EP_GATEWAY_VALUE, (byte *)sbuf , IP_LENGTH)) {
+ if (CONFIG::read_buffer(EP_GATEWAY_VALUE, (byte *)ipbuf , IP_LENGTH)) {
Serial.print(F("Gateway: "));
- Serial.println(wifi_config.ip2str((byte *)sbuf));
+ Serial.println(IPAddress(ipbuf).toString());
} else {
Serial.println(F("Error reading gateway"));
}
@@ -443,5 +443,17 @@ void CONFIG::print_config()
Serial.println(F("Enabled"));
#else
Serial.println(F("Disabled"));
+#endif
+ Serial.print(F("Pin 2 Recovery: "));
+#ifdef RECOVERY_FEATURE
+ Serial.println(F("Enabled"));
+#else
+ Serial.println(F("Disabled"));
+#endif
+ Serial.print(F("Authentication: "));
+#ifdef AUTHENTICATION_FEATURE
+ Serial.println(F("Enabled"));
+#else
+ Serial.println(F("Disabled"));
#endif
}
diff --git a/esp8266/config.h b/esp8266/config.h
index 4a8058c9..a0a3b5b7 100644
--- a/esp8266/config.h
+++ b/esp8266/config.h
@@ -21,7 +21,7 @@
//comment to disable
//MDNS_FEATURE: this feature allow type the name defined
//in web browser by default: http:\\esp8266.local and connect
-#define MDNS_FEATURE
+//#define MDNS_FEATURE
//SSDD_FEATURE: this feature is a discovery protocol, supported on Windows out of the box
#define SSDP_FEATURE
@@ -41,16 +41,16 @@
//TCP_IP_DATA_FEATURE: allow to connect serial from TCP/IP
#define TCP_IP_DATA_FEATURE
+//RECOVERY_FEATURE: allow to use GPIO2 pin as hardware reset for EEPROM, add 8s to boot time to let user to jump GPIO2 to GND
+#define RECOVERY_FEATURE
+
#ifndef CONFIG_h
#define CONFIG_h
#include