-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix ESP8266 "Link Type" errors after reset #9130
Conversation
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.
Thanks for investigating and creating this fix with me @dlfryar |
Waiting on #9131 for a fix to Travis CI. |
@adbridge - please get to next patch release. |
@ARMmbed/mbed-os-maintainers for better visibility |
CI started |
Test run: FAILEDSummary: 1 of 11 test jobs failed Failed test jobs:
|
Restarted CI job: The job appears to not have connected to a device. Failure appears unrelated to PR. |
Description
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 functionESP8266::_oob_connection_status
to get called and change its state (_conn_status) from NSAPI_STATUS_DISCONNECTED to NSAPI_STATUS_CONNECTING. This causesESP8266Interface::_startup
, called later in the boot seqeunce, to skipESP8266::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.Pull request type