As part of the ESP8266 connect sequence, ESP8266Interface::connect,
a software reset is performed. If the ESP8266 had been connected
previously then the ESP8266 will sometimes send a "WIFI DISCONNECT" OOB
message before performing the software reset. This causes the
ESP8266::_oob_connection_status to change its state (_conn_status) from
NSAPI_STATUS_DISCONNECTED to NSAPI_STATUS_CONNECTING. This causes
ESP8266Interface::_startup, called later in the boot seqeunce, to skip
ESP8266::startup. Without this call socket mux mode (CIPMUX=1) is never
enabled and all send commands using this format fail with a "Link Type"
error.
This patch fixes that problem by unconditionally calling
ESP8266::startup as part of the ESP8266 connect sequence.
"ns_types.h" results in build failure when networking feature is ignored with
.mbedignored. ESP8266 component should be enabled only when NSAPI is present.
Compile [ 1.3%]: ESP8266Interface.cpp
[Error] ESP8266Interface.cpp@582,33: cannot declare static function inside another function
[Error] ESP8266Interface.cpp@583,13: cannot convert 'ESP8266Interface (*)()' to 'WiFiInterface*' in return
Failed to build library