I just came back home, jumped on my arduino, edited the send_command_to_serial(char command[50]) function and replaced
strcpy(synchronized_buffer_send.buffer,command);
by
- ```
memcpy(synchronized_buffer_send.buffer,command,50);
And it worked ! ! ! Thank you so much for your help
! ! ! !
Jimmus:
Yeah, strcpy is not the right function to use here. It will stop at the first 0 byte.Really, though, doesn't EasyTransfer do all this for you? Wouldn't it be easier and way more efficient to just use your structures directly?
This is what i tried at first. But for a reason I may not fully understand yet, I only got the Easytransfer library to work with one send structure and one receive structure per device.
I tried using multiple structure by assigning one send and one receive on Serial1, another 2 structs on Serial2 but the result was a complete mess with the value of one struct overwritting the value of others on the received buffer... I tried with small structure of less than 20 bytes... I also tried 125 bytes structure (containing all structure) but the error rate was too high with only 1 successful transfer every few minutes ...
I used a simplified sketch for test purpose and only managed to get it work with 2 structs of less than 50 bytes for a 100% success rate other 8 hours of test. This is why I tried to "workaround" the problem. And even now, I don't know if the limits comes from the library or because i'm not using it correctly, so I'll make sure to figure that out later ![]()
Once again thanks for you help guys !