Skip to main content
Associate III
January 18, 2024
Solved

STM32WB55 USB Dongle MTD Not Receive CoAP Message

Hi,

I'm using a STM32WB55RG Nucleo and STM32WB55 USB Dongle. I programmed the nucleo as FTD and write 2 sources and programmed the usb as MTD and write 2 sources that exactly the same with FTD. I'm trying to send coap messages from FTD to MTD so this is my message flow Nucleo(as leader)  --> USB (as end device). As I said I write my sources properly and test my code as both of them(Nucleo and USB) are FTD. It works but when I programmed the USB dongle as MTD, the usb dongle does not get the coap messages. I'm sending my messages as Multicast from FTD. How can I solve this problem?

Best regards.

This topic has been closed for replies.
Mickey_PiperBest answer
Associate III
January 18, 2024

I found the solution. The problem occurs the sleepy end device mode configuration. In app_thread.c there is a function named "APP_THREAD_DeviceConfig". At the beginning of this function, you can find the configuration:

 otLinkModeConfig OT_LinkMode = {0};
/* Set the sleepy end device mode */
 OT_LinkMode.mRxOnWhenIdle = 1;
 OT_LinkMode.mDeviceType = 0;
 OT_LinkMode.mNetworkData = 1U;

If you change the "OT_LinkMode.mRxOnWhenIdle" value 0 to 1, MTD device will get the coap message.

Best regards.

1 reply

Mickey_PiperAuthorBest answer
Associate III
January 18, 2024

I found the solution. The problem occurs the sleepy end device mode configuration. In app_thread.c there is a function named "APP_THREAD_DeviceConfig". At the beginning of this function, you can find the configuration:

 otLinkModeConfig OT_LinkMode = {0};
/* Set the sleepy end device mode */
 OT_LinkMode.mRxOnWhenIdle = 1;
 OT_LinkMode.mDeviceType = 0;
 OT_LinkMode.mNetworkData = 1U;

If you change the "OT_LinkMode.mRxOnWhenIdle" value 0 to 1, MTD device will get the coap message.

Best regards.