I follow the instructions in BLE Mesh User guide, however I cannot get it working.
I am able to send command ''light on" and "light on 1" with commissioner, ( verified on sniffer that it is indeed send out )
However, the receiving side (BD_ADDR_ID = 1) didn't receive it. ( Set a break point at MeshLightServerCallback, and never triggered.)
One weird thing is that in function MeshGenericCallback, pEvent->eventData.initComplete.deviceIsCommissioned is TRUE even for the very first time, so MeshNode_Commission(&gRawCommData); is never executed. So I force the function to execute MeshNode_Commission at first entrance, but nothing happens, mesh device still cannot receive.
static meshResult_t MeshGenericCallback
/* This will trigger this callback again, but "deviceIsCommissioned" will be TRUE. */
/* Ignore */
I turned off NVM (Non-Volatile Memory, aka Flash) and solved the problem.
NVM macro is defined in ApplMain.h :
#define gAppUseNvm_d (FALSE) // Originally (TRUE)
If NVM is necessary, an alternative is to put App_NvmErase() right after NV_Init();
/* Initialize NV module */