cancel
Showing results for 
Search instead for 
Did you mean: 

STM32WB55 THREAD Change Thread Config

Mickey_Piper
Associate III

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.

10 REPLIES 10

Hi @Ouadi ,

Thank you for your assistance for all. I will try and find differences. Thank you again.

Best regards.