nRF5 SDK for Thread and Zigbee v1.0.0
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages
Joiner

This module includes functions for the Thread Joiner role. More...

Typedefs

typedef enum otJoinerState otJoinerState
 
typedef void(OTCALLotJoinerCallback )(otError aError, void *aContext)
 

Enumerations

enum  otJoinerState {
  OT_JOINER_STATE_IDLE = 0, OT_JOINER_STATE_DISCOVER = 1, OT_JOINER_STATE_CONNECT = 2, OT_JOINER_STATE_CONNECTED = 3,
  OT_JOINER_STATE_ENTRUST = 4, OT_JOINER_STATE_JOINED = 5
}
 

Functions

OTAPI otError OTCALL otJoinerStart (otInstance *aInstance, const char *aPSKd, const char *aProvisioningUrl, const char *aVendorName, const char *aVendorModel, const char *aVendorSwVersion, const char *aVendorData, otJoinerCallback aCallback, void *aContext)
 
OTAPI otError OTCALL otJoinerStop (otInstance *aInstance)
 
OTAPI otJoinerState OTCALL otJoinerGetState (otInstance *aInstance)
 
OTAPI otError OTCALL otJoinerGetId (otInstance *aInstance, otExtAddress *aJoinerId)
 

Detailed Description

This module includes functions for the Thread Joiner role.

Typedef Documentation

typedef void(OTCALL * otJoinerCallback)(otError aError, void *aContext)

This function pointer is called to notify the completion of a join operation.

Parameters
[in]aErrorOT_ERROR_NONE if the join process succeeded. OT_ERROR_SECURITY if the join process failed due to security credentials. OT_ERROR_NOT_FOUND if no joinable network was discovered. OT_ERROR_RESPONSE_TIMEOUT if a response timed out.
[in]aContextA pointer to application-specific context.

This enumeration defines the Joiner State.

Enumeration Type Documentation

This enumeration defines the Joiner State.

Function Documentation

OTAPI otError OTCALL otJoinerGetId ( otInstance aInstance,
otExtAddress aJoinerId 
)

Get the Joiner ID.

Joiner ID is the first 64 bits of the result of computing SHA-256 over factory-assigned IEEE EUI-64, which is used as IEEE 802.15.4 Extended Address during commissioning process.

Parameters
[in]aInstanceA pointer to the OpenThread instance.
[out]aJoinerIdA pointer to where the Joiner ID is placed.
Return values
OT_ERROR_NONESuccessfully retrieved the Joiner ID.
OT_ERROR_DISABLED_FEATUREThe Joiner feature is not enabled in this build.
OTAPI otJoinerState OTCALL otJoinerGetState ( otInstance aInstance)

This function returns the Joiner State.

Parameters
[in]aInstanceA pointer to an OpenThread instance.
Return values
OT_JOINER_STATE_IDLE
OT_JOINER_STATE_DISCOVER
OT_JOINER_STATE_CONNECT
OT_JOINER_STATE_CONNECTED
OT_JOINER_STATE_ENTRUST
OT_JOINER_STATE_JOINED
OTAPI otError OTCALL otJoinerStart ( otInstance aInstance,
const char *  aPSKd,
const char *  aProvisioningUrl,
const char *  aVendorName,
const char *  aVendorModel,
const char *  aVendorSwVersion,
const char *  aVendorData,
otJoinerCallback  aCallback,
void *  aContext 
)

This function enables the Thread Joiner role.

Parameters
[in]aInstanceA pointer to an OpenThread instance.
[in]aPSKdA pointer to the PSKd.
[in]aProvisioningUrlA pointer to the Provisioning URL (may be NULL).
[in]aVendorNameA pointer to the Vendor Name (must be static).
[in]aVendorModelA pointer to the Vendor Model (must be static).
[in]aVendorSwVersionA pointer to the Vendor SW Version (must be static).
[in]aVendorDataA pointer to the Vendor Data (must be static).
[in]aCallbackA pointer to a function that is called when the join operation completes.
[in]aContextA pointer to application-specific context.
Return values
OT_ERROR_NONESuccessfully started the Commissioner role.
OT_ERROR_INVALID_ARGSaPSKd or aProvisioningUrl is invalid.
OT_ERROR_DISABLED_FEATUREThe Joiner feature is not enabled in this build.
OTAPI otError OTCALL otJoinerStop ( otInstance aInstance)

This function disables the Thread Joiner role.

Parameters
[in]aInstanceA pointer to an OpenThread instance.
Return values
OT_ERROR_NONESuccessfully disabled the Joiner role.
OT_ERROR_DISABLED_FEATUREThe Joiner feature is not enabled in this build.