Skip to main content

Get a Raw LoRa Packet from LoRaWAN Gateway

1. Below list the support products and Requirements:

  1. LoRaWAN Gateway model: LIG16, LG308N, DLOS8N, LPS8N
  2. Firmware version since : lgw--build-v5.4.1644658774

2. Introduction

By default, the LoRaWAN gateway cannot receive LoRa Packet, If the user needs to receive the raw LoRa Packet, the user can modify the file.

Here are two ways to modify the received raw LoRa package.

2.1 Method 1:

root@dragino-1d178c:~# vim /usr/bin/generate-config.sh

gen_cus_cfg() {
json_init
json_add_object SX130x_conf
json_add_string "spidev_path" "/dev/spidev0.0"
json_add_boolean "full_duplex" 0
json_add_boolean "lorawan_public" 0 -----------------> "1" proves receive LoRaWAN Packet,"0" proves receive non-LoRaWan Packet
json_add_int "clksrc" "1"
json_add_string "clksrc_desc" "radio_1 provides clock to concentrator"
json_add_int "antenna_gain" "0"
json_add_string "antenna_gain_desc" "antenna gain, in dBi"

root@dragino-1d178c:~# vim /etc/lora/global_conf.json

{
"SX130x\_conf": {
"spidev\_path": "/dev/spidev0.0",
"full\_duplex": false,
"lorawan\_public": false, -----------------> "true" proves receive LoRaWAN Packet,"false" proves receive non-LoRaWan Packet
"clksrc": 1,
"clksrc\_desc": "radio\_1 provides clock to concentrator for most devices except MultiTech. For MultiTech set to 0.",
"antenna\_gain": 0,
"antenna\_gain\_desc": "antenna gain, in dBi",
"radio\_0": {

and run root@dragino-1d178c:~# fwd

2.2 Method 2:

Modify /etc/lora/cfg-$chip/"frequency"-global_conf.json

view chip name : cat /tmp/iot/chip

Restart the device after the modification

image-20220527172224-1.png

modify /etc/lora/cfg-$chip/"frequency"-global_conf.json

Note : User need to do that connect gateway command line via ssh.

image-20220527172304-2.png

Checking LoRaWAN Gateway Log

Command line input logread -f Decoding verifies that the packet is correct

image-20220722161946-1.png

Checking LoRa Packet

0

Toggle the left panel column.