Chengdu Ebyte Electronic Technology Co.,Ltd.
NB183S&NB183_User Manual
Copyright ©2012–2022
,
Chengdu Ebyte Electronic Technology Co.,Ltd.
24
Alibaba Cloud MQTT platform communication test:
4.5 Channel ports
random port:
The TCP client, UDP client, HTTP client, and MQTT client can configure the local port to 0 (use a random local port),
and the server mode cannot use a random port, otherwise the client cannot establish a connection correctly (the device
does not correctly port listening).
Using a random port connection can quickly re-establish the connection when the device disconnects from the server
unexpectedly, preventing the server from rejecting the connection due to four waves of incompleteness. 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 AT, it will automatically configure a
random port, which can be canceled by definition.
static port:
Device fixed port (factory default use: 8001-8008), TCP server mode device listens to the configured port, accepts client
connection request and establishes a connection for data communication, TCP client mode device fixed port initiates
connection request.