Wiki source code of Lorawan-server by Petr Gotthard
Last modified by Xiaoling on 2023/04/21 17:42
Hide last authors
author | version | line-number | content |
---|---|---|---|
![]() |
46.2 | 1 | **~ Table of Contents:** |
![]() |
1.4 | 2 | |
3 | {{toc/}} | ||
4 | |||
![]() |
26.2 | 5 | |
6 | |||
7 | |||
8 | |||
![]() |
46.3 | 9 | = 1. Introduction = |
![]() |
1.1 | 10 | |
![]() |
46.2 | 11 | |
![]() |
1.2 | 12 | This is an Open Source LoRaWAN server from [[https:~~/~~/github.com/gotthardp/lorawan-server>>url:https://github.com/gotthardp/lorawan-server]]. |
![]() |
1.1 | 13 | |
14 | |||
![]() |
46.3 | 15 | = 2. Support Devices = |
![]() |
1.1 | 16 | |
![]() |
46.2 | 17 | |
![]() |
11.1 | 18 | All current LoRaWAN gateway can support the connection to this LoRaWAN server. Some gateway models have this lorawan server built-in by default. They are: |
19 | |||
20 | * HP0A | ||
21 | * HP0C | ||
22 | * LPS8v2 | ||
23 | |||
![]() |
46.3 | 24 | If for some reason, if the above model doesn't have this lorawan server in it. Users can install them manually. |
![]() |
46.2 | 25 | |
26 | |||
![]() |
46.3 | 27 | == 2.1 Install lorawan server in Armbian System == |
![]() |
15.4 | 28 | |
![]() |
46.3 | 29 | === 2.1.1 Check if you have the Armbian system === |
![]() |
11.1 | 30 | |
31 | |||
![]() |
46.3 | 32 | (% style="color:blue" %)**Run command:** |
![]() |
20.1 | 33 | |
![]() |
18.1 | 34 | (% class="box infomessage" %) |
35 | ((( | ||
![]() |
46.3 | 36 | **uname -a** |
37 | |||
38 | **cat /etc/debian_version ** | ||
![]() |
18.1 | 39 | ))) |
![]() |
11.1 | 40 | |
![]() |
18.1 | 41 | [[image:image-20220526172628-2.png]] |
![]() |
11.1 | 42 | |
43 | |||
![]() |
46.3 | 44 | === 2.1.2 Install lorawan server === |
45 | |||
46 | |||
47 | (% style="color:blue" %)**Run command:** | ||
48 | |||
![]() |
20.1 | 49 | (% class="box infomessage" %) |
50 | ((( | ||
![]() |
46.7 | 51 | **wget https://github.com/gotthardp/lorawan-server/releases/download/v0.6.7/lorawan-server_0.6.7_all.deb************** |
![]() |
46.3 | 52 | |
53 | **dpkg -i lorawan-server_0.6.7_all.deb ** | ||
![]() |
20.1 | 54 | ))) |
55 | |||
![]() |
23.1 | 56 | [[image:image-20220527085338-1.png||height="271" width="1145"]] |
![]() |
20.1 | 57 | |
![]() |
23.1 | 58 | At this point, lorawan-server is installed |
![]() |
20.1 | 59 | |
![]() |
26.2 | 60 | |
![]() |
46.3 | 61 | == 2.2 How do start lorawan server == |
![]() |
23.1 | 62 | |
![]() |
46.3 | 63 | === 2.2.1 Setting the automatic startup and start/stop lorawan-server via systemctl === |
![]() |
21.1 | 64 | |
![]() |
46.3 | 65 | |
66 | (% style="color:blue" %)**If users want the server to start automatically after system reboot, run the command:** | ||
67 | |||
![]() |
21.1 | 68 | (% class="box infomessage" %) |
69 | ((( | ||
![]() |
46.7 | 70 | **~ systemctl enable lorawan-server** |
![]() |
21.1 | 71 | ))) |
72 | |||
73 | |||
![]() |
46.3 | 74 | (% style="color:blue" %)**start/stop lorawan-server via systemctl:** |
75 | |||
![]() |
21.1 | 76 | (% class="box infomessage" %) |
77 | ((( | ||
![]() |
46.7 | 78 | **~ systemctl start lorawan-server** |
79 | |||
80 | ** systemctl stop lorawan-server** | ||
![]() |
21.1 | 81 | ))) |
82 | |||
![]() |
23.1 | 83 | [[image:image-20220527091541-2.png||height="81" width="896"]] |
![]() |
21.1 | 84 | |
![]() |
46.3 | 85 | |
![]() |
46.7 | 86 | By default, the server listens on HTTP port 8080 and expects "**admin**" as both username and password. Users can access it via a web browser by entering the URL, where is the IP or the hostname of your server. [[http:~~/~~/ip_address:8080>>http://ip_address:8080]] |
![]() |
23.1 | 87 | |
![]() |
11.1 | 88 | |
![]() |
46.3 | 89 | = 3. Configure Gateway = |
![]() |
24.1 | 90 | |
![]() |
46.3 | 91 | == 3.1 Register Gateway == |
92 | |||
93 | |||
![]() |
33.1 | 94 | [[image:image-20220531144134-1.png||height="623" width="965"]] |
![]() |
1.1 | 95 | |
96 | |||
![]() |
46.7 | 97 | Back to the page of Semtech UDP check the secondary server settings and click the button of (% style="color:blue" %)**Save&Apply.** |
![]() |
1.1 | 98 | |
99 | |||
![]() |
15.2 | 100 | |
![]() |
33.1 | 101 | [[image:image-20220531144640-2.png]] |
![]() |
15.2 | 102 | |
103 | |||
![]() |
33.1 | 104 | If the user completes the above steps, you can check your gateway status on the built-in Lorawan server. |
![]() |
11.1 | 105 | |
106 | |||
![]() |
33.1 | 107 | [[image:image-20220531144914-3.png||height="657" width="964"]] |
108 | |||
109 | |||
110 | [[image:image-20220531144957-4.png||height="425" width="970"]] | ||
111 | |||
112 | |||
![]() |
46.3 | 113 | = 4. Configure Sensors = |
114 | |||
![]() |
46.4 | 115 | == 4.1 Step 1. Add the Networks == |
![]() |
33.1 | 116 | |
![]() |
46.3 | 117 | |
![]() |
37.1 | 118 | **The following are examples of adding EU868 frequency nodes** |
![]() |
33.1 | 119 | |
![]() |
37.1 | 120 | See this link for more frequency configurations [[https:~~/~~/github.com/gotthardp/lorawan-server/blob/master/doc/Regions.md>>https://github.com/gotthardp/lorawan-server/blob/master/doc/Regions.md]] |
121 | |||
![]() |
46.4 | 122 | |
![]() |
33.1 | 123 | (% class="box" %) |
124 | ((( | ||
![]() |
46.3 | 125 | 1. Input the NetID* ~-~-> Random 6 digits |
![]() |
33.1 | 126 | |
![]() |
46.3 | 127 | 2. Choose the Region* ~-~-> EU 863-870MHz |
![]() |
33.1 | 128 | |
![]() |
46.3 | 129 | 3. Gateway Power ~-~-> Default value of EU868 is 16dBm |
![]() |
33.1 | 130 | ))) |
131 | |||
![]() |
37.1 | 132 | [[image:image-20220601184816-1.png||height="608" width="958"]] |
![]() |
34.1 | 133 | |
![]() |
46.4 | 134 | |
![]() |
46.6 | 135 | |
![]() |
46.5 | 136 | (% style="color:blue" %)**Configuration of ADR** |
![]() |
39.2 | 137 | |
![]() |
37.1 | 138 | (% class="box" %) |
139 | ((( | ||
![]() |
39.2 | 140 | Max EIRP(dBm) * ~-~-> 16 |
![]() |
37.1 | 141 | |
![]() |
39.2 | 142 | Max Power * ~-~-> Max |
![]() |
37.1 | 143 | |
![]() |
39.2 | 144 | Min Power * ~-~-> Max - 14 dB |
![]() |
37.1 | 145 | |
![]() |
39.2 | 146 | Max Date Rate * ~-~-> SF7 125kHz (5470 bit/s) |
![]() |
37.1 | 147 | |
![]() |
39.2 | 148 | Initial RX2 DR * ~-~-> SF12 125kHz (250 bit/s) |
![]() |
37.1 | 149 | |
![]() |
39.2 | 150 | Initial Duty Cycle ~-~-> 1 (100%) |
151 | |||
152 | Initial RX1 DR Offset ~-~-> 0 | ||
153 | |||
154 | Initial RX2 Freq (MHz)* ~-~-> 869.525 | ||
![]() |
37.1 | 155 | ))) |
156 | |||
157 | [[image:image-20220601185451-2.png||height="612" width="953"]] | ||
158 | |||
![]() |
46.4 | 159 | |
160 | |||
![]() |
46.5 | 161 | (% style="color:blue" %)**Configuration of Channels** |
![]() |
39.2 | 162 | |
163 | (% class="box" %) | ||
164 | ((( | ||
165 | Initial Channels ~-~-> eg. 0 - 2 | ||
166 | ))) | ||
167 | |||
168 | [[image:image-20220601190313-3.png||height="549" width="958"]] | ||
169 | |||
170 | |||
![]() |
46.4 | 171 | Finally, click** "(% style="color:blue" %)submit"(%%)**, Complete the Add Networks step. |
![]() |
39.2 | 172 | |
![]() |
46.4 | 173 | |
174 | == 4.2 Step 2. Create new group == | ||
175 | |||
176 | |||
![]() |
39.2 | 177 | (% class="box" %) |
178 | ((( | ||
179 | Name ~-~-> custom | ||
180 | |||
181 | Network ~-~-> Enter the Networks configured in the preceding steps | ||
182 | ))) | ||
183 | |||
184 | [[image:image-20220601200220-4.png||height="533" width="968"]] | ||
![]() |
41.1 | 185 | |
186 | |||
![]() |
46.4 | 187 | == 4.3 Step 3. Create new profile == |
188 | |||
189 | |||
![]() |
46.1 | 190 | [[image:image-20220601203544-5.png||height="494" width="982"]] |
191 | |||
192 | |||
![]() |
46.4 | 193 | == 4.4 Step 4. Create new device == |
194 | |||
195 | |||
![]() |
46.1 | 196 | [[image:image-20220601203837-6.png||height="577" width="983"]] |
197 | |||
198 | |||
![]() |
46.4 | 199 | == 4.5 Checking node Status == |
200 | |||
201 | |||
![]() |
46.1 | 202 | [[image:image-20220601204155-7.png||height="484" width="990"]] |
203 | |||
![]() |
46.4 | 204 | |
![]() |
46.1 | 205 | [[image:image-20220601204545-8.png||height="404" width="995"]] |
![]() |
46.4 | 206 | |
207 |