Hide last authors
Xiaoling 36.1 1 (% style="text-align:center" %)
Xiaoling 104.3 2 [[image:image-20220616085956-1.jpeg||height="609" width="609"]]
Xiaoling 1.1 3
4
5
6
Xiaoling 133.2 7 **Table of Contents:**
Xiaoling 1.1 8
Xiaoling 73.1 9 {{toc/}}
Xiaoling 1.1 10
Xiaoling 72.1 11
12 (% class="wikigeneratedid" id="H" %)
13 (((
14
15 )))
16
Xiaoling 110.2 17 = 1. Introduction =
Xiaoling 36.1 18
Xiaoling 110.2 19 == 1.1 What is PG1302 LoRaWAN Concentrator? ==
Xiaoling 108.19 20
Xiaoling 98.16 21
Xiaoling 108.10 22 (((
Xiaoling 128.2 23 The PG1302 is a (% style="color:blue" %)**multi-channel high-performance transmitter/receiver**(%%) designed to simultaneously receive several LoRa packets using random spreading factors on random channels. Its goal is to enable robust connection between a central wireless data concentrator and a massive amount of wireless end-points spread over a very wide range of distances.
Xiaoling 108.10 24 )))
Xiaoling 87.1 25
Xiaoling 108.10 26 (((
Edwin Chen 100.1 27 The PG1302 is designed to use with Raspberry Pi to build smart metering fixed networks and Internet of Things applications with up to 5000 nodes per km2 in a moderately interfered environment.
Xiaoling 108.10 28 )))
Xiaoling 87.1 29
Xiaoling 108.10 30 (((
Xiaoling 128.2 31 PG1302 is fully compatible with (% style="color:blue" %)**RPi3/4 or Tinker Board**(%%), users can use the pre-build OS from Dragino to set up and easy to use the module by Web UI. Or install the raw LoRaWAN driver in the existing OS.
Xiaoling 108.10 32 )))
Edwin Chen 100.1 33
34
Xiaoling 110.2 35 == 1.2 Features ==
Xiaoling 108.3 36
Xiaoling 36.1 37
38 * Base on Semtech SX1302 solution
Xiaoye 112.1 39 * Support Raspberry Pi 3B/3B+/4, TinkerBoard2/2S, Orange Pi Pc/PC PLUS.
Xiaoling 36.1 40 * Up to -140dBm sensitivity
41 * Support 3.3v and 5v.
42 * Mini-PCIe Interface
43 * Converter board to support Raspberry Pi
44
Xiaoling 110.2 45 == 1.3 General Interfaces for PG1302 ==
Xiaoling 108.6 46
47
Xiaoling 36.1 48 * SPI interface for LoRa
49 * Power Input: 5v, 1A
50 * 1 x I-PEX for LoRa
Edwin Chen 111.1 51 * Working Temperature: -40 ℃ ~~ 80℃
Xiaoling 36.1 52
Xiaoling 110.2 53 == 1.4 Pin Mapping ==
Xiaoling 36.1 54
Xiaoling 108.3 55
Xiaoling 144.2 56 [[image:image-20240122140551-1.png]]
Xiaoling 36.1 57
Xiaoling 108.3 58
Xiaoling 110.2 59 == 1.5 LEDs ==
Xiaoling 36.1 60
Xiaoling 108.3 61
Xiaoling 108.16 62 (((
Xiaoling 108.10 63 TX: Blink when transmit a packet
Xiaoye 145.1 64 RX: Blink when receiving a packet
Xiaoling 108.10 65 Config: Always ON
Xiaoling 108.16 66 )))
Xiaoling 36.1 67
Xiaoling 104.5 68
Xiaoling 110.2 69 == 1.6 Power Consumption ==
Xiaoling 108.3 70
Xiaoling 62.1 71
Xiaoling 108.3 72 <300mA @ 3.3v.
73
Edwin Chen 106.2 74 Detail Test Report see [[this link>>https://www.dropbox.com/sh/89virm4y0b02c7i/AAA-cgQEsSc8gNGFYAB0qZ_Za?dl=0]]
Xiaoling 104.5 75
Edwin Chen 106.2 76
Xiaoye 145.1 77 == 1.7 Antenna Installation ==
Xiaoling 108.3 78
Xiaoling 62.1 79
Xiaoye 145.1 80 Left:  **GPS antenna**
81
82 Right:  **LoRa Antenna**
83
84 [[image:https://www.thethingsnetwork.org/forum/uploads/default/original/3X/6/2/624619afa8d75a2c21bfd1e3687afaa75ad61cbc.jpeg||alt="PG1302_70"]]
85
86
87
88
89
90 == 1.8 Applications ==
91
92
Xiaoling 36.1 93 * Smart Buildings & Home Automation
94 * Logistics and Supply Chain Management
95 * Smart Metering
96 * Smart Agriculture
97 * Smart Cities
98 * Smart Factory
99
Xiaoye 145.1 100
Xiaoling 110.2 101 = 2. Example: Set up as LoRaWAN gateway =
Xiaoling 108.19 102
Xiaoling 110.2 103 == 2.1 System structure ==
Xiaoling 108.19 104
Xiaoling 36.1 105
Xiaoling 108.10 106 (((
Xiaoling 98.3 107 This example is an example to show how to set up the PG1302 + RPi as a LoRaWAN gateway to use with [[TheThingsNetwork>>url:http://www.thethingsnetwork.org/]](TTN) LoRaWAN server. Set up method for other server are similar.
Xiaoling 108.19 108
109
Xiaoling 108.10 110 )))
Xiaoling 36.1 111
112 [[image:1651743698677-436.png||height="457" width="686"]]
113
114
Xiaoling 110.2 115 == 2.2 Hardware Installation ==
Xiaoye 103.1 116
Xiaoling 108.3 117
Xiaoling 98.27 118 (% style="color:red" %)**Important Notice: Please power the RPI with 5V,3A cable.**
Xiaoling 36.1 119
Xiaoling 144.3 120 [[image:image-20220621104746-1.png||height="351" width="415"]]
Xiaoling 36.1 121
122
Xiaoling 110.2 123 = 3. Install the software? =
Xiaoling 36.1 124
Xiaoling 108.11 125
Xiaoye 112.1 126 **Raspberry Pi 3B/3B+/4,**
Xiaoling 36.1 127
Xiaoye 103.1 128 * Flash SD card with Dragino pre-build image which supports Web UI.
Xiaoye 115.1 129 * Install [[Dragino-FWD>>http://wiki.dragino.com/xwiki/bin/view/Main/User%20Manual%20for%20All%20Gateway%20models/PG1302/#H5.2.2.A0Selecttheappropriatedeviceversiontodownload:]] in existing RPi OS.
Xiaoling 36.1 130
Xiaoye 112.1 131 **TinkerBoard2/2S, **
Xiaoling 111.2 132
Xiaoye 115.1 133 * Install [[Dragino-FWD>>http://wiki.dragino.com/xwiki/bin/view/Main/User%20Manual%20for%20All%20Gateway%20models/PG1302/#H5.2.2.A0Selecttheappropriatedeviceversiontodownload:]] in the existing OS.
Xiaoye 112.1 134
135 **Orange Pi PC/PC PLUS.**
136
Xiaoye 115.1 137 * Install [[Dragino-FWD>>http://wiki.dragino.com/xwiki/bin/view/Main/User%20Manual%20for%20All%20Gateway%20models/PG1302/#H5.2.2.A0Selecttheappropriatedeviceversiontodownload:]] in the existing OS.
Xiaoye 112.1 138
Xiaoling 110.2 139 = 4. Flash with pre-build image =
Xiaoling 36.1 140
Xiaoling 110.2 141 == 4.1 Download the dragino image for RPI ==
Xiaoling 108.19 142
Xiaoye 103.1 143
Xiaoling 108.6 144 (((
145 Download PG1302_for_Rpi4_64_with_webui from: [[https:~~/~~/www.dropbox.com/sh/f6nbldh1qbspya5/AACgL6pDkwdBQO1BQqq_Nubwa?dl=0>>https://www.dropbox.com/sh/f6nbldh1qbspya5/AACgL6pDkwdBQO1BQqq_Nubwa?dl=0]]
146 )))
Xiaoling 62.1 147
Xiaoling 108.3 148
Xiaoling 110.2 149 == 4.2 Flash the image to an SD card ==
Xiaoling 108.6 150
Xiaoling 36.1 151
Xiaoye 103.1 152 Flash the image to the SD card:
153
Xiaoling 36.1 154 [[image:1651744119133-233.png||height="373" width="621"]]
155
156
Xiaoling 108.3 157 (% style="color:red" %)**Note: Download the flash tool following this link:**[[https:~~/~~/www.balena.io/etcher/>>https://www.balena.io/etcher/]]
Xiaoling 36.1 158
Xiaoling 62.1 159
Xiaoling 110.2 160 == 4.3 Access the Linux console ==
Xiaoling 108.3 161
Xiaoye 103.1 162
Xiaoling 108.11 163 (((
Xiaoling 108.3 164 Connect the RPI Ethernet port to your router, RPi will obtain an IP address from your router. In the router's management portal, you should be able to find what IP address the router has assigned to the RPI. You can use this IP to connect the WEB UI or SSH access of RPI. Make sure your PC and the RPI is in the same network, then use a SSH tool (such as [[putty>>url:http://www.chiark.greenend.org.uk/~~sgtatham/putty/download.html]]) to access it. Below are screenshots
Xiaoling 108.11 165 )))
Xiaoling 108.3 166
Xiaoling 108.7 167
Xiaoling 36.1 168 [[image:1651744193675-591.png||height="450" width="466"]]
169
Xiaoling 98.11 170 The account details for Web Login are:
Xiaoling 36.1 171
Xiaoling 98.28 172 (((
173 **~ (% style="color:#0000ff" %)User Name: root(%%)**
174 )))
Xiaoling 36.1 175
Xiaoling 98.28 176 (((
177 **~ (% style="color:#0000ff" %)Password:   dragino(%%)**
178 )))
Xiaoling 36.1 179
Xiaoling 98.28 180 (((
181
182 )))
Xiaoling 36.1 183
Xiaoling 98.28 184 (((
185 **~ (% style="color:#0000ff" %)Backup account(%%)**
186 )))
Xiaoling 36.1 187
Xiaoling 98.28 188 (((
189 **~ (% style="color:#0000ff" %)Pi/dragino(%%)**
Xiaoye 103.1 190
191
Xiaoling 98.28 192 )))
Xiaoling 36.1 193
Xiaoye 103.1 194 After logging in, you will be in the Linux console and type the command here.
Xiaoling 36.1 195
196 [[image:1651744358515-107.png||height="366" width="581"]]
197
198
Xiaoling 110.2 199 == 4.4 Access the WebUI of RPi4 ==
Xiaoling 108.3 200
Xiaoling 110.2 201 === 4.4.1 Home page ===
Xiaoling 62.1 202
Xiaoling 108.19 203
Xiaoling 108.12 204 (((
Xiaoling 108.15 205 Open a browser on the PC and type the RPI ip address **http:~/~/IP_ADDRESS ** (If the IP is assigned by the uplink router)
Xiaoling 98.5 206 You will see the login interface of RPI as shown below.
207 The account details for Web Login are:
Xiaoling 108.12 208 )))
Xiaoling 36.1 209
Xiaoling 98.22 210 (((
Xiaoling 98.29 211 **~ (% style="color:#0000ff" %)User Name: root(%%)**
212 (% style="color:#0000ff" %)** Password:   dragino**
Xiaoling 108.3 213
214
Xiaoling 98.22 215 )))
Xiaoling 36.1 216
217 [[image:1651744457761-993.png||height="352" width="621"]]
218
219
Xiaoling 110.2 220 === 4.4.2 LoRa Page ===
Xiaoling 108.3 221
Xiaoye 103.1 222
Xiaoling 98.7 223 This page shows the LoRa Radio Settings. There are a set of default frequency band according to LoRaWAN protocol, and user can customize the band* as well.
Xiaoling 36.1 224
Xiaoling 108.19 225
Xiaoling 36.1 226 [[image:1651744554845-970.png||height="328" width="621"]]
227
Xiaoling 108.19 228
Xiaoling 98.7 229 Different PG1302 hardware version can support different frequency range:
Xiaoling 36.1 230
Xiaoling 108.17 231 * (% style="color:red" %)**868: valid frequency: 863Mhz ~~ 870Mhz. for bands EU868, RU864, IN865 or KZ865.**
232 * (% style="color:red" %)**915: valid frequency: 902Mhz ~~ 928Mhz. for bands US915, AU915, AS923 or KR920**
Xiaoling 36.1 233
Xiaoling 108.9 234 After user choose the frequency plan, he can see the actually frequency in used by checking the (% style="color:#037691" %)**page LogRead ~-~-> LoRa Log**
Xiaoling 36.1 235
Xiaoling 108.3 236 (% style="color:red" %)**Note *: [[See this instruction for how to customize frequency band>>doc:Main.How to customized LoRaWAN frequency band.WebHome]]**
Xiaoling 36.1 237
238
Xiaoling 110.2 239 === 4.4.3 LoRaWAN Page ===
Xiaoling 36.1 240
Xiaoling 110.2 241 ==== 4.4.3.1 Semtech UDP ====
Xiaoling 36.1 242
Xiaoling 108.19 243
Xiaoling 36.1 244 [[image:1651744767914-283.png||height="352" width="621"]]
245
Xiaoling 108.17 246
Xiaoling 108.3 247 (% style="color:red" %)**Note *: [[See this instruction for how to configure TTN>>doc:Main.Notes for TTN.WebHome]].**
Xiaoling 36.1 248
249
Xiaoling 110.2 250 ==== 4.4.3.2 Basic Station ====
Xiaoling 108.3 251
Xiaoling 36.1 252
253 [[image:1651744890629-683.png||height="380" width="621"]]
254
255
Xiaoling 108.3 256 (% style="color:red" %)**Note *: [[See this instruction for how to configure AWS-loT-Core>>doc:Main.AWS IoT Core for LoRaWAN.WebHome]].**
Xiaoling 36.1 257
Xiaoling 108.3 258
Xiaoling 110.2 259 === 4.4.4 LogRead ===
Xiaoling 108.3 260
Xiaoling 110.2 261 ==== 4.4.4.1 LoRa Log ====
Xiaoling 36.1 262
Xiaoling 108.19 263
Xiaoling 36.1 264 [[image:1651744955955-452.png||height="571" width="621"]]
265
Xiaoling 108.19 266
Xiaoling 98.7 267 Show the frequency for LoRa Radio and traffics.
Xiaoling 36.1 268
269
Xiaoling 110.2 270 ==== 4.4.4.2 System Log ====
Xiaoling 108.3 271
Xiaoye 103.1 272
Xiaoling 98.7 273 Show system log.
Xiaoling 36.1 274
275 [[image:1651745003470-264.png||height="477" width="621"]]
276
277
Xiaoling 110.2 278 ==== 4.4.4.3 Record Log ====
Xiaoling 108.3 279
Xiaoye 103.1 280
Xiaoling 98.7 281 **Record the system log.**
Xiaoling 36.1 282
283 [[image:1651745069814-662.png||height="144" width="621"]]
284
285
Xiaoling 110.2 286 = 5. Install stand-alone LoRa Packet Forwarder =
Xiaoling 108.3 287
Xiaoye 116.1 288 == 5.1 Choose the right installation package for your OS ==
Xiaoling 36.1 289
Xiaoling 108.19 290
Xiaoye 116.1 291 (((
292 **draginofwd-32bit (RPI, Orange PI)**
293
294 **Download URL:** https:~/~/www.dragino.com/downloads/downloads/LoRa_Gateway/PG1302/software/draginofwd-32bit.deb
295
296 **Linux Command:** wget https:~/~/www.dragino.com/downloads/downloads/LoRa_Gateway/PG1302/software/draginofwd-32bit.deb && dpkg -i draginofwd-32bit.deb
297
298
299 **dragino-64bit (RPI, Orange PI)**
300
301 **Download URL: **https:~/~/www.dragino.com/downloads/downloads/LoRa_Gateway/PG1302/software/draginofwd-64bit.deb
302 )))
303
304 **Linux Command: **wget https:~/~/www.dragino.com/downloads/downloads/LoRa_Gateway/PG1302/software/draginofwd-64bit.deb && dpkg -i draginofwd-64bit.deb
305
306
307 **dragino-tiker-32bit (Tinker Board)**
308
309 **Download URL: **https:~/~/www.dragino.com/downloads/downloads/LoRa_Gateway/PG1302/software/draginofwd-tinker-32bit.deb
310
311 **Linux Command: **wget https:~/~/www.dragino.com/downloads/downloads/LoRa_Gateway/PG1302/software/draginofwd-tinker-32bit.deb && dpkg -i draginofwd-tinker-32bit.deb
312
313
314 **Install details:**
315
316 [[image:image-20220928181226-1.png||height="218" width="1100"]]
317
318
Xiaoling 98.7 319 RPI in this example is RPI model 4B with fresh Raspbian OS install.
Xiaoling 36.1 320
Xiaoling 98.30 321 (% class="box" %)
322 (((
Xiaoling 128.2 323 **~ pi@raspberrypi:~~$ cat /etc/os-release
Xiaoling 36.1 324 PRETTY_NAME="Raspbian GNU/Linux 8 (jessie)"
325 NAME="Raspbian GNU/Linux"
326 VERSION_ID="8"
327 VERSION="8 (jessie)"
328 ID=raspbian
329 ID_LIKE=debian
330 HOME_URL="http:~/~/www.raspbian.org/"
331 SUPPORT_URL="http:~/~/www.raspbian.org/RaspbianForums"
Xiaoling 128.2 332 BUG_REPORT_URL="http:~/~/www.raspbian.org/RaspbianBugs"**
Xiaoye 103.1 333
334
Xiaoling 98.30 335 )))
Xiaoling 36.1 336
337
Xiaoye 117.1 338 == 5.2 Select the mode of connection to the server ==
Xiaoye 116.1 339
340
Xiaoye 117.1 341 The Dragino LoRa Packet Forware supports the Semtech UDP and Basic Station mode.
Xiaoling 108.3 342
Xiaoye 117.1 343 The User can choose one of the methods as the connection mode.
Xiaoling 108.3 344
Xiaoye 117.1 345
346 **~1. Semtech UDP Mode  ~-~-> 5.2.1**
347
348 **2. Basic Station Mode  ~-~-> 5.2.2**
349
350
351 === 5.2.1 Semtech UDP Mode ===
352
353
Xiaoling 125.3 354 ==== **a). Get a gateway EUI from the device ETH MAC.** ====
Xiaoye 117.1 355
356
Xiaoye 103.1 357 In RPI, run the below command to get a Gateway ID
Xiaoling 36.1 358
Xiaoling 98.11 359 (% class="box infomessage" %)
360 (((
Xiaoling 108.3 361 **~ ifconfig eth0**
Xiaoling 98.11 362 )))
Xiaoling 36.1 363
364 [[image:1651745210205-512.png||height="130" width="621"]]
365
Xiaoling 108.3 366
Xiaoling 91.1 367 (((
Xiaoling 99.2 368 (((
Xiaoling 98.7 369 We got the ether (eth0 MAC) address is b8:27:eb:49:62:bc). Add ffff at the end and remove “:” to get the gateway ID: b827ebxxxxbcffff.  Input this to TTN v3. Make sure to select legacy packet forwarder.
Xiaoling 108.3 370
Xiaoye 117.1 371
372
Xiaoling 125.3 373 ==== **b). Input this Gateway EUI to the TTN-Stack** ====
374
375
Xiaoling 91.1 376 )))
Xiaoling 99.2 377 )))
Xiaoling 36.1 378
379 [[image:1651745267862-321.png||height="526" width="621"]]
380
381 [[image:1651745306744-481.png||height="478" width="621"]]
382
Xiaoling 108.3 383
Xiaoling 62.1 384
Xiaoling 125.3 385 ==== **c). After Register, the status should show not connected as below:** ====
386
387
Xiaoling 36.1 388 [[image:1651745366987-458.png||height="363" width="621"]]
389
390
Xiaoling 108.3 391
Xiaoling 125.3 392 ==== **d). Enable SPI and I2C on your device** ====
393
394
Xiaoye 117.1 395 **the below example is using Raspberry 4B.**
Xiaoling 108.3 396
Xiaoling 36.1 397
Xiaoling 108.3 398 Run (% style="background-color:yellow" %) **sudo raspi-config**(%%) to open the config window
Xiaoling 36.1 399
Xiaoling 98.24 400 [[image:1651745476754-240.png||height="234" width="629"]]
Xiaoling 36.1 401
Xiaoling 110.2 402
Xiaoling 36.1 403 [[image:image-20220505181135-1.png]]
404
Xiaoling 110.2 405
Xiaoling 98.24 406 [[image:image-20220505181135-2.png||height="229" width="622"]]
Xiaoling 36.1 407
Xiaoling 108.3 408
409
Xiaoling 125.3 410 ==== **e). Access the root account:** ====
Xiaoling 36.1 411
Xiaoling 99.2 412 (((
Xiaoling 98.24 413 [[image:1651745583363-614.png||height="151" width="732"]]
Xiaoling 108.3 414
Xiaoling 125.3 415
Xiaoling 108.3 416
Xiaoling 99.2 417 )))
Xiaoling 36.1 418
Xiaoling 125.3 419 ==== **f). Modify the configuration of FWD** ====
Xiaoling 36.1 420
421
Xiaoye 117.1 422 (((
423 After installation, user can find the configuration file in** (% style="color:#0000ff" %)/etc/lora/ (%%)**Replace the gateway ID we got above to the (% style="color:#0000ff" %)**gateway_ID** (%%)in file (% style="color:#0000ff" %)**local_conf.json.**
424 )))
Xiaoling 36.1 425
Xiaoling 99.2 426 (((
Xiaoye 117.1 427 The default LoRaWAN server points to localhost, user need to put the correct server address to the server_address field in file (% style="color:#0000ff" %)**local_conf.json**(%%), like below.
Xiaoling 108.3 428
429
Xiaoye 117.1 430 the User can find the lora configuration directory in (% style="color:#0000ff" %)**/etc/lora/**(%%) there are the cfg-302 directory and the global_conf.json, and local_conf.json files.
Xiaoling 36.1 431
Xiaoye 117.1 432 /etc/lora/
433 ├── cfg-302  ~-~--> global configuration file
434 ├── devskey  ~-~--> Database
435 ├── global_conf.json  ~-~--> Frequency plan for current applications
436 └── local_conf.json  ~-~--> Local fwd configuration
Xiaoling 36.1 437
Xiaoye 117.1 438 At default, the users need to change two configurations file: global_conf.json and local_conf.json.
Xiaoling 108.3 439
Xiaoling 125.3 440
Xiaoye 117.1 441 ===== **1.) Configure gateway EUI and server address, port for fwd** =====
Xiaoling 36.1 442
Xiaoling 108.4 443
Xiaoling 88.1 444 )))
Xiaoling 36.1 445
446 [[image:1651745709709-887.png||height="820" width="621"]]
447
448
Xiaoye 117.1 449 **Note: Users can find the TTN v3 server address from [[Server Addresses ~| The Things Stack for LoRaWAN (thethingsindustries.com)>>url:https://www.thethingsindustries.com/docs/getting-started/server-addresses/#deployments]]**
Xiaoling 36.1 450
451
Xiaoye 117.1 452 ===== **2). Override the global_conf.json file by selecting the appropriate frequency plan for your region in cfg-302** =====
453
454
455 the default frequency band is US915 in the (% style="color:#0000ff" %)**global_conf.json**(%%) file.
456
Xiaoling 36.1 457 [[image:1651745838008-820.png||height="650" width="621"]]
458
Xiaoling 108.4 459
Xiaoye 117.1 460 If the user wants to change to other frequency bands, the User can copy the file from(% style="color:#0000ff" %)** /etc/lora/cfg-302**(%%) ** **and put it into** (% style="color:#0000ff" %)/etc/lora/global_conf.json(%%).**
Xiaoling 36.1 461
Xiaoye 117.1 462 **//eg: cp /etc/lora/cfg-302/EU-global_conf.json /etc/lora/global_conf.json //**
Xiaoling 36.1 463
Xiaoling 108.21 464
Xiaoye 117.1 465
466 ====== **Selecting the appropriate frequency plan for your region in cfg-302.** ======
467
Xiaoling 98.24 468 [[image:1651745867516-322.png||height="83" width="740"]]
Xiaoling 36.1 469
470
Xiaoye 117.1 471 ====== **Override the global_conf.json** ======
Xiaoling 108.4 472
Xiaoling 108.17 473 (% class="box infomessage" %)
474 (((
Xiaoling 108.21 475 **cp /etc/lora/cfg-302/EU-global_conf.json /etc/lora/global_conf.json**
Xiaoling 108.17 476 )))
477
Xiaoling 98.24 478 [[image:1651745984006-868.png||height="87" width="745"]]
Xiaoling 36.1 479
Xiaoling 108.17 480
Xiaoling 125.3 481 ==== (% style="color:inherit; font-family:inherit; font-size:23px" %)**g). Running the Fwd Server**(%%) ====
Xiaoling 36.1 482
Xiaoling 108.4 483
Xiaoling 91.1 484 (((
Xiaoye 117.1 485 Run the below command to restart the dragino_fwd:
Xiaoling 91.1 486 )))
Xiaoling 36.1 487
Xiaoling 91.1 488 (((
Xiaoling 98.8 489 (% class="box infomessage" %)
490 (((
Xiaoling 108.4 491 **sudo systemctl start draginofwd**
Xiaoling 91.1 492 )))
Xiaoling 98.8 493 )))
Xiaoling 36.1 494
Xiaoling 91.1 495 (((
Xiaoling 98.8 496 debug check the ruing status of fwd:
Xiaoling 91.1 497 )))
Xiaoling 36.1 498
Xiaoling 91.1 499 (((
Xiaoling 98.8 500 (% class="box infomessage" %)
501 (((
Xiaoling 108.4 502 **sudo systemctl status draginofwd**
Xiaoling 91.1 503 )))
Xiaoling 98.8 504 )))
Xiaoling 36.1 505
Xiaoling 98.24 506 [[image:1651746045057-414.png||height="193" width="729"]]
Xiaoling 36.1 507
Xiaoling 108.4 508
Xiaoye 117.1 509 Wait for a few minutes, the gateway will be online/active on the TTN-Stack.
Xiaoling 108.4 510
Xiaoling 36.1 511 [[image:1651746078253-168.png||height="372" width="621"]]
512
513
Xiaoling 108.4 514
Xiaoye 117.1 515 Get the draginofwd real-time running log:
Xiaoling 36.1 516
Edwin Chen 95.1 517 (% class="box infomessage" %)
518 (((
Xiaoling 108.4 519 **~ sudo journalctl -u draginofwd -f**
Edwin Chen 95.1 520 )))
Xiaoling 36.1 521
Xiaoling 98.37 522 [[image:1651746111963-838.png||height="184" width="730"]]
Xiaoling 36.1 523
Edwin Chen 93.1 524
Xiaoling 108.21 525
Xiaoling 108.4 526 If there are LoRaWAN nodes transmitting nearby, we can see the traffic in (% style="color:#037691" %)**TTN v3 –> Gateway ~-~-> Live data**
527
Edwin Chen 94.1 528 [[image:1651746139304-966.png||height="326" width="621"]]
Edwin Chen 93.1 529
Xiaoling 108.2 530
Xiaoling 125.3 531 ==== **h). Commands to handle service** ====
Edwin Chen 93.1 532
Xiaoling 98.37 533 * (% style="color:#0000ff" %)**Stop** (%%)dragino_fwd service:  sudo systemctl stop draginofwd
534 * (% style="color:#0000ff" %)**Disable**(%%) dragino_fwd auto run after boot: sudo systemctl disable draginofwd
535 * (% style="color:#0000ff" %)**Start** (%%)dragino_fwd : sudo systemctl start draginofwd
536 * (% style="color:#0000ff" %)**Auto run**(%%) dragino_fwd after boot:  sudo systemctl enable draginofwd
537 * (% style="color:#0000ff" %)**Show status** (%%)of dragino_fwd:  sudo systemctl status draginofwd
Xiaoling 36.1 538
Xiaoling 125.3 539 === 5.2.2 Basic Station Mode. ===
Xiaoye 117.1 540
541
Xiaoling 125.3 542 ==== **a). Get a gateway EUI from the device ETH MAC.** ====
543
544
Xiaoye 125.1 545 In RPI, run the below command to get a Gateway EUI
Xiaoye 117.1 546
547 (% class="box infomessage" %)
548 (((
549 **~ ifconfig eth0**
550 )))
551
552 [[image:1651745210205-512.png||height="130" width="621"]]
553
554
555 (((
556 (((
557 We got the ether (eth0 MAC) address is b8:27:eb:49:62:bc). Add ffff at the end and remove “:” to get the gateway ID: b827ebxxxxbcffff.  Input this to TTN v3. Make sure to select legacy packet forwarder.
558 )))
559 )))
560
561
562
Xiaoling 125.3 563 ==== **b). Register the gateway with the Basic Station Mode on the TTN-Stack** ====
Xiaoye 117.1 564
565
Xiaoye 125.1 566 [[image:image-20230329164417-5.png]]
Xiaoye 117.1 567
568
569
Xiaoling 125.3 570 ==== **c). Download the gateway API keys, and then upload them to the gateway.** ====
Xiaoye 117.1 571
572
Xiaoye 125.1 573 [[image:image-20230329164704-6.png]]
Xiaoye 117.1 574
575
Xiaoling 125.3 576 ==== **d). The status Shows disconnect.** ====
Xiaoye 117.1 577
Xiaoling 125.3 578
Xiaoye 125.1 579 [[image:image-20230329165619-7.png||height="568" width="948"]]
Xiaoye 117.1 580
581
Xiaoling 125.3 582 ==== **e.) Uploda API keys into the gateway** ====
Xiaoye 117.1 583
Xiaoling 125.3 584
Xiaoye 125.1 585 the User can find the Basic Station configuration directory in (% style="color:#0000ff" %)**/etc/station/**(%%) there is the station.conf files, and ttnstack directory.
Xiaoye 117.1 586
Xiaoye 125.1 587 //**directory tree:**//
Xiaoye 117.1 588
Xiaoye 125.1 589 ///etc/station/
590 ├── station.conf 
Xiaoling 125.2 591 └── ttnstack  ~-~--> ** ttnstack configuration file directory**
Xiaoye 125.1 592 ├── cups.trust  ~-~-->  ttnstack auth file
593 ├── cups.uri  ~-~-->  ttnstack server URI file
594 └── station.conf  ~-~-~-~-> backup configuration file//
595
596
597
598 **and then upload the downloaded keys to this directory((% style="color:#0000ff" %)/etc/station/(%%))**
599
600 eg:
601
602 /etc/station/
603 ├── cups.key  ~-~--> uploaded by you
604 ├── lns.key  ~-~--> uploaded by you
605 ├── station.conf
606
607
Xiaoling 125.3 608 ==== **f). Configure gateway EUI and server address** ====
Xiaoye 125.1 609
610
611 [[image:image-20230329195650-10.png]]
612
613
614 After the user enters the correct parameters, the server will be run automatically
615
616
617 Tree Directory:
618
619 /etc/station/
620 ├── cups.key
621 ├── cups.trust
622 ├── cups.uri
623 ├── lns.key
624 ├── start-configure.sh
625 ├── station.conf
626 └── ttnstack
627 ├── cups.trust
628 ├── cups.uri
629 └── station.conf
630
631
Xiaoling 125.3 632 ==== **g). Check station running log** ====
Xiaoye 125.1 633
634
635 tail -f /var/log/station.log
636
637
638 [[image:image-20230329201624-11.png]]
639
Xiaoye 142.1 640
Xiaoye 143.1 641
Kilight Cao 134.1 642 = 6. Add GPS support in PG1302 =
Xiaoye 125.1 643
Xiaoye 142.1 644 The PG1302 supports GPS:
Xiaoling 36.1 645
Xiaoye 142.1 646 [[image:image-20240118160132-1.png||height="270" width="338"]]
647
648
649 * **The users can find the GPS device in Raspberry: /dev/ttyS0 or /dev/ttyAMA0**
650
651 [[image:image-20240118160407-2.png||height="71" width="458"]]
652
653
654 * **Check the GPS output: cat /dev/ttyS0**
655
656 [[image:image-20240118160454-3.png]]
657
658
659 * **Add the GPS to the Semtech UDP package forwarder configuration.**
660
661 [[image:image-20240118160928-4.png||height="426" width="464"]]
662
663
664 * **Test GPS function**
665
666 **~ 1.) Stop IoT service: systemctl stop draginofwd**
667
668
669 **~ 2.) Run the fwd command and check the output**
670
671
672 [[image:image-20240118161109-5.png]]
673
674
675 **~ 3.) Trouble Shooting:**
676
677 If you get many WARNING outputs, which should be the GPS location is invalid, you need to adjust the GPS location, it is recommended to put it outdoors
678
679
680 [[image:image-20240118161333-6.png]]
681
682
683 The user can check the PG1302 board GPS LED status to check the location,
684
685 GPS location is valid  ~-~--> GPS LED will light up
686
687 GPS location is invalid ~-~--> GPS LED will light down
688
689
690 [[image:image-20240118162033-7.png]]
691
692
693
Kilight Cao 134.1 694 = 7. Trouble Shooting =
Kilight Cao 128.1 695
Xiaoye 142.1 696 (% class="wikigeneratedid" %)
697 7.1 Failed to start the concentrator how to debug
Kilight Cao 128.1 698
Kilight Cao 134.1 699
Xiaoye 129.1 700 --When the problem "failed to start the concentrator" occurs, the user needs to check whether the I2C and SPI are enabled,--
Kilight Cao 128.1 701
Xiaoye 129.1 702 --Users can enter the following command to check whether I2C is detected, and the detection of **"60"** is correct.--
Kilight Cao 128.1 703
704 (% class="box infomessage" %)
705 (((
Xiaoye 129.1 706 --**i2cdetect -y 1**--
Kilight Cao 128.1 707 )))
708
Xiaoye 129.1 709 **Note: This method has been removed because the i2c had been removed on the latest PG1302.**
Kilight Cao 128.1 710
711
Xiaoye 129.1 712
Kilight Cao 128.1 713 Check whether the SPI path of the configuration file is correct,
714
715 (% class="box infomessage" %)
716 (((
Xiaoling 128.2 717 **cat /etc/lora/global_conf.json **
Kilight Cao 128.1 718 )))
719
720 (% class="wikigeneratedid" %)
721 [[image:image-20230518092732-2.png||height="378" width="691"]]
722
723
724
Kilight Cao 134.1 725 = 8. Order Info =
Kilight Cao 128.1 726
727
Xiaoling 98.37 728 Part Number: (% style="color:#0000ff" %)**PG1302-XX**   (%%) Or  Part Number: (% style="color:#0000ff" %)**PG1302-PI-XX   **(%%)(Include RPi converter board for RPI 3/4)
Xiaoling 36.1 729
Xiaoling 98.37 730 **~ (% style="color:#0000ff" %)XX:(%%)**
Xiaoling 36.1 731
Xiaoling 108.4 732 * (% style="color:red" %)**868** (%%)(For Bands: EU868,IN865)
733 * (% style="color:red" %)**915** (%%)(For Bands: US915,AU915,AS923,KR920)
734 * (% style="color:red" %)**470** (%%)(For Band: CN470)
Xiaoling 36.1 735
Kilight Cao 134.1 736 = 9. Packing Info =
Xiaoling 125.3 737
Xiaoling 36.1 738
Xiaoling 91.1 739 (((
Xiaoling 98.9 740 **PG1302 Package Includes**:
Xiaoling 91.1 741 )))
Xiaoling 36.1 742
Xiaoling 98.9 743 (((
Xiaoling 99.5 744 * PG1302 x 1
745 * LoRa Antenna x 1
Xiaoling 91.1 746 )))
Xiaoling 98.9 747
Xiaoling 125.3 748
Xiaoling 128.2 749
Xiaoling 98.9 750 (((
751 **PG1302-PI Package Includes**:
Xiaoling 91.1 752 )))
Xiaoling 36.1 753
Xiaoling 99.5 754 * PG1302 x 1
755 * LoRa Antenna x 1
756 * RPi3/4 converter PCB
757 * Screws to hole converter PCB on RPI.
Xiaoling 98.25 758
Xiaoling 108.2 759 **PG1302-PI Dimension and weight: **
760
761 * Device Size: 18 x 8 x 4 cm
762 * Weight: 150g
763
Kilight Cao 134.1 764 = 10. Support =
Xiaoling 125.3 765
Xiaoling 98.25 766
Xiaoling 98.38 767 (((
Xiaoling 128.2 768 If you are experiencing issues and can't solve, you can send mail to [[support@dragino.com>>mailto:support@dragino.com]].
Xiaoling 98.38 769 )))
Xiaoling 98.25 770
Xiaoling 98.38 771 (((
Xiaoling 98.25 772 With your question as detail as possible. We will reply and help you in the shortest.
Xiaoling 91.1 773 )))
Copyright ©2010-2022 Dragino Technology Co., LTD. All rights reserved
Dragino Wiki v2.0