# Gateways

## About

In this tutorial, we are showing you how you can add any LoRaWAN Gateway to Datacake

## TL;DR

If you don't have the time to read through this documentation, we have prepared a short intro video for you:

{% embed url="<https://www.loom.com/share/a31c5febd2464ffe95bacb02d2ec394c>" %}

## Requirements

{% hint style="warning" %}
Please make sure your LoRaWAN Gateway meets the following requirements.
{% endhint %}

Before proceeding with adding a LoRaWAN gateway to Datacake, it's essential to ensure that your gateway meets the following requirements:

* **Gateway Compatibility:** The gateway must be compatible with LoRaWAN protocols and capable of being configured to communicate with an external LoRaWAN Network Server (LNS).
* **URL Configuration:** You must configure the gateway to use Datacake's LNS URL. This is a critical step, as the gateway needs to point to Datacake's LNS to relay device data effectively.
* **Resetting Gateway (If Necessary):** If your gateway is currently connected to a third-party LNS, you'll need to reset it before configuring it with Datacake's LNS URL. This ensures that the gateway is not simultaneously trying to connect to multiple network servers, which could lead to connectivity issues.

## How to Add LoRaWAN Gateways to Datacake

In this comprehensive guide, we'll walk you through the process of adding your LoRaWAN gateways directly to DataCake, enhancing your workspace's capabilities. This tutorial is designed to make the addition of gateways as straightforward as possible, allowing you to efficiently manage your LoRaWAN devices.

### Gateway Tutorials

We have provided step-by-step tutorials for common gateways. You can access them by clicking on the link in the following section.

* [#tutorials](#tutorials "mention")

### Step 1: Accessing the Gateway Section

* **Navigate to the Sidebar:** Within your Datacake workspace, locate the sidebar. Here, you'll find a new section labeled "Gateways" situated beneath the devices section.
* **Enter the Gateway List View:** Click on the "Gateways" section. This action will take you to the gateway list view, which operates similarly to the device management section.

<figure><img src="/files/poYVZmzaGnuqJstCfksa" alt=""><figcaption></figcaption></figure>

### Step 2: Adding a New Gateway

* **Initiate Gateway Addition:** In the list view, look for and select the "Add Gateway" option. This will open a modal where you're prompted to provide specific details about your new gateway.

<figure><img src="/files/rgQk9ZBROB24CoqFBKAz" alt=""><figcaption></figcaption></figure>

* **Provide Gateway Details:**
  1. **Name of Your Gateway:** Enter a descriptive name for your gateway, such as "My First Gateway."
  2. **Gateway EUI:** This unique identifier is usually found on a sticker on the back of your gateway or within its configuration interface. Enter the EUI as it is.
  3. **Select Frequency:** Choose the appropriate frequency based on your location and the gateway's specifications. Initially, Datacake supports Europe and the United States frequencies, with plans to expand this selection.

<figure><img src="/files/tNDAIu642P5ez2kBSTCU" alt=""><figcaption></figcaption></figure>

### Step 3: Configuring and Understanding Gateway Connectivity

* **Gateway Creation:** After selecting your frequency, click on "Create Gateway." Your gateway will be added to the list, and a new modal will appear providing further instructions.
* **Connectivity Update:** A brief delay may occur before your gateway's online status updates due to status checks from the LoRaWAN network server occurring every minute. This means real-time status updates are not immediately available.

<figure><img src="/files/XMClwpvC5evRCakNzQaz" alt=""><figcaption></figcaption></figure>

### Step 4: Gateway Server Configuration

* **Copy Configuration Details:** From the modal, you'll receive the necessary configuration details, including the protocol (UDP packet forwarder initially), the gateway server address (e.g., eu1.datacake-lns.com for Europe), and the port number (1700).
* **Apply Configuration to Gateway:** Use these details to configure your gateway, ensuring it points to the correct Datacake server address and port, based on the selected frequency.

### Step 5: Viewing and Setting Gateway Location

* **Access Gateway Dashboard:** Clicking on "View Gateway" post-configuration will lead you to a dashboard displaying the gateway's status, connection times, uplink/downlink counts, and round-trip time.

<figure><img src="/files/PAgzL9ulq4FJYHLPkl4j" alt=""><figcaption></figcaption></figure>

* **Configure Location:** To set or adjust your gateway's location, navigate to the configuration tab. Here, you can input the latitude and longitude manually or use the map tool for convenience.

<figure><img src="/files/5DZQ5EoQnftsZFEdfyo0" alt=""><figcaption></figcaption></figure>

### Conclusion

By following these steps, you can successfully add and configure your LoRaWAN gateways within Datacake, streamlining your IoT project setup. This guide ensures that you can efficiently manage your gateways, set their locations, and understand their connectivity status, all from within your Datacake workspace.

## Tutorials

### RAKwireless WisGate Edge Lite 2

{% content-ref url="/pages/fiMgyHgTHzdxdftAnMaq" %}
[RAKwireless WisGate Edge Light 2](/datacake-lns/gateways/rakwireless-wisgate-edge-light-2.md)
{% endcontent-ref %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.datacake.de/datacake-lns/gateways.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
