Introduction: How to Build a Private LoRaWAN Network?

About: Dusun IoT is a specialized IoT gateway hardware maker, manufacturer and factory. We construct Internet of Things (IoT) gateways using a variety of System on Modules (SoMs) and System on Chips (SoCs) from diffe…

A network protocol called LoRaWAN makes use of the LoRa technology. It serves as the standard technology for a variety of Internet of Things applications, including:

  • Parking sensors, garbage management;
  • Smart cities: smart lighting, mass transit, waste management, etc;
  • Environment monitoring, floods, and alarms;
  • Temperature monitoring for quality assurance in the food industry;
  • Optimization of water use in agriculture;
  • And more.

Advantages of Using LoRaWAN

Through practical implementations, the LoRaWAN protocol and LoRa devices help businesses and organizations throughout the world operate more effectively. With a huge capacity to handle millions of messages from thousands of LoRaWAN gateways, it is designed to run with low power consumption and last for years on batteries. Additionally, it is inexpensive because a license-free spectrum means there is no additional charge for Cellular network use.

Meanwhile, LoRaWAN's low power (data rates range from 0.3 kbps to 50 kbps, saving a lot of electricity energy), long-range, and deep-penetrating transmission (a distance of 10+ kilometers in rural areas and up to 2 kilometers in urban areas, good coverage indoors and in multi-story buildings) are some of the main reasons why people like to use it.

What is a Private LoRaWAN Network?

Within a private network infrastructure, a private LoRaWAN network is created for a specific user and their IoT sensors. Without the need for internet connectivity, businesses that can connect their facility devices inside of buildings might choose to use the LoRaWAN private network. Within such a LoRa network, the user deploys his own LoRaWAN network gateways, network topology, and a collection of nodes.

Benefits of Using Private LoRaWAN Network

Private LoRaWAN networks, as opposed to public LoRaWAN networks, give users total control over the network so they may make any necessary modifications and customizations. Given that all data is handled within the business, it provides security and control for a specific application within the network architecture of that organization, considerably lowering the danger of eavesdropping or potential data breaches.

Is Private LoRaWAN Network Legal?

ISM (Industrial Scientific and Medical) technology is the foundation of LoRa technology. There are no statutory limitations on the use of this unrestricted radio frequency band. This implies that data can be remotely shared between devices via sensors and applications. The extent of usage is, however, constrained. 

Supplies

Outdoor LoRaWAN Gateway 

The purpose of the LoRaWAN gateway is to find data signals in the radio spectrum and collect them for transmission to data servers. If the same data is received on multiple gateways, the network service removes the redundant content from the stream. After being decoded and adaptively assessed, the data is then sent to the application. Here, we advise you to select a LoRaWAN gateway outdoor with a sturdy industrial-level enclosure (IP67 above) and built-in integration with TTN (The Things Network) or another LoRaWAN server to make the gateway work longer in harsh environments. The outdoor LoRaWAN gateway is advised to be mounted on cell towers, rooftops, and metal pipes, notably for agriculture or environmental monitoring in rural areas, in order to upload the data to the application server.

Be careful when purchasing LoRaWAN gateway hardware. The applicability changes depending on where you are. For Europe and US, look for models 868MHz and 915MHz frequencies designations respectively. (LoRa Frequency reference: RU864, IN865, EU868, US915, AU915, KR920, AS923). LTE Category reference: Cat1; LTE US support: AT&T,Verzion, Sprint.

LoRaWAN Network Server

The choice of the network server is critical as not every server will be able to interpret the LoRa data signals. Here, you can leverage vendors offering the server-building service.

End Nodes:

These devices have one or more sensors that acquire information and send it to the Gateways via their embedded LoRaWAN communication capability (LoRa modules)

Application Server:

It is the software integrated that runs and executes decisions, data visualizations, events, and more with the information collected.

Step 1: Choose the Suitable LoRaWAN Network Server

The Things Network is a LoRaWAN-based global collaborative Internet of Things ecosystem. The Things Stack powers The Things Network. It allows users to establish connectivity with The Things Network by connecting wireless devices via the LoRa Gateway TTN. The coverage map of Europe provided by The Things Network shows the locations of many gateways that are close to one another.

But I advise LORIOT for private LoRaWAN networks. This business offers a number of affordable options, such as the Start, Build, and Grow plans, which let customers begin with the entry-level plan with the most basic features for early deployments and development phases. You'll require additional selections for a more significant resolution. Surprisingly, LORIOT offers options for using web sockets or TCP sockets to transport data from their servers to the cloud or a device.

Step 2: Set Up the LoRaWAN Gateway

In this stage, you need to make a primary setup on the LoRaWAN gateway in order to capture the LoRa data packets and relay them to the LORIOT server.

Power Connection

The LoRaWAN gateway will receive an IP address that you may access through SSH or a web browser once you connect the Ethernet port to the POE port of the adapter and the LAN port to a router.

WAN Setting

The gateway's default WAN configuration uses DHCP. Make sure the IP address is on the same sub-network as your PC or other devices if you want to switch to static so that you can reach the gateway.

LAN Setting & Wi-Fi Setting

Wi-Fi AP mode is supported by the LoRaWAN gateway. Once the configuration is complete, your PC can use Wi-Fi to connect to the gateway. The gateway can then be accessed by going to the default IP address.

Step 3: Register Gateway on LORIOT Dashboard

It's now time to link the LoRaWAN gateway to the LORIOT servers, which serve as the LoRa packet repository. Go to the dashboard after logging onto your LORIOT account. To register a new gateway, navigate to the gateway registration section of the dashboard and click the link. After that, adhere to the instructions to register the gateway with LORIOT. The gateway page, which contains the platform LORIOT binaries and the documentation setup link, is then redirected to. The binary can be copied from the computer. On the LORIOT gateway page, it will show as connected after being successfully deployed.

Step 4: Creating a LoRa Device

We will now construct a LoRa device to gather and transmit data via the LoRa network. What data you want to collect will determine the types of LoRa devices to construct. You might want to design a straightforward motion or moisture sensor, for instance. A PIR sensor can be used to create a motion sensor for a relatively low price.

Reminder:

There are restrictions on the amount of data that may be sent frequently while using LoRa. This fluctuates depending on where you are, therefore you must stay current with your geographic needs to prevent data transmission failure. Note that some LoRa shields have the ability to block pins. To add more peripherals, you can solder new headers onto the shield's back, or you can utilize microcontrollers with more pins, such the nRF51-DK.  

Step 5: Adding the LoRa Device to LORIOT

On the dashboard of your LORIOT account, click and proceed as follows: Applications >> Sample App >> Manage Output >> Create New Device. If you correctly follow the procedure, you will be able to add the device to the list. The device page will then appear when you click device. Set relaxed seqno checking on this page. The gadget has now been registered.

About Encryption Safety

The network server key and the device server key are the two sets of session keys used in the end-to-end encryption of LoRaWAN. These keys and the device ID will need to be incorporated into the firmware of the device. The keys are also necessary for the network server's verification.

Step 6: Importing the Application

It's time to create a Mbed account so you may create applications using the Arm Mbed Online Compiler. Visit the development board on the board's page after registering. To add to your Mbed compiler, click. Visit the LoRaWAN-Imic-App next. Import this software by clicking. You're directed to an online compiler at this point where you can give your program a name. 

Align the frequency with your location and the shield model. Update the device firmware using the LORIOT keys. Check to see whether we did it correctly. Click compile in the online compiler. Your computer downloads the file if the compilation is successful. Next, establish your development board as a mass storage device on your computer by connecting it via USB. The device will now start to boot if you simply drag and drop the compiled file onto the circuit board. Messages begin trickling into the LORIOT device page at that point.

Step 7: Making a Web Application

We will now create an application to make advantage of the sensor's data. You might choose to use web sockets in this stage to retrieve the data from LORIOT servers. You can configure red and green on the web app to denote the detection of motion and the absence of motion, respectively. Next, go to the LORIOT dashboard and perform the actions below: Application>Example Application>Output. Set the Websocket output type. Copy the URL and the token from the current output setup section of this page, then paste them into the code. I'm done now! We've completed all the procedures necessary to build a realistic, reliable, and secure private LoRa network for data collection and transmission.

If you want to know more about LoRaWAN gateway and how to select ones and build an private LoRaWAN network, do not hesitate to contact Dusun IoT experts for more info.