# Device Provisioning

> How do I provision a device?

## Prerequisites

- Infuse-IoT Embedded SDK Installed (Optional)
- Infuse-IoT Python Tool Installed & Setup
- Infuse-IoT Capable hardware

## Device Provisioning

Device provisioning sets up a device with Infuse-IoT Cloud to use the corresponding services.

<tip>

Provisioning stores data in the user information section OTP (One-Time Programmable) memory.
Some microcontrollers support wiping this OTP section (e.g. nRF microcontrollers via `nrfutil device recover`).
Doing so will reset the stored data requiring the device to be reprovisioned before it will work with Infuse Cloud.

</tip>

<note>

Depending on your device (nRF/STM) the corresponding flag `--nrf` or `--stm` is required.
Examples below utilise the `--nrf` flag as reference.

</note>

<tabs>
<tabs-item icon="i-lucide-plus" label="New device">

To provision a new device, certain details are required:

- The type of board
- The Infuse-IoT Organisation it should belong to.

<tip>

Ensure the board definition exists in Infuse-IoT Cloud, and you have access to it.
Otherwise [Create the board](/docs/infuse-iot-sdk/python-tools/cloud#create-a-new-board) definition first.

</tip>

These can be provided through the command-line:

```text
infuse provision --board [board ID] --organisation [org ID] --nrf
```

or through the runtime interractive interface with

```text
infuse provision --nrf
```

and an interactive terminal interface can be used to provision the device.

</tabs-item>

<tabs-item icon="i-lucide-rotate-cw" label="Reprovision">

Reprovisioning an existing device is simple.

```text
infuse provision --nrf
```

The existing details do not need to be provided and a fetched from Infuse-IoT Cloud.

</tabs-item>
</tabs>
