ditto-examples
ditto-examples copied to clipboard
"Mqtt-bidirectional" example enhancement suggestion, after inability to recieve packets on IoT device.
This is an enhancement suggestion for the mqtt-bidirectional example. I tried this example but I went too quickly through the "Preparing your IDE" part because I already have PlatformIO installed, so I missed the instruction to set the MQTT_MAX_PACKET_SIZE. This caused my device to be unable to receive any messages via Ditto. It took me long to find the cause of the problem, because I first thought it is a problem of Ditto, not of any library.
There is a better way to correct the MQTT_MAX_PACKET_SIZE than editing the files of the library. You can just call client.setBufferSize(2048); before line 130.