diff --git a/README.md b/README.md index 8317691..c3b5cce 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,8 @@ Full API documentation is available here: http://pubsubclient.knolleary.net - It can only publish QoS 0 messages. It can subscribe at QoS 0 or QoS 1. - The maximum message size, including header, is **128 bytes** by default. This - is configurable via `MQTT_MAX_PACKET_SIZE` in `PubSubClient.h`. + is configurable via `MQTT_MAX_PACKET_SIZE` in `PubSubClient.h` or at runtime + using PubSubClient::setBufferSize(). - The keepalive interval is set to 15 seconds by default. This is configurable via `MQTT_KEEPALIVE` in `PubSubClient.h`. - The client uses MQTT 3.1.1 by default. It can be changed to use MQTT 3.1 by diff --git a/examples/mqtt_auth/mqtt_auth.ino b/examples/mqtt_auth/mqtt_auth.ino index e9f7b18..04bd7bb 100755 --- a/examples/mqtt_auth/mqtt_auth.ino +++ b/examples/mqtt_auth/mqtt_auth.ino @@ -27,9 +27,9 @@ void setup() { Ethernet.begin(mac, ip); // Note - the default maximum packet size is 128 bytes. If the - // combined length of clientId, username and password exceed this, - // you will need to increase the value of MQTT_MAX_PACKET_SIZE in - // PubSubClient.h + // combined length of clientId, username and password exceed this use the + // following to increase the buffer size: + // client.setBufferSize(255); if (client.connect("arduinoClient", "testuser", "testpass")) { client.publish("outTopic","hello world");