2024-02-06 05:14 AM - edited 2024-02-06 05:36 AM
Hi,
My thread starts working with the features I mentioned below:
panID = 0x2222U;
channelNB = 12U;
networkKey = (otNetworkKey) {
.m8 = {0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77,
0x88, 0x99, 0xAA, 0xBB, 0xCC, 0xDD, 0xEE, 0xFF}
};
I want to change this config in mcu working. How can I do this? I changed my values and I tried the code below:
otError error;
error = otLinkSetChannel(NULL, channelNB);
if (error != OT_ERROR_NONE)
{
return AKUS_ERROR;
}
error = otLinkSetPanId(NULL, panID);
if (error != OT_ERROR_NONE)
{
return AKUS_ERROR;
}
otNetworkKey *ptr_key = (otNetworkKey*)&(networkKey);
error = otThreadSetNetworkKey(NULL, ptr_key);
if (error != OT_ERROR_NONE)
{
return AKUS_ERROR;
}
but my thread app fails when I use this codes.
Best regards.
Solved! Go to Solution.
2024-02-13 11:53 PM
Hi @Ouadi ,
Thank you for your assistance for all. I will try and find differences. Thank you again.
Best regards.