Chengdu Ebyte Electronic Technology Co.,Ltd
NB124S_User Manual
Copyright ©2012–2023
,
Chengdu Ebyte Electronic Technology Co.,Ltd
Ali Cloud MQTT platform communication test:
4.6 Channel port
Random Port:
TCP client, UDP client, HTTP client, MQTT client can configure the local port as 0 (use random local port),
server mode cannot use random port, otherwise the client cannot establish the connection correctly (The device is
not properly listening on the port).
Using a random port connection can quickly re-establish the connection when the device is accidentally
disconnected from the server, preventing the server from rejecting the connection due to four waved incomplete. It
is recommended to use a random port in client mode.
When the device configures the TCP client, HTTP client, and MQTT client mode in the AT, it will
automatically configure a random port, which can be canceled by customization.
Static Port:
Device fixed port (factory default use: 8001-8002), TCP server mode device listens to the configured port,
accepts the connection request from the client and establishes a connection for data communication, TCP client
mode device initiates a connection request in fixed port.