Problem
As seen in the documentation on this page it says that the device OS 3.0.0 or greater has a publish limit of 1024 bytes, however when attempting to use this buffer to that limit i run into json being truncated as seen in the screenshots section below
It should also be noted that I can be sure of the buffer size by calling
particle::protocol::MAX_EVENT_DATA_LENGTH
from the firmware, which does in fact return 1024.
I believe this issue to be in relation to the JSONBufferWriter
class, as I have been using it in this firmware, and can get successful publishes of 1024 bytes without truncation, however, when I begin to use the JSONBufferWriter
class truncation resumes
Screenshots
Data as seen from Serial.println(publishBuffer)
publishBuffer is of type char[1024]
Data as returned on console.particle.io
{
"publishes": "are",
"being": "cut",
"off!": [
["example", "example", "example"],
["example", "example", "example"],
["example", "example", "example"],
["example", "example", "example"],
["example", "example", "example"],
["example", "example", "example"],
["example", "example", "example"],
["example", "example", "example"],
["example", "example", "example"],
["example", "example", "example"],
["example", "example", "example"],
["example", "example", "example"],
["example", "example", "example"],
["example", "example", "example"],
["example", "example", "example"],
["example", "example", "example"],
["example", "example", "example"],
["example", "example", "example"],
["example", "example", "example"],
["example", "example", "example"�
Device information
Device:
B402 Bsom
OS version:
3.0.0
Question
I am using the PublishQueueAsyncRK
but upon inspecting that library it seems that it is using standard Particle.publish()
at its core, I am wondering if I misinterpreted the documentation or if this is a bug.
Thanks in advance, Ozzie