I have to send 6 bytes of sensor data from mesh server to mesh client. Is it possible to use simple_on/off model or have to create new model. Any sensor model example is available in mesh?
I have to send 6 bytes of sensor data from mesh server to mesh client. Is it possible to use simple_on/off model or have to create new model. Any sensor model example is available in mesh?
Hi,
Have a look at this case.
i saw it, but unable to send data from access_model_publish() directly
Do you get any errors when trying to send data with access_model_publish()?
yes if i send 6 bytes of data from server, i receive as different data as 16bit data
uint64_t val[6] ={0xFE, 0xEA, 0x10, 0x06, 0x6D, 0x00};
uint64_t simple_sensor_server_status_publish(simple_sensor_server_t * p_server, uint64_t * value)
{
simple_sensor_msg_status_t status;
status.rawval = *value;
access_message_tx_t msg;
msg.opcode.opcode = SIMPLE_SENSOR_OPCODE_STATUS;
msg.opcode.company_id = SIMPLE_SENSOR_COMPANY_ID;
msg.p_buffer = (const uint8_t *)&status;
msg.length = sizeof(status);
msg.force_segmented = false;
msg.transmic_size = NRF_MESH_TRANSMIC_SIZE_DEFAULT;
msg.access_token = nrf_mesh_unique_token_get();
return access_model_publish(p_server->model_handle, &msg);
}
can you please tell me how to send 6 bytes of data from server to client from the snippet i have posted. Please help me i'm new to mesh