Build your own LoRaWAN gateway, Step 3: Set up a parametric operation dimension
Introduction
If you only care: Create a LoRaWAN gateway, please refer to "Spend one hours to build your own LoRaWAN gateway"
https://blog.csdn.net/jiangjunjie_2005/article/details/79758720
If you are interested in: how to set parameters and operational diagnostics for the LoRaWAN Gateway, then this article is suitable. Even though it needs a bit
Linux knowledge, however, this is what every "patient" person can master.
1 REDIRECT Server
Edit File: VI Packet_forwarder/lora_pkt_fwd/local_conf.json
(Remember: Modify the end of the line to retain the comma (half-width).) )
Example: Redirect server to xxxx.yyyy.com
{
"Gateway_conf": {
"gateway_id": "B827ebfffe3d6b90",
"Server_address": "Xxxx.yyyy.com",
"Serv_port_up": 1700,
"Serv_port_down": 1700,
........ ........ ........ ................ ........
}
}
Instance 1 redirect server to lorawan.timeddd.com (tridonic mi cloud Server)
Instance 2 redirect server to gw01.rimecloud.com (sharp meters open server)
2 Setting the band
Edit File: VI Packet_forwarder/lora_pkt_fwd/global_conf.json
Example 1: Setting the cn470-510 80-87 Band
{
"Sx1301_conf": {
"Lorawan_public": true,
"CLKSRC": 1,/* Radio_1 provides clock to concentrator */
"Radio_0": {
"Enable": true,
"Type": "SX1255",
"Freq": 486600000,
....................................................
},
"Radio_1": {
"Enable": true,
"Type": "SX1255",
"Freq": 487400000,
....................................................
},
Figure 2-1 View cn470-510 80-87 Band: Head–n/global_conf.json
Example 2: Setting the cn470-510 0-7 Band
{
"Sx1301_conf": {
"Lorawan_public": true,
"CLKSRC": 1,/* Radio_1 provides clock to concentrator */
"Radio_0": {
"Enable": true,
"Type": "SX1255",
"Freq": 470600000,
....................................................
},
"Radio_1": {
"Enable": true,
"Type": "SX1255",
"Freq": 471400000,
....................................................
},
Figure 2-1 View cn470-510 0-7 Band: Head–n/global_conf.json
3 Viewing Logs
The log of the LoRaWAN gateway is a treasure trove that provides the convenience of diagnosing faults and managing LoRaWAN networks. Log files are generally stored in:/tmp, and grep (regular expression matching) is a powerful tool for searching information.
3.1 Starting the gateway
Search log: Grep-b "Concentrator Started"/tmp/start_gateway.sh.log
Examples are shown below:
① Center Frequency points (SX1255 x 2) are: 486600000 and 487400000 respectively
② Gateway EUI = b827ebfffe3d6b90
③ directed server to: lorawan.timeddd.com
④ upstream and downstream ports are 1700
⑤ Startup success: INFO: [main] concentrator started, packet can now is received
Figure 3-1 Gateway startup log
3.2 Node Network
3.2.1 Join-request
Search log: grep-a 2-b 1 "\" size\ ": 23,\" data\ ": \" A "/tmp/start_gateway.sh.log
Explanation: Join-request Message length = 23, first byte data =a (BASE64 encoded)
3.2.1 Join-response
Search log: grep-a 2-b 1 "\" size\ ": 17,\" data\ ": \" I "/tmp/start_gateway.sh.log
Explanation: Join-response Message length = 17, first byte data =i (BASE64 encoded)
3.3 Node Reporting
Search log: Grep-b 2-a 3 "JSON Up"/tmp/start_gateway.sh.log | More
Explanation: INFO: [Up]push_ack received in MS (Server->gateway communication delay)
3.4 Server Downstream
Search log: Grep-a 1-b 2 "JSON Down"/tmp/start_gateway.sh.log | More
3.5 Statistics Log
Search log: Grep-b 1-a "UPSTREAM"/tmp/start_gateway.sh.log | More
Download this PDF document: http://www.rimelink.com/nd.jsp?id=70#_np=107_316