Hi,
For starters, I am playing around with mlops-zephyr. I have modified the demo to collect temperature and humidity readings instead of accelaration data, other than that I am have not changed much, I think.
in this section of the code
// Send binary data to the Notecard
NoteBinaryStoreReset();
if(NoteBinaryStoreTransmit((uint8_t *)buffer,
(EI_CLASSIFIER_DSP_INPUT_FRAME_SIZE * sizeof(float)),
(EI_CLASSIFIER_DSP_INPUT_FRAME_SIZE_COBS * sizeof(float)),
0) != NULL)
{
printk("NoteBinaryStoreTransmit failed");
}
J *req = NoteNewRequest("web.post");
if (req)
{
JAddStringToObject(req, "route", "ingest");
JAddStringToObject(req, "content", "binary/octet-stream");
JAddBoolToObject(req, "binary", true);
if (!NoteRequest(req))
{
printk("Failed to submit Note to Notecard.\n");
ret = -1;
break;
}
}
it fails at NoteRequest with this at the console
[INFO] {“req”:“card.binary”,“delete”:true,“crc”:“0002:A95AF583”}
[INFO] {“max”:261110}
[INFO] {“req”:“card.binary”,“crc”:“0003:21904900”}
[INFO] {“max”:261110}
[INFO] {“req”:“card.binary.put”,“cobs”:81,“status”:“d601993fa817aaa11efaf664e82cc609”,“crc”:“0004:80F841D4”}
[INFO] {}
[INFO] {“req”:“card.binary”,“crc”:“0005:21904900”}
[INFO] {“max”:261110,“status”:“d601993fa817aaa11efaf664e82cc609”,“length”:80,“cobs”:81}
[INFO] {“req”:“web.post”,“route”:“ingest”,“content”:“binary/octet-stream”,“binary”:true,“crc”:“0006:5B6CFB51”}
[INFO] {“err”:“file is too large (103633 larger than 100000 max)”}
I am just attempting to transmit10 sample stores for now to see data routed to my edge impulse project. Why is it telling me that the binary file is too large ?
Here is some more critical code for reference
#define EI_CLASSIFIER_RAW_SAMPLE_COUNT (10)
#define EI_CLASSIFIER_RAW_SAMPLES_PER_FRAME 2
#define EI_CLASSIFIER_DSP_INPUT_FRAME_SIZE (EI_CLASSIFIER_RAW_SAMPLE_COUNT * EI_CLASSIFIER_RAW_SAMPLES_PER_FRAME)
#define EI_CLASSIFIER_INTERVAL_MS (100.0) // 1.314060446780552
#define EI_CLASSIFIER_DSP_INPUT_FRAME_SIZE_COBS (EI_CLASSIFIER_DSP_INPUT_FRAME_SIZE + 256)
...
//for loop that collects the data in buffer, collecting 2 readings per iteration, changed end condition for that
for (size_t ix = 0; ix < (EI_CLASSIFIER_DSP_INPUT_FRAME_SIZE - 1);
ix += EI_CLASSIFIER_RAW_SAMPLES_PER_FRAME)
{