Home Forums EasyTransfer Library Support Forum Hmmm…max length of struct??? Reply To: Hmmm…max length of struct???

#3583
Anonymous
Inactive

So…I used a variant of this library (Serial) on two Particle Photons — kinda like Arduinos with WiFi.  I had trouble whenever I went over about 45 bytes in length of the struct.  After hours of frustrating trial and error, I finally stumbled across the fact that the serial buffer is only 64 bytes long.  I believe this is the same case on the Arduino.  I looked for ways to increase the buffer size, but without any success.  Then, I had a bit of an epiphany and decided to drop the baud rate to 1200 baud and…voilà, the darn thing worked with a struct up to about 200 bytes in length.  My particular need is to send a char[200] array and I’m now successfully doing that.  I also tried the same at 4800 baud without success, but I did have success at 2400 baud.

I don’t know if this solution is good for all, but it addresses my need.