How do you parse out the joiner information?

the code

 void ot_start_joiner()
 {
         LOG_INF("Starting joiner");
 
         otInstance *instance = openthread_get_default_instance();
         struct openthread_context *context = openthread_get_default_context();
         const uint8_t adv_data[] = {0x7E,0x01,0x02,0x03};
         openthread_api_mutex_lock(context);

         otThreadSetJoinerAdvertisement(instance, 0x123456, adv_data, sizeof(adv_data));

         otIp6SetEnabled(instance, true);
         otJoinerStart(instance, OT_JOINER_PSKD, NULL,
                                 "Zephyr", "Zephyr",
                                 KERNEL_VERSION_STRING, NULL,
                                 &ot_joiner_start_handler, NULL);
 
         openthread_api_mutex_unlock(context);
 }

I add the api otThreadSetJoinerAdvertisement in the joiner. and How do I parse out "const uint8_t adv_data[] = {0x7E,0x01,0x02,0x03};" in commissioner?

Parents Reply
  • Hi liisa,

    My apology for the late reply. I have been out of office.

    Our team also confirmed that there isn't any built-in API to get the advertiser data out. It seems to be a feature that was not completed.

    If you want to use it, you will need to extend the handling of MLE Discovery Request messages at the MLE layer, not at the commissioner.

    As it is, I think the maintainers in the OpenThread GitHub repository would have some insight to share on whether this feature should be used.

    May I ask what your use case for this feature is?

Children
No Data
Related