Gen 3 Boron truncating Particle.publish at 782 characters

According to the doc, a Gen 3 Boron can send publish event data up to 1024 characters long.

Running this test code:

String myMessage = "len0007len0014len0021len0028len0035len0042len0049len0056len0063len0070len0077len0084len0091len0098len0105len0112len0119len0126len0133len0140len0147len0154len0161len0168len0175len0182len0189len0196len0203len0210len0217len0224len0231len0238len0245len0252len0259len0266len0273len0280len0287len0294len0301len0308len0315len0322len0329len0336len0343len0350len0357len0364len0371len0378len0385len0392len0399len0406len0413len0420len0427len0434len0441len0448len0455len0462len0469len0476len0483len0490len0497len0504len0511len0518len0525len0532len0539len0546len0553len0560len0567len0574len0581len0588len0595len0602len0609len0616len0623len0630len0637len0644len0651len0658len0665len0672len0679len0686len0693len0700len0707len0714len0721len0728len0735len0742len0749len0756len0763len0770len0777len0784len0791len0798len0805len0812len0819len0826len0833len0840len0847len0854len0861len0868len0875len0882len0889len0896len0903len0910len0917len0924len0931len0938len0945len0952len0959len0966len0973len0980len0987len0994len1001len1008len1015len001024";

void setup() {
  Particle.connect();
  Particle.publish("bulkfirebase",myMessage);
}


void loop() {

}

Results in the following message in the Particle console (and in the webhook):

len0007len0014len0021len0028len0035len0042len0049len0056len0063len0070len0077len0084len0091len0098len0105len0112len0119len0126len0133len0140len0147len0154len0161len0168len0175len0182len0189len0196len0203len0210len0217len0224len0231len0238len0245len0252len0259len0266len0273len0280len0287len0294len0301len0308len0315len0322len0329len0336len0343len0350len0357len0364len0371len0378len0385len0392len0399len0406len0413len0420len0427len0434len0441len0448len0455len0462len0469len0476len0483len0490len0497len0504len0511len0518len0525len0532len0539len0546len0553len0560len0567len0574len0581len0588len0595len0602len0609len0616len0623len0630len0637len0644len0651len0658len0665len0672len0679len0686len0693len0700len0707len0714len0721len0728len0735len0742len0749len0756len0763len0770len0777len07

i.e. the message is truncted at 782 characters.

The Device OS: is 3.1.0

Any idea why the message is getting truncated?

Have you tried subscribing with CLI or directly in a browser?
My guess would be that the console code is just not yet tweaked to accommodate for the extra bytes.

Thanks for your response.

I don’t think it is a console limitation. In my webhook “bulkfirebase” is see the following corresponding Event message.

{
  "name": "bulkfirebase",
  "data": "len0007len0014len0021len0028len0035len0042len0049len0056len0063len0070len0077len0084len0091len0098len0105len0112len0119len0126len0133len0140len0147len0154len0161len0168len0175len0182len0189len0196len0203len0210len0217len0224len0231len0238len0245len0252len0259len0266len0273len0280len0287len0294len0301len0308len0315len0322len0329len0336len0343len0350len0357len0364len0371len0378len0385len0392len0399len0406len0413len0420len0427len0434len0441len0448len0455len0462len0469len0476len0483len0490len0497len0504len0511len0518len0525len0532len0539len0546len0553len0560len0567len0574len0581len0588len0595len0602len0609len0616len0623len0630len0637len0644len0651len0658len0665len0672len0679len0686len0693len0700len0707len0714len0721len0728len0735len0742len0749len0756len0763len0770len0777len07",
  "ttl": 60,
  "published_at": "2021-07-28T16:17:43.387Z",
  "coreid": "e00fce1234b5678eb71f2f1d"
}

I have not tried “Have you tried subscribing with CLI or directly in a browser?”

Just to double check. Subscribing via the CLI gives the same result.

Subscribing to "bulkfirebase" from my devices

`{"data":"len0007len0014len0021len0028len0035len0042len0049len0056len0063len0070len0077len0084len0091len0098len0105len0112len0119len0126len0133len0140len0147len0154len0161len0168len0175len0182len0189len0196len0203len0210len0217len0224len0231len0238len0245len0252len0259len0266len0273len0280len0287len0294len0301len0308len0315len0322len0329len0336len0343len0350len0357len0364len0371len0378len0385len0392len0399len0406len0413len0420len0427len0434len0441len0448len0455len0462len0469len0476len0483len0490len0497len0504len0511len0518len0525len0532len0539len0546len0553len0560len0567len0574len0581len0588len0595len0602len0609len0616len0623len0630len0637len0644len0651len0658len0665len0672len0679len0686len0693len0700len0707len0714len0721len0728len0735len0742len0749len0756len0763len0770len0777len07","ttl":60,"published_at":"2021-07-28T17:24:15.066Z","coreid":"e00fce12345b6789eb71f2f1d","name":"bulkfirebase"}`

Any volunteers to run the simple test that I show about and see if you get the same result?

I have a support ticket in but since I am not an Enterprse client it will take a few days I’m sure before I hear back.

I have a customer that will shortly be sending about 700 messages a minute with just over 100 Borons. I am batching the messages to reduce Data Operations and every byte counts. I estimate that this truncation issue translates to about another 2 blocks or $600 per month.

I’m guessing I am not the only person this would affect.

This is most likely caused by an older Boron or B Series SoM that has a SARA-R410M-02B modem with an older version of the modem software (02.03 and older).

In Device OS 3.1 there is a call that returns the actual length, as described here.

Here’s another example:

#include "Particle.h"

SerialLogHandler logHandler;

SYSTEM_THREAD(ENABLED);

String myMessage = "len0007len0014len0021len0028len0035len0042len0049len0056len0063len0070len0077len0084len0091len0098len0105len0112len0119len0126len0133len0140len0147len0154len0161len0168len0175len0182len0189len0196len0203len0210len0217len0224len0231len0238len0245len0252len0259len0266len0273len0280len0287len0294len0301len0308len0315len0322len0329len0336len0343len0350len0357len0364len0371len0378len0385len0392len0399len0406len0413len0420len0427len0434len0441len0448len0455len0462len0469len0476len0483len0490len0497len0504len0511len0518len0525len0532len0539len0546len0553len0560len0567len0574len0581len0588len0595len0602len0609len0616len0623len0630len0637len0644len0651len0658len0665len0672len0679len0686len0693len0700len0707len0714len0721len0728len0735len0742len0749len0756len0763len0770len0777len0784len0791len0798len0805len0812len0819len0826len0833len0840len0847len0854len0861len0868len0875len0882len0889len0896len0903len0910len0917len0924len0931len0938len0945len0952len0959len0966len0973len0980len0987len0994len1001len1008len1015len001024";

void setup()
{
    waitFor(Serial.isConnected, 10000);
    delay(2000);

    Log.info("eventSize=%d", Particle.maxEventDataSize());

    Particle.connect();
    Particle.publish("bulkfirebase", myMessage);
}

void loop()
{
}

If I run it on the original release Boron I get

0000026707 [app] INFO: eventSize=782

Unfortunately it’s not really practical to upgrade the modem firmware on the Boron.

2 Likes

Well that explains it. Thanks for your excellent support as usual Rick!

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.