I have analysed the light switch client and server example apps where the light switch is also the privisioner. They both start and initialise a bit differently although both start off by calling nrf_mesh_init(), nrf_mesh_enable(), dsm_init(), access_init().
Then they deviate.
One calls config_client_init() and the other calls config_server_init()
What if, I add to the light_switch example app a custom model which is say a proximity model in a secondary element which will obviously get its own node address.
Question. I think I can speculate that the node address will be just +1 of the address it will assign itself.
However how does it get a publish address and say the application key?
In a sense, I am asking is it 'legal' to call config_client_init() and config_server_init() in the same build?
I ask because I work for Laird who supplies module with an onboard interpreted programming language and so by definition I do not know what our customers will be doing and so have to expose as flexible event driven API as I can.
Look forward to hearing from one and all.
To complicate matters the SDK uses the file "nrf_mesh_config_app.h" which is used to specify the maximum number elements and models per element as #defines. And I cannot use that as that #define is a compile time value and by the time our customers play with our Mesh module, the firmware has already been compiled.