I was sending an api request throuhg the photo particle.io device. I have found out that the SPI communication is push into the mesh via on the SERIAL_CMD_OPCODE_VALUE_SET event using the rbc_mesh_event_push(&app_evt);
The app_evt app gets the buffer address of the serial_cmd data:
As the variable serial_cmd is locally defined when the event is popped out using rbc_mesh_event_get, the serial_cmd->params.value_set.value is already corrupted.
As a quick workaround I have defined serial_cmd as a static variable at the top of mesh_aci.c file. It may be a better solution
I was sending an api request throuhg the photo particle.io device. I have found out that the SPI communication is push into the mesh via on the SERIAL_CMD_OPCODE_VALUE_SET event using the rbc_mesh_event_push(&app_evt);
The app_evt app gets the buffer address of the serial_cmd data:
app_evt.data = serial_cmd->params.value_set.value;
As the variable serial_cmd is locally defined when the event is popped out using rbc_mesh_event_get, the serial_cmd->params.value_set.value is already corrupted.
As a quick workaround I have defined serial_cmd as a static variable at the top of mesh_aci.c file. It may be a better solution