Skip to content

[Txt Data] Try to read txtData description of a server service #8250

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

You must be logged in to vote

The length of the TXT entry value also needs to be set.

entry->mTxtEntry.mValueLength

The SRP Client CLI provides an example of configuring the TXT record:

if (!aArgs[6].IsEmpty() && (aArgs[6] != "-"))
{
uint8_t *txtBuffer;
txtBuffer = otSrpClientBuffersGetServiceEntryTxtBuffer(entry, &size);
entry->mTxtEntry.mValueLength = size;
SuccessOrExit(error = aArgs[6].ParseAsHexString(entry->mTxtEntry.mValueLength, txtBuffer));
}

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@estelleOl
Comment options

@abtink
Comment options

@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
3 participants