/* Server wants to send the data back. We just store them in between and pass them to the client.  */
int server_raw_cb(const int iface, const struct modbus_adu *adu, void *user_data)
/* Server wants to send the data back. We just store them in between and pass them to the client.  */
int server_raw_cb(const int iface, const struct modbus_adu *adu, void *user_data)
{
	LOG_DBG("Server raw callback from interface %d", iface);
	tmp_adu.trans_id = adu->trans_id;
	tmp_adu.proto_id = adu->proto_id;
	tmp_adu.length = adu->length;
	tmp_adu.unit_id = adu->unit_id;
	tmp_adu.fc = adu->fc;
	memcpy(tmp_adu.data, adu->data,
	       MIN(adu->length, sizeof(tmp_adu.data)));
	LOG_HEXDUMP_DBG(tmp_adu.data, tmp_adu.length, "resp");
	k_sem_give(&received);
	return 0;
}