Open shadowfighterCA opened 1 year ago
You can split the packets to small ones then send one by one . In you esp32 when received try to merge the packets.
https://mqtt.org "It is designed as an extremely lightweight publish/subscribe messaging transport that is ideal for connecting remote devices with a small code footprint and minimal network bandwidth", it's not suit to transport large data.
hey, thanks for response. As per mqtt specs maximum payload can be 256 MB. And I have received more than 10 MB payload on the same hardware (ESP32) using native framework (ESP IDF). So as far as hardware and protocol goes, it is possible to receive more than 10 MB payload. I was asking if someone has modified this library for ESP32. Arduino framework uses esp idf in backend so doing this is possible.
Hi
Please feel free to checkout my maintained fork of H4AsyncMQTT. Just keep in mind the availability of RAM to handle continuous TCP fragments.
I'm struggling with a similar problem, but for me it's sending. I can't send anything higher than the above specified payload limit, even after increasing the payload size appropriately. @HamzaHajeir is your library also relevant for this use case?
I'm struggling with a similar problem, but for me it's sending. I can't send anything higher than the above specified payload limit, even after increasing the payload size appropriately. @HamzaHajeir is your library also relevant for this use case?
Hi @danbachar, yes, as there's no limit to the incoming payload size, starting from reassembling TCP fragments from LwIP upwards. The library accepts any reasonable payload size (~Max free block / 2).
I mean to send a ~130 kb payload from the esp32, not receive
Likewise, there need to be a free block of a bit more than two times the payload size. Therefore something like 260kb of a block size (the mqtt packet needs to be saved in a contiguous block of memory).
What free heap/max block you have in your system?
On Sat, Nov 30, 2024, 23:22 Dan Bachar @.***> wrote:
I mean to send a ~130 kb payload from the esp32, not receive
— Reply to this email directly, view it on GitHub https://github.com/knolleary/pubsubclient/issues/1017#issuecomment-2509202831, or unsubscribe https://github.com/notifications/unsubscribe-auth/AH3O7J4S4DKGRBMYTDAURO32DINCDAVCNFSM6AAAAABSYXEHBOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKMBZGIYDEOBTGE . You are receiving this because you were mentioned.Message ID: @.***>
I am trying to receive around 2 MB of payload via MQTT on esp32. But maximum packet size that I can set is 65536 via
client.setBufferSize()
function. The argument of this function is a uint16_t hence i am unable to set receiving packet size more than 65536. Such large payloads can be easily received by ESP-IDF. Can you help me with this ? I tried setting it up higher than 65536 but it simply does not work.Code for reference -