Last modified by Kilight Cao on 2023/09/14 09:29

From version 2.2
edited by Xiaoling
on 2022/05/14 14:21
Change comment: There is no comment for this version
To version 1.2
edited by Xiaoling
on 2022/05/14 14:10
Change comment: There is no comment for this version

Summary

Details

Page properties
Content
... ... @@ -1,4 +1,4 @@
1 - **Contents:**
1 +Contents:
2 2  
3 3  {{toc/}}
4 4  
... ... @@ -11,100 +11,69 @@
11 11  
12 12  = 2. Introduction =
13 13  
14 -(((
15 15  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.
16 -)))
17 17  
18 -(((
19 -Here are two ways to modify the received raw LoRa package.
20 -)))
16 +Here are two ways to modify the received raw LoRa package,
21 21  
22 22  == 2.1 Method 1: ==
23 23  
24 24  root@dragino-1d178c:~~# vim /usr/bin/generate-config.sh
25 25  
26 -(% class="box" %)
27 -(((
28 -(((
29 -(((
30 - gen_cus_cfg() {
22 +{{{ gen_cus_cfg() {
31 31   json_init
32 32   json_add_object SX130x_conf
33 33   json_add_string "spidev_path" "/dev/spidev0.0"
34 34   json_add_boolean "full_duplex" 0
35 - json_add_boolean "lorawan_public" 0 ~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~--> "1" proves receive LoRaWAN Packet,"0" proves receive non-LoRaWan Packet
27 + json_add_boolean "lorawan_public" 0 -----------------> "1" proves receive LoRaWAN Packet,"0" proves receive non-LoRaWan Packet
36 36   json_add_int "clksrc" "1"
37 37   json_add_string "clksrc_desc" "radio_1 provides clock to concentrator"
38 38   json_add_int "antenna_gain" "0"
39 39   json_add_string "antenna_gain_desc" "antenna gain, in dBi"
40 -)))
41 -)))
42 -)))
32 +}}}
43 43  
44 44  root@dragino-1d178c:~~# vim /etc/lora/global_conf.json
45 45  
46 -(% class="box" %)
47 -(((
48 -(((
49 -(((
50 - {
36 +{{{ {
51 51   "SX130x_conf": {
52 52   "spidev_path": "/dev/spidev0.0",
53 53   "full_duplex": false,
54 - "lorawan_public": false,  ~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~--> "true" proves receive LoRaWAN Packet,"false" proves receive non-LoRaWan Packet
40 + "lorawan_public": false, -----------------> "true" proves receive LoRaWAN Packet,"false" proves receive non-LoRaWan Packet
55 55   "clksrc": 1,
56 56   "clksrc_desc": "radio_1 provides clock to concentrator for most devices except MultiTech. For MultiTech set to 0.",
57 57   "antenna_gain": 0,
58 58   "antenna_gain_desc": "antenna gain, in dBi",
59 59   "radio_0": {
60 -)))
61 -)))
62 -)))
46 +}}}
63 63  
48 +
64 64  and run **root@dragino-1d178c:~~# fwd**
65 65  
66 66  == 2.2 Method 2: ==
67 67  
68 -(((
69 69  Modify /etc/lora/cfg-$chip/"frequency"-global_conf.json
70 -)))
71 71  
72 -(((
73 73  view chip name : cat /tmp/iot/chip
74 -)))
75 75  
76 -(((
77 77  Restart the device after the modification
78 -)))
79 79  
80 -(((
81 -[[image:https://wiki.dragino.com/images/thumb/0/09/Lora.png/800px-Lora.png||height="69" width="767"]]
82 -)))
59 +[[~[~[image:https://wiki.dragino.com/images/thumb/0/09/Lora.png/800px-Lora.png~|~|height="72" width="800"~]~]>>url:https://wiki.dragino.com/index.php/File:Lora.png]]
83 83  
84 84  modify /etc/lora/cfg-$chip/"frequency"-global_conf.json
85 85  
86 -(% style="color:red" %)Note : User need to do that connect gateway command line via ssh.
63 +Note : User need to do that connect gateway command line via ssh.
87 87  
88 -(((
89 -(((
90 -[[image:https://wiki.dragino.com/images/thumb/8/81/Lora_packet_1.png/800px-Lora_packet_1.png||height="324" width="769"]]
91 -)))
92 -)))
65 +[[~[~[image:https://wiki.dragino.com/images/thumb/8/81/Lora_packet_1.png/800px-Lora_packet_1.png~|~|height="337" width="800"~]~]>>url:https://wiki.dragino.com/index.php/File:Lora_packet_1.png]]
93 93  
94 94  Checking LoRaWAN Gateway Log
95 95  
96 -Command line input (% style="color:#037691" %) **logread -f**
69 +Command line input logread -f
97 97  
98 -(((
99 -(((
100 -[[image:https://wiki.dragino.com/images/thumb/6/61/Lg01_lora_packet.png/800px-Lg01_lora_packet.png||height="394" width="771"]]
101 -)))
102 -)))
71 +[[~[~[image:https://wiki.dragino.com/images/thumb/6/61/Lg01_lora_packet.png/800px-Lg01_lora_packet.png~|~|height="409" width="800"~]~]>>url:https://wiki.dragino.com/index.php/File:Lg01_lora_packet.png]]
103 103  
104 104  Checking LoRa Gateway Log
105 105  
106 106  Decoding verifies that the packet is correct
107 107  
108 -[[image:https://wiki.dragino.com/images/thumb/a/a3/Base64_decode.png/600px-Base64_decode.png||height="339" width="600"]]
77 +[[~[~[image:https://wiki.dragino.com/images/thumb/a/a3/Base64_decode.png/600px-Base64_decode.png~|~|height="339" width="600"~]~]>>url:https://wiki.dragino.com/index.php/File:Base64_decode.png]]
109 109  
110 110  Checking LoRa Packet