pdf-icon

Unit MQTT-PoE

SKU:U129-B

Description

Unit MQTT-PoE is an Ethernet MQTT communication module that combines PoE power supply with the W5500 Ethernet controller. It uses a UART communication interface (controlled by AT commands) and integrates an RJ45 adaptive 10/100M Ethernet port. It supports 4x Topic subscriptions. With extremely low network latency and high stability, it is suitable for various industrial automation, security monitoring systems, automatic measurement and control systems, and device data cloud applications.

Unit MQTT Version Comparison
Compared to Unit MQTT , this PoE version integrates PoE power supply functionality, with a load capacity of 1.2A@5V (6W).

Features

  • Embedded W5500 Ethernet chip
  • RJ45 Ethernet port 10/100Mbps
  • PoE power supply capability: 1.2A@5V (6W)
  • Ethernet MQTT communication
  • Supports 4x Topic subscriptions
  • Low latency
  • Development methods:
    • AT commands, UART: 9600bps default
    • Development platforms: UIFlow, Arduino

Includes

  • 1 x Unit MQTT-PoE
  • 1 x HY2.0-4P Grove cable (20cm)

Applications

  • Remote data collection/cloud upload

Specifications

Specification Parameter
Module Processor ARM Cortex-M3
Communication Interface UART: baud 9600bps 8N1 default
MQTT Supports 4x Topic subscriptions, does not support MQTTS
Ethernet Port RJ45 adaptive 10/100M Ethernet port
Latency Latency `10ms
PoE Power Supply Capability 1.2A@5V (6W) / Power supply voltage DC 37-57V
Operating Current 190mA
Standby Current 130mA
Net Weight 27.0g
Gross Weight 34.2g
Product Dimensions 72 x 26 x 19mm
Package Dimensions 73 x 35 x 20mm

Schematics

PinMap

Unit MQTT-PoE

HY2.0-4P Black Red Yellow White
PORT.C GND 5V UART_TX UART_RX

Softwares

Arduino

UiFlow2

Protocol

Note: Each command must end with a carriage return and line feed \r\n

Setting AT Commands

AT+NETMAC=MAC address

  • Command Description: Set the module's MAC address
  • MAC address must be in the format: XX-XX-XX-XX-XX-XX
//Example usage
AT+NETMAC=12-34-56-78-90-AB
+NETMAC=OK

AT+NETSTATICIP=IP address, subnet mask, gateway

  • Command Description: Set the module's static IP address (AT+NETSTATICIP=IP address, subnet mask, gateway)
Note:
When DHCP is enabled, the static IP setting will not take effect
IP address (text), representing the local IP address, can be an IP address or domain name
Subnet mask (text), must be in IP address format
Gateway (text), must be in IP address format
//Example usage
AT+NETSTATICIP="192.168.0.101","255.255.255.0","192.168.0.1"
+NETSTATICIP=OK

AT+NETDHCPEN=1/0

  • Command Description: Enable/disable DHCP function 1/0
    1: Enable DHCP function
    0: Disable DHCP function
//Example usage
AT+NETDHCPEN=1
+NETDHCPEN=OK

AT+MQCLIENTID=Client name

  • Command Description: Set MQTT server
    Client name
    (text) MQTT client name
//Example usage
AT+MQCLIENTID="CLIENT ID"
+MQCLIENTID=OK

AT+MQKEEP=Keep-alive duration

  • Command Description: Set the keep-alive duration for connecting to the MQTT server
    Keep-alive duration
    The interval for automatically sending PINGREQ packets, in seconds, range 5~300
//Example usage
AT+MQKEEP=500
+MQKEEP=OK

AT+MQSUBSCRIBE=Topic number**,1/0,Topic name,**QoS

  • Command Description: Set the topic to subscribe to on the MQTT server. This module can subscribe to 4 topics simultaneously. Modifying the subscription topic with this command will not immediately subscribe or unsubscribe; it will take effect the next time the module connects to the MQTT server.
    Topic number Number 1-4
    1/0 1: Enable subscription to this topic, 0: Disable subscription to this topic. When this parameter is 0, the following two parameters must be empty.
    Topic name (text) QoS must be one of 0, 1, 2
//Example usage
AT+MQSUBSCRIBE=1,1,"sub",0
+MQSUBSCRIBE=OK

AT+MQSERVER=Server address**,**Server port

  • Command Description: Set the MQTT server address and port number
    Server address
    (text), can be an IP address or domain name
    Server port Number 0~65535
//Example usage
AT+MQSERVER="xxx.mqttserver.com",1883
+MQSERVER=OK

AT+MQUSERPWD=Username**,**Password

  • Command Description:
    Set username and password Username (text) MQTT username
    Password (text) MQTT login password
//Example usage
AT+MQUSERPWD="user","123456"
+MQUSERPWD=OK

AT+MQAUTO=1/0

  • Command Description:
    Set whether to connect to the server directly upon power-up
    1/0 0: Do not start connection directly upon power-up, 1: Start connection directly upon power-up based on configured parameters
//Example usage
AT+MQAUTO=1
+MQAUTO=OK

AT+MQRESETCFG

  • Command Description: Restore MQTT-related factory settings
//Example usage
AT+MQRESETCFG
+MQRESETCFG=OK

AT+MQPUBLISH=Topic**,Message,**QoS

  • Command Description: Publish MQTT message
    Topic (text), the topic name of the message to be published
    Message (text), the message to be published, the maximum length allowed for this parameter is 1000
    QoS QOS, must be 0, 1, 2, this parameter can be omitted, in which case QOS is 0

AT+BAUD=Baud rate

  • Command Description: Set the UART baud rate
    Baud rate Baud rate can only be one of the following values: /4800/9600/19200/34800/115200/230400
//Example usage
AT+BAUD=115200
+BAUD=OK

AT+SAVE

  • Command Description: Save parameters, After configuring MQTT parameters, you need to execute the SAVE command and perform a RESET soft reset for the configuration to take effect
//Example usage
AT+SAVE
+SAVE=OK

AT+RESET

  • Command Description: Perform a soft reset of the module, After configuring MQTT parameters, you need to execute the SAVE command and perform a RESET soft reset for the configuration to take effect
//Example usage
AT+RESET
+RESET=OK

Query AT Commands

AT

  • Command Description: Test communication with the module, response: AT
//Example usage
AT
AT

AT+MQSUBSCRIBE=Topic number**?**

  • Command Description: Query the subscribed topic, response: +MQSUBSCRIBE=OK:Topic number, Enable/Disable, Topic name, QoS level
    Topic number can only be one of 1~4
    Enable/Disable 1: Current subscription is enabled, 0: Current subscription is invalid
    Topic name QoS level can only be one of 0, 1, 2 representing MQTT QoS levels QOS0, QOS1, QOS2
//Example usage
AT+MQSUBSCRIBE=1?
+MQSUBSCRIBE=OK:1,1,"/topic",0

AT+MQAUTO?

  • Command Description: Query whether to start connection directly upon power-up, response: +MQAUTO=OK:Enable/Disable 0: Do not start connection directly upon power-up, 1: Start connection directly upon power-up based on configured parameters
//Example usage
AT+MQAUTO?
+MQAUTO=OK:1

AT+NETMAC?

  • Command Description: Query the module's current MAC address, response: +NETMAC=OK:MAC address Format: XX-XX-XX-XX-XX-XX
//Example usage
AT+NETMAC?
+NETMAC=OK:12-34-56-78-90-AB

AT+NETSTATICIP?

  • Command Description: Query the module's static IP settings, response: +NETSTATICIP=OK:Static IP address, Subnet mask, Gateway
//Example usage
AT+NETSTATICIP?
+NETSTATICIP=OK:"192.168.1.2","255.255.255.0","192.168.1.1"

AT+NETDHCPEN?

  • Command Description: Query DHCP function enable/disable, response: +NETDHCPEN=OK:Enable/Disable 1: Enable DHCP function, 0: Disable DHCP function
//Example usage
AT+NETDHCPEN?
+NETDHCPEN=OK:1

AT+MQCLIENTID?

  • Command Description: Query MQTT client name, response: +MQCLIENTID=OK:Client IP
//Example usage
AT+MQCLIENTID?
+MQCLIENTID=OK:"clientID" 

AT+MQSERVER?

  • Command Description: Query MQTT server address and port number, response: +MQSERVER=OK:Server address, Server port number
//Example usage
AT+MQSERVER?

+MQSERVER=OK:"192.168.1.55",1883

AT+MQUSERPWD?

  • Command Description: Query the set MQTT server username and password, response: +MQUSERPWD=OK:Username, Password
//Example usage
AT+MQUSERPWD?
+MQUSERPWD=OK:"USER","123456" 

AT+MQKEEP?

  • Command Description: Query the keep-alive interval for connecting to the MQTT server, response: +MQKEEP=OK:Keep-alive interval
//Example usage
AT+MQKEEP?
+MQKEEP=OK:60

AT+BAUD?

  • Command Description: Query the UART baud rate, response: +BAUD=OK:Baud rate Default baud rate is 9600
//Example usage
AT+BAUD?
+BAUD=OK:9600

AT+VERSION?

  • Command Description: Query the current version number, response: +VERSION=OK:Current firmware version number
//Example usage
AT+VERSION?
+VERSION=OK:1.0

AT+MQSTATUS?

  • Command Description: Query MQTT connection status/connection has been disconnected
    Response: +MQSTATUS=OK:Connection status
//Example usage
AT+MQSTATUS?
+MQSTATUS=OK:1

AT+NETIP?

  • Command Description: Query the module's current actual IP address
    Response: +NETIP=OK:IP address, Subnet mask, Gateway, DNS server address
//Example usage
AT+NETIP?
+NETIP=OK:"192.168.2.121","255.255.255.0","192.168.2.1","192.168.2.1"

Active AT Commands


//Network not connected
+NETUNCONNECT

//MQTT server not connected
+MQUNCONNECT
 
//Connected to MQTT server successfully
+MQCONNECT

//Received topic message
+MQRECV:**Topic**,**Length**,**Message**

Error Codes Returned When Commands Fail


//Parameter content error
ERROR:Error Param

//Parameter count does not meet requirements
ERROR:Error Param Num

//Parameter length is too long, each parameter field must be less than 128 bytes (maximum message length is 1000 bytes) 
ERROR:Parma is too long

//Failed to connect to the network
ERROR:Unconnected

//MQTT server communication error
ERROR:MQTT Connect Fail

//Server did not respond when publishing message (Qos1 and Qos2) 
ERROR:MQTT Publish Fail
 

Video