# Milesight Gateway

Milesight offers their gateways with the option of activating a LoRaWAN Network Server on the gateway. This lets you use your LoRaWAN devices without the need of an external LNS such as TheThingsNetwork or Loriot.

Datacake does have an integration for this internal LNS so you can add your LoRaWAN devices without the need of an external LNS.

## Requirements

* This guide requires that you have a Milesight Gateway with onboard LNS

### Setup Milesight LNS

* We don't cover the steps needed to configure the LNS on the Gateway, specifically in the steps of adding devices.
* We assume that you already made this steps.
* If not, please have a look at their documentation first. You can find the latest documentation on their support pages here:

{% embed url="<https://support.milesight-iot.com/support/solutions/folders/73000325960>" %}
Milesight Embedded Network Server - For Milesight LoRaWAN Gateway
{% endembed %}

## Setup

### Pick Milesight Gateway LNS

When you create a new LoRaWAN device on Datacake you must select a LoRaWAN Network Server. In the list of available LoRaWAN Network Servers you can find the Milesight Gateway LNS as an option.

In order to use your device with your Gateway, please select the Milesight LNS from the list of available LNS.

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

### Set Webhook URL

In order for your Milesight Gateway to forward the data from the embedded network server to Datacake, you need to provide a webhook URL for forwarding.

This URL is:

`https://api.datacake.co/integrations/lorawan/milesightgateway/`

Now you need to add this URL to your Milesight Gateway embedded network server configuration. Please have a look at the following screenshot to see where you need to store it.

#### Activate Application

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

#### Set Webhook URL

<div><figure><img src="/files/sVBi1grLg5Dc9vbqkav4" alt=""><figcaption></figcaption></figure> <figure><img src="/files/otUdQLOCjKBCbWMpmSJD" alt=""><figcaption></figcaption></figure></div>


---

# 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/lorawan/lns/milesight-gateway.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.
