Your First Steps into the World of IoT with LoRaWAN

Your First Steps into the World of IoT with LoRaWAN

Welcome to the world of IoT! If you're reading this, you're likely interested in harnessing the power of data to enhance your business. One of the key technologies in IoT is LoRaWAN, a protocol for low-power, long-range communications. We made a full article on this technology and its benefits in comparison to other communication protocols. Now, in this article we want to guide you through the initial steps of setting up your LoRaWAN devices and ensuring a smooth start. If you have questions like: “How do I start?” and “What do I need to begin with?”, then you are in the right place.

Understanding LoRaWAN

Before diving into the practical setup, let's understand what LoRaWAN is. LoRaWAN stands for Long Range Wide Area Network, a protocol designed for IoT devices that need to send small amounts of data over long distances using minimal power. It's ideal for applications like remote sensors or devices that need to operate on battery power for longer periods (Some claim to have battery lifes of up to 10 years).

Starting: Getting Your First LoRaWAN Kit

The first thing you will want to do is buy some sensors and get started. However, there is one thing that you have to consider before buying your sensors, and that is, how will you connect your sensors to the internet: you will need a gateway.

Now, let's not go for it right away. There's still a couple of things you will need to consider first:

  1. Coverage: Check if your area already has LoRaWAN coverage. If public or community gateways are available, you might not need your own gateway. Check out the TTN coverage here.
  2. Device Proximity: If your devices are in close proximity to an existing gateway with spare capacity, you may use that instead of buying a new one. Again, you can check that out on the TTN Mapper.
  3. Control and Security: For control over your network and data, or if you have specific security requirements, having your own gateway is beneficial.
  4. Data Volume: Consider the amount of data you'll be sending. High volumes might need a dedicated gateway.

If based on the above points you decide you need a gateway, the next step is to pick one of the multiple options in the market. Please, make sure it is compatible with the LoRaWAN Network Server (LNS) you plan to use, like TTN or Loriot (More about that later). 

Our recommendation:

  • RAK Wireless RAK72568 WisGate Gateway for indoors applications

  • RAK Wireless RAK7249 WisGateEdge Max for outdoor/industrial applications

By meticulously configuring the gateway, you lay a robust foundation for a resilient, efficient, and scalable LoRaWAN network. So please follow the manufacturer’s instructions carefully!

Setting Up the Gateway

Choosing a Network Server: First, you need a LoRaWAN Network Server (LNS) to connect your gateway. The Things Network is a popular choice, especially for beginners, due to its user-friendly interface and free tier. However, there are multiple options in the market.

When selecting a LoRaWAN Network Server (LNS), it's essential to understand the differences and capabilities of each option to determine which best fits your needs:

  • The Things Network (TTN): TTN is known for popularizing LoRaWAN by offering a free network server that is community-driven. It's ideal for prototyping or initial testing but is not recommended for commercial deployments due to the lack of guaranteed availability​​.
  • The Things Industries (TTI): TTI is the commercial counterpart to TTN, providing a private environment for your network elements. After testing with TTN, you can opt for a paid subscription with TTI for commercial use​​.
  • ThingPark by Actility: Actility is a founding member of the LoRaWAN Alliance and offers ThingPark, a network server for telecom operators. This server is widely used by a large number of telecom operators and is known for its ability to connect with gateways from various manufacturers​​.
  • LORIOT: A Swiss-origin network server service provider, LORIOT offers both hosted and on-premise LoRaWAN network server solutions. It is a suitable choice for those who require a dedicated, managed service​​.

When choosing an LNS, consider factors such as the scale of deployment, the need for commercial support, network control, and specific features like integration capabilities with existing infrastructure

Once your LNS is chosen, the next step is connecting the Gateway to the LNS: You'll need to understand a few terms like "Gateway-EUI". This is a unique identifier for your gateway. Follow the step-by-step guides your LNS provides to connect your gateway. If you chose TTN, here is how. Please be careful while selecting the Frequency Plan! This depends on your region. For choosing the right plan, please consult the following document. 

Configuring Your Sensors

First things first, your LoRaWAN devices will come with some credentials (DevEUI, AppEUI or JoinEUI, and AppKEY). These credentials always come in a different way. They are either printed on your device’s box, on a sticker on the device, maybe your IoT store sent you a file via email with weird keys you didn’t understand at first, or maybe they come printed as a sheet inside of your sensor’s box. Please be very careful with these keys. You will need them to set up your devices and they are really hard to get back once lost! Make a copy of them, photos and put them in a safe place. 

Creating an Application on the LNS: Think of an application as a virtual container where your sensors' data will be collected. On The Things Network, this is straightforward. Just follow their guide to create a new application.

Now the next step is adding your Sensors to the application. This is where you'll need the DevEUI, AppEUI (or JoinEUI), and AppKey. But first you will need to enter some technical details. Things like selecting the device type, selecting the frequency plan, the LoRaWAN version and some other parameters very often depend on your specific use case and region. For starters, you can use default settings offered by The Things Network, which are suitable for most basic applications. Feel free to search online for tips on what to select for your specific region. All of this information is available online.

Activating your LoRaWAN sensors: First of all, you need to consider there are different activation methods for different sensors:

  1. Button Activation: Some sensors have an activation button. Press it according to the manufacturer's instructions to activate.
  2. Battery Installation: Other sensors require you to install batteries. Make sure you use the recommended battery type for optimal performance.
  3. Additional Methods: There might be other methods depending on the manufacturer. Some options may include activating via an app, NFC scan of your device, activation with a magnet, among others. Check their website or contact their support for guidance.

Once activated, you should see the sensor data appearing in The Things Network. This confirms that your sensor is communicating successfully.

Troubleshooting and Tips

No Data from Sensors: If your sensors are not sending data, check their power source and ensure they're within range of the gateway.

Understanding Technical Terms: Don't hesitate to use online resources or community forums to understand technical terms. The Things Network community, in particular, is very helpful.

Patience is Key: Setting up IoT devices can be challenging at first, but patience and persistence will pay off.

Setting up your first LoRaWAN network is a significant milestone in your IoT journey. By now, you should have a basic understanding of how to integrate and configure your LoRaWAN gateway and sensors. The knowledge you've gained through this process lays a solid foundation for the exciting steps ahead.

As you move forward, remember that the power of IoT lies not just in the hardware but in its application to real-world challenges. In our upcoming article, we will delve into the world of cold chain monitoring. We will guide you through selecting the most suitable LoRaWAN sensors, such as the Dragino LHT65N, Laird Sentrius RS1xx, and Milesight EM300, tailored specifically to meet the demands of maintaining optimal temperature conditions in various industries.

Furthermore, understanding the data your sensors collect is crucial. Our subsequent piece will focus on making sense of this data. Here, we will introduce you to Datacake, to simplify the process of visualizing and interpreting your IoT data. 

Whether you are monitoring temperature for sensitive pharmaceuticals or ensuring the freshness of food products during transport, Datacake can transform raw data into actionable insights.