Skip to content

client.write sending time is too long  #610

Closed
@ShawnXuan

Description

@ShawnXuan

Hardware:

Board: ?ESP32S?
IDE name: ?Arduino IDE?
Flash Frequency: ?40Mhz?
Upload Speed: ?115200?

Description:

I found it may take very long time to send a message using client.write. sometime more than 1 second. especially when the model is on moving status or be waved, but it is very close to the router(within 5m)

Sketch:

here is test code. the sending time(delt_t) which is less than 1 is ignored.

  int delt_t;
  delt_t = millis();
  int res = client.write(message,sizeof(message));
  delt_t = millis() - delt_t;
  if(delt_t>1){
    Serial.print("client.write time: ");
    Serial.println(delt_t);
  }

Debug Messages:

the numbers is not start with 'client.write time:' is the main loop frequency.

154
client.write time: 1059
27
118
153
154
154
154
154
154
154
154
153
154
client.write time: 29
150
154
154
153
client.write time: 1196
99
25
154
154
153
154
154
154
154
client.write time: 1201
104
18
154
154
154
client.write time: 1176
34
93
154
154
153
154
154
client.write time: 25
client.write time: 8
149
154
153
154

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions