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

MQTT buffer size not working after 7500 bytes (IDFGH-14541) #15303

Open
3 tasks done
juanpgg-git opened this issue Jan 29, 2025 · 0 comments
Open
3 tasks done

MQTT buffer size not working after 7500 bytes (IDFGH-14541) #15303

juanpgg-git opened this issue Jan 29, 2025 · 0 comments
Assignees
Labels
Status: Opened Issue is new

Comments

@juanpgg-git
Copy link

Answers checklist.

  • I have read the documentation ESP-IDF Programming Guide and the issue is not addressed there.
  • I have updated my IDF branch (master or release) to the latest version and checked that the issue is present there.
  • I have searched the issue tracker for a similar issue and not found a similar issue.

General issue report

I'm working with an ESP32 in Platformio using the Arduino framework and the ESP-IDF MQTT (mqtt_client.h) implementation.
platform = espressif32 @ 6.9.0 (which uses ESP-IDF 4.4.7)

The broker is AWS IoT Core. So far I've been able to do the provisioning process and send data back and forth without problem.

The problem is I need to be able to receive 15kB in the payload, but if I set the buffer size greater than 7500 bytes, the client is not able to connect.

Error is:
Other event id: 0 E (18401) esp-tls-mbedtls: mbedtls_ssl_handshake returned -0x2880 E (18402) esp-tls: Failed to open new connection E (18403) TRANSPORT_BASE: Failed to open a new connection E (18409) MQTT_CLIENT: Error transport connect MQTT_EVENT_ERROR MQTT_EVENT_DISCONNECTED

I also tried increasing the MQTT task size, but that didn't work.

This is the specific code:
esp_mqtt_client_config_t aws_mqtt_cfg = { .event_handle = mqtt_event_handler, .uri = "xxxxxxxxxxxx", .port = SERVER_PORT, .client_id = "xxxxxxxx", //.task_stack = 12000, .buffer_size = 7500, .cert_pem = AWS_CERT_CA, .client_cert_pem = AWS_CERT_CA_new, .client_key_pem = AWS_CERT_PRIVATE_new, };

I checked the heap size before connecting and there's around 80kB free to use, so that shouldn't be the problem. I also tried looking for the max mqtt buffer size but found no rule about it.

Thanks a lot in advance

@espressif-bot espressif-bot added the Status: Opened Issue is new label Jan 29, 2025
@github-actions github-actions bot changed the title MQTT buffer size not working after 7500 bytes MQTT buffer size not working after 7500 bytes (IDFGH-14541) Jan 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Opened Issue is new
Projects
None yet
Development

No branches or pull requests

3 participants