table of Contents
1. Connect the computer to the LoRa gateway
2. Configure the LoRa gateway device with the help of the computer's display interface
3. Modify the destination server and port of the gateway through the sudo gateway-config command
Preface
In the previous article " How to add a LoRaWAN gateway to Tencent Cloud ", we introduced how to add a LoRa gateway to the Tencent Cloud IoT platform.
However, if you want to connect the LoRa gateway to Tencent Cloud, you also need to configure the LoRa gateway.
This article describes how to modify the packet-forwarder configuration of the LoRa gateway to change its server address to the address of Tencent Cloud, so that the gateway can connect to Tencent Cloud.
1. Connect the computer to the LoRa gateway
To connect the gateway device to the Internet, you first need to log in to the gateway device on the computer. You can consider using the Putty tool to connect to the LoRa gateway by ssh. For the method, please refer to " How to log in to the Raspberry Pi gateway on a computer-teach you how to connect the Raspberry Pi to LoRaWAN The first part of connecting the gateway to the server ".
2. Configure the LoRa gateway device with the help of the computer's display interface
After successfully logging in to the gateway through SSH, enter the sudo gateway-config command to open the gateway configuration main interface featured by RAK Huilian's gateway products. This main interface can make the gateway configuration interface more friendly. For details, see " Teach you how to connect the Raspberry Pi gateway to the server Part 2 ".
3. Modify the destination server and port of the gateway through the sudo gateway-config command
You can configure the gateway after opening the main interface of the gateway configuration featured by RAK's gateway products.
Use the computer’s display interface to configure the gateway device to connect the gateway to the external network. For the method, please refer to " How to connect the Raspberry Pi gateway to the external network-teach you how to connect the Raspberry Pi gateway to the server." three "
As shown in Figure 1, select Setup RAK Gateway LoRa concentrator.
As shown in Figure 2, modify the selection server type and select the TTN server.
As shown in Figure 3, the selected frequency band is CN470. The selection of this frequency band needs to be selected according to the actual use location of the gateway. If it is in China, then the CN470 frequency band needs to be selected. Moreover, when purchasing a gateway, you also need to select the gateway of the corresponding frequency band.
As shown in Figure 4, select Edit packet-forwarder config to enter the interface shown in Figure 5.
On the interface shown in Figure 5, the packet-forwarder can be configured, that is, the LoRa gateway can be configured
The address of the Tencent Cloud server changed to gateway_conf.server_address, which is loragw.things.qcloud.com .
Fourth, the gateway is online
Restart the gateway, wait for a while, refresh the LoRaWAN gateway management interface on the Tencent Cloud IoT development platform, and you will see that the gateway is online. The "RAK7243 Gateway" in the picture is the LoRaWAN gateway RAK7243 of RAK Huilian we used as an example.
Conclusion
After we add the LoRaWAN gateway to the Tencent Cloud development platform, we can add nodes to the platform for management. For details on how to add nodes, please look forward to our next article.