nrf connect SDK v2.1.1 undefined reference to otCommissionerStart

Hello,

i tried to implement a commissioner over the API, but i get the error undefined reference to `otCommissionerStart'. In the prj.conf i added:

# Enable COMMISSIONER
CONFIG_OPENTHREAD_COMMISSIONER=y


I also added the header file:

#include <openthread/commissioner.h>

But when i call the function otCommissionerStart i get the error undefined reference to `otCommissionerStart':

void startCommissioner(void){
    otError       error = OT_ERROR_NONE;
    otInstance  * myInstance = openthread_get_default_instance();
    error = otCommissionerStart(myInstance,  NULL, NULL, NULL);
    if (error != OT_ERROR_NONE) {
        printk("Failed to start commissioner: %d\n", error);
    }else{
        printk("Commissioner started\n");
    }
}



What else did i forget?


Regards
Markus

commissioner_minimal.zip

Related