How does the Bluetooth gateway connect to the MQTT server?

Let’s set up the Bluetooth gateway first:

Configure the gateway's mqtt client:

After configuring the mqtt client of acserver, we need to configure the mqtt client on the gateway side. Here we mainly describe the description of the network configuration fields. For descriptions of gateway filtering and other descriptions, please refer to other tutorials. First make sure the gateway is configurable online (refer to the gateway user manual).
Insert image description here
Configure the gateway as shown below:
Insert image description here

Insert image description here

After configuration, click Configure Gateway. After the gateway automatically restarts, the data can be sent to the mqtt server. You can use mqttfx to check it.

Here, one piece of data is reported every second, because I set the sending interval of the gateway to 1000 milliseconds:

If we feel that there is too much same data, we can use the node heartbeat function, which only sends heartbeats for the same data. For example, the Bluetooth terminal device broadcasts a temperature of 21 degrees, and we set the node heartbeat to 10 seconds, then if the temperature remains at 21 degrees , mqtt messages are published once every 10 seconds. If the temperature suddenly changes by 22 degrees, the Bluetooth gateway will immediately push the message to mqtt. Here we set the node heartbeat for 10 seconds.

https://blog.csdn.net/hlemon0808/article/details/109184017

MQTT transmission configuration of Bluetooth gateway_Bluetooth mesh to mqtt-CSDN blog

Guess you like

Origin blog.csdn.net/zdwzzu2006/article/details/132898775