diff --git a/components/wifi/esp8266-driver/ESP8266Interface.cpp b/components/wifi/esp8266-driver/ESP8266Interface.cpp index 8c83e2aaba..b438b43af3 100644 --- a/components/wifi/esp8266-driver/ESP8266Interface.cpp +++ b/components/wifi/esp8266-driver/ESP8266Interface.cpp @@ -715,6 +715,7 @@ nsapi_error_t ESP8266Interface::_init(void) if (!_esp.startup(ESP8266::WIFIMODE_STATION)) { return NSAPI_ERROR_DEVICE_ERROR; } +#if MBED_CONF_ESP8266_SNTP_ENABLE if (!_esp.set_sntp_config(MBED_CONF_ESP8266_SNTP_ENABLE, MBED_CONF_ESP8266_SNTP_TIMEZONE, MBED_CONF_ESP8266_SNTP_SERVER0, @@ -722,6 +723,7 @@ nsapi_error_t ESP8266Interface::_init(void) MBED_CONF_ESP8266_SNTP_SERVER2)) { return NSAPI_ERROR_DEVICE_ERROR; } +#endif _initialized = true; } return NSAPI_ERROR_OK; diff --git a/components/wifi/esp8266-driver/mbed_lib.json b/components/wifi/esp8266-driver/mbed_lib.json index ccf91b6a49..6eefffc00f 100644 --- a/components/wifi/esp8266-driver/mbed_lib.json +++ b/components/wifi/esp8266-driver/mbed_lib.json @@ -71,7 +71,7 @@ "value": false }, "sntp-enable": { - "help": "Enable SNTP. This allows application to use get_sntp_time()", + "help": "Enable SNTP. This allows application to use get_sntp_time(). Only available from ESP8266 AT v1.5. This driver supports v1.7 and higher.", "value": false }, "sntp-timezone": {