Complete guide to configuring a LoRaWAN gateway with TTN

Last update: January 25, 2026
  • The correct configuration of the LoRaWAN gateway (IP, frequency and packet forwarder) is the basis for connecting any node network to TTN.
  • Registering gateways, applications, and end devices with TTN requires the use of unique identifiers and well-managed LoRaWAN keys.
  • Payload formatters allow you to transform raw data into readable information for dashboards, databases, and integrations.
  • Combining TTN with tools like Node-RED, MQTT, or Datacake turns a LoRaWAN network into a complete and scalable IoT solution.

LoRaWAN gateway configuration

Assemble and fine-tune a LoRaWAN gateway properly configured It's the key component for any IoT project based on this technology to function properly. Simply plugging in the equipment and crossing your fingers isn't enough: you have to take care of the hardware, the IP network, the packet forwarder and registration on a LoRaWAN server as The Things Network (TTN)in addition to registering end applications and devices.

Throughout this guide you will see, step by step and in great detail, how to perform the complete configuration of a LoRaWAN gateway In various real-world scenarios: commercial gateways like the RAK7289 or Dragino LPS8, a DIY gateway with a Raspberry Pi 4B and RAK5146 hub, and the integration of LoRaWAN sensors (GPS trackers, temperature and humidity probes, etc.) into TTN. The goal is that, by the time you finish reading, you'll have a clear understanding of what to do, where to do it, and what to check to ensure everything is working correctly.

Basic concepts and preliminary steps before configuring a LoRaWAN gateway

how to ping in linux
Related article:
How to Ping in Linux: Commands, Options, and Examples

Before you start tinkering with menus, it's important to be clear about what elements are involved in a functional LoRaWAN network: the gateway, the LoRaWAN server, the applications, and the end devices or end devicesEach piece has its role and needs minimum parameters to communicate with the others.

In practice, most educational and laboratory projects rely on TTN as a free public serverTTN offers a web console from which to register gateways, create applications, and register devices to securely send their data using unique keys (DevEUI, AppEUI/JoinEUI, AppKey).

Another point that needs to be clear from the beginning is the LoRaWAN frequency compatible with your regionIn Europe, the frequency plan for the 868 MHz band (EU868) is normally used, while other areas use different plans (US915, AU915, etc.). The gateway and TTN must be on the same plan, or simply put, communicate on the same channel.

Regarding end devices, it is common to work with Dragino GPS trackers For location tracking, and with temperature and humidity probes such as the Browan Tabs TBHH100-868 sensors. These devices usually come with their factory-installed LoRaWAN credentials, ready to register with TTN, but it's advisable to review them and know where to configure them.

Finally, you need to make sure that the gateway has a Stable and secure IP connectivitywhether via Ethernet cable, Wi-Fi, or even 4G/5G mobile networks. Without internet access (or the corresponding WAN), the gateway will not be able to forward LoRa packets to the server.

Configuration of commercial gateways: RAK7289 and Dragino LPS8

Example LoRaWAN configuration

Many educational projects use commercial gateways such as the RAK7289 for outdoor use or Dragino LPS8 indoorBoth come with a web management interface where you can adjust both the IP network part and the LoRaWAN parameters needed to communicate with TTN or other servers.

In some settings, such as educational centers, the RAK gateway initial configuration The setup may already be completed by the school itself (for example, a high school), and students only need to adapt the network settings (static IP or DHCP) to the local infrastructure. Even so, it's advisable to know all the steps so they can be repeated if the location or server changes.

IP network configuration on RAK gateways (example RAK7289)

The first real step in working with the gateway is to make sure it has IP access to the local network and the InternetIn the case of RAK gateways, this is configured in the administration menu, within the WAN network section.

On the menu Network → WAN Interface we can choose whether the gateway will function as DHCP client or with static IPIf left in DHCP mode, the network router will automatically assign the IP address. This simplifies things, but requires later discovery of the assigned IP address using a network scanner (for example, with nmap, any IP scanner or checking connectivity with ping in Linux) or by consulting the router's DHCP server table.

If we need more control, it is highly recommended to assign a well-documented static IPThis way we will always know which address to go to in order to access the management panel and it will be easier to apply firewall rules or remote access if necessary.

In environments with multiple computers, such as classrooms or laboratories, it is also helpful to know the Ethernet MAC and hostname from the gateway. Sometimes it's listed on the DHCP server itself with a hostname identifiable (for example, “RAK7289”), which allows it to be located at a glance even if it is using DHCP.

Emergency access via managed Wi-Fi

If for whatever reason we have no way of locating the gateway's IP address on the wired network, many RAK and Dragino models offer a integrated Wi-Fi access point for managementThis AP is usually open or uses default credentials, and allows you to connect a laptop or tablet directly to the device.

When connecting to that Wi-Fi network, the default gateway IP address is usually the address of management of the gateway itselfBy accessing that IP address via a web browser, we can access the administration interface without relying on DHCP, switches, or intermediate routers, which is very useful in new deployments or if the network configuration has been completely lost.

However, once the start-up is complete, it is essential Disable management Wi-Fi or strengthen its securityLeaving an open or poorly secured network connected to a critical piece of equipment such as the gateway poses a clear vulnerability, especially if the gateway is outdoors or in publicly accessible locations.

LoRaWAN configuration and TTN registration of a RAK gateway

With the IP network resolved, the next step is to link the gateway to the LoRaWAN server. On RAK gateways, this step is usually found in the menu. LoRa Network → Network Settings → Packet Forwarder, where the destination to which the received LoRa packets will be sent is adjusted.

In that section we must locate and copy the EUI GatewayThis is the gateway's unique identifier. This value will then be used to register the gateway in the TTN console. It's a good idea to save it in a document (along with the device's username and password) so you don't have to look it up every time.

  8 Key Aspects of the APFS File System

To register the gateway in TTN, access the TTN Console with the corresponding credentials. Once inside, the appropriate region is selected and accessed to the “Gateways” section. There, by clicking on “Register gateway”, the copied EUI is entered, the appropriate frequency plan is selected (in Europe, EU868) and the registration process is completed.

In some models and firmwares It is necessary to activate the mode of legacy packet forwarder In the TTN settings, you can ensure compatibility with the gateway software. You can also specify the coverage type (indoor/outdoor) and the physical location so that the gateway appears correctly on the TTN maps.

If everything is done correctly, the gateway status in the TTN console will change to “Connected” and, in the tab of TrafficMessages with real-time LoRa traffic will begin to appear when there are devices transmitting within range.

Dragino LPS8 Gateway Management: Access, Wi-Fi and IP

El Dragino LPS8 It's a fairly common indoor LoRaWAN gateway for testing and small deployments. It's based on an SX1308 concentrator and comes pre-configured with various frequency plans for different geographic zones, including the EU868 band.

This equipment can be managed by SSH and HTTPTo access the network via SSH or HTTP through the RJ-45 port, we first need to know the IP address assigned by the network's DHCP server. Again, this is where using an IP scanner, checking the router's DHCP table, or a similar tool comes in handy.

The simplest option for the initial setup is to use the Wi-Fi access point created by the LPS8 itselfWhen powered on, the device broadcasts a network with an SSID of the type “dragino-xxxxx”. The default password is usually “dragino+dragino”. Once connected to this network, the gateway is accessed via a web browser by entering the IP address 10.130.1.1.

The initial credentials in the web interface are usually username “admin” and password “dragino”It is highly recommended to change these keys as soon as everything is up and running, especially if you are going to leave the Wi-Fi AP active or if the gateway is going to be accessible from uncontrolled networks.

Dragino LPS8 LoRaWAN settings and TTN link

Within the LPS8 configuration interface, we find a specific menu for the LoRa and LoRaWAN sections. The first step is to verify that the [option/feature] has been selected. correct frequency plan for our regionFor example, 868 MHz for Europe.

In the tab LoRaWAN The server to which the packets will be forwarded is specified. In the "service provider" dropdown menu, TTN can be selected, and in "server address," the European TTN server associated with the EU868 band is chosen. The UDP uplink and downlink ports are usually set to 1700 by default, which is correct in most cases.

That same screen displays the Gateway IDThis will be the value we use in the TTN console when registering the gateway. Registering it follows a very similar flow to RAK: you enter the console, go to “Gateways”, choose “register gateway”, enter the ID, check (if applicable) the use of legacy packet forwarder and select the corresponding European plan.

If we wanted to use a Dedicated LoRaWAN server, like ChirpStackInstead of TTN, this would be where you enter your address, ports, and authentication parameters. However, for educational purposes and many personal projects, TTN is usually more than sufficient.

Configuring LAN, WAN, and Wi-Fi WAN in Dragino

In the LPS8 network tab, we find several sub-tabs that allow us to precisely adjust how the gateway connects to the local network and the Internet. In the section on LAN The internal network used by the gateway's own Wi-Fi AP is configured; it is a kind of local "management network".

The usual thing is not to touch the default LAN configuration Or, if it is modified, carefully note that information, because it may be the only way in if the WAN portion is misconfigured. The LPS8 LAN acts as a rescue network to regain administrative access.

In the section WAN The IP address that the RJ-45 port will use when the gateway is connected by cable is defined. You can choose DHCP or assign a static IP address. In stable environments, assigning a static IP address is the most professional approach. Static IP address to the WAN interface to avoid unexpected changes in direction.

Finally, the part about Wi-Fi WAN This allows the gateway to connect as a client to an existing Wi-Fi network. Here you define whether the IP address of that interface will be static or obtained via DHCP, and you enter the SSID, encryption type, and password parameters.

The Wi-Fi tab also displays and configures the AP that Dragino automatically generatesFrom a security standpoint, it's advisable to change the network name and password, or even disable the access point if it's not going to be used, to reduce the attack surface.

Building a DIY LoRaWAN gateway with Raspberry Pi 4 and RAK5146

In addition to commercial gateways, it is very common to set up a Homemade LoRaWAN gateway with Raspberry Pi and a RAK hubThis approach is perfect for learning in depth how all the pieces connect and for having a flexible and upgradable team.

In this type of project, a Raspberry Pi 4B as the system's brain and an mPCIe concentrator like the RAK5146 mounted on a Pi HAT RAK2287 type adapter. On this base, a specialized system image, such as RAKPiOS, is installed, which already integrates specific utilities to manage the LoRaWAN part.

Required hardware and physical assembly

To build a LoRaWAN gateway of this type, you need, at a minimum, one Raspberry Pi 4B with its power supplyA microSD card of at least 16 GB, the Pi HAT RAK2287, the mPCIe hub RAK5146, and the corresponding LoRa and GPS antennas. A good set of screws and standoffs also helps to secure everything firmly.

The process begins by introducing the RAK5146 in the mPCIe slot of the HAT RAK2287, usually at an angle of about 45 degrees, until it fits snugly into the connector. Then gently press the card down and screw it in using the two screws aligned with the holes in the HAT.

  Fiber optic cable: The invisible highway that revolutionizes the Internet

Once the hub is mounted on the HAT, the Pi HAT on the Raspberry Pi GPIO pins It is secured with four screws or spacers to prevent movement. This creates a rigid block that prevents stress on the connectors and facilitates installation in boxes or brackets.

Finally, they connect the LoRa antenna and GPS antenna in the corresponding connectors from the concentrator. It is extremely important never to turn on the equipment without the antennas connected, as this could damage the RF stage of the concentrator.

Installing RAKPiOS on the SD card

With the physical components complete, the next step is to prepare the Raspberry Pi's operating system. To do this, download the latest version of RAK from the official repository. RAKPiOS, which is specifically designed for LoRaWAN gateways with RAK ​​hardware.

The RAKPiOS image is written to the microSD card using a flashing tool such as Etcher Whale or similarThe typical process involves selecting the downloaded image, choosing the destination card, and launching the "Flash," waiting for it to finish and the data to be verified.

When the flashing process is complete, the card is removed from the reader and inserted into the Raspberry Pi microSD slotFrom there, simply connect the power supply (and, if desired, an Ethernet network cable) for the Pi to boot into RAKPiOS.

First boot, SSH access and password change

On the first boot, RAKPiOS usually creates a Wi-Fi access point with SSID of type RAK_XXXXwhere XXXX corresponds to the last digits of the Raspberry Pi's MAC address. The initial password for the access point is usually "rakwireless". By connecting to this network, we can access the device wirelessly.

The default IP address of the Raspberry Pi in that mode is usually 192.168.230.1With that IP address we can open an SSH connection (for example, with PuTTY on Windows or from the terminal on Linux/macOS) using the default credentials, which are usually username “rak” and password “changeme”.

As soon as we log in for the first time, the system asks us Change your password for security reasonsThis is a step that shouldn't be skipped: simply enter your current password and then your new password twice.

Setting up the internet connection with rakpios-cli

Once authenticated, the next step is to configure internet access. RAKPiOS includes a configuration utility called rakpios-cli which centralizes most of the network options and services.

Typing rakpios-cli A text-based menu will appear in the terminal, navigable with the keyboard. Although it may initially display a warning or minor error, you can continue pressing "OK" until you reach the main options. From there, you can access... “Managed Networks” and select the wlan0 interface to adjust the Wi-Fi.

The operating mode is specified within the wlan0 configuration, normally STA Mode (Wi-Fi client)Next, the available networks are scanned or the SSID is manually entered, the Wi-Fi password is configured, and the connection is enabled. Once the changes are applied, the Raspberry Pi will temporarily disconnect from the access point and obtain an IP address from the network router.

To continue accessing the equipment, you now use the new IP address assigned by the router to the Raspberry Pi. That way we no longer depend on the RAK AP and the gateway behaves like just another device on the local network.

Activating the Packet Forwarder and obtaining the gateway's EUI

With internet access up and running, it's time to enable the LoRaWAN service itself. Again, from rakpios-cli This time, you enter the “Deploy Services” section and select “Packet Forwarder”.

The Packet Forwarder menu provides access to the option “Configure Environment Variables”, where data such as the region (e.g., EU_868), the interface (SPI, which is the one used by the RAK5146 concentrator), the concentrator model and, if applicable, other band-specific parameters are indicated.

After saving the changes, return to the previous menu and choose “Start the Service” To start the Packet Forwarder. At that moment, the system will display the gateway's EUI, which is the unique identifier we will need in the TTN console to register the gateway.

It's worth copying this EUI and save it in some configuration documentNext, the registration procedure in TTN is the same as for a commercial gateway: from the console, in the Gateways section, click on register, enter the EUI, select the region (EU868) and complete the registration.

Registration of applications and end devices in TTN

Once the gateway appears as “Connected” in TTN, the next step to view useful data is register the applications and end devicesThe gateway itself does not store useful information; it only forwards traffic. It is the applications that aggregate the data from the sensors or trackers.

In TTN, from the console, you access the section of “Applications” A new application is created, given an ID and, if desired, a description. This application will act as a container for all end devices (sensors) related to the same project.

Once the application is created, the button is used to “Register end device” or “Register end device” To register each sensor, TTN allows you to register devices by manually entering the parameters or, in some cases, using manufacturer templates.

For manual entry, values ​​such as DevEUI and AppKey with automatic generation buttons, while the JoinEUI (equivalent to AppEUI) It can be a user-defined value (provided that it then matches what we configure on the device).

Once the form is completed and registration is confirmed, TTN will display the necessary parameters for configuring the end device in the "Activation information" tab: DevEUI, JoinEUI/AppEUI, and AppKey. These are the data that must be entered into the LoRaWAN node (sensor, tracker, etc.) using its configuration tool or serial interface.

Example with Tabs TBHH100-868 sensors and Dragino trackers

Temperature and humidity sensors Tabs TBHH100-868 The Browan devices are a typical example of a simple LoRaWAN device. Their main function is to periodically send temperature, relative humidity, and, in some cases, battery status.

These types of sensors usually come with the LoRaWAN keys already programmed: AppKey, AppEUI and DevEUIThe supplier usually provides a data sheet or label with these values. With TTN, you only need to create an application and enter the credentials listed on that sheet for each sensor.

  How to update the BIOS safely and without surprises

The data transmission logic of these sensors is usually based on thresholds: They send information periodically or when there are significant changes. (For example, every 60 minutes if there are no changes, or sooner if the temperature varies by ±2 °C or the humidity by ±5%). It is important to know these details to correctly interpret the message frequency in TTN.

In the case of Dragino trackersFor devices used as GPS trackers, registration in TTN is similar: the devices are created in the TTN application with their unique keys and, if desired, advanced tracker parameters (sending interval, panic alarm duration, etc.) are adjusted using AT commands via serial port.

To configure these trackers via USB, connect the cable to the PC, open a serial terminal (115200 baud) and send the AT commands as indicated in the manualAn important detail is that the commands must be pasted all at once, not typed character by character, so that the device interprets them correctly.

Integration of external devices: Loko Air unit example

Another common situation is the integration of specific devices, such as a Loko Air type ventilation or environmental control unit, which is configured using its own desktop tool (for example, Loko Configuration Tool).

In this case, the typical flow is: the final device is created in TTN, the DevEUI, JoinEUI, and AppKey values ​​are generated (or taken), and then These three parameters are entered into the manufacturer's configuration tool., enabling the LoRaWAN option on the device.

Once the configuration is sent, the device restarts and begins attempting to join the TTN network using OTAA (Over The Air Activation). When the gateway detects the connection attempt and the network accepts it, the TTN console will begin to display the following: real-time messages in the device's "Live data" view, along with the location on the map if the device sends GPS coordinates.

Payload formatters and data decoders

To make the data sent by the sensors readable, TTN allows defining payload formattersIn some cases, a standard format, such as CayenneLPP, can be used, which automatically interprets certain types of data.

When the device uses a proprietary format, the developer can create a custom decoder in JavaScript that receives the raw bytes, converts them to hexadecimal and applies specific functions to interpret each type of data (humidity, temperature, barometer, GPS, accelerometer, gyroscope, magnetometer, battery voltage, etc.).

The typical pattern involves analyzing a "flag" or channel identifier at the beginning of the frame and, depending on its value, applying the correct formula to the following bytes to convert them into physical valuesFinally, the script returns a JSON object with the interpreted variables (for example, temperature, humidity, battery, latitude, longitude…), which TTN will display as readable fields.

This "already digested" information is what can then be reused in integrations with external platforms such as Node-RED, MQTT, Datacake-type dashboards, MySQL databases, or cloud services like ThingSpeak, without needing to re-decode each payload on each system.

Data visualization and exploitation: from TTN to Node-RED, Datacake and others

Once the devices send data and TTN receives it without problems, the fun part begins: the visualization and exploitation of informationTTN already offers a basic console to view traffic and data from each device, but the norm is to integrate the data with other platforms.

A widely used option is DatacakeThis allows you to create public or private dashboards to easily display values ​​such as temperature, humidity, GPS position, or battery status. TTN configures the corresponding integration so that the decoded data is automatically sent to Datacake.

In more advanced environments or when you want to automate business logic, it is very common to use Node-RED together with MQTTTTN publishes application data through an MQTT broker, and Node-RED consumes it to process it, store it in databases like MySQL, trigger alerts, act on other devices, or send it to external systems.

This type of integration allows building complete end-to-end IoT solutions with a relatively low cost: low-power LoRaWAN nodes, TTN-connected gateways, and a flexible backend based on Node-RED, databases, and dashboards.

There are even specific courses and training programs that cover the entire chain: from gateway configuration and TTN registration, through MQTT and Node-RED, to storage and analysis on platforms like MySQL or ThingSpeak. These courses provide video lessons and support to answer specific implementation questions.

Taken together, this entire workflow—configured gateway, TTN as the LoRaWAN server, properly registered applications and devices, payload decoders, and integration tools—enables LoRaWAN projects to move from simple lab tests to full-scale deployments. robust and scalable real-world solutions, suitable for monitoring assets, environments, infrastructures or industrial processes for years with minimal maintenance.

Viewed globally, the configuration of a LoRaWAN gateway and its associated ecosystem may seem complex, but it boils down to a few key pillars: ensuring a Robust IP connectivityChoosing the right frequency plan, linking the gateway to a LoRaWAN server like TTN, registering applications and devices with their credentials, and leveraging formatters, integrations, and dashboards to turn raw data into useful and actionable information.