Author Topic: sendwithretry buffer size  (Read 2003 times)

therrien

  • NewMember
  • *
  • Posts: 2
sendwithretry buffer size
« on: May 12, 2019, 09:02:14 AM »
What is the right value for the buffer size when I send "ACK_TEST" with sendwithretry.  8 ou 9.
9 to include '\0'   

TomWS

  • Hero Member
  • *****
  • Posts: 1930
Re: sendwithretry buffer size
« Reply #1 on: May 12, 2019, 10:56:58 AM »
What is the right value for the buffer size when I send "ACK_TEST" with sendwithretry.  8 ou 9.
9 to include '\0'   
It depends on how you're going to use it at the receiving end.  If ALL you want to do is send the printable characters, the correct length would be 8.  However, if you want to send a null terminated string, length should = 9 so the termination byte will be included in the packet.

sendWithRetry doesn't care about the content, it only wants to know how many bytes to send over the air...

Tom

therrien

  • NewMember
  • *
  • Posts: 2
Re: sendwithretry buffer size
« Reply #2 on: May 12, 2019, 07:07:43 PM »
Thanks for waking me up.