{"id":27058,"date":"2019-11-18T18:59:22","date_gmt":"2019-11-18T10:59:22","guid":{"rendered":"\/blog\/?p=27058"},"modified":"2024-01-16T08:02:35","modified_gmt":"2024-01-16T08:02:35","slug":"lora-and-lorawan-for-arduino-and-raspberry-pi","status":"publish","type":"post","link":"https:\/\/www.seeedstudio.com\/blog\/2019\/11\/18\/lora-and-lorawan-for-arduino-and-raspberry-pi\/","title":{"rendered":"How to Enable LoRa and LoRaWAN on Arduino and Raspberry Pi"},"content":{"rendered":"\n<p>Building an Arduino or Raspberry Pi project that needs to send data back and forth? Wi-Fi would work fine for that. But what if you need to transmit data over a long-range, yet do not wish to invest a lot in Wi-Fi setup of a large number of routers, access points, and network security programs? Introducing LoRa and LoRaWAN, which enable secure, low-cost radio communication over massive distances of up to 20km!<\/p>\n\n\n\n<div style=\"height:15px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>In this article, we will learn about how to use LoRa and LoRaWAN with Arduino and Raspberry Pi! This blog will cover:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>What is LoRa and LoRaWAN?<\/li>\n\n\n\n<li>LoRa vs LoRaWAN &#8211; What is the difference?<\/li>\n\n\n\n<li>Why use LoRa and LoRaWAN Technology?<\/li>\n\n\n\n<li>Choosing a LoRa Development Platform<\/li>\n\n\n\n<li>Tutorial: Getting Started with LoRa on Arduino <\/li>\n\n\n\n<li>Tutorial: LoRaWAN with Raspberry Pi and Arduino<\/li>\n<\/ul>\n\n\n\n<div style=\"height:25px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<figure class=\"wp-block-image\"><img fetchpriority=\"high\" decoding=\"async\" width=\"1003\" height=\"542\" src=\"https:\/\/blog.seeedstudio.com\/wp-content\/uploads\/2019\/11\/image-79.png\" alt=\"\" class=\"wp-image-27098\" srcset=\"https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2019\/11\/image-79.png 1003w, https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2019\/11\/image-79-300x162.png 300w, https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2019\/11\/image-79-768x415.png 768w\" sizes=\"(max-width: 1003px) 100vw, 1003px\" \/><\/figure>\n\n\n\n<div style=\"height:25px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">Before we begin&#8230;<\/h3>\n\n\n\n<div style=\"height:15px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>This article is one of many extensive blog posts that we&#8217;ve written on LoRa &amp; LoRaWAN! Each of them is focused on a specific topic and is specially intended to help you better understand the two, so be sure to check them for a comprehensive insight!<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/www.seeedstudio.com\/blog\/2021\/04\/27\/a-gentle-introduction-to-lorawan-gateways-nodes\/\">A Gentle Introduction to LoRaWAN Gateways &amp; Nodes<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/www.seeedstudio.com\/blog\/2021\/06\/12\/lorawan-gateways-what-you-need-to-know\/\">LoRaWAN Gateways \u2013 What You Need to Know!<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/www.seeedstudio.com\/blog\/2021\/04\/26\/what-is-peer-to-peer-p2p-lora-communication\/\">What is Peer-To-Peer (P2P) LR Communication?<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/www.seeedstudio.com\/blog\/2021\/06\/12\/enhance-lora-communication-with-a-lora-antenna\/\">Enhance LR Communication with a LR Antenna!<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/www.seeedstudio.com\/blog\/2021\/04\/19\/lora-lorawan-vertical-solutions-for-the-real-world\/\">LoRa &amp; LoRaWAN: Vertical Solutions for the Real World<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/www.seeedstudio.com\/blog\/2021\/06\/09\/create-your-own-low-code-iot-application-with-sensecap-lorawan-devices-on-datacake\/\">Create your own low-code IoT Application with SenseCAP LoRaWAN Devices on Datacake!<\/a><\/li>\n<\/ul>\n\n\n\n<div style=\"height:25px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<hr class=\"wp-block-separator has-css-opacity\"\/>\n\n\n\n<div style=\"height:1px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">What is LR and LoRaWAN?<\/h2>\n\n\n\n<div style=\"height:15px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">LoRa<\/h3>\n\n\n\n<div style=\"height:10px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>Short for <strong>Lo<\/strong>ng <strong>Ra<\/strong>nge, LoRa is a spread spectrum modulation technique derived from chirp spread spectrum technology. It features long-range, low-power, and secure data transmission for your IoT applications.  For example, they can be used to connect sensors, gateways, machines, devices, and even people wirelessly to the cloud.<\/p>\n\n\n\n<p>LR operates in various frequency bands which range depending on the region. For example, the US operates in the 915 MHz band, Asia operates in the 865 to 867 MHz and 920 to 923 MHz band.<\/p>\n\n\n\n<div style=\"height:10px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"mce_9\">LoRaWAN<\/h3>\n\n\n\n<div style=\"height:10px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>LoRaWAN is a <strong>L<\/strong>ow <strong>P<\/strong>ower, <strong>W<\/strong>ide-<strong>A<\/strong>rea (LPWA) networking protocol that wirelessly connects battery-operated devices in a regional, national, or global network. Specifically, it targets IoT needs like secure bi-directional communication, mobility, and localization services by leveraging on unlicensed radio spectrum in the industrial, scientific, and medical (ISM) band.<\/p>\n\n\n\n<div style=\"height:25px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter is-resized\"><img decoding=\"async\" src=\"https:\/\/www.digikey.com\/-\/media\/MakerIO\/Images\/blogs\/introduction-to-lora-technology\/introduction-to-lora-technology-figure-1.jpg?ts=21c2c3bb-0661-415b-b58e-c4f12837e104\" alt=\"Image result for what is lora\" width=\"600\"\/><figcaption class=\"wp-element-caption\"><em>Source: DigiKey<\/em><\/figcaption><\/figure><\/div>\n\n\n<div style=\"height:10px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p> The network architecture of LoRaWAN is laid out in a star-of-stars topology where <strong>LoRaWAN Gateways<\/strong> act as transparent bridges that relay messages between <strong>End Nodes<\/strong> and a <strong>Central Network Server<\/strong> in the back end as seen in the image above. Gateways are connected to a network server via a Standard IP connection and end devices use single-hop wireless communication with one or many gateways.<\/p>\n\n\n\n<div style=\"height:15px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<hr class=\"wp-block-separator has-css-opacity\"\/>\n\n\n\n<div style=\"height:1px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">LoRa vs LoRaWAN &#8211; What is the difference?<\/h2>\n\n\n\n<div style=\"height:15px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>While LoRa &amp; LoRaWAN are commonly mistaken to be the same thing, they represent different components of a LoRa-based communication system that serve distinct functions.<\/p>\n\n\n\n<p>LoRa is a radio frequency carrier signal based on the physical (PHY) layer that converts the data it receives to signals through modulation. On the other hand, LoRaWAN is a protocol located in the Media Access Control (MAC) layer that promotes LR signals to wider applications, designed for large-scale public networks with a single operator. LoRaWAN can also work in different frequencies by just connecting the right antenna to its socket.<\/p>\n\n\n\n<div style=\"height:15px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter is-resized\"><img decoding=\"async\" src=\"https:\/\/lh6.googleusercontent.com\/7zTTmoBDI1KTO0pnkrUxNCBAd1c7szVLpJyo1tq6GkvSUym2aAI_mT_N1W1RMgmI9M5qq_Kg71ZdPqe_-o-u2qSKBESdFmUDAdinzlM0zl2_oPs1kO1jYLWWDBWLtUF1b4tsnAm3\" alt=\"\" width=\"700\"\/><figcaption class=\"wp-element-caption\"><em>Source: Semtech<\/em><\/figcaption><\/figure><\/div>\n\n\n<div style=\"height:15px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>In simple terms, you can understand LR to be a <strong>type of hardware<\/strong> that supports long-range wireless communication, whereas LoRaWAN refers to a <strong>network protocol<\/strong> based on LR.<\/p>\n\n\n\n<div style=\"height:15px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<hr class=\"wp-block-separator has-css-opacity\"\/>\n\n\n\n<div style=\"height:1px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">Why use LoRa and LoRaWAN Technologies? <\/h2>\n\n\n\n<div style=\"height:15px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>There are several advantages of using LoRa and LoRaWAN technology.<\/p>\n\n\n\n<div style=\"height:10px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">Long Range<\/h3>\n\n\n\n<div style=\"height:10px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>LoRa enables wireless communication over far longer ranges compared to Wi-Fi or BLE.<\/p>\n\n\n\n<div style=\"height:1px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">Low Power <\/h3>\n\n\n\n<div style=\"height:10px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>Compared to WiFi, BLE or Satellite Communication, devices in a LoRa network consume relatively little power. This allows them to run on renewable energy (eg. Solar power), and reduces battery replacement costs. Edge nodes can run on a single battery for up to years.<\/p>\n\n\n\n<div style=\"height:1px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">Secure<\/h3>\n\n\n\n<div style=\"height:10px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>LoRaWAN networks are protected by end-to-end AES128 encryption, mutual authentication, integrity protection, and confidentiality.<\/p>\n\n\n\n<div style=\"height:1px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">Standardized<\/h3>\n\n\n\n<div style=\"height:10px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>LoRa &amp; LoRaWAN are widely accepted technologies and protocols, allowing you to capitalize on device interoperability and global availability of LoRaWAN networks for rapid and convenient deployment of IoT applications anywhere.<\/p>\n\n\n\n<div style=\"height:1px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">Low Cost<\/h3>\n\n\n\n<div style=\"height:10px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>LoRa operates on unlicensed frequency spectrums, which reduces fees for network operations. In addition, a wide variety of pre-licensed LoRa development platforms reduces legislative costs.<\/p>\n\n\n\n<div style=\"height:1px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">Flexible<\/h3>\n\n\n\n<div style=\"height:10px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>LoRa &amp; LoRaWAN combine the best of other technologies and can be used in a variety of environments and networks. Like Wi-Fi, LoRaWAN operates in the unlicensed band and supports indoor applications; like Cellular, LoRa Technology is highly secure from end devices to the application server, and is suitable for outdoor applications.<\/p>\n\n\n\n<div style=\"height:15px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<hr class=\"wp-block-separator has-css-opacity\"\/>\n\n\n\n<div style=\"height:1px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">Choosing a LoRa Development Platform<\/h2>\n\n\n\n<div style=\"height:15px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>At this point, you might be wondering how you can get your hands on LoRa &amp; LoRaWAN for building your own IoT projects. Well. you&#8217;ll be glad to know that Seeed offers a variety of LoRa development platforms for every purpose, especially our latest <a href=\"https:\/\/www.seeedstudio.com\/lora-series\" target=\"_blank\" rel=\"noreferrer noopener\">LoRa solutions<\/a>!<\/p>\n\n\n\n<div style=\"height:10px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>In this section, I&#8217;ll be sharing my top product recommendations for getting started with  LoRa &amp; LoRaWAN!<\/p>\n\n\n\n<div style=\"height:10px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h3 class=\"wp-block-heading\"><a href=\"https:\/\/www.seeedstudio.com\/LoRa-E5-Dev-Kit-p-4868.html\"><strong>Wio E5 Development Kit<\/strong><\/a><\/h3>\n\n\n\n<div style=\"height:10px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>The Wio E5 Development Kit consists of the Wio E5 Development board, an antenna, a USB Type C Cable and a 2*AA 3V Battery Holder. The Wio E5 Dev Board is embedded with the Wio E5 STM32WLE5JC module with LoRaWAN protocol compatibility on the global frequency band. In addition, it supports various data protocols and interfaces, such as full GPIOs, RS-485 and Grove!<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter is-resized\"><img decoding=\"async\" src=\"https:\/\/lh5.googleusercontent.com\/PnM_XbOuJZ_tvqVu1kB0QjFqC03ot7Cw7m6Z74Sa8wnnovd-LioE0yWDZqRJfQO4qnu5klqUjuKHNmRhBlnLpO6qcuaUwdQl8FhOHdhvtuzp93wQpbpU-jbe2Uek7uStzOMDAkjd\" alt=\"\" width=\"500\"\/><\/figure><\/div>\n\n\n<p><strong>Product Features:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Ultra-low power consumption and high performance<\/li>\n\n\n\n<li>Easy testing and rapid prototyping<\/li>\n\n\n\n<li>Full GPIOs that lead out to rich interfaces, including RS-485, Grove, and etc.<\/li>\n\n\n\n<li>Global LoRaWAN\u00ae and LR frequency plan supported<\/li>\n\n\n\n<li>Long-distance transmission range to 10km (ideal value in open area)<\/li>\n<\/ul>\n\n\n\n<div style=\"height:25px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>If you\u2019re keen to pick up the Wio E5 Development Kit, visit the&nbsp;<a href=\"https:\/\/www.seeedstudio.com\/LoRa-E5-Dev-Kit-p-4868.html\">Seeed Online Store<\/a>&nbsp;now!<\/p>\n\n\n\n<div style=\"height:15px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h3 class=\"wp-block-heading\"><a href=\"https:\/\/www.seeedstudio.com\/Grove-LoRa-E5-STM32WLE5JC-p-4867.html\"><strong>Grove \u2013 Wio E5 (STM32WLE5JC)<\/strong><\/a><\/h3>\n\n\n\n<div style=\"height:10px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>If you want to use LoRa with an SBCs like the popular&nbsp;<a href=\"https:\/\/www.seeedstudio.com\/Raspberry-Pi-4-Computer-Model-B-4GB-p-4077.html\">Raspberry Pi 4<\/a>, or an Arduino microcontroller like the&nbsp;<a href=\"https:\/\/www.seeedstudio.com\/Wio-Terminal-p-4509.html\">Wio Terminal<\/a>, the Wio E5 Grove module will be your best bet. Featuring full LoRaWAN capabilities in the modular simplicity of the&nbsp;<a href=\"https:\/\/wiki.seeedstudio.com\/Grove_System\/\">Grove ecosystem<\/a>, the Grove Wio E5 lets you bring your existing devices into your LoRaWAN network with just a few simple steps!<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter is-resized\"><img decoding=\"async\" src=\"https:\/\/lh4.googleusercontent.com\/-yB9SHxtDhyjCgOBvokuAMQI5_5GZg_H1ZLpbPkRKYzfOTABjunU7za9dNvmQu2KGtcZ66_biXegqHWu0l5xzpj6Y8c2HgA3tV7ta_hDWTcpI6jyFRtjAM9ExUrhiipcct42K9lv\" alt=\"\" width=\"400\"\/><\/figure><\/div>\n\n\n<p><strong>Core Features:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Wio E5 (STM32WLE5JC) embedded<\/li>\n\n\n\n<li>Support LoRaWAN protocol on EU868\/US915 frequency band<\/li>\n\n\n\n<li>Ultra-long transmitting range up to 10km (Ideal value in open space)<\/li>\n\n\n\n<li>Easy control by AT command via UART connection<\/li>\n\n\n\n<li>Rapid prototyping with plug-and-play Grove interfaces<\/li>\n\n\n\n<li>Ultra-low power consumption and high performance<\/li>\n<\/ul>\n\n\n\n<div style=\"height:25px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>Visit the&nbsp;<a href=\"https:\/\/www.seeedstudio.com\/Grove-LoRa-E5-STM32WLE5JC-p-4867.html\">Seeed Online Store<\/a>&nbsp;to learn more about the Grove Wio E5 Module today!<\/p>\n\n\n\n<div style=\"height:25px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p><a href=\"https:\/\/www.seeedstudio.com\/Wio-E5-LE-Wireless-Module-Tape-Reel-STM32WLE5JC-p-5752.html\" target=\"_blank\" rel=\"noreferrer noopener\"><strong>Wio-E5 &amp; Wio-E5-LE (STM32WLE5JC) LoRa Module<\/strong><\/a><\/p>\n\n\n\n<p>For those who want to custom design your LoRa-powered PCBAs, I highly recommend checking out our STM32WLE5JC-powered LoRa modules: the Wio-E5 and Wio-E5-LE, which are the world-first combo of LoRa RF and MCU integrated in one single tiny module! Coming with CE, FCC, TELEC certifications, and built-in AT Command, these two modules are production-ready to scale up your LoRa products.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/media-cdn.seeedstudio.com\/media\/catalog\/product\/cache\/bb49d3ec4ee05b6f018e93f896b8a25d\/1\/-\/1-114993121-wio-e5-le-hf-45font_1__1.jpg\" alt=\"\"\/><\/figure>\n\n\n\n<p>Highlight features:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>STMicroelectronics&#8217; STM32WLE5JC embedded<\/li>\n\n\n\n<li>Built-in AT command &amp; ST SDK for further development<\/li>\n\n\n\n<li>Ultra-low power consumption down to 26 mA In transmit mode<\/li>\n\n\n\n<li>Equipped with a variety of GPIO interfaces (UART, I2C, and ADC) for peripherals expansion<\/li>\n\n\n\n<li>Ultra-long transmitting range up to 10km (Ideal value in open space)<\/li>\n<\/ul>\n\n\n\n<div style=\"height:25px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>Visit the&nbsp;<a href=\"https:\/\/www.seeedstudio.com\/Wio-E5-LE-Wireless-Module-Tape-Reel-STM32WLE5JC-p-5752.html\" target=\"_blank\" rel=\"noreferrer noopener\">Seeed Online Store<\/a>&nbsp;to learn more about the Wio-E5 LoRa Module today!<\/p>\n\n\n\n<div style=\"height:25px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p><strong>Note:<\/strong>&nbsp;A full LoRa system will require four key components: End nodes, gateway, network serve and application server. For our full list of products for each category, please visit their corresponding links!<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/www.seeedstudio.com\/catalogsearch\/result\/?q=lora%20module\" target=\"_blank\" rel=\"noreferrer noopener\">LoRa Modules<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/www.seeedstudio.com\/catalogsearch\/result\/?q=lora%20dev%20kit\">LoRa Dev Boards &amp; Dev Kits<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/www.seeedstudio.com\/catalogsearch\/result\/?q=lora%20sensor\">LoRa Sensor Nodes<\/a>&nbsp;(Devices)<\/li>\n\n\n\n<li><a href=\"https:\/\/www.seeedstudio.com\/catalogsearch\/result\/?q=lora%20gateway\">LoRa Gateways<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/www.seeedstudio.com\/catalogsearch\/result\/?q=lora%20accessory\">LoRa Accessories<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/www.seeedstudio.com\/SenseCAP-c-1339.html?product_list_stock=3&amp;product_list_order=position\">Industrial-grade LoRaWAN Products for Outdoor Applications<\/a><\/li>\n<\/ul>\n\n\n\n<div style=\"height:15px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<hr class=\"wp-block-separator has-css-opacity\"\/>\n\n\n\n<div style=\"height:1px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">Tutorial: Getting Started with LoRa on Arduino<\/h2>\n\n\n\n<div style=\"height:15px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>With this tutorial, I&#8217;d like to show you how to easily create low-power yet powerful applications in your smart home or IoT projects!<\/p>\n\n\n\n<p><em><strong>Note: <\/strong>LoRa is not suitable for projects that require large amounts of data to be transmitted at high rates.<\/em><\/p>\n\n\n\n<p>You can use LR in two ways: <\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Point-to-point communication <\/li>\n\n\n\n<li>Network (Building a LoRa  network using LoRaWAN) <\/li>\n<\/ul>\n\n\n\n<p>In today&#8217;s tutorial, we will be setting up our Edge Node with our XIAO SAMD21 and Grove DHT11 Temperature and Humidity Sensor to send data to our server on The Things Network.<\/p>\n\n\n\n<div style=\"height:15px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter is-resized\"><img decoding=\"async\" src=\"https:\/\/files.seeedstudio.com\/products\/113020091\/WechatIMG647.jpeg\" alt=\"\" width=\"600\"\/><\/figure><\/div>\n\n\n<div style=\"height:15px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">Required Materials<\/h3>\n\n\n\n<div style=\"height:10px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/www.seeedstudio.com\/Seeeduino-XIAO-Arduino-Microcontroller-SAMD21-Cortex-M0+-p-4426.html\">Seeed Studio XIAO SAMD21<\/a> SAM (Fully Arduino Compatible)<\/li>\n\n\n\n<li><a href=\"https:\/\/www.seeedstudio.com\/Seeeduino-XIAO-Expansion-board-p-4746.html\">XIAO Expansion Board<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/www.seeedstudio.com\/Grove-LoRa-E5-STM32WLE5JC-p-4867.html\">Grove &#8211; Wio-E5 (STM32WLE5JC), EU868\/US915, LoRaWAN supported<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/www.seeedstudio.com\/Grove-Temperature-Humidity-Sensor-DHT11.html\">Grove &#8211; DHT11 Temperature &amp; Humidity Sensor<\/a><\/li>\n<\/ul>\n\n\n\n<div style=\"height:10px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"hardware-connection\"><strong>Hardware Connection<\/strong><\/h3>\n\n\n\n<div style=\"height:10px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p><strong>Step 1:<\/strong>&nbsp;Connect the Wio-E5 module directly to the &#8220;UART&#8221; slot of the Expansion Board.&nbsp;<\/p>\n\n\n\n<p><strong>Step 2:<\/strong>&nbsp;Connect the DHT11 into the &#8220;A0\/D0&#8221; socket as shown below.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large is-resized\"><img decoding=\"async\" src=\"https:\/\/blog.seeedstudio.com\/wp-content\/uploads\/2021\/04\/P2P-1030x645.png\" alt=\"\" class=\"wp-image-41966\" width=\"600\" srcset=\"https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2021\/04\/P2P-1030x645.png 1030w, https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2021\/04\/P2P-300x188.png 300w, https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2021\/04\/P2P-768x481.png 768w, https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2021\/04\/P2P-1024x641.png 1024w, https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2021\/04\/P2P.png 1232w\" sizes=\"(max-width: 1030px) 100vw, 1030px\" \/><\/figure><\/div>\n\n\n<div style=\"height:10px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"software-preparation\"><strong>Software Preparation<\/strong><\/h3>\n\n\n\n<div style=\"height:10px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>If this is the first time you work with Arduino, we strongly recommend you to see&nbsp;<a href=\"https:\/\/wiki.seeedstudio.com\/Getting_Started_with_Arduino\/\">Getting Started with Arduino<\/a> before the start. Click to learn details about&nbsp;<a href=\"https:\/\/wiki.seeedstudio.com\/How_to_install_Arduino_Library\/\">how to install an Arduino Library<\/a><\/p>\n\n\n\n<div style=\"height:10px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p><strong>Step 1:<\/strong>&nbsp;Install the&nbsp;<a href=\"https:\/\/github.com\/olikraus\/U8g2_Arduino\">u8g2 library<\/a><\/p>\n\n\n\n<div style=\"height:10px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p><strong>Step 2:<\/strong>&nbsp;Install the&nbsp;<a href=\"https:\/\/github.com\/Seeed-Studio\/Grove_Temperature_And_Humidity_Sensor\">DHT sensor library<\/a><\/p>\n\n\n\n<div style=\"height:10px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p><strong>Step 3: <\/strong>Copy the following code into a new Arduino Sketch and upload.<\/p>\n\n\n\n<div style=\"height:10px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<pre class=\"wp-block-code\"><code>#include &lt;Arduino.h&gt;\n#include &lt;U8x8lib.h&gt;\n#include \"DHT.h\"\n \n#define DHTPIN 0 \/\/ what pin we're connected to\n \n\/\/ Uncomment whatever type you're using!\n#define DHTTYPE DHT11 \/\/ DHT 11\n\/\/ #define DHTTYPE DHT22   \/\/ DHT 22  (AM2302)\n\/\/#define DHTTYPE DHT21   \/\/ DHT 21 (AM2301)\n \nDHT dht(DHTPIN, DHTTYPE);\n \nU8X8_SSD1306_128X64_NONAME_HW_I2C u8x8(\/* reset=*\/U8X8_PIN_NONE);\n\/\/ U8X8_SSD1306_128X64_NONAME_SW_I2C u8x8(\/* clock=*\/ SCL, \/* data=*\/ SDA, \/* reset=*\/ U8X8_PIN_NONE);   \/\/ OLEDs without Reset of the Display\n \nstatic char recv_buf&#91;512];\nstatic bool is_exist = false;\nstatic bool is_join = false;\nstatic int led = 0;\n \nstatic int at_send_check_response(char *p_ack, int timeout_ms, char *p_cmd, ...)\n{\n    int ch;\n    int num = 0;\n    int index = 0;\n    int startMillis = 0;\n    va_list args;\n    memset(recv_buf, 0, sizeof(recv_buf));\n    va_start(args, p_cmd);\n    Serial1.printf(p_cmd, args);\n    Serial.printf(p_cmd, args);\n    va_end(args);\n    delay(200);\n    startMillis = millis();\n \n    if (p_ack == NULL)\n    {\n        return 0;\n    }\n \n    do\n    {\n        while (Serial1.available() &gt; 0)\n        {\n            ch = Serial1.read();\n            recv_buf&#91;index++] = ch;\n            Serial.print((char)ch);\n            delay(2);\n        }\n \n        if (strstr(recv_buf, p_ack) != NULL)\n        {\n            return 1;\n        }\n \n    } while (millis() - startMillis &lt; timeout_ms);\n    return 0;\n}\n \nstatic void recv_prase(char *p_msg)\n{\n    if (p_msg == NULL)\n    {\n        return;\n    }\n    char *p_start = NULL;\n    int data = 0;\n    int rssi = 0;\n    int snr = 0;\n \n    p_start = strstr(p_msg, \"RX\");\n    if (p_start &amp;&amp; (1 == sscanf(p_start, \"RX: \\\"%d\\\"\\r\\n\", &amp;data)))\n    {\n        Serial.println(data);\n        u8x8.setCursor(2, 4);\n        u8x8.print(\"led :\");\n        led = !!data;\n        u8x8.print(led);\n        if (led)\n        {\n            digitalWrite(LED_BUILTIN, LOW);\n        }\n        else\n        {\n            digitalWrite(LED_BUILTIN, HIGH);\n        }\n    }\n \n    p_start = strstr(p_msg, \"RSSI\");\n    if (p_start &amp;&amp; (1 == sscanf(p_start, \"RSSI %d,\", &amp;rssi)))\n    {\n        u8x8.setCursor(0, 6);\n        u8x8.print(\"                \");\n        u8x8.setCursor(2, 6);\n        u8x8.print(\"rssi:\");\n        u8x8.print(rssi);\n    }\n    p_start = strstr(p_msg, \"SNR\");\n    if (p_start &amp;&amp; (1 == sscanf(p_start, \"SNR %d\", &amp;snr)))\n    {\n        u8x8.setCursor(0, 7);\n        u8x8.print(\"                \");\n        u8x8.setCursor(2, 7);\n        u8x8.print(\"snr :\");\n        u8x8.print(snr);\n    }\n}\n \nvoid setup(void)\n{\n    u8x8.begin();\n    u8x8.setFlipMode(1);\n    u8x8.setFont(u8x8_font_chroma48medium8_r);\n \n    Serial.begin(115200);\n    pinMode(LED_BUILTIN, OUTPUT);\n    digitalWrite(LED_BUILTIN, HIGH);\n \n    Serial1.begin(9600);\n    Serial.print(\"E5 LORAWAN TEST\\r\\n\");\n    u8x8.setCursor(0, 0);\n \n    if (at_send_check_response(\"+AT: OK\", 100, \"AT\\r\\n\"))\n    {\n        is_exist = true;\n        at_send_check_response(\"+ID: AppEui\", 1000, \"AT+ID\\r\\n\");\n        at_send_check_response(\"+MODE: LWOTAA\", 1000, \"AT+MODE=LWOTAA\\r\\n\");\n        at_send_check_response(\"+DR: EU868\", 1000, \"AT+DR=EU868\\r\\n\");\n        at_send_check_response(\"+CH: NUM\", 1000, \"AT+CH=NUM,0-2\\r\\n\");\n        at_send_check_response(\"+KEY: APPKEY\", 1000, \"AT+KEY=APPKEY,\\\"2B7E151628AED2A6ABF7158809CF4F3C\\\"\\r\\n\");\n        at_send_check_response(\"+CLASS: C\", 1000, \"AT+CLASS=A\\r\\n\");\n        at_send_check_response(\"+PORT: 8\", 1000, \"AT+PORT=8\\r\\n\");\n        delay(200);\n        u8x8.setCursor(5, 0);\n        u8x8.print(\"LoRaWAN\");\n        is_join = true;\n    }\n    else\n    {\n        is_exist = false;\n        Serial.print(\"No E5 module found.\\r\\n\");\n        u8x8.setCursor(0, 1);\n        u8x8.print(\"unfound E5 !\");\n    }\n \n    dht.begin();\n \n    u8x8.setCursor(0, 2);\n    u8x8.setCursor(2, 2);\n    u8x8.print(\"temp:\");\n \n    u8x8.setCursor(2, 3);\n    u8x8.print(\"humi:\");\n \n    u8x8.setCursor(2, 4);\n    u8x8.print(\"led :\");\n    u8x8.print(led);\n}\n \nvoid loop(void)\n{\n    float temp = 0;\n    float humi = 0;\n \n    temp = dht.readTemperature();\n    humi = dht.readHumidity();\n \n    Serial.print(\"Humidity: \");\n    Serial.print(humi);\n    Serial.print(\" %\\t\");\n    Serial.print(\"Temperature: \");\n    Serial.print(temp);\n    Serial.println(\" *C\");\n \n    u8x8.setCursor(0, 2);\n    u8x8.print(\"      \");\n    u8x8.setCursor(2, 2);\n    u8x8.print(\"temp:\");\n    u8x8.print(temp);\n    u8x8.setCursor(2, 3);\n    u8x8.print(\"humi:\");\n    u8x8.print(humi);\n \n    if (is_exist)\n    {\n        int ret = 0;\n        if (is_join)\n        {\n \n            ret = at_send_check_response(\"+JOIN: Network joined\", 12000, \"AT+JOIN\\r\\n\");\n            if (ret)\n            {\n                is_join = false;\n            }\n            else\n            {\n                at_send_check_response(\"+ID: AppEui\", 1000, \"AT+ID\\r\\n\");\n                Serial.print(\"JOIN failed!\\r\\n\\r\\n\");\n                delay(5000);\n            }\n        }\n        else\n        {\n            char cmd&#91;128];\n            sprintf(cmd, \"AT+CMSGHEX=\\\"%04X%04X\\\"\\r\\n\", (int)temp, (int)humi);\n            ret = at_send_check_response(\"Done\", 5000, cmd);\n            if (ret)\n            {\n                recv_prase(recv_buf);\n            }\n            else\n            {\n                Serial.print(\"Send failed!\\r\\n\\r\\n\");\n            }\n            delay(5000);\n        }\n    }\n    else\n    {\n        delay(1000);\n    }\n}<\/code><\/pre>\n\n\n\n<div style=\"height:15px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"ttn-console-configuration-setup\">TTN Console Configuration Setup<\/h3>\n\n\n\n<div style=\"height:10px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>In this section, we set up our console and application on The Things Network to visualise the data from our XIAO SAMD21. <\/p>\n\n\n\n<div style=\"height:10px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p><strong>Step 1:<\/strong> Head over to the <a href=\"https:\/\/www.thethingsnetwork.org\/\">TTN website<\/a> and create your account. Navigate to &#8220;Console&#8221;, then click on &#8220;APPLICATIONS&#8221;.<\/p>\n\n\n\n<div style=\"height:10px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter is-resized\"><img decoding=\"async\" src=\"https:\/\/files.seeedstudio.com\/products\/113990896\/wiki\/s2.1.png\" alt=\"2.1\" width=\"800\"\/><\/figure><\/div>\n\n\n<div style=\"height:15px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p><strong>Step 2<\/strong>: Add an Application.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Application ID: Enter a unique application name.<\/li>\n\n\n\n<li>Description: Enter a description.<\/li>\n\n\n\n<li>Handler Registration: Select the same handler as the gateway router.<\/li>\n\n\n\n<li>Select <em>Add Application<\/em> to continue.<\/li>\n<\/ul>\n\n\n\n<div style=\"height:15px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter is-resized\"><img decoding=\"async\" src=\"https:\/\/files.seeedstudio.com\/products\/113990896\/wiki\/s3.5.png\" alt=\"3.5\" width=\"700\"\/><\/figure><\/div>\n\n\n<div style=\"height:15px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p><strong>Step 3<\/strong>: Add a decoding script to the application and save.<\/p>\n\n\n\n<div style=\"height:15px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter is-resized\"><img decoding=\"async\" src=\"https:\/\/files.seeedstudio.com\/products\/113020091\/decoding%20script.png\" alt=\"3.1\" width=\"700\"\/><\/figure><\/div>\n\n\n<div style=\"height:10px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>Copy and paste the decoding function below.<\/p>\n\n\n\n<div style=\"height:10px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<pre id=\"__code_3\" class=\"wp-block-code\"><code><strong>function<\/strong> <strong>Decoder<\/strong>(bytes, port) {\n\n  <strong>var<\/strong> decoded = {};\n  <strong>if<\/strong> (port === 8) {\n    decoded.temp = bytes&#91;0] &lt;&lt;8 | bytes&#91;1];\n    decoded.humi = bytes&#91;2] &lt;&lt;8 | bytes&#91;3];\n  }\n\n  <strong>return<\/strong> decoded;\n}<\/code><\/pre>\n\n\n\n<div style=\"height:15px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p><strong>Step 4<\/strong>: Add the Grove &#8211; Wio-E5 device to the TTN Console.<\/p>\n\n\n\n<p>First, we have to retrieve some module information. Run the downloaded program module, view the DEVEUI and APP EUI of the Wio-E5 module through the serial port (USB).<\/p>\n\n\n\n<div style=\"height:10px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter is-resized\"><img decoding=\"async\" src=\"https:\/\/files.seeedstudio.com\/products\/113020091\/Screen%20Shot%202021-03-09%20at%203.19.22%20PM.png\" alt=\"3.10\" width=\"600\"\/><\/figure><\/div>\n\n\n<div style=\"height:10px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>Add these two EUIs to your TTN Network through Settings &gt; EUIs &gt; Add EUI.<\/p>\n\n\n\n<div style=\"height:10px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter is-resized\"><img decoding=\"async\" src=\"https:\/\/files.seeedstudio.com\/products\/113020091\/Screen%20Shot%202021-03-09%20at%203.19.29%20PM.png\" alt=\"3.10\" width=\"700\"\/><\/figure><\/div>\n\n\n<div style=\"height:15px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p><strong>Step 5:<\/strong> Register Device by navigating to Devices &gt; Register Device.<\/p>\n\n\n\n<div style=\"height:10px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter is-resized\"><img decoding=\"async\" src=\"https:\/\/files.seeedstudio.com\/products\/113020091\/Screen%20Shot%202021-03-09%20at%203.19.35%20PM.png\" alt=\"3.10\" width=\"700\"\/><\/figure><\/div>\n\n\n<div style=\"height:10px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Device ID: Enter a unique name.<\/li>\n\n\n\n<li>Device EUI: Select the E5 dev EUI.<\/li>\n\n\n\n<li>APP KEY: Use this APPkey 2B7E151628AED2A6ABF7158809CF4F3C<\/li>\n\n\n\n<li>App EUI: Select the E5 App EUI.<\/li>\n<\/ul>\n\n\n\n<div style=\"height:10px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter is-resized\"><img decoding=\"async\" src=\"https:\/\/files.seeedstudio.com\/products\/113020091\/Screen%20Shot%202021-03-09%20at%203.19.44%20PM.png\" alt=\"3.10\" width=\"700\"\/><\/figure><\/div>\n\n\n<div style=\"height:15px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p><strong>Step 6:<\/strong> Perform Gateway Registration on TTN Console.<\/p>\n\n\n\n<p>Please refer to the instructions shown in&nbsp;<a href=\"https:\/\/wiki.seeedstudio.com\/The-Things-Indoor-Gateway\/\">The Things Indoor Gateway wiki page: The Things Indoor Gateway Get Started with SenseCAP<\/a>.<\/p>\n\n\n\n<div style=\"height:10px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter is-resized\"><img decoding=\"async\" src=\"https:\/\/files.seeedstudio.com\/products\/113020091\/Screen%20Shot%202021-03-09%20at%203.19.53%20PM.png\" alt=\"3.10\" width=\"700\"\/><\/figure><\/div>\n\n\n<div style=\"height:15px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p><strong>Step 7<\/strong>: Review the Result. You can check the readings via the Serial Monitor.<\/p>\n\n\n\n<div style=\"height:10px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter is-resized\"><img decoding=\"async\" src=\"https:\/\/files.seeedstudio.com\/products\/113020091\/Screen%20Shot%202021-03-09%20at%203.20.00%20PM.png\" alt=\"\" width=\"600\"\/><\/figure><\/div>\n\n\n<div style=\"height:10px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"temperature-and-humidity-parameters\">Temperature and Humidity Parameters<\/h3>\n\n\n\n<div style=\"height:10px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>As the final step in setting up your Grove &#8211; Wio E5 module, we will demonstrate how you can visualise the temperature and humidity data that is being remotely transmitted to TTN.<\/p>\n\n\n\n<div style=\"height:10px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p><strong>Step 1:<\/strong> Enter the APPLICATION created in TTN and click on the data page to view the reported data.<\/p>\n\n\n\n<div style=\"height:10px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter is-resized\"><img decoding=\"async\" src=\"https:\/\/files.seeedstudio.com\/products\/113020091\/Screen%20Shot%202021-03-09%20at%203.26.05%20PM.png\" alt=\"\" width=\"700\"\/><\/figure><\/div>\n\n\n<div style=\"height:15px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p><strong>Step 2:<\/strong> Remote Control Example with LED<\/p>\n\n\n\n<p>You can also send commands to control your Edge Node through the TTN application console. In this example, we will be controlling the LED on the Seeeduino XIAO by sending commands through a downlink payload.<\/p>\n\n\n\n<p>First, enter the current device control page. Send the specified data in the \u201cDOWNLINK\u201d window. Send &#8220;01&#8221; to turn on LED light; Send &#8220;00&#8221; to turn it off. You can add more functionality to your Edge Node by programming it into the uploaded Arduino Sketch.<\/p>\n\n\n\n<div style=\"height:10px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter is-resized\"><img decoding=\"async\" src=\"https:\/\/files.seeedstudio.com\/products\/113020091\/Screen%20Shot%202021-03-09%20at%203.30.31%20PM.png\" alt=\"\" width=\"700\"\/><\/figure><\/div>\n\n\n<div style=\"height:15px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>And that concludes this basic tutorial on how to connect a LoRa Edge Node with a Seeed Studio XIAO SAMD21 to send data remotely in a LoRaWAN Network! In the next section, we will go further in-depth to create our very own LoRaWAN.<\/p>\n\n\n\n<div style=\"height:15px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<hr class=\"wp-block-separator has-css-opacity\"\/>\n\n\n\n<div style=\"height:1px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">LoRaWAN with Raspberry Pi and Arduino Tutorial<\/h2>\n\n\n\n<div style=\"height:15px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>A typical LoRa  network consists of 4 parts: Edge \/ End Node Devices (eg. Sensors, Radio Module), Gateways, a network service, and an application.  Similar to a Wi-Fi network, a LoRaWAN network can only be set up with both devices and gateways.  LoRaWAN Gateways help to scan the spectrum and capture LR packets.<\/p>\n\n\n\n<p>A unique feature of LoRaWAN network infrastructure is that no devices are associated with a single gateway. This allows all gateways within range of a device to receive its signal and forward the data to a network service that handles the packet. The network service acts as the entity that speaks LoRaWAN to the gateway, which gets the data to the application. They also handle other LR features like adaptive data rating. After that, the network service will then forward the decrypted data to your application where it will be processed.<\/p>\n\n\n\n<p>Through this second tutorial, you will learn how to build your own complete private LoRaWAN network with Arduino and Raspberry Pi!<\/p>\n\n\n\n<div style=\"height:10px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">Required Materials<\/h3>\n\n\n\n<div style=\"height:10px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>To follow along with this tutorial, you can acquire all the required materials in a complete package with the <a href=\"https:\/\/www.seeedstudio.com\/LoRa-LoRaWAN-Gateway-868MHz-Kit-with-Raspberry-Pi-3-p-2823.html?utm_source=blog&amp;utm_medium=blog\">LoRa \/LoRaWAN Gateway &#8211; 868MHz Kit with Raspberry Pi 3<\/a>. This Kit provides all the basic elements to build a LoRaWAN Network, containing:<\/p>\n\n\n\n<div style=\"height:10px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter is-resized\"><img decoding=\"async\" src=\"https:\/\/blog.seeedstudio.com\/wp-content\/uploads\/2019\/11\/image-69.png\" alt=\"\" class=\"wp-image-27085\" width=\"500\" srcset=\"https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2019\/11\/image-69.png 861w, https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2019\/11\/image-69-300x224.png 300w, https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2019\/11\/image-69-768x574.png 768w\" sizes=\"(max-width: 861px) 100vw, 861px\" \/><\/figure><\/div>\n\n\n<div style=\"height:10px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<figure class=\"wp-block-table aligncenter\"><table><tbody><tr><td>No.<\/td><td>Parts<\/td><\/tr><tr><td>1<\/td><td>1 x Raspberry Pi 3<\/td><\/tr><tr><td>2<\/td><td>1 x Gateway module RHF0M301\u2013868<br><\/td><\/tr><tr><td>3<\/td><td>1 x PRI 2 Bridge RHF4T002<br><\/td><\/tr><tr><td>4<\/td><td>1 x Seeeduino LoRaWAN with GPS (RHF76-052AM) <\/td><\/tr><tr><td>5<\/td><td>1 x USB to UART Adapter<br><\/td><\/tr><tr><td>6<\/td><td>1 x Upgrade to 16GB Micro SD Card \u2013 Class 10<br><\/td><\/tr><tr><td>7<\/td><td>1 x 0dBi Rubber Duck Antenna<br><\/td><\/tr><tr><td>8<\/td><td>1 x 5V\/2.1A American Standard Adapter with Micro USB Connector<br><\/td><\/tr><tr><td>9<\/td><td>1 x Micro USB Cable 20cm<br><\/td><\/tr><tr><td>10<\/td><td>1 x Micro USB Cable 100cm<br><\/td><\/tr><tr><td>11<\/td><td>1 x RJ45 Ethernet Cable 200cm<br><\/td><\/tr><tr><td>12<\/td><td>1 x JST2.0 Cable 10cm<br><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>We have also recently released the WM1302 Pi Hat for building powerful LoRaWAN Gateways with the <a href=\"https:\/\/www.seeedstudio.com\/WM1302-LoRaWAN-Gateway-Module-SPI-EU868-p-4889.html\">WM1302 LoRaWAN Gateway Modules<\/a> on the Raspberry Pi. The new WM1302 series is based on the latest Semtech SX1302, which brings improvements across the board in transmission power, thermal management and power efficiency.<\/p>\n\n\n\n<p>We are currently in the midst of preparing a tutorial with the new WM1302 Pi Hat. Meanwhile, kindly visit its <a href=\"https:\/\/www.seeedstudio.com\/WM1302-Pi-Hat-p-4897.html\">product page<\/a> to learn more!<\/p>\n\n\n\n<div style=\"height:10px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"mce_196\">Step by Step tutorial: Build your own LR Network using LoRaWAN<\/h3>\n\n\n\n<div style=\"height:10px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h4 class=\"wp-block-heading\">Hardware Setup<\/h4>\n\n\n\n<div style=\"height:10px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>Since there are many interfaces here, let&#8217;s first go over their capabilities.<\/p>\n\n\n\n<div style=\"height:10px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter is-resized\"><img decoding=\"async\" src=\"https:\/\/github.com\/SeeedDocument\/LoRaWAN_Gateway-868MHz_Kit_with_Raspberry_Pi_3\/raw\/master\/img\/Lora_interface.jpg\" alt=\"\" width=\"401\" height=\"294\"\/><\/figure><\/div>\n\n\n<div style=\"height:10px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p><strong>Step 1:<\/strong> Plug&nbsp;<strong>Gateway module RHF0M301\u2013868<\/strong>&nbsp;into&nbsp;<strong>PRI 2 Bridge RHF4T002<\/strong>.<\/p>\n\n\n\n<div style=\"height:10px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p><strong>Step 2:<\/strong> Plug&nbsp;<strong>PRI 2 Bridge RHF4T002<\/strong>&nbsp;into&nbsp;<strong>Raspberry Pi 3<\/strong>.<\/p>\n\n\n\n<div style=\"height:10px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p><strong>Step 3:<\/strong> Connect \u2777&nbsp;and&nbsp;\u2778 via a 20cm Micro-USB cable.<\/p>\n\n\n\n<div style=\"height:10px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p><strong>Step 4:<\/strong> Connect the&nbsp;<strong>USB to UART Adapter<\/strong>&nbsp;to the GPIO of&nbsp;<strong>Raspberry Pi 3<\/strong>. Please connect them as the picture shown below.<\/p>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter is-resized\"><img decoding=\"async\" src=\"https:\/\/blog.seeedstudio.com\/wp-content\/uploads\/2019\/11\/image-70.png\" alt=\"\" class=\"wp-image-27086\" width=\"700\" srcset=\"https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2019\/11\/image-70.png 898w, https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2019\/11\/image-70-300x124.png 300w, https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2019\/11\/image-70-768x316.png 768w\" sizes=\"(max-width: 898px) 100vw, 898px\" \/><\/figure><\/div>\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p><strong>Step 5:<\/strong> Plug the <strong>USB to UART Adapter<\/strong> into your PC.<\/p>\n\n\n\n<div style=\"height:10px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p><strong>Step 6: <\/strong>Connect&nbsp;\u2776&nbsp;with 5V\/2.1A Standard Adapter via 100cm Micro-USB cable.<\/p>\n\n\n\n<div style=\"height:10px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>Your hardware connection should look like this:<\/p>\n\n\n\n<div style=\"height:15px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter is-resized\"><img decoding=\"async\" src=\"https:\/\/blog.seeedstudio.com\/wp-content\/uploads\/2019\/11\/image-71.png\" alt=\"\" class=\"wp-image-27087\" width=\"600\" srcset=\"https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2019\/11\/image-71.png 795w, https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2019\/11\/image-71-300x145.png 300w, https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2019\/11\/image-71-768x372.png 768w\" sizes=\"(max-width: 795px) 100vw, 795px\" \/><\/figure><\/div>\n\n\n<div style=\"height:15px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h4 class=\"wp-block-heading\">Software Setup<\/h4>\n\n\n\n<div style=\"height:10px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>Before starting, take note that you will need the following software on your computer:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"http:\/\/wiki.seeed.cc\/Getting_Started_with_Arduino\/\">Arduino IDE <\/a> &#8211; Portable serial tool for Serial Communication with the Seeeduino LoRaWAN with GPS.<\/li>\n\n\n\n<li><a href=\"https:\/\/www.chiark.greenend.org.uk\/~sgtatham\/putty\/latest.html\">PuTTY<\/a> &#8211; Terminal tool with both serial and SSH capabilities to control our Raspberry Pi.<\/li>\n<\/ul>\n\n\n\n<div style=\"height:25px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h4 class=\"wp-block-heading\">Connecting to Local Server<\/h4>\n\n\n\n<div style=\"height:10px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p><strong>Step 1: Power up the Raspberry Pi and connect to PuTTY.<\/strong><\/p>\n\n\n\n<div style=\"height:15px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>First, make sure the serial tool and RPi (RHF4T002 Adapter) are connected correctly. Plug the FT232 tool into your PC (If COM port is not recognized correctly, please refer to&nbsp;<a href=\"http:\/\/www.ftdichip.com\/Drivers\/VCP.htm\">Virtual COM Port Drivers<\/a>).<\/p>\n\n\n\n<p>Open&nbsp;Device Manager&nbsp;of your PC to get the right COM port. Like COM15 for example. Configure ExtraPuTTY according to below picture (Speed 115200, others use defaults), click&nbsp;Open. As the gateway is still not opened, so there is nothing in the terminal.<\/p>\n\n\n\n<div style=\"height:15px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter is-resized\"><img decoding=\"async\" src=\"https:\/\/github.com\/SeeedDocument\/LoRaWAN_Gateway-868MHz_Kit_with_Raspberry_Pi_3\/raw\/master\/img\/putty_lora.png\" alt=\"\" width=\"399\" height=\"339\"\/><\/figure><\/div>\n\n\n<div style=\"height:15px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>Power the gateway up. The booting log will be showed in the PuTTY terminal. When complete, you will be prompted to input your login name. (This may take 1 &#8211; 2 minutes to complete)<\/p>\n\n\n\n<div style=\"height:15px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter is-resized\"><img decoding=\"async\" src=\"https:\/\/github.com\/SeeedDocument\/LoRaWAN_Gateway-868MHz_Kit_with_Raspberry_Pi_3\/raw\/master\/img\/login_putty.png\" alt=\"\" width=\"500\"\/><\/figure><\/div>\n\n\n<div style=\"height:15px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>Login with the RHF2S001&#8217;s default username and password (Username:&nbsp;<strong>rxhf<\/strong>, Password:&nbsp;<strong>risinghf<\/strong>&nbsp;). Then, connect the RHF2S001 with the router through ethernet cable and run <strong>ifconfig <\/strong>to check the IP address and MAC address.<\/p>\n\n\n\n<div style=\"height:15px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter is-resized\"><img decoding=\"async\" src=\"https:\/\/github.com\/SeeedDocument\/LoRaWAN_Gateway-868MHz_Kit_with_Raspberry_Pi_3\/raw\/master\/img\/Lora_getip.png\" alt=\"\" width=\"500\"\/><figcaption class=\"wp-element-caption\"> <br>IP IS IN THE BLUE SQUARE, MAC ADDRESS IS IN ORANGE SQUARE (FORMAT: B8:27:EB:XX:XX:XX)<br><\/figcaption><\/figure><\/div>\n\n\n<div style=\"height:15px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>To login through SSH, you need to fill in the Hostname with the IP address you&#8217;ve just got and use port 22 where you will choose the SSH connection type. Just leave the other options by default. Then simply click&nbsp;<strong>Open<\/strong>. (We are using SSH as it is faster and more stable compared to Ethernet and UART.<\/p>\n\n\n\n<div style=\"height:15px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p><strong>Step 2: Expand SD Card File System<\/strong><\/p>\n\n\n\n<div style=\"height:10px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>By default, the image enables only 2GB for Raspbian System. It is recommended to expand the filesystem to use the entire SD card instead. Run the below command in the PuTTY terminal to start raspi-config.<\/p>\n\n\n\n<div style=\"height:10px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo raspi-config<\/code><\/pre>\n\n\n\n<div style=\"height:10px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>Choose \u201cExpand Filesystem\u201d, when finished reboot to make it effect. Run below command in the PuTTY terminal to know the SD card capacity and usage.<\/p>\n\n\n\n<div style=\"height:10px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<pre class=\"wp-block-code\"><code>df -h<\/code><\/pre>\n\n\n\n<div style=\"height:10px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>Please refer to Raspberry Pi Foundation&#8217;s <a href=\"https:\/\/www.raspberrypi.org\/documentation\/configuration\/raspi-config.md\">raspi-config tool documentation<\/a> for more details.<\/p>\n\n\n\n<div style=\"height:15px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p><strong>Step 3: Use RHF2S001 integrated LoRaWAN server<\/strong><\/p>\n\n\n\n<div style=\"height:10px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>Connect Gateway with the internal server by running the following commands in the PuTTY terminal and check the status:<\/p>\n\n\n\n<div style=\"height:10px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo systemctl status pktfwd<\/code><\/pre>\n\n\n\n<p> <\/p>\n\n\n\n<div style=\"height:10px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>If pktfwd service is not active, run the following command to start it:<\/p>\n\n\n\n<div style=\"height:10px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo systemctl enable pktfwd\nsudo systemctl restart pktfwd<\/code><\/pre>\n\n\n\n<div style=\"height:10px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>Here is the Frequency Plan for EU868,<\/p>\n\n\n\n<div style=\"height:10px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img loading=\"lazy\" decoding=\"async\" width=\"211\" height=\"440\" src=\"https:\/\/blog.seeedstudio.com\/wp-content\/uploads\/2019\/11\/image-72.png\" alt=\"\" class=\"wp-image-27090\" srcset=\"https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2019\/11\/image-72.png 211w, https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2019\/11\/image-72-144x300.png 144w\" sizes=\"(max-width: 211px) 100vw, 211px\" \/><\/figure><\/div>\n\n\n<div style=\"height:10px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>and the Frequency Plan for US915 HYBRID.<\/p>\n\n\n\n<div style=\"height:10px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img loading=\"lazy\" decoding=\"async\" width=\"218\" height=\"501\" src=\"https:\/\/blog.seeedstudio.com\/wp-content\/uploads\/2019\/11\/image-73.png\" alt=\"\" class=\"wp-image-27091\" srcset=\"https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2019\/11\/image-73.png 218w, https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2019\/11\/image-73-131x300.png 131w\" sizes=\"(max-width: 218px) 100vw, 218px\" \/><\/figure><\/div>\n\n\n<div style=\"height:10px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>Now, we will configure Seeeduino LoRaWAN&#8217;s settings by first connecting the it to the PC. Then, open the&nbsp;Arduino&nbsp;IDE and copy the code below into a new sketch.<\/p>\n\n\n\n<div style=\"height:10px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<pre class=\"wp-block-code\"><code> void setup()\n {\n     Serial1.begin(9600);\n     SerialUSB.begin(115200);\n }\n\n void loop()\n {\n     while(Serial1.available())\n     {\n         SerialUSB.write(Serial1.read());\n     }\n     while(SerialUSB.available())\n     {\n         Serial1.write(SerialUSB.read());\n     }\n }<\/code><\/pre>\n\n\n\n<div style=\"height:10px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>Next, choose the appropriate serial port for the Seeeduino LoRaWAN and upload the code.<\/p>\n\n\n\n<div style=\"height:15px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter is-resized\"><img decoding=\"async\" src=\"https:\/\/github.com\/SeeedDocument\/LoRaWAN_Gateway-868MHz_Kit_with_Raspberry_Pi_3\/raw\/master\/img\/port_lora.png\" alt=\"\" width=\"600\"\/><\/figure><\/div>\n\n\n<div style=\"height:15px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>Now, open the serial monitor in the upper right corner (or press Ctrl+Shift+M). Check&nbsp;<strong>Newline<\/strong>&nbsp;(This option will add &#8220;\\r\\n&#8221; at the end of each command), set the baud rate 9600, then enter the commands below and press&nbsp;<strong>send<\/strong>.<\/p>\n\n\n\n<div style=\"height:15px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter is-resized\"><img decoding=\"async\" src=\"https:\/\/github.com\/SeeedDocument\/LoRaWAN_Gateway-868MHz_Kit_with_Raspberry_Pi_3\/raw\/master\/img\/At_send.png\" alt=\"\" width=\"600\"\/><\/figure><\/div>\n\n\n<div style=\"height:15px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>For EU868:<\/p>\n\n\n\n<div style=\"height:10px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<pre class=\"wp-block-code\"><code>AT+FDEFAULT=RISINGHF\nAT+DR=EU868<\/code><\/pre>\n\n\n\n<div style=\"height:10px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>For US915:<\/p>\n\n\n\n<div style=\"height:10px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<pre class=\"wp-block-code\"><code> AT+FDEFAULT=RISINGHF\n AT+DR=US915HYBRID\n AT+RXWIN2=923.3,DR8<\/code><\/pre>\n\n\n\n<div style=\"height:10px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>Now, we will be accessing the internal server console. Enter the IP address of your LoRaWAN Gateway into your browser; you should be taken to the following page.<\/p>\n\n\n\n<div style=\"height:10px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<div style=\"height:10px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter is-resized\"><img decoding=\"async\" src=\"https:\/\/blog.seeedstudio.com\/wp-content\/uploads\/2019\/11\/image-74.png\" alt=\"\" class=\"wp-image-27092\" width=\"600\" srcset=\"https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2019\/11\/image-74.png 900w, https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2019\/11\/image-74-300x146.png 300w, https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2019\/11\/image-74-768x374.png 768w\" sizes=\"(max-width: 900px) 100vw, 900px\" \/><\/figure><\/div>\n\n\n<div style=\"height:30px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p><strong>Step 4. Use Seeeduino LoRaWAN GPS to access the LoRaWAN server<\/strong><\/p>\n\n\n\n<div style=\"height:15px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>There are two modes of LoRaWAN Communication. In this tutorial, we will only talk about the ABP Mode since it is free for use. For more information about the OTAA Mode, (which is for commercial use), kindly visit&nbsp;<a href=\"https:\/\/github.com\/SeeedDocument\/LoRaWAN_Gateway-868MHz_Kit_with_Raspberry_Pi_3\/raw\/master\/res\/%5BRHF-UM01649%5DIoT%20Discovery%20User%20Manual-seeed-v2.1.pdf\">here<\/a>.<\/p>\n\n\n\n<div style=\"height:10px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>First find the &#8220;Application&#8221; button in the upper right corner of the website above, click it and you will see a new page.<\/p>\n\n\n\n<p>Now you need the&nbsp;<strong>APPEui<\/strong>, <strong>DevAddr<\/strong>, <strong>DevEui<\/strong>&nbsp;of the Seeeduino LoRaWAN to add a new application. To retrieve this information, send the following AT command through the Arduino serial monitor.<\/p>\n\n\n\n<div style=\"height:10px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<pre class=\"wp-block-code\"><code>at+id<\/code><\/pre>\n\n\n\n<div style=\"height:10px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/blog.seeedstudio.com\/wp-content\/uploads\/2019\/11\/image-75.png\" alt=\"\" class=\"wp-image-27093\" width=\"500\" height=\"95\" srcset=\"https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2019\/11\/image-75.png 920w, https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2019\/11\/image-75-300x57.png 300w, https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2019\/11\/image-75-768x147.png 768w\" sizes=\"(max-width: 500px) 100vw, 500px\" \/><\/figure><\/div>\n\n\n<div style=\"height:10px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>Fill in the blank with your ID information, as well as the name and owner according to your preference. Then click&nbsp;<strong>Add<\/strong>.<\/p>\n\n\n\n<div style=\"height:15px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img loading=\"lazy\" decoding=\"async\" width=\"899\" height=\"457\" src=\"https:\/\/blog.seeedstudio.com\/wp-content\/uploads\/2019\/11\/image-76.png\" alt=\"\" class=\"wp-image-27094\" srcset=\"https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2019\/11\/image-76.png 899w, https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2019\/11\/image-76-300x153.png 300w, https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2019\/11\/image-76-768x390.png 768w\" sizes=\"(max-width: 899px) 100vw, 899px\" \/><\/figure><\/div>\n\n\n<div style=\"height:15px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>You will be brought to the configure page, where you should select Personalised Motes.<\/p>\n\n\n\n<div style=\"height:9px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>Fill in the&nbsp;<strong>DevEUI<\/strong>&nbsp;and&nbsp;<strong>DevAddr<\/strong>&nbsp;with ID info. of your Seeeduino LoRaWAN GPS and set the <strong>NWKSKEY<\/strong> and&nbsp; <strong>APPSKEY<\/strong>&nbsp;by default. You can refer to the picture below.<\/p>\n\n\n\n<div style=\"height:9px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<ul class=\"wp-block-list\">\n<li>DevEui\uff1a Seeeduino LoRaWAN GPS get through AT+ID command<\/li>\n\n\n\n<li>DevAddr: Seeeduino LoRaWAN GPS get through AT+ID command<\/li>\n\n\n\n<li>NWKSKEY\uff1aDefault value 2B7E151628AED2A6ABF7158809CF4F3C<\/li>\n\n\n\n<li>APPSKEY\uff1aDefault value 2B7E151628AED2A6ABF7158809CF4F3C<\/li>\n<\/ul>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/github.com\/SeeedDocument\/LoRaWAN_Gateway-868MHz_Kit_with_Raspberry_Pi_3\/raw\/master\/img\/Add_info.png\" alt=\"\" width=\"700\" height=\"300\"\/><\/figure><\/div>\n\n\n<div style=\"height:15px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>To test whether if the device has been added successfully, use the serial monitor of Arduino IDE to send the command below.<\/p>\n\n\n\n<div style=\"height:9px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<pre class=\"wp-block-code\"><code>at+mode=lwabp\n\nAT+CMSGHEX=\"0a 0b 0c 0d 0e\"<\/code><\/pre>\n\n\n\n<div style=\"height:9px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>The results should be as follows:<\/p>\n\n\n\n<div style=\"height:15px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter is-resized\"><img decoding=\"async\" src=\"https:\/\/blog.seeedstudio.com\/wp-content\/uploads\/2019\/11\/image-77.png\" alt=\"\" class=\"wp-image-27095\" width=\"600\" srcset=\"https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2019\/11\/image-77.png 905w, https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2019\/11\/image-77-300x87.png 300w, https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2019\/11\/image-77-768x222.png 768w\" sizes=\"(max-width: 905px) 100vw, 905px\" \/><\/figure><\/div>\n\n\n<div style=\"height:15px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>Then, return to the website and click&nbsp;<strong>Application-&gt;Seeed(the name of the Application you just added)-&gt;View application data<\/strong> where  you will see the data you&#8217;ve just sent form the Seeeduino_LoRAWAN.<\/p>\n\n\n\n<div style=\"height:15px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter is-resized\"><img decoding=\"async\" src=\"https:\/\/blog.seeedstudio.com\/wp-content\/uploads\/2019\/11\/image-78.png\" alt=\"\" class=\"wp-image-27096\" width=\"700\" srcset=\"https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2019\/11\/image-78.png 887w, https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2019\/11\/image-78-300x139.png 300w, https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2019\/11\/image-78-768x357.png 768w\" sizes=\"(max-width: 887px) 100vw, 887px\" \/><\/figure><\/div>\n\n\n<div style=\"height:15px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>Still with us? Good! In our last step, you will learn how to connect to Loriot Server, which will act as your LoRaWAN network server provider.<\/p>\n\n\n\n<div style=\"height:15px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h4 class=\"wp-block-heading\">Connect to Loriot Server<\/h4>\n\n\n\n<div style=\"height:15px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p><strong>Step 1: Loriot Server Gateway Registration<\/strong><\/p>\n\n\n\n<div style=\"height:10px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>If you are a new user, you will first need to <a href=\"https:\/\/cn1.loriot.io\/register.html\">register for an account<\/a>. Follow the website instructions to activate your account. After successful activation, <a href=\"https:\/\/cn1.loriot.io\/home\/login.html\">click&nbsp;here<\/a>&nbsp;to log in. The default tier is \u201cCommunity Network\u201d, which supports 1 Gateway (RHF2S001) and 10 nodes.<\/p>\n\n\n\n<p>Navigate to&nbsp;<strong>Dashboard &gt; Gateway<\/strong>, and click&nbsp;<strong>Add Gateway<\/strong>&nbsp;begin adding your Gateway. Select&nbsp;<strong>Raspberry Pi 3<\/strong>, and enter the remaining settings as follows:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Radio Front-End: RHF2S001 868\/915 MHz(SX1257)<\/li>\n\n\n\n<li>Bus: SPI<\/li>\n\n\n\n<li>Enter the MAC address of your RHF2S001, (eg. b8:27:eb:xx:xx:xx)<\/li>\n\n\n\n<li>Input Gateway Location information<\/li>\n<\/ul>\n\n\n\n<div style=\"height:15px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>Click \u201cRegister Raspberry Pi gateway\u201d to finish the registration.<\/p>\n\n\n\n<div style=\"height:15px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter is-resized\"><img decoding=\"async\" src=\"https:\/\/github.com\/SeeedDocument\/LoRaWAN_Gateway-868MHz_Kit_with_Raspberry_Pi_3\/raw\/master\/img\/add_gateway.png\" alt=\"\" width=\"700\"\/><\/figure><\/div>\n\n\n<div style=\"height:15px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>Click the registered gateway to enter configuration page, switch \u201cFrquency Plan\u201d manually, your plan here is decided by the type of your RHF2S001 type. The available plans are CN470, CN473, CN434, CN780 and EU868. After selecting, refresh the page to get the desired channel. In this example, we will use&nbsp;<strong>EU868<\/strong>. Then, run the command in the PuTTY terminal.<\/p>\n\n\n\n<div style=\"height:10px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<pre class=\"wp-block-code\"><code>cd \/home\/rxhf\/loriot\/1.0.2\nsudo systemctl stop pktfwd\nsudo gwrst\nwget https:\/\/cn1.loriot.io\/home\/gwsw\/loriot-risinghf-rhf2s008-rhf1257-SPI-0-latest.bin -O loriot-gw.bin\nchmod +x loriot-gw.bin\n.\/loriot-gw.bin -f -s cn1.loriot.io<\/code><\/pre>\n\n\n\n<div style=\"height:10px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>Finish the gateway registration. You should now see the Gateway as <strong>Connected<\/strong>. Our next step will be to register the node.<\/p>\n\n\n\n<div style=\"height:15px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter is-resized\"><img decoding=\"async\" src=\"https:\/\/github.com\/SeeedDocument\/LoRaWAN_Gateway-868MHz_Kit_with_Raspberry_Pi_3\/raw\/master\/img\/service_done.png\" alt=\"\" width=\"700\"\/><\/figure><\/div>\n\n\n<div style=\"height:15px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p><strong>Step 2. Loriot Server Connect Node device<\/strong><\/p>\n\n\n\n<p>Firstly, get the available gateway channels from <strong>Dashboard &gt; Gateway &gt; Your Gateway<\/strong>. The available channels should be shown in accordance with the picture below.<\/p>\n\n\n\n<div style=\"height:15px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter is-resized\"><img decoding=\"async\" src=\"https:\/\/github.com\/SeeedDocument\/LoRaWAN_Gateway-868MHz_Kit_with_Raspberry_Pi_3\/raw\/master\/img\/radio_list.png\" alt=\"\" width=\"600\"\/><\/figure><\/div>\n\n\n<div style=\"height:15px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>Next, configure the Seeeduino LoRAWAN GPS  by opening the serial monitor of Arduino IDE and enter the command below.<\/p>\n\n\n\n<div style=\"height:10px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<pre class=\"wp-block-code\"><code>at+ch<\/code><\/pre>\n\n\n\n<div style=\"height:10px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>To confirm the default channel of the Seeeduino_LoRAWAN GPS, you will get 3 channels. If there is no available channel, you can change the channels of Seeeduino_LoRAWAN by the command below.<\/p>\n\n\n\n<div style=\"height:10px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<pre class=\"wp-block-code\"><code>at+ch=0,868.1\nat+ch=1,868.3\nat+ch=2,868.5<\/code><\/pre>\n\n\n\n<div style=\"height:10px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>Check the channels again with the&nbsp;<strong>at+ch<\/strong>&nbsp;command.<\/p>\n\n\n\n<p>Now, we will add Seeeduino_LoRAWAN GPS as an ABP Node with the Loriot server. Navigate to&nbsp;<strong>Dashboard &gt; Applications &gt; SimpleApp<\/strong>. Click&nbsp;<strong>Import ABP<\/strong> and enter the following fields. <\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>DevAddr: Seeeduino_LoRAWAN GPS get through &#8220;AT+ID&#8221; command <\/li>\n\n\n\n<li>FCntUp: Set to 1<\/li>\n\n\n\n<li>FCntDn: Set to 1<\/li>\n\n\n\n<li>NWKSKEY: Default value 2B7E151628AED2A6ABF7158809CF4F3C<\/li>\n\n\n\n<li>APPSKEY: Default value 2B7E151628AED2A6ABF7158809CF4F3C<\/li>\n\n\n\n<li>EUI: DEVEUI, Seeeduino_LoRAWAN GPS get through &#8220;AT+ID&#8221; command<\/li>\n<\/ul>\n\n\n\n<div style=\"height:15px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p><em><strong>Note:<\/strong> For the device address, Loriot doesn&#8217;t support colon connector so you will have to remove them manually.<\/em><\/p>\n\n\n\n<div style=\"height:15px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter is-resized\"><img decoding=\"async\" src=\"https:\/\/github.com\/SeeedDocument\/LoRaWAN_Gateway-868MHz_Kit_with_Raspberry_Pi_3\/raw\/master\/img\/add_apb.png\" alt=\"\" width=\"700\"\/><\/figure><\/div>\n\n\n<div style=\"height:15px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>Click&nbsp;<strong>Import Device<\/strong> to finish the device import. Now, navigate once again to&nbsp;<strong>Dashboard &gt; Applications &gt; SampleApp<\/strong> to verify the new ABP Node that you just created.<\/p>\n\n\n\n<div style=\"height:15px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter is-resized\"><img decoding=\"async\" src=\"https:\/\/github.com\/SeeedDocument\/LoRaWAN_Gateway-868MHz_Kit_with_Raspberry_Pi_3\/raw\/master\/img\/inite_status_apb.png\" alt=\"\" width=\"700\"\/><\/figure><\/div>\n\n\n<div style=\"height:15px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>Lastly, we will test the connection by sending data from the Seeeduino_LoRAWAN by entering this following command:<\/p>\n\n\n\n<div style=\"height:10px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<pre class=\"wp-block-code\"><code>AT+CMSGHEX=\"0a 0b 0c 0d 0e\"<\/code><\/pre>\n\n\n\n<div style=\"height:10px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>Go to&nbsp;<strong>Dashboard &gt; Applications &gt; SampleApp &gt; Device<\/strong>. Click the Node Device EUI or DevAddr, and you will find the data you&#8217;ve just sent here.<\/p>\n\n\n\n<div style=\"height:15px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img decoding=\"async\" src=\"https:\/\/github.com\/SeeedDocument\/LoRaWAN_Gateway-868MHz_Kit_with_Raspberry_Pi_3\/raw\/master\/img\/final.png\" alt=\"\"\/><\/figure><\/div>\n\n\n<div style=\"height:15px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>Congratulations! You&#8217;ve now set up your very own LoRaWAN End Node, Gateway and Server!<\/p>\n\n\n\n<div style=\"height:15px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<hr class=\"wp-block-separator has-css-opacity\"\/>\n\n\n\n<div style=\"height:1px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">Summary<\/h2>\n\n\n\n<div style=\"height:15px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>With LR and LoRaWAN, anyone can set up a network and transfer data over long distances with IoT devices in a manner that is both secure and low cost! that is secure and also low-cost! With this article, I hope that you have gained a better understanding of what LoRa and LoRaWAN networks are for as well as how to get started!<\/p>\n\n\n\n<p>We also offer various LR and LoRaWAN products other than those stated above ranging from Gateways, Node, Arduino LR modules, Raspberry Pi LoRa and many more <a href=\"https:\/\/www.seeedstudio.com\/lora-c-755.html?product_list_limit=all\">here<\/a>!<\/p>\n\n\n\n<p>If you are interested in LoRa projects? You can check out our <a href=\"https:\/\/www.hackster.io\/SeeedStudio\/seeed-lora-iotea-solution-b5ee95\">LoRa IoTea project which is an automatic information collection system applied to a tea plantation! Alternatively, you can also visit our article on real-world<\/a> solutions built with LoRa here!<\/p>\n\n\n\n<div style=\"height:40px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n","protected":false},"excerpt":{"rendered":"<p>Building an Arduino or Raspberry Pi project that needs to send data back and forth?<\/p>\n","protected":false},"author":2781,"featured_media":27098,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_lmt_disableupdate":"","_lmt_disable":"","_price":"","_stock":"","_tribe_ticket_header":"","_tribe_default_ticket_provider":"","_tribe_ticket_capacity":"0","_ticket_start_date":"","_ticket_end_date":"","_tribe_ticket_show_description":"","_tribe_ticket_show_not_going":false,"_tribe_ticket_use_global_stock":"","_tribe_ticket_global_stock_level":"","_global_stock_mode":"","_global_stock_cap":"","_tribe_rsvp_for_event":"","_tribe_ticket_going_count":"","_tribe_ticket_not_going_count":"","_tribe_tickets_list":"[]","_tribe_ticket_has_attendee_info_fields":false,"iawp_total_views":0,"footnotes":""},"categories":[1],"tags":[726,3388,2026,3748,3710,2023,2028,3747,3780],"class_list":["post-27058","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-news","tag-lora","tag-lora-gateway","tag-lora-iot","tag-lora-series","tag-lora-e5","tag-lorawan","tag-lorawan-arduino","tag-lorawan-gateway","tag-wm1302-lorawan-gateway-module"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.0 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How to Enable LoRa and LoRaWAN on Arduino and Raspberry Pi - Latest News from Seeed Studio<\/title>\n<meta name=\"description\" content=\"LoRa and LoRaWAN are powerful technologies for IoT devices and networks. Learn how to get started with LoRaWAN for Arduino &amp; Raspberry Pi today!\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.seeedstudio.com\/blog\/2019\/11\/18\/lora-and-lorawan-for-arduino-and-raspberry-pi\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Enable LoRa and LoRaWAN on Arduino and Raspberry Pi - Latest News from Seeed Studio\" \/>\n<meta property=\"og:description\" content=\"LoRa and LoRaWAN are powerful technologies for IoT devices and networks. Learn how to get started with LoRaWAN for Arduino &amp; Raspberry Pi today!\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.seeedstudio.com\/blog\/2019\/11\/18\/lora-and-lorawan-for-arduino-and-raspberry-pi\/\" \/>\n<meta property=\"og:site_name\" content=\"Latest News from Seeed Studio\" \/>\n<meta property=\"article:published_time\" content=\"2019-11-18T10:59:22+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-01-16T08:02:35+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2019\/11\/image-79.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1003\" \/>\n\t<meta property=\"og:image:height\" content=\"542\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"yida\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"yida\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"25 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.seeedstudio.com\/blog\/2019\/11\/18\/lora-and-lorawan-for-arduino-and-raspberry-pi\/\",\"url\":\"https:\/\/www.seeedstudio.com\/blog\/2019\/11\/18\/lora-and-lorawan-for-arduino-and-raspberry-pi\/\",\"name\":\"How to Enable LoRa and LoRaWAN on Arduino and Raspberry Pi - Latest News from Seeed Studio\",\"isPartOf\":{\"@id\":\"https:\/\/www.seeedstudio.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.seeedstudio.com\/blog\/2019\/11\/18\/lora-and-lorawan-for-arduino-and-raspberry-pi\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.seeedstudio.com\/blog\/2019\/11\/18\/lora-and-lorawan-for-arduino-and-raspberry-pi\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2019\/11\/image-79.png\",\"datePublished\":\"2019-11-18T10:59:22+00:00\",\"dateModified\":\"2024-01-16T08:02:35+00:00\",\"author\":{\"@id\":\"https:\/\/www.seeedstudio.com\/blog\/#\/schema\/person\/6457c21fb5499f36fcf657d48dc4380e\"},\"description\":\"LoRa and LoRaWAN are powerful technologies for IoT devices and networks. Learn how to get started with LoRaWAN for Arduino & Raspberry Pi today!\",\"breadcrumb\":{\"@id\":\"https:\/\/www.seeedstudio.com\/blog\/2019\/11\/18\/lora-and-lorawan-for-arduino-and-raspberry-pi\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.seeedstudio.com\/blog\/2019\/11\/18\/lora-and-lorawan-for-arduino-and-raspberry-pi\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.seeedstudio.com\/blog\/2019\/11\/18\/lora-and-lorawan-for-arduino-and-raspberry-pi\/#primaryimage\",\"url\":\"https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2019\/11\/image-79.png\",\"contentUrl\":\"https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2019\/11\/image-79.png\",\"width\":1003,\"height\":542,\"caption\":\"LoRa and LoRaWAN for Arduino and Raspberry Pi\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.seeedstudio.com\/blog\/2019\/11\/18\/lora-and-lorawan-for-arduino-and-raspberry-pi\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.seeedstudio.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Enable LoRa and LoRaWAN on Arduino and Raspberry Pi\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.seeedstudio.com\/blog\/#website\",\"url\":\"https:\/\/www.seeedstudio.com\/blog\/\",\"name\":\"Latest News from Seeed Studio\",\"description\":\"Emerging IoT, AI and Autonomous Applications on the Edge\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.seeedstudio.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.seeedstudio.com\/blog\/#\/schema\/person\/6457c21fb5499f36fcf657d48dc4380e\",\"name\":\"yida\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.seeedstudio.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/91a6af461a3a3af5aa79654f77822c7f?s=96&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/91a6af461a3a3af5aa79654f77822c7f?s=96&r=g\",\"caption\":\"yida\"},\"url\":\"https:\/\/www.seeedstudio.com\/blog\/author\/yida\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to Enable LoRa and LoRaWAN on Arduino and Raspberry Pi - Latest News from Seeed Studio","description":"LoRa and LoRaWAN are powerful technologies for IoT devices and networks. Learn how to get started with LoRaWAN for Arduino & Raspberry Pi today!","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.seeedstudio.com\/blog\/2019\/11\/18\/lora-and-lorawan-for-arduino-and-raspberry-pi\/","og_locale":"en_US","og_type":"article","og_title":"How to Enable LoRa and LoRaWAN on Arduino and Raspberry Pi - Latest News from Seeed Studio","og_description":"LoRa and LoRaWAN are powerful technologies for IoT devices and networks. Learn how to get started with LoRaWAN for Arduino & Raspberry Pi today!","og_url":"https:\/\/www.seeedstudio.com\/blog\/2019\/11\/18\/lora-and-lorawan-for-arduino-and-raspberry-pi\/","og_site_name":"Latest News from Seeed Studio","article_published_time":"2019-11-18T10:59:22+00:00","article_modified_time":"2024-01-16T08:02:35+00:00","og_image":[{"width":1003,"height":542,"url":"https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2019\/11\/image-79.png","type":"image\/png"}],"author":"yida","twitter_card":"summary_large_image","twitter_misc":{"Written by":"yida","Est. reading time":"25 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.seeedstudio.com\/blog\/2019\/11\/18\/lora-and-lorawan-for-arduino-and-raspberry-pi\/","url":"https:\/\/www.seeedstudio.com\/blog\/2019\/11\/18\/lora-and-lorawan-for-arduino-and-raspberry-pi\/","name":"How to Enable LoRa and LoRaWAN on Arduino and Raspberry Pi - Latest News from Seeed Studio","isPartOf":{"@id":"https:\/\/www.seeedstudio.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.seeedstudio.com\/blog\/2019\/11\/18\/lora-and-lorawan-for-arduino-and-raspberry-pi\/#primaryimage"},"image":{"@id":"https:\/\/www.seeedstudio.com\/blog\/2019\/11\/18\/lora-and-lorawan-for-arduino-and-raspberry-pi\/#primaryimage"},"thumbnailUrl":"https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2019\/11\/image-79.png","datePublished":"2019-11-18T10:59:22+00:00","dateModified":"2024-01-16T08:02:35+00:00","author":{"@id":"https:\/\/www.seeedstudio.com\/blog\/#\/schema\/person\/6457c21fb5499f36fcf657d48dc4380e"},"description":"LoRa and LoRaWAN are powerful technologies for IoT devices and networks. Learn how to get started with LoRaWAN for Arduino & Raspberry Pi today!","breadcrumb":{"@id":"https:\/\/www.seeedstudio.com\/blog\/2019\/11\/18\/lora-and-lorawan-for-arduino-and-raspberry-pi\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.seeedstudio.com\/blog\/2019\/11\/18\/lora-and-lorawan-for-arduino-and-raspberry-pi\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.seeedstudio.com\/blog\/2019\/11\/18\/lora-and-lorawan-for-arduino-and-raspberry-pi\/#primaryimage","url":"https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2019\/11\/image-79.png","contentUrl":"https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2019\/11\/image-79.png","width":1003,"height":542,"caption":"LoRa and LoRaWAN for Arduino and Raspberry Pi"},{"@type":"BreadcrumbList","@id":"https:\/\/www.seeedstudio.com\/blog\/2019\/11\/18\/lora-and-lorawan-for-arduino-and-raspberry-pi\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.seeedstudio.com\/blog\/"},{"@type":"ListItem","position":2,"name":"How to Enable LoRa and LoRaWAN on Arduino and Raspberry Pi"}]},{"@type":"WebSite","@id":"https:\/\/www.seeedstudio.com\/blog\/#website","url":"https:\/\/www.seeedstudio.com\/blog\/","name":"Latest News from Seeed Studio","description":"Emerging IoT, AI and Autonomous Applications on the Edge","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.seeedstudio.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.seeedstudio.com\/blog\/#\/schema\/person\/6457c21fb5499f36fcf657d48dc4380e","name":"yida","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.seeedstudio.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/91a6af461a3a3af5aa79654f77822c7f?s=96&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/91a6af461a3a3af5aa79654f77822c7f?s=96&r=g","caption":"yida"},"url":"https:\/\/www.seeedstudio.com\/blog\/author\/yida\/"}]}},"modified_by":"Lily","views":84589,"featured_image_urls":{"full":["https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2019\/11\/image-79.png",1003,542,false],"thumbnail":["https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2019\/11\/image-79-80x80.png",80,80,true],"medium":["https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2019\/11\/image-79-300x162.png",300,162,true],"medium_large":["https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2019\/11\/image-79-768x415.png",640,346,true],"large":["https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2019\/11\/image-79.png",640,346,false],"1536x1536":["https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2019\/11\/image-79.png",1003,542,false],"2048x2048":["https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2019\/11\/image-79.png",1003,542,false],"visody_icon":["https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2019\/11\/image-79.png",32,17,false],"magazine-7-slider-full":["https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2019\/11\/image-79.png",1003,542,false],"magazine-7-slider-center":["https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2019\/11\/image-79.png",936,506,false],"magazine-7-featured":["https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2019\/11\/image-79.png",1003,542,false],"magazine-7-medium":["https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2019\/11\/image-79.png",703,380,false],"magazine-7-medium-square":["https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2019\/11\/image-79.png",675,365,false]},"author_info":{"display_name":"yida","author_link":"https:\/\/www.seeedstudio.com\/blog\/author\/yida\/"},"category_info":"<a href=\"https:\/\/www.seeedstudio.com\/blog\/category\/news\/\" rel=\"category tag\">News<\/a>","tag_info":"News","comment_count":"0","_links":{"self":[{"href":"https:\/\/www.seeedstudio.com\/blog\/wp-json\/wp\/v2\/posts\/27058","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.seeedstudio.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.seeedstudio.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.seeedstudio.com\/blog\/wp-json\/wp\/v2\/users\/2781"}],"replies":[{"embeddable":true,"href":"https:\/\/www.seeedstudio.com\/blog\/wp-json\/wp\/v2\/comments?post=27058"}],"version-history":[{"count":26,"href":"https:\/\/www.seeedstudio.com\/blog\/wp-json\/wp\/v2\/posts\/27058\/revisions"}],"predecessor-version":[{"id":91237,"href":"https:\/\/www.seeedstudio.com\/blog\/wp-json\/wp\/v2\/posts\/27058\/revisions\/91237"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.seeedstudio.com\/blog\/wp-json\/wp\/v2\/media\/27098"}],"wp:attachment":[{"href":"https:\/\/www.seeedstudio.com\/blog\/wp-json\/wp\/v2\/media?parent=27058"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.seeedstudio.com\/blog\/wp-json\/wp\/v2\/categories?post=27058"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.seeedstudio.com\/blog\/wp-json\/wp\/v2\/tags?post=27058"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}