Skip to content

Commit 98c9eb7

Browse files
committed
sync with devt branch
1 parent 55c600f commit 98c9eb7

36 files changed

+223
-252
lines changed

.travis.yml

Lines changed: 5 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -11,27 +11,15 @@ before_install:
1111
before_script:
1212
- "export DISPLAY=:99.0"
1313
- sleep 3 # give xvfb some time to start
14-
- wget http://downloads.arduino.cc/arduino-1.6.5-linux64.tar.xz
15-
- tar xf arduino-1.6.5-linux64.tar.xz
16-
- mv arduino-1.6.5 $HOME/arduino_ide
14+
- wget http://downloads.arduino.cc/arduino-1.6.8-linux64.tar.xz
15+
- tar xf arduino-1.6.8-linux64.tar.xz
16+
- mv arduino-1.6.8 $HOME/arduino_ide
1717
- cd $HOME/arduino_ide/hardware
1818
- mkdir esp8266com
1919
- cd esp8266com
20-
- wget https://github.com/esp8266/Arduino/releases/download/2.1.0/esp8266-2.1.0.zip
21-
- unzip esp8266-2.1.0.zip
22-
- mv esp8266-2.1.0 esp8266
23-
- wget http://arduino.esp8266.com/versions/2.1.0/package_esp8266com_index.json
24-
- mkdir esp8266/package
25-
- mv package_esp8266com_index.json esp8266/package/package_esp8266com_index.template.json
20+
- git clone https://github.com/esp8266/Arduino.git esp8266
2621
- cd esp8266/tools
2722
- python get.py
28-
- cd ..
29-
- head -11 ./platform.txt > pt.txt
30-
- echo 'runtime.tools.xtensa-lx106-elf-gcc.path={runtime.platform.path}/tools/xtensa-lx106-elf' >> pt.txt
31-
- echo 'runtime.tools.esptool.path={runtime.platform.path}/tools/esptool' >> pt.txt
32-
- tail -110 ./platform.txt >> pt.txt
33-
- rm -fr platform.txt
34-
- mv pt.txt platform.txt
3523

3624

3725
script:
@@ -41,7 +29,7 @@ script:
4129
- arduino --board esp8266com:esp8266:generic --save-prefs
4230
- arduino --get-pref sketchbook.path
4331
- build_sketch esp8266/esp8266.ino
44-
32+
4533
notifications:
4634
email:
4735
on_success: change

README.md

Lines changed: 84 additions & 124 deletions
Large diffs are not rendered by default.

TODO.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
TODO
2+
MONITORING_FEATURE : temperatures
3+
INFO_MSG_FEATURE
4+
ERROR_MSG_FEATURE
5+
STATUS_MSG_FEATURE
File renamed without changes.

esp8266/config.cpp

Lines changed: 19 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -236,6 +236,7 @@ void CONFIG::print_config()
236236
{
237237
//use biggest size for buffer
238238
char sbuf[MAX_PASSWORD_LENGTH+1];
239+
uint8_t ipbuf[4];
239240
byte bbuf=0;
240241
int ibuf=0;
241242
if (CONFIG::read_byte(EP_WIFI_MODE, &bbuf )) {
@@ -257,7 +258,6 @@ void CONFIG::print_config()
257258
} else {
258259
Serial.println(F("Error reading SSID"));
259260
}
260-
//if (CONFIG::read_string(EP_PASSWORD, sbuf , MAX_PASSWORD_LENGTH))Serial.println(sbuf);
261261

262262
if (CONFIG::read_byte(EP_IP_MODE, &bbuf )) {
263263
Serial.print(F("IP Mode: "));
@@ -272,23 +272,23 @@ void CONFIG::print_config()
272272
Serial.println(F("Error reading IP mode"));
273273
}
274274

275-
if (CONFIG::read_buffer(EP_IP_VALUE,(byte *)sbuf , IP_LENGTH)) {
275+
if (CONFIG::read_buffer(EP_IP_VALUE,(byte *)ipbuf , IP_LENGTH)) {
276276
Serial.print(F("IP: "));
277-
Serial.println(wifi_config.ip2str((byte *)sbuf));
277+
Serial.println(IPAddress(ipbuf).toString());
278278
} else {
279279
Serial.println(F("Error reading IP"));
280280
}
281281

282-
if (CONFIG::read_buffer(EP_MASK_VALUE, (byte *)sbuf , IP_LENGTH)) {
282+
if (CONFIG::read_buffer(EP_MASK_VALUE, (byte *)ipbuf , IP_LENGTH)) {
283283
Serial.print(F("Subnet: "));
284-
Serial.println(wifi_config.ip2str((byte *)sbuf));
284+
Serial.println(IPAddress(ipbuf).toString());
285285
} else {
286286
Serial.println(F("Error reading subnet"));
287287
}
288288

289-
if (CONFIG::read_buffer(EP_GATEWAY_VALUE, (byte *)sbuf , IP_LENGTH)) {
289+
if (CONFIG::read_buffer(EP_GATEWAY_VALUE, (byte *)ipbuf , IP_LENGTH)) {
290290
Serial.print(F("Gateway: "));
291-
Serial.println(wifi_config.ip2str((byte *)sbuf));
291+
Serial.println(IPAddress(ipbuf).toString());
292292
} else {
293293
Serial.println(F("Error reading gateway"));
294294
}
@@ -443,5 +443,17 @@ void CONFIG::print_config()
443443
Serial.println(F("Enabled"));
444444
#else
445445
Serial.println(F("Disabled"));
446+
#endif
447+
Serial.print(F("Pin 2 Recovery: "));
448+
#ifdef RECOVERY_FEATURE
449+
Serial.println(F("Enabled"));
450+
#else
451+
Serial.println(F("Disabled"));
452+
#endif
453+
Serial.print(F("Authentication: "));
454+
#ifdef AUTHENTICATION_FEATURE
455+
Serial.println(F("Enabled"));
456+
#else
457+
Serial.println(F("Disabled"));
446458
#endif
447459
}

esp8266/config.h

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
//comment to disable
2222
//MDNS_FEATURE: this feature allow type the name defined
2323
//in web browser by default: http:\\esp8266.local and connect
24-
#define MDNS_FEATURE
24+
//#define MDNS_FEATURE
2525

2626
//SSDD_FEATURE: this feature is a discovery protocol, supported on Windows out of the box
2727
#define SSDP_FEATURE
@@ -41,16 +41,16 @@
4141
//TCP_IP_DATA_FEATURE: allow to connect serial from TCP/IP
4242
#define TCP_IP_DATA_FEATURE
4343

44+
//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
45+
#define RECOVERY_FEATURE
46+
4447
#ifndef CONFIG_h
4548
#define CONFIG_h
4649

4750
#include <Arduino.h>
4851
#include "wifi.h"
49-
extern "C" {
50-
#include "user_interface.h"
51-
}
5252
//version and sources location
53-
#define FW_VERSION "0.6.0"
53+
#define FW_VERSION "0.6.1"
5454
#define REPOSITORY "https://github.com/luc-github/ESP8266"
5555

5656

@@ -99,8 +99,8 @@ const byte DEFAULT_MASK_VALUE[] = {255, 255, 255, 0};
9999
#define DEFAULT_GATEWAY_VALUE DEFAULT_IP_VALUE
100100
const long DEFAULT_BAUD_RATE = 9600;
101101
const char M117_[] PROGMEM = "M117 ";
102-
#define DEFAULT_PHY_MODE PHY_MODE_11G
103-
#define DEFAULT_SLEEP_MODE MODEM_SLEEP_T
102+
#define DEFAULT_PHY_MODE WIFI_PHY_MODE_11G
103+
#define DEFAULT_SLEEP_MODE WIFI_MODEM_SLEEP
104104
#define DEFAULT_CHANNEL 11
105105
#define DEFAULT_AUTH_TYPE AUTH_WPA_PSK
106106
#define DEFAULT_SSID_VISIBLE 1

esp8266/data/404.tpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<BR><BR>
88
if not redirected, <a href='http://$WEB_ADDRESS$'>click here</a>
99
<BR><BR>
10-
<PROGRESS name='prg' id='prg'>
10+
<PROGRESS name='prg' id='prg'></PROGRESS>
1111

1212
<script>
1313
var i = 0;

esp8266/data/header.inc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ $INCLUDE[css.inc]$
1010
<body>
1111
<div class="container"><table class="nav">
1212
<tr width=100%>
13-
<td class="$MENU_HOME$"><a href="http://$WEB_ADDRESS$">Home</a></td>
13+
<td class="$MENU_HOME$"><a href="http://$WEB_ADDRESS$/HOME">Home</a></td>
1414
<td class="$MENU_SYSTEM$"><a href="http://$WEB_ADDRESS$/CONFIGSYS">System</a></td>
1515
<td class="$MENU_AP$"><a href="http://$WEB_ADDRESS$/CONFIGAP">Access Point</a></td>
1616
<td class="$MENU_STA$"><a href="http://$WEB_ADDRESS$/CONFIGSTA">Station</a></td>

esp8266/data/restart.tpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<BODY>
66
<CENTER>Restarting, please wait....
77
<BR>
8-
<PROGRESS name='prg' id='prg'>
8+
<PROGRESS name='prg' id='prg'></PROGRESS>
99
</CENTER>
1010
<script>
1111
var i = 0;

esp8266/data/system.tpl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ $SLEEP_MODE_OPTIONS_LIST$
2626
</select></div>
2727
<div class="form-group $WEB_PORT_STATUS$"><label class="control-label" for="CONFIG3">Web port:</label><br>
2828
<input type="number" class="form-control" id="CONFIG3" name="WEBPORT" min="1" max="65000" step="1" placeholder="1~65000" value="$WEB_PORT$" style="width: auto;"></div>
29-
<div class="form-group $DATA_PORT_STATUS$" style="$DATA_PORT_VISIBILITY$"><label class="control-label" for="CONFIG4">Data port:</label><br>
29+
<div id='dataport' class="form-group $DATA_PORT_STATUS$" style="$DATA_PORT_VISIBILITY$"><label class="control-label" for="CONFIG4">Data port:</label><br>
3030
<input type="number" class="form-control" id="CONFIG4" name="DATAPORT" min="1" max="65000" step="1" placeholder="1~65000" value="$DATA_PORT$" style="width: auto;"></div>
3131
<div class="alert alert-danger" role="alert" style="$ERROR_MSG_VISIBILITY$" >
3232
$ERROR_MSG$
@@ -69,6 +69,8 @@ document.getElementById('upload-button').style.visibility = 'hidden';
6969
document.getElementById('upload-button').style.width = '0px';
7070
document.getElementById('system').style.visibility = 'hidden';
7171
document.getElementById('system').style.height = '0px';
72+
document.getElementById('dataport').style.visibility = 'hidden';
73+
document.getElementById('dataport').style.height = '0px';
7274
document.getElementById('msg').style.visibility = "visible";
7375
document.getElementById('file-select').value="";
7476
document.getElementById('file-select').style.visibility = 'hidden';

0 commit comments

Comments
 (0)