Skip to content

[TCP Feature] Issue using OtTcpSendByExtension #8903

Closed Answered by abtink
estelleOl asked this question in Q&A
Discussion options

You must be logged in to vote

Check the documentation of otTcpSendByExtension().

Here are some suggestions:

  • Make sure you have a single array buffer that can fit both messages , i.e.,can contain "Board 2 | Adding message by extnsion".
    • Make sure both array the otLinkedBuffer persist (should not be be local stack variables).
  • Use this array when you prepare the otLinkedBuffer and copy the first message into buffer.
  • Call otTcpSendByReference() which takes ownership of the otLinkBuffer (so we should not change it anymore).
  • To send next message, you can write second message into the array buffer at the end (after the last message).
    • Important: Do not change the otLinkBuffer's mLength field (it is owned by TCP stack now).

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@estelleOl
Comment options

Answer selected by estelleOl
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants