First of all, I know the difference between the two roles, and I have also read through docs.
My question is actually limited to the current nordic mesh implementation.
My application needs to act as provisioner at times, and provisionee some other times. I managed to compile a code that seems to take care of it, based on the light switch example, but I noticed that when I start the provisionee role, being selected at the very beginning of the application, I get a NRF_ERROR_NOT_SUPPORTED upon calling prov_provisionee_init(). After reading again the nordic mesh docs, I found this:
The provisioning API provides functions for setting up a provisioner and functions for setting up a provisionee. You can exclude code for one of the roles if your device is not using it. To do so, link in only the code for the role that you want the device to support.
If a function is called that is not supported, because the functionality for that role has not been compiled into the library, an
NRF_ERROR_NOT_SUPPORTED
error is returned.
Does this mean that I can't include code for both roles? If not, how do I deal with this?
Thanks