ST Nucleo LoRa Gateway development board connected to Tencent Cloud IoT development platform

foreword

In the previous article, the ST NUCLEO LoRa Sensor development board was connected to the Tencent Cloud IoT development platform to complete the node access. This article continues to complete the access to the LoRa gateway. At the same time, you will also see an easter egg sent by Tencent, the Tencent LoRa community network.

Tencent Cloud IoT Explorer is a one-stop IoT development platform mainly promoted by Tencent Cloud. IoT experts learn and share from the three parts of device side development, platform function operation, and application side development, and also share some hands-on works and collections The officially released industry cooperation case helps readers better understand the entire development link. Details can be viewed here .

1 The general idea of ​​docking

As described in Connecting the ST NUCLEO LoRa Sensor Development Board to the Tencent Cloud IoT Development Platform , the Tencent Cloud IoT Development Platform retains the standard Packet Forwarder protocol, which minimizes the access threshold for enterprises and developers.
Therefore, on the gateway side, we only need to use the standard Packet Forwarder protocol to achieve platform access.

The scheme topology is as follows:

LoRaWAN
PacketForwarder
Nucleo_LoRa_Sensor/TencentOS_tiny
Nucleo_LoRa_Gateway
腾讯云物联网开发平台

2 Console to operate LoRa gateway

Tencent LoRa Community Network

When the console comes in, you can see this big map of China. Although the platform has been online for two months, there are already 70 community gateways.

The so-called community network means that you can access nodes through a nearby gateway without building a gateway yourself. This starting point is still very good, and now a gateway still costs 1,000 blocks, which is still a relatively large amount for most of my friends.

I don’t know what scale this network will grow to in the end. After all, the atmosphere of LoRa developer culture cannot be felt in China. I hope Tencent can continue to do this and bring the rhythm of domestic developers in the area.

It is estimated that some enterprises will be worried that their channel capacity will be occupied after the opening, and choose not to open the gateway. In fact, there is no need to worry. I believe that companies that are actually working on the project will definitely build their own gateways to ensure reliability. Publicizing the gateway will bring some benefits. It is estimated that local developers will see your gateway name and make a wave of publicity for their own enterprises.

Of course, you can also see some excellent developers, such as Mculover666,

Add user gateway

Go to the LoRa Gateway management page and select [Add Gateway].

On the New Gateway page, fill in the basic information of the gateway. GwEUI is the gateway unique ID. In this example, according to the MAC address on the back of ST NUCLEO LoRa GW, add 0xffff to the middle of the 6-byte MAC address.

Whether to publicly select "Yes" means that community developers can view the gateway on the community network, and can access LoRa nodes through this gateway.

After the gateway is successfully created, you can view "GW1" on the gateway list page.

3 LoRa gateway physical operation

hardware connection

The whole system construction needs to be composed of LRWAN_GS_LF1 gateway (gateway module and STM32F746 Nucleo core board), 5V adapter and computer.

1. First use a 5V adapter to connect to the Micro USB interface on the gateway module of the LRWAN_GS_LF1 gateway through a USB cable to supply power to the entire gateway.
2. The Micro USB port on the Nucleo core board (the Micro USB port on the non-Ethernet port side) can be connected to the PC through a USB cable, which can realize the function of a virtual serial port.
3. The gateway development board is connected to the LAN port of the upper-level router through a network cable, so that the Ethernet can be connected by DHCP.

Serial port preparation

1. After the hardware connection is successful, open the device manager on the PC to view the serial port corresponding to the gateway (please make sure that the stlink driver has been installed).

2. Open the serial port tool, make the corresponding configuration, and open the serial port.

Configuration modification

1. Configure the server address. loragw.things.qcloud.comIn this example, the LoRa server address (access domain name: , access port: 1700) of the Tencent Cloud IoT development platform is set .

AT+PKTFWD=loragw.things.qcloud.com,1700,1700  

2. Configure the frequency plan. Adjust the frequency point information to 486.3MHz - 487.7 MHz, and modify the command as follows (need to send one by one):

AT+CH=0,486.3,A
AT+CH=1,486.5,A
AT+CH=2,486.7,A
AT+CH=3,486.9,A
AT+CH=4,487.1,B
AT+CH=5,487.3,B
AT+CH=6,487.5,B
AT+CH=7,487.7,B
AT+CH=8,OFF
AT+CH=9,OFF

A sample screenshot is shown below:

run

The gateway can be reset by AT+Reset and the server connection can be started.

View from the serial port log:

LORAWAN SERVER: loragw.things.qcloud.com 

Indicates that the server address is successfully modified.

Ethernet started
DHCP IP: 192.168.3.249
Downlink UDP Connected
Uplink UDP Connected

Indicates that the gateway's DHCP access to the network is successful, and the network connection is normal.

END

That’s all


Related Posts