2022-06-20 04:20 AM
Hello ST,
Below function need for Unprovising from network ::
void Appli_Unprovision(void)
{
if(!ProxyFlag)
{
/* No GATT connection */
BLEMesh_StopAdvScan();
PalNvmErase(NVM_BASE, 0);
PalNvmErase(NVM_BASE, 0x1000);
PalNvmErase(APP_NVM_BASE, 0);
PalNvmErase(PRVN_NVM_BASE_OFFSET, 0);
TRACE_M(TF_PROVISION,"NVM erased\r\n");
BLEMesh_Unprovision();
AppliNvm_ClearModelState();
TRACE_M(TF_PROVISION,"Device is unprovisioned by application \r\n");
BLEMesh_Process();
NVIC_SystemReset();
}
}
We don't want to reset the system but without NVIC_SystemReset(); system behave will change and Transport layer become busy.
Please provide the solution for this. We have already spent too much time in STM32WB Mesh network development and our project dead line coming closer. Request to you response back as soon as possible for this issue..
Best Regards
Deepak
2022-06-23 11:13 PM
After unprovisioning, we have to initialize several part especially the GATT Database to advertise the correct MESH UUID service and characteristics. NVIC_SystemReset() is an "easy" way to be sure that the Node will start with the correct configuration.
But when the LP Node enter in Low Power mode with friend Node the only one way to communicate with this LP Node is with the friend Node. I do not really understand how you can unprovision LP Node without Friend Node?
Can you please share more details?
2022-06-24 01:50 AM
To start the correct configuration of node, what makes node to advertise the correct MESH UUID service and characteristics?
Can we reinitialize the all require function again..
Why we have two core CPU when it require complete reset. Can we reset the CPU2 (Ratio) then
/**
// * Select HSI as system clock source after Wake Up from Stop mode
// */
// LL_RCC_SetClkAfterWakeFromStop(LL_RCC_STOP_WAKEUPCLOCK_HSI);
//
// /* Initialize low power manager */
// UTIL_LPM_Init( );
// /* Initialize the CPU2 reset value before starting CPU2 with C2BOOT */
// LL_C2_PWR_SetPowerMode(LL_PWR_MODE_SHUTDOWN);
// //appe_Tl_Init(); /* Initialize all transport layers */
// TL_MM_Config_t tl_mm_config;
// SHCI_TL_HciInitConf_t SHci_Tl_Init_Conf;
// /**< Reference table initialization */
// TL_Init();
//
// /**< System channel initialization */
// UTIL_SEQ_RegTask( 1<< CFG_TASK_SYSTEM_HCI_ASYNCH_EVT_ID, UTIL_SEQ_RFU, shci_user_evt_proc );
// SHci_Tl_Init_Conf.p_cmdbuffer = (uint8_t*)&SystemCmdBuffer;
// SHci_Tl_Init_Conf.StatusNotCallBack = APPE_SysStatusNot;
// shci_init(APPE_SysUserEvtRx, (void*) &SHci_Tl_Init_Conf);
//
// /**< Memory Manager channel initialization */
// tl_mm_config.p_BleSpareEvtBuffer = BleSpareEvtBuffer;
// tl_mm_config.p_SystemSpareEvtBuffer = SystemSpareEvtBuffer;
// tl_mm_config.p_AsynchEvtPool = EvtPool;
// tl_mm_config.AsynchEvtPoolSize = POOL_SIZE;
// TL_MM_Init( &tl_mm_config );
//
// TL_Enable();
// BLEMesh_InitUnprovisionedNode(); /* Initalizes Unprovisioned node */
reinitialize Mesh network again.........
-----------------------------------------------------------------------------------------------------
Q-- I do not really understand how you can unprovision LP Node without Friend Node?
Ans- I think to process Unprovisioning a node, before that node must be Provision by Provisioner and Provisioner node itself has characteristics of Friend Node.
Best Regards
Deepak
2022-06-27 08:31 AM
Hi Deepak,
At the Provisioner side, if you want to unprovision some Node, previously provisioned by the Provisioner, you have to use the following ATEP command:
ATEP UNPV xxxx
where xxxx is the Node address set previously by the Provisioner (xxxx >= 0002)
Unfortunately with the current version of the Provisioner software you can only unprovision the last Node you have provisioned.
To have the possibility to unprovision the provisioned Node of your choice, you have to modify the following function in the Firmware\Middlewares\ST\STM32_WPAN\ble\mesh\MeshModel\Srcconfig_client.c file:
/**
* @brief GenericModelServer_GetOpcodeTableCb: This function is call-back
* from the library to send Model Opcode Table info to library
* @param MODEL_OpcodeTableParam_t: Pointer to the Generic Model opcode array
* @param length: Pointer to the Length of Generic Model opcode array
* @retval MOBLE_RESULT
*/
MOBLE_RESULT ConfigClientModel_SendMessage(MOBLE_ADDRESS dst_peer ,
MOBLEUINT16 opcode,
MOBLEUINT8 *pData,
MOBLEUINT32 dataLength)
{
MOBLE_ADDRESS peer_addr;
peer_addr = BLEMesh_GetAddress();
MOBLEUINT8 *pTargetDevKey;
MOBLE_RESULT result = MOBLE_RESULT_SUCCESS;
pTargetDevKey = GetNewProvNodeDevKey();
result = ConfigModel_SendMessage(peer_addr, dst_peer, opcode,
pData, dataLength, pTargetDevKey);
return result;
}
As following:
/**
* @brief GenericModelServer_GetOpcodeTableCb: This function is call-back
* from the library to send Model Opcode Table info to library
* @param MODEL_OpcodeTableParam_t: Pointer to the Generic Model opcode array
* @param length: Pointer to the Length of Generic Model opcode array
* @retval MOBLE_RESULT
*/
MOBLE_RESULT ConfigClientModel_SendMessage(MOBLE_ADDRESS dst_peer ,
MOBLEUINT16 opcode,
MOBLEUINT8 *pData,
MOBLEUINT32 dataLength)
{
MOBLE_ADDRESS peer_addr;
peer_addr = BLEMesh_GetAddress();
MOBLEUINT8 *pTargetDevKey;
MOBLE_RESULT result = MOBLE_RESULT_SUCCESS;
pTargetDevKey = (MOBLEUINT8 *)AppliPrvnNvm_GetNodeDevKey(dst_peer);
result = ConfigModel_SendMessage(peer_addr, dst_peer, opcode,
pData, dataLength, pTargetDevKey);
return result;
}
And add the following include at the beginning of this file:
#include "appli_nvm.h"
These modifications will be part of the next delivery (1.15.0)
To unprovision the Provisioner, the following ATUT command as to be used:
ATUT SET-02
I hope this will help you.
Best regards.
2022-06-27 09:53 PM
Hello EMECH,
The above changes respond back on terminal:
-------------------------------------------------------------------------------
ConfigClientNodeReset- Config Client Node Reset message
dst_peer= ,peer_add=...........................
------------------------------------------------------------------
if we do not reset the LPN board (Dongle) and change the Provisioner (another STM32WB Nucleo Board hardware. which create new network Appli_StartProvisionerMode(1);).
During Config Client Process it will get stuck below point..
Once again if we reset the same LPN node (hard reset) (dongle) or NVIC_SystemReset();.
Scan again on terminal and restart the provisioning process. it is compiling the process. as shown below trace:
Appli_ConfigClient_ConfigureNode - **Node is configured**
my question is why LPN node require reset?
we don't want reset in security application...
I hope you have tested before releasing new version.
Best Regards
Deepak
2022-06-27 11:37 PM
Hello Deepak,
Normally you do not have to reset any Node for unprovisioning (by hard reset or NVIC_SystemReset()).
What is the version of the STM32Cube_FW_WB used ?
Actually NVIC_SystemReset() is only called when you unprovision manually a node (RESET and SW1 button actions) and when you unprovision the Provisioner with the ATUT SET-02 command from Provisioner terminal.
In both case this NVIC_SystemReset() calls can be removed.
Best regards.
2022-06-28 12:55 AM
Hi EMECH,
Really Really thanks for your quick response..
Find the STM32Cube_FW_WB details below:
BLE-Mesh Lighting Demo v1.13.002
BLE-Mesh Library v01.13.002
BLE Stack v1.13.0 Branch=0 Type=5
FUS v1.2.0
Best Regards
Deepak Aagri
2022-06-28 01:08 AM
Deepak,
OK, let me check the differences you can have between your version and the last 1.14.0 not yet available on st.com.
I will get back to you with probably some files to update.
Best regards.
2022-06-28 06:27 AM
2022-06-30 02:15 AM
Hello EMECH,
After following above modification. Still we are facing same problem from second STM32WB Nucleo board..
------------------------------------------------------------------------------------------------------
First STM32WB Nucleo Board Response:..
32293 ConfigClient_NodeReset - Config Client Node Reset message
Request to Unprovision:2
32329 ConfigClientModel_ProcessMessageCb - dst_peer = [0001] , peer_add = [0002], opcode= [804A] ,response= [00]
32330 ConfigClient_NodeResetStatus - ConfigClient_NodeResetStatus Received
LPN Board Response this:
Device is unprovisioned by provisioner
------------------------------------------------------------------------------------------------------------
if we reset LPN (Dongle) Board then restart provisioning process from second STM32 Nucleo Board again it will config Client App Key Add properly..
Best Regards
Deepak Aagri