Merge branch 'master' into feature/cmake

This commit is contained in:
Angus Gratton
2018-09-06 20:23:04 +08:00
committed by Angus Gratton
261 changed files with 3487 additions and 85171 deletions
@@ -56,8 +56,8 @@ def test_examples_protocol_http_server_persistence(env, extra_data):
# Parse IP address of STA
print "Waiting to connect with AP"
got_ip = dut1.expect(re.compile(r"(?:[\s\S]*)Got IP: (\d+.\d+.\d+.\d+)"), timeout=120)[0]
got_port = dut1.expect(re.compile(r"(?:[\s\S]*)Starting server on port: (\d+)"), timeout=30)[0]
got_ip = dut1.expect(re.compile(r"(?:[\s\S]*)Got IP: '(\d+.\d+.\d+.\d+)'"), timeout=120)[0]
got_port = dut1.expect(re.compile(r"(?:[\s\S]*)Starting server on port: '(\d+)'"), timeout=30)[0]
print "Got IP : " + got_ip
print "Got Port : " + got_port
@@ -162,7 +162,7 @@ httpd_handle_t start_webserver(void)
{
httpd_config_t config = HTTPD_DEFAULT_CONFIG();
// Start the httpd server
ESP_LOGI(TAG, "Starting server on port: %d", config.server_port);
ESP_LOGI(TAG, "Starting server on port: '%d'", config.server_port);
httpd_handle_t server;
if (httpd_start(&server, &config) == ESP_OK) {
@@ -195,7 +195,7 @@ static esp_err_t event_handler(void *ctx, system_event_t *event)
break;
case SYSTEM_EVENT_STA_GOT_IP:
ESP_LOGI(TAG, "SYSTEM_EVENT_STA_GOT_IP");
ESP_LOGI(TAG, "Got IP: %s",
ESP_LOGI(TAG, "Got IP: '%s'",
ip4addr_ntoa(&event->event_info.got_ip.ip_info.ip));
/* Start the web server */
@@ -18,7 +18,7 @@ import httplib
import argparse
def start_session (ip, port):
return httplib.HTTPConnection(ip, int(port))
return httplib.HTTPConnection(ip, int(port), timeout=15)
def end_session (conn):
conn.close()