element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet & Tria Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • About Us
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      • Japan
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Vietnam
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Save The Bees Design Challenge
  • Challenges & Projects
  • Design Challenges
  • Save The Bees Design Challenge
  • More
  • Cancel
Save The Bees Design Challenge
Blog Save the Bees challange Blog-2 - Get started with LoRaWAN
  • Blog
  • Forum
  • Documents
  • Leaderboard
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Save The Bees Design Challenge to participate - click to join for free!
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: embeddedguy
  • Date Created: 25 Apr 2023 5:08 PM Date Created
  • Views 465 views
  • Likes 7 likes
  • Comments 2 comments
  • save the bees
Related
Recommended

Save the Bees challange Blog-2 - Get started with LoRaWAN

embeddedguy
embeddedguy
25 Apr 2023

The Save the Bees challenge has provided the development kit to the selected participant with two development boards. They are Arduino Nicla vision and Arduino MKR WAN 1310. These development platforms are quite useful in the project ideas that one may have to help save the bees. The Nicla vision is capable for running ML models at the edge as it has quite fast and efficient dual core STM32 MCU running at it’s core along with sensors such as microphone, camera, distance sensor and IMU in such a tiny form factor. It is also fully supported by edge-impulse machine learning platform to train and upload ML model fast onto the device. On top of all these features, it has wireless connectivity such as BLE and WiFi. The MKR 1310 on the other hand has LoRa communication. It has LoRa module along with MKR form factor so that more MKR form factor boards can be stacked together. The board can be used to send small amount of data to LoRaWAN network server such as the TTN.

To get started with Arduino MKR 1310 I followed the official Arduino guide which has mentioned all the required steps of how to connect to The Things Network. The Things Network is LoRaWAN network server which handles the traffic to and from LoRaWAN connected devices.

So for Arduino MKR 1310 to be connected to the TTN I will first need to have a LoRaWAN gateway nearby so that all the data from LoRa devices can be routed to the TTN network. For this, I have decided to have a single channel gateway HaT for Raspberry Pi which has SX137x module communicating to the Raspberry Pi over SPI interface and the Raspberry Pi runs an open-source program such as packet forwarder to route data received for LoRa node to the TTN. It is recommended though that one uses a LoRa gateway with eight channels for better communication and no data loss. Also to note here is that LoRaWAN network has some limitation. For example, to send data upstream to the network via eight channel LoRa Gateway it can receive data from up to eight different nodes at the same time. While receiving data from the network it cannot transmit data upstream at the same time. If the network is transmitting data for the 10% of the time, then it can not receive the data from upstream.

image

The above image shows that the HaT is installed on Raspberry Pi model 3b. The next part is to configure the raspberry pi and install the required software to start communicating with TTN network. For this we will first create an account on the TTN and register a gateway. The TTN has community edition which is free for use. One can register upto 10 gateways and 10 nodes via this plan. Gateway registration requires some work on both the sides. ie. TTN cloud and Raspberry Pi. The following is the list of required hardware to setup Gateway for communication.

1> RaspberryPi with internet connection & Dragino LoRa HaT

2> TTN community account

On the TTN side first register the gateway via console. While doing so save the global address of the TTN network server. In most cases it will be a line with thethings.network ending. This address is required to send data from Raspberrypi gateway to the TTN server. TTN will also ask for gateway ID number, which we can get from raspberrypi by executing some commands. The next section lists all the commands for getting required details from the raspberrypi.

On the raspberryPi installation of packaet forwarder software is required to configure and start our gateway.

$ git clone https://github.com/dragino/dual_chan_pkt_fwd

$ cd dual_chan_pkt_fwd

Before doing anything it is required to set the global configuration parameters in global_conf.json file. The things which are needed be specified correctly is frequncy 1 and frequency 2. These are the parameters dependent on the region one is located. For India it is between ~865-867 MhZ.

So “freq” will be 865000000 and “freq_2” will be 867000000.

The sprad_factor should be set to 7

The address is the one we copied from the TTN network before which needs to be copied in this file.

The port is a number which specify the interface on which communication happens. I have set it to default that is 1700.

Finally, we need to save and close the file.

After that executing following command will start the gateway and communication will happen to the TTN.

$make

$sudo ./dual_chan_pkt_fwd

The last command will list the gateway ID for us to register online on TTN network.

image

If the above steps are followed correctly data will show up on the TTN network every few seconds. Which means our gateway is connected to the TTN and we now can add more nodes to communicate with the server.

image

  • Sign in to reply
Parents
  • embeddedguy
    embeddedguy over 2 years ago

    Just to mention that I am running late for this challenge submission also because that I received the challenge kit late due to delays in customs and then some technical difficulties followed.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • embeddedguy
    embeddedguy over 2 years ago in reply to embeddedguy

    But lets try to catch up with other challengers.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
Comment
  • embeddedguy
    embeddedguy over 2 years ago in reply to embeddedguy

    But lets try to catch up with other challengers.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
Children
No Data
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube