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

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #3582
    Anonymous
    Inactive

    I need to send about 220 bytes of data between two Particle devices.  When I first tested ET with a structure consisting of two integers and a 20 byte char array, it worked just fine.  However, when I go about ~45 bytes in the char array, it no longer works.  I was under the impression I could send up to 250 bytes.  Am I doing something wrong and/or is there a way to work around this other than chopping up my message?

    BTW, I’m very grateful for this library!!!

    #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.

     

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.