[![](https://openthread.io/static/images/icon-github.svg)View source on GitHub](https://github.com/openthread/ot-docs/tree/main/site/en/guides/border-router/external-commissioning/prepare.md)

In this guide, learn how to use OTBR Web GUI to form the Thread Network.
Then, choose a [supported platform](https://openthread.io/platforms) and
build a Joiner device.

To set up a Border Router, refer to [OpenThread Border Router Build and Configuration](https://openthread.io/guides/border-router/build.md).

> [!IMPORTANT]
> **Key Point:** Thread network management can also be done with the [Thread Network SDK for Android](https://developers.home.google.com/thread) and [iOS Thread APIs](https://developer.apple.com/documentation/threadnetwork/).

## Form the Thread network

1. Initialize a new operational dataset:

       sudo ot-ctl dataset init new
       Done

   <br />

2. Set the network credentials:

       sudo ot-ctl dataset panid 0xdead
       Done

   <br />

       sudo ot-ctl dataset extpanid dead1111dead2222
       Done

       sudo ot-ctl dataset networkname OpenThreadGuide
       Done

       sudo ot-ctl dataset networkkey 11112233445566778899DEAD1111DEAD
       Done

3. Generate a hex-encoded PSKc by using a Passphrase (Commissioner Credential),
   the Extended PAN ID, and the Network Name with the PSKc Generator tool on
   the OTBR. Make sure to use the same Extended PAN ID and Network Name that
   was used in the operational dataset:

       cd ~/ot-br-posix/build/otbr/tools
       ./pskc j01Nme DEAD1111DEAD2222 OpenThreadGuide
       198886f519a8fd7c981fee95d72f4ba7

   <br />

4. Set the PSKc:

       sudo ot-ctl dataset pskc 198886f519a8fd7c981fee95d72f4ba7
       Done

   <br />

5. Commit the active dataset, set the on-mesh prefix, and form the Thread
   network:

       sudo ot-ctl dataset commit active
       Done

   <br />

       sudo ot-ctl prefix add fd11:22::/64 pasor
       Done

       sudo ot-ctl ifconfig up
       Done

       sudo ot-ctl thread start
       Done

       sudo ot-ctl netdata register
       Done

6. Confirm the network configuration:

       sudo ot-ctl state
       leader
       Done

   <br />

       sudo ot-ctl pskc
       198886f519a8fd7c981fee95d72f4ba7
       Done

## Prepare the Joiner device

Build and flash a device with OpenThread, to function as the Joiner. For an
overview of building OpenThread, see the [Building Guide](https://openthread.io/guides/build/index.md).

Use the `-DOT_JOINER=ON` build option to enable the Joiner role.

Specific instructions on building supported platforms with GNU Autotools can be
found in each example's
[platform folder](https://github.com/openthread/openthread/tree/master/examples/platforms).

When commissioning a Joiner, it's important to understand the following terms
and concepts:

- **Joining Device Credential** : You'll need to provide a Passphrase to
  commission a device, for example `J01NU5`. This Passphrase is separate
  from the Commissioner Credential you created when forming your Thread
  network, and has different requirements:

  - Must be a string of all uppercase alphanumeric characters (0-9 and A-Y, excluding I, O, Q, and Z for readability), with a length between 6 and 32 characters.

  The Joining Device Credential might also be referred to as Join Passphrase,
  Joiner Password, or PSKd. This Passphrase is used to authenticate a device
  during Thread Commissioning. You can also use it with a device's EUI64
  value to generate a unique QR Code.
- **PSKd**: Pre-Shared Key for the Joiner. The PSKd is the Joining Device
  Credential when it's specifically encoded in binary form.

- **EUI-64** : 64-bit Extended Unique Identifier, for example
  `0000b57fffe15d68`. This is a Joiner device's factory-assigned IEEE EUI-64,
  used to generate a QR code and uniquely identify a device.

Once the Joiner device is ready, obtain its factory-assigned IEEE EUI-64. Use
the `eui64` command in the OpenThread CLI:

    eui64
    0000b57fffe15d68
    Done

## Select Commissioner type

The [OpenThread Commissioner](https://openthread.io/guides/commissioner) provides
the [OT Commissioner CLI](https://openthread.io/guides/border-router/external-commissioning/cli) to externally commission a device.

The OT Commissioner CLI runs on the same host machine as OTBR. In the next
guide, learn how to use the [OT Commissioner CLI](https://openthread.io/guides/border-router/external-commissioning/cli) to connect
to a border router and commission a new device.