Skip to content
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

Merged
merged 1 commit into from
Dec 18, 2018

Conversation

c1728p9
Copy link
Contributor

@c1728p9 c1728p9 commented Dec 17, 2018

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 function ESP8266::_oob_connection_status to get called and 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.

Pull request type

[x] Fix
[ ] Refactor
[ ] Target update
[ ] Functionality change
[ ] Docs update
[ ] Test update
[ ] Breaking change

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.
@c1728p9
Copy link
Contributor Author

c1728p9 commented Dec 17, 2018

Thanks for investigating and creating this fix with me @dlfryar

@cmonr
Copy link
Contributor

cmonr commented Dec 17, 2018

Waiting on #9131 for a fix to Travis CI.

@JanneKiiskila
Copy link
Contributor

@adbridge - please get to next patch release.

@0xc0170
Copy link
Contributor

0xc0170 commented Dec 18, 2018

@adbridge - please get to next patch release.

@ARMmbed/mbed-os-maintainers for better visibility

@0xc0170
Copy link
Contributor

0xc0170 commented Dec 18, 2018

CI started

@mbed-ci
Copy link

mbed-ci commented Dec 18, 2018

Test run: FAILED

Summary: 1 of 11 test jobs failed
Build number : 1
Build artifacts

Failed test jobs:

  • jenkins-ci/mbed-os-ci_dynamic-memory-usage

@cmonr
Copy link
Contributor

cmonr commented Dec 18, 2018

Restarted CI job: jenkins-ci/mbed-os-ci_dynamic-memory-usage

The job appears to not have connected to a device. Failure appears unrelated to PR.

@cmonr cmonr merged commit 6210805 into ARMmbed:master Dec 18, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants