Hey @rickkas7 - I accidentally upgraded my boron from 3.1.0 to 3.2.0, and PublishQueuePosixRK is no longer working for me in that I do not see any user-code publishes coming to particle console. (deviceOS publishes are working fine, however, like spark/device/diagnostics/update
- so the device can talk to console, just not from my code)
I’ve further downgraded deviceOS (via particle flash --usb boron-system-part1@3.1.0.bin
), but that still doesn’t resolve it. I’m suspecting that something has changed in the flash filesystem as a result of 3.2.0 and that simply reflashing the firmware isn’t resolving it.
Any hints on how to troubleshoot and/or restore function?
Condensed publish shippets below - worked fine before 3.2.0, after update to 3.2.0 doesn’t work, and after downgrade to 3.1.0 also doesn’t work:
#include "PublishQueuePosixRK.h" //background cloud publishing
setup() {
[...stuff...]
PublishQueuePosix::instance().setup();
PublishQueuePosix::instance().withRamQueueSize(10); // hold 10 messages in memory before going to flash
}
void log_to_cloud() {
char buf[256];
JSONBufferWriter writer(buf, sizeof(buf));
writer.beginObject();
writer.name("bus_amps");
writer.beginObject();
writer.name("value").value(STATS.bus_amps);
writer.name("context");
writer.beginObject();
writer.name("bus_watts").value(STATS.bus_watts);
writer.endObject();
writer.endObject();
[...more json stuff added...]
writer.buffer()[std::min(writer.bufferSize(), writer.dataSize())] = 0;
PublishQueuePosix::instance().publish("Ubidots", buf, PRIVATE | NO_ACK);
}