Commit Graph

20 Commits (247866a8d2ac3b0d904fba5bddf8e3d31e59f14d)

Author SHA1 Message Date
Veijo Pesonen 44696009bd adds an error check for data overflow from modem side 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
Veijo Pesonen 91832e6e78 socket_send() returns WOULD_BLOCK if server won't accept
Driver must return NSAPI_ERROR_WOULD_BLOCK if a server won't accept
data from the modem and the modem's buffers are full. In case that
socket is closed driver returns NSAPI_ERROR_CONNECTION_LOST.
2019-01-14 13:06:14 +00:00
Veijo Pesonen 0f9098d239 Fixes AT-layer socket_open-functions
When a socket open fails it musn't be treated as fatal error. Returning
a device error which is then handled by an application is the correct
solution
2019-01-14 13:06:14 +00:00
Russ Butler c8c68381d6 Fix ESP8266 recv_udp timeout with flow control
UDP packets are always received as OOB data. Without checking for
new OOB data with a call to "_process_oob" then recv_udp never blocks.
If a UDP packet is not available then NSAPI_ERROR_WOULD_BLOCK is
returned. This causes mbed-os's DNS handling to always fail when
flow control is enabled.

This patch fixes recv_udp by always calling "_process_oob" regardless
of if flow control is enabled. This ensures that recv_udp follows the
timeout parameter and waits for new data to arrive.
2018-12-27 22:25:55 -06:00
Michal Paszta 56363775f2 ESP8266 send returns WOULD_BLOCK error when busy 2018-12-11 16:14:50 -06:00
Veijo Pesonen fc548ec367 Fixes AT command timeout values from reset&connect 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
Veijo Pesonen 891d756a1a Reports NSAPI_STATUS_CONNECTING when trying to reconnect 2018-12-11 16:14:45 -06:00
Veijo Pesonen 1108d8d96c Truncates TCP stream and NACKs UDP datagram when sending too much data
ESP8266 maximum packet size when sending is 2048 bytes.
2018-12-11 16:14:45 -06:00
Veijo Pesonen 54136e72dc Fixes return value check when calling ATCmdParser::read() 2018-12-11 16:14:45 -06:00
Veijo Pesonen ca7fef2da0 Dropping duplicate "using namespace mbed;" 2018-12-11 16:14:45 -06:00
Veijo Pesonen 7d878f4d88 Truncates data to be send to modem to 2048 bytes 2018-12-11 16:14:45 -06:00
Veijo Pesonen 934472be1d esp8266 driver - don't set UART flow control if no support 2018-11-09 16:03:41 +02:00
Veijo Pesonen 8dd6a5d039 Add ESP8266 driver v1.7 2018-11-09 14:49:48 +02:00
deepikabhavnani 451cf7ccb3 Add required namespace instead of relying on mbed.h
mbed.h has 'using namespace mbed;', hence some of the files skip
adding required namespace to the code, it is always good to specify the
namespace around the elements in header and `using namespace` in
specific CPP files, instead of all
2018-10-25 12:43:59 -05:00
Seppo Takalo fc5bf5986b Add ESP8266 driver v1.6 2018-09-01 12:36:28 -05:00