Commit Graph

26 Commits (51d55508e8400b60af467005646c4e2164738d48)

Author SHA1 Message Date
Michal Paszta 6be5ad09f2 ESP8266: connect() returns OK in non-blocking calls 2019-02-21 14:25:41 -06:00
Michal Paszta 1c88e0fa11 ESP8266: connect() can handle ESP's errors.
ESP8266Interface::connect() checks the exact return value from
the underlying ESP8266::connect() call.
Increased timeout for network-wifi greentea tests to 6 minutes.
2019-02-21 14:25:39 -06:00
Veijo Pesonen dd82b6be74 ESP8266: with empty packet send returns zero if TCP, unsupported otherwise 2019-02-08 16:50:27 +00:00
Veijo Pesonen 32f3b09904 ESP8266: provides blocking/non-blocking connect
Implements NetworkInterface::set_blocking() and implements the
functionality to distinguish between the two in connect()
2019-01-25 14:29:59 +00:00
Veijo Pesonen 8927bf7862 ESP8266: turns connect fully to non-blocking mode
Blocking mode connect is not supported anymore when this patch is
applied
2019-01-25 14:29:59 +00:00
Veijo Pesonen 247866a8d2 ESP8266: makes connect() connection status aware 2019-01-25 14:29:59 +00:00
Veijo Pesonen 1eed2668ba fixes a debug print 2019-01-25 14:29:59 +00:00
Veijo Pesonen 64bb010541 Drop signalling SIGIO artificially if UDP send fails
With TCP it's desirable that SIGIO wakes up the application to check
if there is buffer space space available on the mode. With UDP the
behavior is not acceptable as we don't know if the other endpoint is
there as connection establishment is missing. Hence buffers might
stay full forever.
2019-01-25 14:29:59 +00:00
Veijo Pesonen e495866eea fixes disconnect to check the state from modem
Additionally to internal bookkeeping lets check from the modem
that what is connection state in disconnect. There might be
inconsistencies.
2019-01-25 14:29:59 +00:00
Seppo Takalo 0e001598c3 Flush ESP8266 serial input buffers after HW reset 2019-01-14 13:06:14 +00:00
Seppo Takalo ec57224a8d ESP8266: Set HW reset time to 2ms 2019-01-14 13:06:14 +00:00
Michal Paszta 03058ba4e1 Prevent ESP8266 stopping HW control on init 2019-01-14 13:06:14 +00:00
Russ Butler 53e39edcde Fix ESP8266 "Link Type" errors after reset
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.
2018-12-27 22:26:02 -06:00
Michal Paszta 56363775f2 ESP8266 send returns WOULD_BLOCK error when busy 2018-12-11 16:14:50 -06:00
Veijo Pesonen c22ac0c279 Fixes namespace collision 2018-12-11 16:14:50 -06:00
Veijo Pesonen 7210b97c59 powers down the modem on disconnect 2018-12-11 16:14:50 -06:00
Veijo Pesonen 5799daef72 Fixes connect, and network-status logic 2018-12-11 16:14:50 -06:00
Veijo Pesonen c10d276928 Adds support for controlling HW reset of the modem from the driver
While connecting will run HW reset for the modem if reset wire is attached to a know pin.
2018-12-11 16:14:50 -06:00
Deepika ce08039c30 Add Serial + EventQueue dependency to ESP8266 2018-12-11 16:14:50 -06:00
Deepika 771b69e405 Components if using RTOS modules should be enabled only when RTOS is present
Build failures were observed when rtos is ignored with .mbedignored.
Components dependent on RTOS should be guarded with MBED_CONF_RTOS_PRESENT
2018-12-11 16:14:50 -06:00
Deepika 0b38cb85f8 Fix header files used in esp8266
"ns_types.h" results in build failure when networking feature is ignored with
.mbedignored. ESP8266 component should be enabled only when NSAPI is present.
2018-12-11 16:14:50 -06:00
Michal Paszta a10e299bd9 ESP8266 disconnect returns ERROR_NO_CONNECTION 2018-12-11 16:14:45 -06:00
Veijo Pesonen 63c219a1c3 Drops std:: because string.h is included 2018-12-11 16:14:45 -06:00
Veijo Pesonen 8dd6a5d039 Add ESP8266 driver v1.7 2018-11-09 14:49:48 +02:00
Juha Ylinen 273f7c6fd6 ESP8266: Fix compilation error when default interface is enabled
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
2018-09-03 12:56:26 +03:00
Seppo Takalo fc5bf5986b Add ESP8266 driver v1.6 2018-09-01 12:36:28 -05:00