Skip to main content

otThreadSetJoinerAdvertisement

Function otThreadSetJoinerAdvertisement 

Source
pub unsafe extern "C" fn otThreadSetJoinerAdvertisement(
    aInstance: *mut otInstance,
    aOui: u32,
    aAdvData: *const u8,
    aAdvDataLength: u8,
) -> otError
Expand description

Sets the Thread Joiner Advertisement used when discovering a Thread network.

Requires OPENTHREAD_CONFIG_JOINER_ADV_EXPERIMENTAL_ENABLE.

@note This is an experimental feature and is not part of the Thread specification. OpenThread’s implementation is partial: it provides the mechanism for a Joiner to include a new Joiner Adv TLV in its emitted Discovery Scan Request messages, but does not include the corresponding logic for the receiver of Scan Request to read or parse this TLV.

A Joiner can use this to advertise its own application-specific information (such as Vendor ID, Product ID, Discriminator, etc.) using a newly proposed Joiner Advertisement TLV (OT_MESHCOP_TLV_JOINERADVERTISEMENT). This TLV is appended as a sub-TLV within the MLE Discovery TLV in an MLE Discovery Scan Request message.

@param[in] aInstance A pointer to an OpenThread instance. @param[in] aOui The Vendor IEEE OUI value that will be included in the Joiner Advertisement. Only the least significant 3 bytes will be used, and the most significant byte will be ignored. @param[in] aAdvData A pointer to the AdvData that will be included in the Joiner Advertisement. @param[in] aAdvDataLength The length of AdvData in bytes. Must not exceed OT_JOINER_ADVDATA_MAX_LENGTH.

@retval OT_ERROR_NONE Successfully set Joiner Advertisement. @retval OT_ERROR_INVALID_ARGS Invalid AdvData.