adafruit / Adafruit_MQTT_Library

Arduino library for MQTT support
MIT License
573 stars 291 forks source link

Change to uint16_t to support messages > 255 bytes #104

Open jwende opened 6 years ago

jwende commented 6 years ago

https://github.com/adafruit/Adafruit_MQTT_Library/blob/974f4b8713a83d01b040a0d23b798d3f2978d990/Adafruit_MQTT.cpp#L228

Cheers Joerg

rareearthmagnet commented 6 years ago

Jeorg, do if this is the only thing in the code that needs to be changed to support larger messages? I am still having problems sending messages > 100 bytes....

Thanks.

jjunimd commented 6 years ago

You will also need to increase the size of MAXBUFFERSIZE in Adafruit_mqtt.h (line #98)

jwende commented 6 years ago

that is correct (and there might be another issue with the 23 byte limit of the device identifier ... this had been removed in MQTT 3.1.1)

jjunimd commented 6 years ago

By "device identifier" do you mean the server? The feed name? Since these are URLs, what portion of them counts toward the 23 byte limit?

jwende commented 6 years ago

sorry - Client Identifier The Client Identifier (ClientId) identifies the Client to the Server. Server may allow client identifies larger than 23 bytes (http://docs.oasis-open.org/mqtt/mqtt/v3.1.1/os/mqtt-v3.1.1-os.html#_Toc398718028)

jjunimd commented 6 years ago

Thanks!