LoRa gateway using DSPWorks module

Setting up the gateway

 

 

DSPWorks LoRa module

Raspberry pi 3

The LoRa gateway is made using the Raspberry pi 3. The following steps were used to set the gateway up.

  • Select a class 10 sd-card on which the image will be flashed.
  • Download the image from provided in the link https://www.raspberrypi.org/do
Sr no. Signal Name Pin number on Raspberry pi Pin number on DSPWorks LoRa module
1 3.3V 17 20
2 MOSI 19 8
3 MISO 21 7
4 SCLK 23 5
5 GND 25 16
6 CS 1424 10
7 5V 2 19

cumentation/inst allation/installing-images/ and flash it on the sd-card using image writing software like Etcher. This is the Debian image customised for Pi.Connect the Raspberry pi board to the LoRa module (SX1276).The connections are as follows :

And make sure to connect the antenna to the radio module before supplying the power.

            

Connections on Raspberry pi 3

        

 

Connections on DSPWorks LoRa module

  • (The DSPWorks LoRa module has a front end PA, pin 2 and pin 3 have to be set high through GPIO without which the module will not transmit anything)
  •  

    MOSI , MISO , SCLK are together known as SPI (serial peripheral interface) , these pins are used to transmit and receive data.

    • Connect the ethernet cable to the Raspberry pi and also connect it to as USB using the UART pins.
    • Connect the USB to the computer and connect the computer to the wifi : WAZIUP_PI_GW_xxxxxxxxxx using the password loragateway.
    • Open the terminal where certain commands will be used to configure the gateway.
    • Once logged in , we may see a simple command interface . We simply have to quit this interface by entering Q.
    • Clone the github project by using the command

    >git clone https://github.com/CongducPham/LowCostLoRaGw.git

    > cp -r LowCostLoRaGw/gw_full_latest/* lora_gateway/

    • Change the directory to lora_gateway and build it using the command make.
    • We then have to build the file by using command make lora_gateway_pi2.
    • Get the hardware address of the gateway using ifconfig. The hardware address is provided in eth0.
    • Now we have to configure the gateway by going into scripts folder and using the command

    > ./config_gw.sh hardware_address.

    • To configure the gateway , give the suitable instructions.
    • After configuring the gateway , connect the end device to the gateway by using the AppSkey and NwkSkey which is provided in the loraWan.py folder.
    • Enable AES and raw form reception in gateway_conf.json.
    • Change the sync-world from 0x12 which is for private network to 0x34 for public network.
    • Run the gateway using the command ,/sudo lora_gateway -mode 1 -raw | python post_processing_gw.py  and make sure to set the code rate , SF , BW and frequency as per your requirement.
    • This should set the gateway running.

    The Final Module

    For more reference use the link :  http://cpham.perso.univ-pau.fr/LORA/WAZIUP/Low-cost-LoRa-GW-step-by-step.pdf

    Setting up the Arduino to send and receive signals to the gateway 

                          

                                                                                                      

                                     Arduino UNO                                                                                    DSPWorks LoRa module

    The board we have used is Arduino Uno . The steps to set up the Arduino are as follows

    • Select a suitable radio module like SX1276.
    • Connect the Arduino and the radio pins
    Sr no. Signal Name Pin number on Arduino UNO Pin number on DSPWorks LoRa module
    1 CS 2 10
    2 MOSI 11 8
    3 MISO 12 7
    4 SCLK 13 5
    5 GND GND 16
    6 3.3V 3.3V 20
    7 5V 5 19

    And make sure to connect the antenna to the radio module before supplying the power.

                    

    Connections on Arduino UNO

     

           

    Connections on DSPWorks LoRa module

     

    •   Download the github project : https://github.com/CongducPham/LowCostLoRaGw/
    • Select SX1272 and the LowPo wer in library folder present in Arduino folder from the project by Congduc Pham and paste it library folder of the Arduino in the computer.
    • Connect the Arduino board to the computer and open Arduino IDE . Select the suitable and port in the Tools menu.
    • Open the ping pong program and change the MAX_DBM from 14 to 4 and upload the program to the Arduino board to test the gateway.
    • The default frequency is set to 865.2 Mhz which can be changed by making suitable changes in the code.
    • Make sure to set the baud rate in the serial monitor to 38400.

    The Final module

    For more reference use the link :  https://github.com/CongducPham/tutorials/blob/master/Low-cost-LoRa-IoT-step-by-step.pdf

    One thought on “LoRa gateway using DSPWorks module

    • for using it in India,do we need to configure using codes? or it is ready-made working on indian band
      can you give us datasheet with pin diagram

    Leave a Reply

    Your email address will not be published. Required fields are marked *