# Setup and Flash a gateway

> How do I flash a USB gateway

## Prerequisites

- Infuse-IoT Embedded SDK Installed
- Infuse-IoT Python Tool Installed & Setup
- Provisioned Infuse-IoT Capable hardware:

  - Serial ePacket packet
  - Bluetooth Support

<tabs sync="gatewayBoardTab">
<tabs-item label="Default">

This guide is based on the `nrf54l15dk/nrf54l15/cpuapp` or you can try with Custom Board.

</tabs-item>

<tabs-item label="Custom Board">

Alternately enter a custom board to update commands below

<config-input default="nrf54l15dk/nrf54l15/cpuapp" label="Gateway Board name" name="gatewayBoard" type="text">



</config-input>
</tabs-item>
</tabs>

<steps level="2">

## Open the Infuse-IoT Embedded SDK workspace

Open a terminal and navigate to your Infuse-IoT SDK workspace.

## Build the Gateway Firmware

Build the `gateway_usb` firmware with.

<tabs sync="gatewayBoardTab">
<tabs-item label="Default">

```bash
west build -b nrf54l15dk/nrf54l15/cpuapp infuse-sdk/apps/gateway_usb
```

</tabs-item>

<tabs-item label="Custom Board">
<dynamic-block language="bash" template="west build -b {gatewayBoard} infuse-sdk/apps/gateway_usb
">



</dynamic-block>
</tabs-item>
</tabs>

<tip>

By default, the app utilises the default network which works for most things.
However, certain functionality (like `infuse ota-upgrade --single`)
will require the gateway to utilise the same [network](configure-network) as deployed devices.

</tip>

## Flash the Gateway Firmware.

Connect your programmer and flash the Gateway Firmware with the following command (substituting your board name)

<tabs sync="gatewayBoardTab">
<tabs-item label="Default">

```bash
west flash -d build/nrf54l15dk/nrf54l15/cpuapp/gateway_usb
```

</tabs-item>

<tabs-item label="Custom Board">
<dynamic-block language="bash" template="west flash -d build/{gatewayBoard}/gateway_usb
">



</dynamic-block>
</tabs-item>
</tabs>

## Connect to the Gateway to check it worked.

Follow the steps in [How to use `infuse gateway` to connect to a device](connect-gateway) to check
the gateway is working.

</steps>
