ok, thank you.

I have used the strncpy function and it is working now.

I gave more space to the msg too becuase I was losing datas sometimes becuase the string it was bigger than the msg.

Regards.