Hi All,
I have two notecards, one NOTE-NBGLN and one NOTE-WBEX-500, both of which are running firmware version 8.1.4.17149. I am having trouble with this function running on Zephyr 3.7.0:
void sendResultMsg(char *cmd_id, int result)
{
char cmdid[37];
int i;
for(i = 0; i < 36; i++) //copy the command ID to the fixed length array
{
cmdid[i] = cmd_id[i];
}
cmdid[36] = 0; //null terminate the string
printk(“Command ID is %s.\n”, cmdid);
J *req = NoteNewRequest(“note.add”);
if (req)
{
JAddStringToObject(req, “file”, “result.qo”);
JAddBoolToObject(req, “sync”, true);
J *body = JCreateObject();
JAddStringToObject(body, “cmd_id”, cmdid);
JAddNumberToObject(body, “result”, result);
JAddItemToObject(req, “body”, body);
bool rsp = (NoteRequest(req));
if(rsp)
{
printk(“Result message sent.\n”);
}
else
{
printk(“Result message failed.\n”);
}
}
}
The NOTE-NBGLN works and sends the message with no problem.
The NOTE-WBEX-500 fails to send the message. I can’t find any clues as to why this happens. Any assistance would be much appreciated.
Thanks in advance,
Rob