✨ Use RCAPP and get 5% off 👇
Skip to content
Free Delivery on Orders Above Rs 999/- Pan-India
Cash on Delivery Available for Orders above Rs.500/- and Upto Rs 3000/-
SAVE more when you BUY more. Upto 30% Off on BULK PURCHASE
GST Invoices for Your Business
Dedicated Technical Support Team
Safely Delivering Genuine Products PAN INDIA

Raspberry Pi Node to Node using IOTIF LoRa

Raspberry Pi Node to Node using IOTIF LoRa
D
Written By Daniel D'Souza
📅 Updated on 17 Jun 2026
Summarize with AI
✅ Prompt copied

Summary

In this blog, we explore the fascinating world of Raspberry Pi and its potential in establishing node-to-node communication using IoTIF LoRa. We delve into the introduction of Raspberry Pi, highlighting its versatility and IoT capabilities. A detailed circuit diagram is provided, guiding readers on how to set up a wireless communication system. Lastly, we conclude with insights into the possibilities and benefits of this project, emphasizing the convenience and efficiency it offers in various IoT applications. Discover how to unlock the potential of Raspberry Pi and LoRa for seamless wireless connectivity!

Introduction:

In this tutorial, we will learn how to connect the LORA Module to Raspberry Pi. We will use the Raspberry Pi and Lora to create a transmitter and receiver for data transmission and reception respectively. The tutorial will provide step-by-step instructions on how to connect the LORA Module to Raspberry Pi. It will explain how to use these components to create a transmitter and receiver for data transmission and reception.

STEP 1(Hardware connection):

Let us setup the Receiver part. Assemble the connection between Raspberry Pi and Lora as shown in the table below:

 

Lora module 

Raspberry pi

2,3,4,5,6,7,8,9 (8 Pin connector) 

Keypad connector (2,3,4,5,6,7,8,9) 

4 Pin connector (G, 5V, 10, 11) 

4 Pin connector (G, 5V, 10, 11) 

 

Components and Supplies

Raspberry Pi 4 Model B 4GB RamRaspberry Pi 4 Model B 4GB Ram

Raspberry Pi 4 Model B 4GB Ram

Official Raspberry Pi 4 Model B 4GB RAM The Raspberry Pi 4 Model B 4GB is a compact and versatile single-board computer that provides desktop-level performance in a credit card-sized device. The RPI 4B is powered by a Broadcom Quad-Core Cortex-A72 (ARM v8) 64-bit...
Rs 11,779/-
Rs 11,779/-
Rs 15,499/-
Save Rs 3,720/-
DRAGINO LORA BEE V1.1 + HOPERF RFM95-98(W)-RobocrazeDRAGINO LORA BEE V1.1 + HOPERF RFM95-98(W)-Robocraze

DRAGINO LORA BEE V1.1 + HOPERF RFM95-98(W)

DRAGINO LORA BEE V1.1 + HOPERF RFM95-98(W)  The Dragino Lora BEE is a LoRa module that allows the user to send data and provides ultra-long range spread spectrum communication and high interference immunity whilst minimizing current consumption. The LoRa BEE targets professional wireless sensor network...
Rs 2,189/-
Rs 2,189/-
Rs 2,780/-
Save Rs 591/-
IOTIF - IOT Trainer Kit with Pi 4B 1GBIOTIF - IOT Trainer Kit with Pi 3B+-Robocraze

    IOTIF - IOT Trainer Kit with Pi 4B 1GB

    IOTIF Trainer and Prototype Board What is an IOTIF Trainer Kit? The IOTIF trainer kit is an electronic trainer kit consisting of three micro-controllers: Raspberry Pi 4B 1GB / Raspberry Pi 4B (with SD Card and pre-installed Raspbian OS), Arduino Nano and ESP-01; and a variety of sensors and actuators...
    Rs 60,489/-
    Rs 60,489/-
    Rs 65,048/-
    Save Rs 4,559/-
    IOTIF - IOT Trainer Kit with Pi 4B 4GBIOTIF - IOT Trainer Kit with Pi 4B 4GB

      IOTIF - IOT Trainer Kit with Pi 4B 4GB

      IOTIF Trainer and Prototype Board What is an IOTIF Trainer Kit? The IOTIF trainer kit is an electronic trainer kit consisting of three micro-controllers: Raspberry Pi 3B / Raspberry Pi 4B (with SD Card and pre-installed Raspbian OS), Arduino Nano and ESP-01; and a variety of sensors and actuators like Buzzer,...
      Rs 64,399/-
      Rs 64,399/-
      Rs 70,659/-
      Save Rs 6,260/-

      Circuit Diagram: 

      STEP 2(Install the library)

      For lora communication we need to Install wiringPi library: 

      You'll need git. If git is not installed, enter the following into the command line. 

      sudo apt-get install git-core 

      We highly recommend using Git to download the latest version. To check the version of wiringPi, enter the following command. 

      gpio -v 

      If you receive an output similar to the following with the Unknown17, you'll want to update WiringPi on a Raspberry Pi 4 or above. 

      gpio version: 2.50Copyright (c) 2012-2018 Gordon Henderson 

      This is free software with ABSOLUTELY NO WARRANTY. 

      For details type: gpio -warranty Raspberry Pi Details:  Type: Unknown17, Revision: 02, Memory: 0MB, Maker: Sony    * Device tree is enabled.    * --> Raspberry Pi 4 Model B Rev 1.2    * This Raspberry Pi supports user-level GPIO access.  

      Enter the following to remove the wiringPi and configuration files. 

      sudo apt-get purge wiringpi 

      Then type the following for the Pi to remove all locations that remember wiringPi. 

      hash -r 

      As long as you have Git installed, these commands should be all you need to download and install Wiring Pi. 

      git clone https://github.com/WiringPi/WiringPi.git  

      This will make a folder in your current directory called WiringPi. Head to the Wiring Pi directory. 

      cd WiringPi 

      Then pull the latest changes from the origin. 

      git pull origin 

      Then enter the following command. The ./build is a script to build Wiring Pi from the source files. This builds the helper files, modifies some paths in Linux and gets WiringPi ready to rock. 

      ./build 

      At this point, the library should work. Run the gpio command shown below to view some information about the wiringPi version and the Pi that it is running on. 

      gpio -v 

      Entering the following command will draw a table illustrating the configuration for the pins in the 40-pin connector. 

      gpio readall 

      Download the Lora-transceiver code

      In the terminal, run 

      wget https://codeload.github.com/dragino/rpi-lora-tranceiver/zip/master 

      Unzip the library 

      unzip master 

      STEP 4(Pin numbers and frequency update):

      Update the pin numbers and frequency by opening the main.c file. Change directory to go inside the folder with the main.c file using the command given below: 

      cd rpi-lora-transceiver-master/ dragino_lora_app 

      Then, using the nano editor, open the main.c file using the command below: 

      Nano main.c 

      Scroll down in the main.c file the line shows frequency and raspberry connection according to the below image: 

      Change the pin numbers and frequency in the nano editor. Press Ctrl+X to exit nano. Upon exiting, the save prompt will be displayed. Press Y and then press the Enter key. 

      STEP 5(Rebuild the main.c file):

      Every time the code is edited, it needs to be rebuilt in order for the changes to take effect. Use the commands below to clean any previous build files present and to rebuild the source 

      make clean  

      Make 

      STEP 6(Explanation of the code)

      Lora initialization: The SetupLoRa function prepares the LoRa module for operation by setting the necessary parameters and configurations specific to the chosen chip version (SX1272 or SX1276). 

      Sender part: In the sender, the function opmodeLora() sets the LoRa module's operating mode to LoRa mode using the opmode function. The configPower function is called to configure the transmit power of the LoRa module. The code then prints information about the LoRa transmission settings, including the spreading factor (sf) and frequency (freq). The hello buffer represents the payload of the LoRa message which is to be sent. You can change that payload according to you. Finally, the program enters a loop where it repeatedly calls the txlora function to send the message stored in the hello buffer.

      
      if (!strcmp("sender", argv[1])) { 
      
              opmodeLora(); 
      
              // enter standby mode (required for FIFO loading)) 
      
              opmode(OPMODE_STANDBY); 
      
        
      
      writeReg(RegPaRamp, (readReg(RegPaRamp) & 0xF0) | 0x08); // set PA ramp-up time 50 uSec 
      
        
      
              configPower(23); 
      
        
      
              printf("Send packets at SF%i on %.6lf Mhz.\n", sf,(double)freq/1000000); 
      
              printf("------------------\n"); 
      
        
      
              if (argc > 2) 
      
                  strncpy((char *)hello, argv[2], sizeof(hello)); 
      
        
      
              while(1) { 
      
                  txlora(hello, strlen((char *)hello)); 
      
                  delay(5000); 
      
              } 
      
      } 
      
      Receiver part: In the receiver part, the receivepacket function is called repeatedly in the receiver part of the code to check for incoming packets and print their details. It provides insights into the received signal's strength, quality, and payload content. In the main function, the receiver part initializes the LoRa module for reception and continuously listens for incoming packets, printing information about each received packet.

       

      
      else { 
      
        
      
              // radio init 
      
              opmodeLora(); 
      
              opmode(OPMODE_STANDBY); 
      
              opmode(OPMODE_RX); 
      
              printf("Listening at SF%i on %.6lf Mhz.\n", sf,(double)freq/1000000); 
      
              printf("------------------\n"); 
      
              while(1) { 
      
                  receivepacket();  
      
                  delay(1); 
      
              } 
      
        
      
          } 
      

      STEP 7(Running the receiver):

      Run the receiver code using the command below 

      ./dragino_lora_app rec 

        

      NOTE: For using the Raspberry Pi as transmeter complete the setup as shown above but for executing the transmeter code use the below command.  

      ./dragino_lora_app sender 

      Conclusion

      The use of Raspberry Pi Node to Node communication using IoTIF LoRa technology opens up a world of possibilities for the Internet of Things (IoT) enthusiasts. The circuit diagram presented in this blog serves as a valuable guide for implementing this powerful communication solution. By harnessing the low-power, long-range capabilities of LoRa, we can create robust and scalable IoT networks that connect devices seamlessly. With this technology, the potential for innovative applications is endless. So, whether you're a hobbyist or a professional, don't miss out on the chance to explore the exciting realm of Raspberry Pi Node to Node communication with IoTIF LoRa. Discover new possibilities and unleash your creativity today!

       

      If you appreciate our work don't forget to share this post and leave your opinion in the comment box.

       

      Please do check out other blog posts about Popular electronics

       

      Make sure you check out our wide range of products and collections (we offer some exciting deals!)

      Prev Post
      Next Post

      Leave a comment

      Please note, comments need to be approved before they are published.

      Thanks for subscribing!

      This email has been registered!

      Shop the look

      Choose Options

      Edit Option
      Back In Stock Notification
      Compare
      Product SKU Description Collection Availability Product Type Other Details

      Choose Options

      this is just a warning
      Login
      Shopping Cart
      0 items
      FREE SHIPPING!
      ₹100 OFF
      ₹200 OFF
      ₹999
      ₹2500
      ₹4900
      WhatsApp Chat Chat