Closed EricSTMicro closed 3 months ago
I think the root cause is that the RCP restore feature missed setting the source match feature. I have pushed a commit PR10055 to resolve this issue. Could you try this commit to check if it could resolve your issue?
Hello,
I will be able to test it tomorrow only. I will let you know the result.
BR, Eric
Hello zhanglongxia,
I confirm your commit works fine as expected. Thank you for your reactivity!
BR, Eric
Describe the bug A clear and concise description of what the bug is. When the RCP failure recovering feature (OPENTHREAD_SPINEL_CONFIG_RCP_RESTORATION_MAX_COUNT) is activated, after it resets the RCP due to a spinel/HLDC issue (bad frame received/sent) or reset (using reset button of the board), the Host (RPi) doesn't enable the src addr match table (otPlatRadioEnableSrcMatch). The Host only enables it once when the system starts, when OTBR becomes leader for example.
The result is that the RCP will set the pending bit to 1 in all of the data requests coming from the child it is associated with.
If we check at otPlatRadioEnableSrcMatch definition:
We can see that if the src addr match table is not enabled, we set the pending bit in every data request, so we are behaving normally, but the src addr match table should be enabled.
The intention of this feature is that the Host doesn't have to reset the whole Thread application, but only the RCP, so it is transparent for the other devices in the network that something wrong occured. We want to use this feature as we experience some issues using the spinel/HDLC over UART. We sometimes miss one or several bytes and it's too bad to reset the OTBR application just for that.
To Reproduce Information to reproduce the behavior, including:
Git commit id
IEEE 802.15.4 hardware platform
Build steps
Network topology
Expected behavior A clear and concise description of what you expected to happen. Host should enabled the src addr match table on the RCP, so that it doesn't set the frame pending bit to 1, and doesn't send an empty data frame after that.
Workaround A simple workaround is to call otPlatRadioEnableSrcMatch(*InstanceOT, TRUE) in RCP's FW at reset, but I'm not sure about what it implies.