Closed agalliazzo closed 7 months ago
ST Internal Reference: 172491
Hello @agalliazzo,
Excuse this delayed reply. Our development teams are already having a look to what you reported SRP is normally working fine but there are two important comments when looking at the code:
NVM is saved before doing all the SRP stuff, so the SRP key cannot be stored. Please save NVM AFTER SRP has been registered successfully, you should be able to get the key back when restoring data from NVM.
OT_NvmRamBuffer should absolutely NOT be placed in MB_MEM2, I don't know where you find the information that tell to do so but please tell me, so we can remove this wrong information. You mentionned Thread_SED_Coap_FreeRTOS\Core\Inc\hw_c but it doesn't exist.
Replace this:
PLACE_IN_SECTION("MB_MEM2") uint32_t OT_NvmRamBuffer[CFG_THREAD_NVM_RAM_SIZE_IN_BYTES / 4];
by this:
uint32_t OT_NvmRamBuffer[CFG_THREAD_NVM_RAM_SIZE_IN_BYTES / 4];
If you save just data in NVM just after being connected to the leader which is SRP server, but before SRP registration, it will fail on reboot and I get error 28 (OT_ERROR_RESPONSE_TIMEOUT). This is due to the key not being the good one, as it wasn't saved in NVM.
If you save after SRP registration, it works fine every time. you can sometimes get the error 29 (OT_ERROR_DUPLICATED) as SRP registration already exist on server's side but it immediately gives a retry knowing that and is successful.
which error you gets?
With Regards, Rania
Hello,
Any feedback please!!
Hello @agalliazzo,
Please allow me to close this issue as no activity. You may reopen it at any time if you have any details to share with us in order to help you to solve the issue. Thank you for your comprehension.
With regards
Describe the set-up
Actual network configuration
Describe the bug SRP client still not working also if #78 is marked as resolved. In particular, I can register the first time, then I try to save NVM data (and it works, I check if saved data is in the FLASH using STMCubeProgrammer and the data match) but at the next power-on SRP fail to register due to loosing the key as suggested in this old thread
How To Reproduce
Steps in code
My code: OHCS_Protocol.h
OHCS_Protocol.c
app_thread.c
app_entry.c - Relevant part only