Automatically set mqtt buffer size (#637)
* Automatically set mqtt buffer size Current versions of pubsubclient allows the buffer size to be set dynamically: https://github.com/knolleary/pubsubclient/pull/282 We can take advantage of this to avoid having to modify one of the dependencies and instead automatically up the buffer size when a powerful board is detected.
This commit is contained in:
1 parent
2bb8feffed
commit
1e599415fc
7 files changed
+17
-34
No files matched your search
@@ -6,16 +6,6 @@
|
||||
* Download OpenMQTTGateway code (OpenMQTTGateway_sources.zip) from the [release page](https://github.com/1technophile/OpenMQTTGateway/releases) and unzip it
|
||||
* Download the libraries package corresponding to your board and module wished into the same page (example esp32-m5stick-c-ble-libraries.zip)
|
||||
* Unzip the libraries into your arduino libraries folder (example D:/Users/XXXX/Documents/Arduino/libraries)
|
||||
* If you are using an ESP, Mega or other powerfull board; Open the *PubSubClient* folder, open the file src/PubSubClient.h, replace
|
||||
```C++
|
||||
#define MQTT_MAX_PACKET_SIZE 128
|
||||
```
|
||||
by
|
||||
```C++
|
||||
#define MQTT_MAX_PACKET_SIZE 1024
|
||||
```
|
||||
This modification will enable to send and receive by MQTT long json messages.
|
||||
|
||||
* If necessary replace the spaces into each library folder by _: example rename “ESP32 BLE Arduino” folder to “ESP32_BLE_Arduino”
|
||||
* Open the file main.ino from OpenMQTTGateway/main folder with the arduino IDE
|
||||
* Change the settings and the desired gateways into user_config.h (uncomment the modules you want)
|
||||
|
||||
Reference in new issue
Block a user