- 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.

Setting up and fine-tuning a properly configured LoRaWAN gateway is the key to ensuring any IoT project based on this technology functions correctly. Simply plugging in the equipment and hoping for the best is not enough: attention must be paid to the hardware, the IP network, the packet forwarder , and registration with a LoRaWAN server such as The Things Network (TTN) , in addition to registering applications and end devices.
Throughout this guide, you'll see, step by step and in great detail, how to fully configure 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 registration of LoRaWAN sensors (GPS trackers, temperature and humidity probes, etc.) in TTN. The goal is that, by the time you finish reading, you'll know exactly 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
Before you start tinkering with menus, it's important to understand which elements are involved in a functional LoRaWAN network : the gateway, the LoRaWAN server, the applications, and the end devices . Each component has its role and requires certain minimum parameters to communicate with the others.
In practice, most educational and laboratory projects rely on TTN as a free public server . TTN 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 to clarify from the outset is the LoRaWAN frequency compatible with your region . In Europe, the frequency plan for the 868 MHz band (EU868) is typically used, while other regions use different plans (US915, AU915, etc.). The gateway and TTN must be compatible with this plan, or simply put, communicate on the same channel.
As for end devices, it's common to work with Dragino GPS trackers for location and temperature and humidity probes like the Browan Tabs TBHH100-868 sensors. These devices usually come with their LoRaWAN credentials pre-installed, ready to register with TTN, but it's advisable to review them and know where to configure them.
Finally, it's essential to ensure the gateway has a stable and secure IP connection , whether via Ethernet cable, Wi-Fi, or even 4G/5G mobile networks. Without internet access (or the corresponding WAN connection), the gateway will be unable to forward LoRa packets to the server.
Configuration of commercial gateways: RAK7289 and Dragino LPS8

Many educational projects use commercial gateways such as the RAK7289 for outdoor use or the Dragino LPS8 for indoor use . Both come with a web-based management interface where the IP network settings and the LoRaWAN parameters necessary for communicating with TTN or other servers are configured.
In some environments, such as educational institutions, the initial configuration of the RAK gateway may have already been completed by the institution itself (for example, a secondary school), and students only need to adapt the network settings (static IP or DHCP) to the local infrastructure. Even so, it's advisable to be familiar with all the steps so they can be repeated when changing locations or servers.
IP network configuration on RAK gateways (example RAK7289)
The first real step in working with the gateway is to ensure it has IP access to the local network and the internet . In 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's highly recommended to assign the gateway a well-documented static IP address . This way, we'll always know which address to use to access the management panel, and it will be easier to apply firewall rules or remote access controls if necessary.
In environments with multiple devices, such as classrooms or laboratories, it's also helpful to know the Ethernet MAC address and hostname of the gateway. Sometimes, the DHCP server itself lists this information with a identifiable hostname (for example, "RAK7289"), allowing you to locate it at a glance even when using DHCP.
Emergency access via managed Wi-Fi
If for any reason we can't locate the gateway's IP address on the wired network, many RAK and Dragino models offer an integrated Wi-Fi access point for management . This access point is usually open or uses default credentials, allowing 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 gateway's own management address . By accessing that IP address via a web browser, we can access the management interface without relying on DHCP, intermediate switches, or routers—something very useful in new deployments or if the network configuration has been completely lost.
However, once the setup is complete, it's crucial to disable the management Wi-Fi or strengthen its security . Leaving an open or poorly secured network connected to a critical device like the gateway represents a clear vulnerability, especially if the gateway is outdoors or in a public access location.
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 is usually found in the LoRa Network → Network Settings → Packet Forwarder menu , where you configure the destination to which received LoRa packets will be sent.
In that section, we need to locate and copy the Gateway EUI , which 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 search for it every time.
To register the gateway with TTN, access the TTN Console using the appropriate credentials. Once logged in, select the correct region and go to the "Gateways" section. There, click on "Register gateway," enter the copied EUI, select the appropriate frequency plan (in Europe, EU868), and complete the registration process.
In some models and firmware versions, it's necessary to enable legacy packet forwarder mode in the TTN settings to ensure compatibility with the gateway software. You can also specify the coverage type (indoor/outdoor) and physical location so that the gateway appears correctly on TTN maps.
If everything is done correctly, the gateway status in the TTN console will change to "Connected" and, in the Traffic tab , messages with real-time LoRa traffic will start appearing when there are devices transmitting within range.
Dragino LPS8 Gateway Management: Access, Wi-Fi and IP
The Dragino LPS8 is a fairly common indoor LoRaWAN gateway for testing and small deployments. It is based on an SX1308 concentrator and comes pre-configured with various frequency plans for different geographic zones, including the EU868 band.
This device can be managed via both SSH and HTTP . To access it via SSH or HTTP through the RJ-45 port, we first need to know the IP address assigned to it 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 initial setup is to use the Wi-Fi access point created by the LPS8 itself . When 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 can be accessed via a web browser by entering the IP address 10.130.1.1.
The initial credentials for the web interface are usually the username “admin” and the password “dragino” . It is highly recommended to change these credentials as soon as everything is up and running, especially if you are going to leave the Wi-Fi access point active or if the gateway will 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 correct frequency plan for our region has been selected , for example, 868 MHz for Europe.
In the LoRaWAN tab , you specify the server to which the packets will be forwarded. In the "service provider" dropdown, you can select TTN, and in "server address," you choose the European TTN server associated with the EU868 band. The UDP uplink and downlink ports are usually set to 1700 by default, which is correct in most cases.
On that same screen, the Gateway ID is displayed , which is the value we will 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 our own LoRaWAN server, such as ChirpStack , instead of TTN, this would be where we would enter its 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's network tab, you'll find several sub-tabs that allow you to precisely adjust how the gateway connects to your local network and the internet. The LAN section configures the internal network used by the gateway's own Wi-Fi access point; it's a kind of local "management network."
It's best not to change the default LAN configuration , or if you do, to carefully note down those settings, as this may be the only way in if the WAN connection is misconfigured. The LPS8's LAN acts as a rescue network to regain administrative access.
The WAN section defines the IP address that the RJ-45 port will use when the gateway is connected via cable. You can choose DHCP or assign a static IP address. In stable environments, assigning a static IP address to the WAN interface is the most professional approach to prevent unexpected address changes.
Finally, the Wi-Fi WAN section 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.
The Wi-Fi tab also displays and allows you to configure the access point (AP) that Dragino automatically generates . From a security standpoint, it's advisable to change the network name and password, or even disable the AP if it's not going to be used, to reduce the attack surface.
Building a DIY LoRaWAN gateway with Raspberry Pi 4 and RAK5146
Besides commercial gateways, it's very common to build a homemade LoRaWAN gateway using a Raspberry Pi and a RAK hub . This approach is perfect for learning in depth how all the components connect and for having a flexible and upgradeable system.
In this type of project, a Raspberry Pi 4B is usually used as the system's brain, along with an mPCIe hub such as the RAK5146 mounted on a RAK2287 Pi HAT adapter. A specialized system image, such as RAKPiOS, is then installed on this base, which already integrates specific utilities for managing the LoRaWAN component.
Required hardware and physical assembly
To build this type of LoRaWAN gateway, you'll need at least a Raspberry Pi 4B with its power supply , a 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 will also help secure everything.
The process begins by inserting the RAK5146 into the RAK2287 HAT's mPCIe slot , typically at an angle of about 45 degrees, until it clicks into place. Then, gently press the card down and secure it with the two screws aligned with the holes in the HAT.
Once the hub is mounted on the HAT, the Pi HAT is placed over the Raspberry Pi's GPIO pins and secured with four screws or standoffs to prevent movement. This creates a rigid block that prevents stress on the connectors and simplifies installation in cases or stands.
Finally, connect the LoRa antenna and the GPS antenna to their corresponding connectors on the hub. It is extremely important never to turn on the device without the antennas connected, as this could damage the hub's RF stage.
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 RAKPiOS from the official RAK repository . This version is specifically designed for LoRaWAN gateways with RAK hardware.
The RAKPiOS image is written to the microSD card using a flashing tool such as Balena Etcher or a similar program . The typical process involves selecting the downloaded image, choosing the destination card, and launching the "Flash" program, waiting for it to finish and the data to be verified.
Once the flashing process is complete, remove the card from the reader and insert it into the Raspberry Pi's microSD slot . From there, simply connect the power supply (and, if desired, an Ethernet cable) for the Pi to boot into RAKPiOS.
First boot, SSH access and password change
On initial startup, RAKPiOS typically creates a Wi-Fi access point with an SSID of the type RAK_XXXX , where 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, you can access the device wirelessly.
The default IP address of the Raspberry Pi in this mode is usually 192.168.230.1 . With this 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 the username “rak” and password “changeme”.
The first time you log in, the system prompts you to change your password for security reasons . This is a step you shouldn't skip: 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 that centralizes most network and service options.
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.
Within the wlan0 configuration, the operating mode is specified, usually STA Mode (Wi-Fi client) . Then, 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 device, the new IP address assigned to the Raspberry Pi by the router is now used. This way, we no longer depend on the RAK access point, and the gateway behaves like any other device on the local network.
Activating the Packet Forwarder and obtaining the gateway's EUI
With internet access established, it's time to enable the LoRaWAN service itself. Again, using rakpios-cli, navigate to the "Deploy Services" section and select "Packet Forwarder".
In the Packet Forwarder menu, you can access the "Configure Environment Variables" option , where you specify data such as the region (for example, EU_868), the interface (SPI, which is the one used by the RAK5146 concentrator), the concentrator model and, if applicable, other band-specific parameters.
After saving the changes, return to the previous menu and select “Start the Service” to start the Packet Forwarder. At that point, 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 is advisable to copy this EUI and save it in a configuration document . The registration procedure in TTN is then 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 to register the applications and end devices . The 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, access the "Applications" section and create a new application, giving it 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 "Register end device" button is used to register each sensor. TTN allows you to register devices by manually entering the parameters or, in some cases, using manufacturer templates.
For manual setup, values such as DevEUI and AppKey can be generated from the console itself using automatic generation buttons, while the JoinEUI (equivalent to AppEUI) can be a user-defined value (provided 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
The Browan TBHH100-868 temperature and humidity sensors 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 DevEUI . The vendor typically 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.
The data transmission logic of these sensors is usually based on thresholds: they send information at set intervals or when significant changes occur (for example, every 60 minutes if there are no changes, or sooner if the temperature varies by ±2 °C or the humidity by ±5%). Understanding these details is important for correctly interpreting the message frequency in TTN.
In the case of Dragino trackers , used as GPS locators, registration in TTN is done similarly: the devices are created in the TTN application with their unique keys and, if desired, advanced tracker parameters (sending interval, duration of panic alarm, etc.) are adjusted using AT commands via serial port.
To configure these trackers via USB, connect the cable to your PC, open a serial terminal (115200 baud), and send the AT commands indicated in the manual . It's important to note that the commands must be entered all at once, not typed character by character, for the device to interpret them correctly.
Integration of external devices: Loko Air unit example
Another common situation is the integration of specific devices, such as a ventilation or environmental control unit like Loko Air , 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, real-time messages will appear in the device's "Live data" view on the TTN console , along with the location on the map if the device sends GPS coordinates.
Payload formatters and data decoders
To ensure that the data sent by the sensors is readable, TTN allows you to define payload formatters . In 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 JavaScript decoder that receives the raw bytes, converts them to hexadecimal, and applies specific functions to interpret each data type (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 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 decode each payload again in each system.
Data visualization and exploitation: from TTN to Node-RED, Datacake and others
Once the devices are sending data and TTN is receiving it seamlessly, the fun part begins: visualizing and analyzing the information . TTN already offers a basic console for viewing traffic and data from each device, but it's more common to integrate the data with other platforms.
A popular option is Datacake , which allows you to create public or private dashboards to visualize values such as temperature, humidity, GPS position, or battery status in a user-friendly way. TTN configures the corresponding integration so that the decoded data is automatically sent to Datacake.
In more advanced environments or when automating business logic, it's very common to use Node-RED in conjunction with MQTT . TTN publishes application data through an MQTT broker, and Node-RED consumes it for processing, storing in databases like MySQL, triggering alerts, controlling other devices, or sending it to external systems.
This type of integration allows you to build complete end-to-end IoT solutions at 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 flow—configured gateway, TTN as LoRaWAN server, properly registered applications and devices, payload decoders, and integration tools—enables LoRaWAN projects to move from simple laboratory tests to deployment as robust and scalable real-world solutions , suitable for monitoring assets, environments, infrastructures, or industrial processes for years with minimal maintenance.
Viewed globally, configuring a LoRaWAN gateway and its associated ecosystem may seem complex, but it boils down to a few key pillars: ensuring robust IP connectivity , correctly choosing the frequency plan, linking the gateway to a LoRaWAN server such as TTN, registering applications and devices with their credentials, and leveraging formatters, integrations, and dashboards to transform raw data into useful and actionable insights.