Waveshare UART-WIFI232-B2 User Manual page 70

Table of Contents

Advertisement

UART-WIFI232-B2 User Manual
The main purpose of sending to the network is to keep the connection with the server, and at
the same time, let the server that has been idle for a long time (not sending data to the server for a
long time) check whether the current connection status is valid.
In applications where servers send fixed query instructions to devices, in order to reduce
frequent interaction, users can choose to send heartbeat packets (query instructions) to the serial
device end instead of sending query instructions from the server.
To enable the custom heartbeat packet function, the AT command setting steps are as follows:
(1) Enable the function of sending heartbeat packets
AT+HEARTEN=on
(2) Set the type of heartbeat packet sending direction (NET or COM), for example, set the heartbeat
packet to be sent to the network server.
AT+HEARTTP=NET
(3) Set the heartbeat packet data (up to 40 bytes), for example, to set the data to the string
www.waveshare.com, you need to first convert it to a hexadecimal string as
7777772E7761766573686172652E636F6D。
AT+HEARTDT=7777772E7766573686172652E636F6D
(4) Set the interval time for sending heartbeat packets, with a range of 1-65535s and a default of 30s.
For example, set the transmission interval to 30 seconds.
Figure Custom heartbeat packet Functional Block Diagram
70
www.waveshare.com

Advertisement

Table of Contents
loading

Table of Contents