Skip to content

ESP8266: Pelion connect fails with 'send tcp data' timeout #11544

@ccli8

Description

@ccli8

Description

Environment

mbed-os-example-pelion
656809a Merge pull request #14 from ARMmbed/remove-patches

mbed-clout-client
3.4.0

mbed-os
83fca60 Merge pull request #11454 from Tharazi97/LSI_VALUE_STM

Target
NU_PFM_M2351_NPSA_NS

Pelion connection has some failure rate. For my check, I enable ESP8266 debug log. From the log, pelion connection failure results from send tcp data failing. Some questions with it:

  1. The first AT+CIPSEND=0,642 fails due to timeout. If I enlarge ESP8266_SEND_TIMEOUT from 2000ms to e.g. 10000ms, the failure rate can decrease. But what is reasonable value of ESP8266_SEND_TIMEOUT? It depends on network status.
  2. When the first AT+CIPSEND=0,642 times out, a second AT+CIPSEND=0,642 is retried. But there is Recv 642 bytes from ESP8266 module in the first AT+CIPSEND=0,642. In my understanding, this means ESP8266 module has received 642 bytes from host mcu and is sending it out to remote peer. If the second AT+CIPSEND=0,642 succeeds, then 642 bytes is duplicate sent?

AT> AT+CIPSEND=0,642

AT? >%n
AT< OK
AT= >
AT? SEND OK%n
AT<

AT< Recv 642 bytes


AT(Timeout)

AT? %n
AT? %n

AT> AT+CIPSEND=0,642

AT? >%n
AT! busy
AT(Aborted)
AT? %n
AT<
AT? %n
AT> AT+CIPSEND=0,642
AT? >%n
AT! busy
AT(Aborted)
AT? %n
AT<
AT! busy
AT(Aborted)
AT? %n
AT<
AT! busy
AT(Aborted)

Issue request type

[ ] Question
[ ] Enhancement
[x] Bug

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions