The new ESP8266 cores v3.0.2+ introduces many new breaking features, such as replacing axtls
with bearssl
, as well as good ones such as LwIP Ethernet W5500lwIP
, W5100lwIP
and ENC28J60lwIP
libraries.
Because the original
ESPAsyncTCP library is not well maintained to cope with dynamic environment of new cores, features, etc., this library has to use the forked
ESPAsyncTCP library, which has been created to keep up with the fast changes and avoid compile errors in future cores.
Hopefully the bearssl
feature of the new ESP8266 cores will be added to the forked ESPAsyncTCP library in the near future to support SSL.
This AsyncMQTT_Generic library is based on and modified from Marvin Roger's async-mqtt-client Library, to provide support to many more boards besides ESP32/ESP8266, such as STM32F, Portenta_H7, Teensy 4.1, etc. boards. Those supported boards can be used with ESP8266/ESP32’s WiFi, LAN8742A Ethernet, Portenta_H7 WiFi/Ethernet, Teensy 4.1 QNEthernet, RASPBERRY_PI_PICO_W with CYW43439 WiFi, ESP32 with LwIP W5500 or ENC28J60.
This AsyncMQTT_Generic library currently supports these following boards:
ESP32
ESP8266
WT32_ETH01 (ESP32 + LAN8720A)
STM32F/L/H/G/WB/MP1 boards with built-in Ethernet LAN8742A such as :
STM32F4/F7 boards using Ethernet LAN8720 such as :
Note: Must use with STM32 core v2.2.0-
Portenta_H7 using either Murata WiFi
or Vision-shield Ethernet
Teensy 4.1 using QNEthernet Library
RASPBERRY_PI_PICO_W with CYW43439 WiFi using arduino-pico core v2.4.0+
ESP32 boards using LwIP ENC28J60 Ethernet
Arduino IDE 1.8.19+
for Arduino. ESP32 Core 2.0.6+
for ESP32-based boards. ESP8266 Core 3.1.1+
for ESP8266-based boards. .Arduino Core for STM32 v2.4.0+
for STM32F/L/H/G/WB/MP1 boards using built-in LAN8742A. . Use core v2.2.0- for LAN8720.Arduino mbed_portenta core 3.5.4+
for Arduino (Use Arduino Board Manager) Portenta_H7-based boards. Earle Philhower's arduino-pico core v2.7.1+
for RASPBERRY_PI_PICO_W with CYW43439 WiFi, etc. Teensy core v1.57+
for Teensy 4.1. KH_Forked ESPAsyncTCP v1.3.0+
for ESP8266. To install manually for Arduino IDEAsyncTCP v1.1.1+
for ESP32.
STM32Ethernet library v1.3.0+
for STM32 using built-in Ethernet LAN8742A on (Nucleo-144, Discovery). LwIP library v2.1.2+
for STM32 using built-in Ethernet LAN8742A on (Nucleo-144, Discovery). KH_Forked STM32AsyncTCP library v1.0.1+
for built-in Ethernet on (Nucleo-144, Discovery). To install manually for Arduino IDEWebServer_WT32_ETH01 library v1.5.1+
to use WT32_ETH01 (ESP32 + LAN8720). To install, check WebServer_ESP32_W5500 library v1.5.3+
to use (ESP32 + LwIP W5500). To install, check WebServer_ESP32_ENC library v1.5.3+
to use (ESP32 + LwIP ENC28J60). To install, check Portenta_H7_AsyncTCP library v1.4.0+
to use Portenta_H7 using either Murata WiFi or Vision-shield Ethernet. To install, check .Teensy41_AsyncTCP library v1.1.0+
to use Teensy 4.1 using QNEthernet Library. To install, check .AsyncTCP_RP2040W library v1.1.0+
to use RASPBERRY_PI_PICO_W with CYW43439 WiFi. To install, check .AsyncTCP_SSL library v1.3.1+
to use TLS/SSL for ESP32. To install, check .ESPAsync_WiFiManager library v1.15.1+
for ESP32/ESP8266 using some examples. AsyncWebServer_RP2040W library v1.4.1+
for RP2040W using some examples. The best and easiest way is to use Arduino Library Manager
. Search for AsyncMQTT_Generic
, then select / install the latest version.
You can also use this link for more detailed instructions.
Another way to install is to:
AsyncMQTT_Generic-main.zip
.AsyncMQTT_Generic-main
directory AsyncMQTT_Generic-main
folder to Arduino libraries' directory such as ~/Arduino/libraries/
.For Generic STM32F4 series
boards, such as STM32F407VE
, using LAN8720
, please use STM32 core v2.2.0
as breaking core v2.3.0
creates the compile error.
To use LAN8720 on some STM32 boards
you have to copy the files stm32f4xx_hal_conf_default.h and stm32f7xx_hal_conf_default.h into STM32 stm32 directory (~/.arduino15/packages/STM32/hardware/stm32/2.2.0/system) to overwrite the old files.
Supposing the STM32 stm32 core version is 2.2.0. These files must be copied into the directory:
~/.arduino15/packages/STM32/hardware/stm32/2.2.0/system/STM32F4xx/stm32f4xx_hal_conf_default.h
for STM32F4.~/.arduino15/packages/STM32/hardware/stm32/2.2.0/system/STM32F7xx/stm32f7xx_hal_conf_default.h
for Nucleo-144 STM32F7.Whenever a new version is installed, remember to copy this file into the new version directory. For example, new version is x.yy.zz, these files must be copied into the corresponding directory:
~/.arduino15/packages/STM32/hardware/stm32/x.yy.zz/system/STM32F4xx/stm32f4xx_hal_conf_default.h
To use Serial1 on some STM32 boards without Serial1 definition (Nucleo-144 NUCLEO_F767ZI, Nucleo-64 NUCLEO_L053R8, etc.) boards, you have to copy the files STM32 variant.h into STM32 stm32 directory (~/.arduino15/packages/STM32/hardware/stm32/2.3.0). You have to modify the files corresponding to your boards, this is just an illustration how to do.
Supposing the STM32 stm32 core version is 2.3.0. These files must be copied into the directory:
~/.arduino15/packages/STM32/hardware/stm32/2.3.0/variants/STM32F7xx/F765Z(G-I)T_F767Z(G-I)T_F777ZIT/NUCLEO_F767ZI/variant.h
for Nucleo-144 NUCLEO_F767ZI.~/.arduino15/packages/STM32/hardware/stm32/2.3.0/variants/STM32L0xx/L052R(6-8)T_L053R(6-8)T_L063R8T/NUCLEO_L053R8/variant.h
for Nucleo-64 NUCLEO_L053R8.Whenever a new version is installed, remember to copy this file into the new version directory. For example, new version is x.yy.zz, these files must be copied into the corresponding directory:
~/.arduino15/packages/STM32/hardware/stm32/x.yy.zz/variants/STM32F7xx/F765Z(G-I)T_F767Z(G-I)T_F777ZIT/NUCLEO_F767ZI/variant.h
~/.arduino15/packages/STM32/hardware/stm32/x.yy.zz/variants/STM32L0xx/L052R(6-8)T_L053R(6-8)T_L063R8T/NUCLEO_L053R8/variant.h
To be able to compile and run on Teensy boards, you have to copy the files in Packages_Patches for Teensy directory into Teensy hardware directory (./arduino-1.8.19/hardware/teensy/avr/boards.txt).
Supposing the Arduino version is 1.8.19. These files must be copied into the directory:
./arduino-1.8.19/hardware/teensy/avr/boards.txt
./arduino-1.8.19/hardware/teensy/avr/cores/teensy/Stream.h
./arduino-1.8.19/hardware/teensy/avr/cores/teensy3/Stream.h
./arduino-1.8.19/hardware/teensy/avr/cores/teensy4/Stream.h
Whenever a new version is installed, remember to copy this file into the new version directory. For example, new version is x.yy.zz These files must be copied into the directory:
./arduino-x.yy.zz/hardware/teensy/avr/boards.txt
./arduino-x.yy.zz/hardware/teensy/avr/cores/teensy/Stream.h
./arduino-x.yy.zz/hardware/teensy/avr/cores/teensy3/Stream.h
./arduino-x.yy.zz/hardware/teensy/avr/cores/teensy4/Stream.h
To be able to upload firmware to Portenta_H7 using Arduino IDE in Linux (Ubuntu, etc.), you have to copy the file portenta_post_install.sh into mbed_portenta directory (~/.arduino15/packages/arduino/hardware/mbed_portenta/3.4.1/portenta_post_install.sh).
Then run the following command using sudo
$ cd ~/.arduino15/packages/arduino/hardware/mbed_portenta/3.4.1
$ chmod 755 portenta_post_install.sh
$ sudo ./portenta_post_install.sh
This will create the file /etc/udev/rules.d/49-portenta_h7.rules
as follows:
# Portenta H7 bootloader mode UDEV rules
SUBSYSTEMS=="usb", ATTRS{idVendor}=="2341", ATTRS{idProduct}=="035b", GROUP="plugdev", MODE="0666"
Supposing the ArduinoCore-mbed core version is 3.4.1. Now only one file must be copied into the directory:
~/.arduino15/packages/arduino/hardware/mbed_portenta/3.4.1/portenta_post_install.sh
Whenever a new version is installed, remember to copy this files into the new version directory. For example, new version is x.yy.zz
This file must be copied into the directory:
~/.arduino15/packages/arduino/hardware/mbed_portenta/x.yy.zz/portenta_post_install.sh
Please have a look at ESP_WiFiManager Issue 39: Not able to read analog port when using the autoconnect example to have more detailed description and solution of the issue.
ADC1
controls ADC
function for pins GPIO32-GPIO39ADC2
controls ADC
function for pins GPIO0, 2, 4, 12-15, 25-27Look in file adc_common.c
In ADC2, there're two locks used for different cases:
lock shared with app and Wi-Fi: ESP32: When Wi-Fi using the ADC2, we assume it will never stop, so app checks the lock and returns immediately if failed. ESP32S2: The controller's control over the ADC is determined by the arbiter. There is no need to control by lock.
lock shared between tasks: when several tasks sharing the ADC2, we want to guarantee all the requests will be handled. Since conversions are short (about 31us), app returns the lock very soon, we use a spinlock to stand there waiting to do conversions one by one.
adc2_spinlock should be acquired first, then adc2_wifi_lock or rtc_spinlock.
ADC2
for other functions, we have to acquire complicated firmware locks and very difficult to doADC2
with WiFi/BlueTooth (BT/BLE).ADC1
, and pins GPIO32-GPIO39ADC2
(GPIO0, 2, 4, 12, 13, 14, 15, 25, 26 and 27), use the fix mentioned at the end of ESP_WiFiManager Issue 39: Not able to read analog port when using the autoconnect example to work with ESP32 WiFi/BlueTooth (BT/BLE).Please check API documentation.
This is the Wiring for STM32F4 (BLACK_F407VE, etc.) using LAN8720
LAN8720 PHY | <---> | STM32F4 |
---|---|---|
TX1 | <---> | PB_13 |
TX_EN | <---> | PB_11 |
TX0 | <---> | PB_12 |
RX0 | <---> | PC_4 |
RX1 | <---> | PC_5 |
nINT/RETCLK | <---> | PA_1 |
CRS | <---> | PA_7 |
MDIO | <---> | PA_2 |
MDC | <---> | PC_1 |
GND | <---> | GND |
VCC | <---> | +3.3V |
Connect as follows. To program, use STM32CubeProgrammer or Arduino IDE with
U(S)ART Support: "Enabled (generic Serial)"
Upload Method : "STM32CubeProgrammer (SWD)"
Jumper settings to program via STLInk
From | <---> | To |
---|---|---|
BOOT0 | <---> | 3.3V |
From | <---> | To |
---|---|---|
BOOT0 | <---> | GND |
STLink | <---> | STM32F4 |
---|---|---|
SWCLK | <---> | SWCLK |
SWDIO | <---> | SWDIO |
RST | <---> | NRST |
GND | <---> | GND |
5v | <---> | 5V |
Connect FDTI (USB to Serial) as follows:
FDTI | <---> | STM32F4 |
---|---|---|
RX | <---> | TX=PA_9 |
TX | <---> | RX=PA_10 |
GND | <---> | GND |
This is the wiring for EP8266 W5x00
or ENC28J60
Ethernet when using SS = GPIO16
W5x00/ENC28J60 Ethernet | <---> | ESP8266 |
---|---|---|
MOSI | <---> | MOSI = GPIO13 |
MISO | <---> | MISO = GPIO12 |
SCK | <---> | SCK = GPIO14 |
SS | <---> | GPIO16 |
GND | <---> | GND |
VCC | <---> | +3.3V |
This is the wiring for ESP8266 W5500
or ENC28J60
Ethernet when using SS = GPIO5
W5x00/ENC28J60 Ethernet | <---> | ESP32 |
---|---|---|
MOSI | <---> | MOSI = GPIO23 |
MISO | <---> | MISO = GPIO19 |
SCK | <---> | SCK = GPIO18 |
SS | <---> | GPIO5 |
INT | <---> | GPIO4 |
GND | <---> | GND |
VCC | <---> | +3.3V |
This is terminal debug output when running FullyFeatured_ESP8266 on ESP8266_NODEMCU_ESP12E connecting to broker.emqx.io
MQTT server.
Starting FullyFeature_ESP8266 on ESP8266_NODEMCU_ESP12E
AsyncMQTT_Generic v1.8.1 for ESP8266
Connecting to Wi-Fi...
Connected to Wi-Fi. IP address: 192.168.2.82
Connecting to MQTT...
Connected to MQTT broker: broker.emqx.io, port: 1883
PubTopic: async-mqtt/ESP8266_Pub
************************************************
Session present: 0
Subscribing at QoS 2, packetId: 1
Publishing at QoS 0
Publishing at QoS 1, packetId: 2
Publishing at QoS 2, packetId: 3
************************************************
Subscribe acknowledged.
packetId: 1
qos: 2
Publish received.
topic: async-mqtt/ESP8266_Pub
qos: 2
dup: 0
retain: 1
len: 13
index: 0
total: 13
Publish acknowledged.
packetId: 2
Publish received.
topic: async-mqtt/ESP8266_Pub
qos: 0
dup: 0
retain: 0
len: 13
index: 0
total: 13
Publish received.
topic: async-mqtt/ESP8266_Pub
qos: 1
dup: 0
retain: 0
len: 13
index: 0
total: 13
Publish received.
topic: async-mqtt/ESP8266_Pub
qos: 2
dup: 0
retain: 0
len: 13
index: 0
total: 13
Publish acknowledged.
packetId: 3
This is terminal debug output when running FullyFeatured_ESP32 on ESP32_DEV connecting to broker.emqx.io
MQTT server.
Starting FullyFeature_ESP32 on ESP32_DEV
AsyncMQTT_Generic v1.8.1 for ESP32 core v2.0.0+
Connecting to Wi-Fi...
WiFi ready
WiFi STA starting
WiFi STA connected
WiFi connected
IP address: 192.168.2.81
Connecting to MQTT...
Connected to MQTT broker: broker.emqx.io, port: 1883
PubTopic: async-mqtt/ESP32_Pub
************************************************
Session present: 0
Subscribing at QoS 2, packetId: 1
Publishing at QoS 0
Publishing at QoS 1, packetId: 2
Publishing at QoS 2, packetId: 3
************************************************
Subscribe acknowledged.
packetId: 1
qos: 2
Publish received.
topic: async-mqtt/ESP32_Pub
qos: 2
dup: 0
retain: 1
len: 6
index: 0
total: 6
Publish received.
topic: async-mqtt/ESP32_Pub
qos: 0
dup: 0
retain: 0
len: 10
index: 0
total: 10
Publish acknowledged.
packetId: 2
Publish received.
topic: async-mqtt/ESP32_Pub
qos: 1
dup: 0
retain: 0
len: 6
index: 0
total: 6
Publish received.
topic: async-mqtt/ESP32_Pub
qos: 2
dup: 0
retain: 0
len: 6
index: 0
total: 6
Publish acknowledged.
packetId: 3
This is terminal debug output when running FullyFeaturedSSL_ESP32 on ESP32_DEV connecting to broker.emqx.io
secured MQTT server (port 8883).
Starting FullyFeatureSSL_ESP32 on ESP32_DEV
AsyncMQTT_Generic v1.8.1 for ESP32 core v2.0.0+
Connecting to Wi-Fi...
WiFi ready
WiFi STA starting
WiFi STA connected
WiFi connected
IP address: 192.168.2.81
Connecting to MQTT...
Connected to MQTT broker: broker.emqx.io, port: 8883
PubTopic: async-mqtt/ESP32_SSL_Pub
************************************************
Session present: 0
Subscribing at QoS 2, packetId: 1
Publishing at QoS 0
Publishing at QoS 1, packetId: 2
Publishing at QoS 2, packetId: 3
************************************************
Subscribe acknowledged.
packetId: 1
qos: 2
Publish received.
topic: async-mqtt/ESP32_SSL_Pub
qos: 2
dup: 0
retain: 1
len: 6
index: 0
total: 6
Publish received.
topic: async-mqtt/ESP32_SSL_Pub
qos: 0
dup: 0
retain: 0
len: 10
index: 0
total: 10
Publish acknowledged
packetId: 2
Publish received.
topic: async-mqtt/ESP32_SSL_Pub
qos: 1
dup: 0
retain: 0
len: 6
index: 0
total: 6
Publish received.
topic: async-mqtt/ESP32_SSL_Pub
qos: 2
dup: 0
retain: 0
len: 6
index: 0
total: 6
Publish acknowledged
packetId: 3
This is terminal debug output when running FullyFeaturedSSL_ESP32 on ESP32_DEV connecting to broker.emqx.io
secured MQTT server (port 8883). The _ASYNC_MQTTLOGLEVEL is set at 4 to show all the debugging messages.
Starting FullyFeatureSSL_ESP32 on ESP32_DEV
AsyncMQTT_Generic v1.8.1 for ESP32 core v2.0.0+
Connecting to Wi-Fi...
WiFi ready
WiFi STA starting
WiFi STA connected
WiFi connected
IP address: 192.168.2.81
Connecting to MQTT...
[AMQTT] CONNECTING
[AMQTT] _onAck: ack len = 303
[AMQTT] _onAck: ack len = 75
[AMQTT] _onAck: ack len = 51
[AMQTT] TCP conn, MQTT CONNECT
[AMQTT] _addFront: new front, packetType = CONNECT
[AMQTT] _handleQueue: snd, packetType # CONNECT , tls: realSent = 61
[AMQTT] _handleQueue: sent / _headsize = 32 / 32
[AMQTT] _handleQueue: released packetType # CONNECT
[AMQTT] _onAck: ack len = 61
[AMQTT] _onData : data rcv len = 4
[AMQTT] _onData: rcv CONNACK
[AMQTT] CONNACK
Connected to MQTT broker: broker.emqx.io, port: 8883
PubTopic: async-mqtt/ESP32_SSL_Pub
************************************************
Session present: 0
[AMQTT] SUBSCRIBE
[AMQTT] _addBack: new back, packetType = SUBSCRIBE
[AMQTT] _handleQueue: snd, packetType # SUBSCRIBE , tls: realSent = 60
[AMQTT] _handleQueue: sent / _headsize = 31 / 31
Subscribing at QoS 2, packetId: 1
[AMQTT] PUBLISH
[AMQTT] _addBack: new back, packetType = PUBLISH
Publishing at QoS 0
[AMQTT] PUBLISH
[AMQTT] _addBack: new back, packetType = PUBLISH
Publishing at QoS 1, packetId: 2
[AMQTT] PUBLISH
[AMQTT] _addBack: new back, packetType = PUBLISH
Publishing at QoS 2, packetId: 3
************************************************
[AMQTT] _onAck: ack len = 60
[AMQTT] _onData : data rcv len = 5
[AMQTT] _onData: rcv SUBACK
[AMQTT] SUBACK
[AMQTT] SUB released
Subscribe acknowledged.
packetId: 1
qos: 2
[AMQTT] _handleQueue: released packetType # SUBSCRIBE
[AMQTT] _handleQueue: snd, packetType # PUBLISH , tls: realSent = 67
[AMQTT] _handleQueue: sent / _headsize = 38 / 38
[AMQTT] _handleQueue: released packetType # PUBLISH
[AMQTT] _handleQueue: snd, packetType # PUBLISH , tls: realSent = 65
[AMQTT] _handleQueue: sent / _headsize = 36 / 36
[AMQTT] _onData : data rcv len = 36
[AMQTT] _onData: rcv PUBLISH
Publish received.
topic: async-mqtt/ESP32_SSL_Pub
qos: 2
dup: 0
retain: 1
len: 6
index: 0
total: 6
[AMQTT] _addBack: new back, packetType = PUBREC
[AMQTT] _onAck: ack len = 67
[AMQTT] _onData : data rcv len = 38
[AMQTT] _onData: rcv PUBLISH
Publish received.
topic: async-mqtt/ESP32_SSL_Pub
qos: 0
dup: 0
retain: 0
len: 10
index: 0
total: 10
[AMQTT] _onAck: ack len = 65
[AMQTT] _onData : data rcv len = 4
[AMQTT] _onData: rcv PUBACK
[AMQTT] PUB released
Publish acknowledged
packetId: 2
[AMQTT] _onData : data rcv len = 36
[AMQTT] _onData: rcv PUBLISH
Publish received.
topic: async-mqtt/ESP32_SSL_Pub
qos: 1
dup: 0
retain: 0
len: 6
index: 0
total: 6
[AMQTT] _addBack: new back, packetType = PUBACK
[AMQTT] _handleQueue: released packetType # PUBLISH
[AMQTT] _handleQueue: snd, packetType # PUBLISH , tls: realSent = 65
[AMQTT] _handleQueue: sent / _headsize = 36 / 36
[AMQTT] _onAck: ack len = 65
[AMQTT] _onData : data rcv len = 4
[AMQTT] _onData: rcv PUBREC
[AMQTT] snd PUBREL
[AMQTT] PUB released
[AMQTT] _insert: new insert, packetType = PUBREL
[AMQTT] _handleQueue: released packetType # PUBLISH
[AMQTT] _handleQueue: snd, packetType # PUBREL , tls: realSent = 33
[AMQTT] _handleQueue: sent / _headsize = 4 / 4
[AMQTT] _onData : data rcv len = 36
[AMQTT] _onData: rcv PUBLISH
Publish received.
topic: async-mqtt/ESP32_SSL_Pub
qos: 2
dup: 0
retain: 0
len: 6
index: 0
total: 6
[AMQTT] _addBack: new back, packetType = PUBREC
[AMQTT] _onAck: ack len = 33
[AMQTT] _onData : data rcv len = 4
[AMQTT] _onData: rcv PUBCOMP
[AMQTT] PUBREL released
Publish acknowledged
packetId: 3
[AMQTT] _handleQueue: released packetType # PUBREL
[AMQTT] _handleQueue: snd, packetType # PUBREC , tls: realSent = 33
[AMQTT] _handleQueue: sent / _headsize = 4 / 4
[AMQTT] _onAck: ack len = 33
[AMQTT] _onData : data rcv len = 4
[AMQTT] _onData: rcv PUBREL
[AMQTT] _insert: new insert, packetType = PUBCOMP
[AMQTT] _handleQueue: released packetType # PUBREC
[AMQTT] _handleQueue: snd, packetType # PUBCOMP , tls: realSent = 33
[AMQTT] _handleQueue: sent / _headsize = 4 / 4
[AMQTT] _handleQueue: released packetType # PUBCOMP
[AMQTT] _handleQueue: snd, packetType # PUBACK , tls: realSent = 33
[AMQTT] _handleQueue: sent / _headsize = 4 / 4
[AMQTT] _handleQueue: released packetType # PUBACK
[AMQTT] _handleQueue: snd, packetType # PUBREC , tls: realSent = 33
[AMQTT] _handleQueue: sent / _headsize = 4 / 4
[AMQTT] PUBREC released
[AMQTT] _onAck: ack len = 33
[AMQTT] _onAck: ack len = 66
[AMQTT] _onData : data rcv len = 4
[AMQTT] _onData: rcv PUBREL
[AMQTT] _insert: new insert, packetType = PUBCOMP
[AMQTT] _handleQueue: released packetType # PUBREC
[AMQTT] _handleQueue: snd, packetType # PUBCOMP , tls: realSent = 33
[AMQTT] _handleQueue: sent / _headsize = 4 / 4
[AMQTT] _handleQueue: released packetType # PUBCOMP
[AMQTT] PUBREC released
[AMQTT] _onAck: ack len = 33
[AMQTT] PING
[AMQTT] _addBack: new back, packetType = PINGREQ
[AMQTT] _handleQueue: snd, packetType # PINGREQ , tls: realSent = 31
[AMQTT] _handleQueue: sent / _headsize = 2 / 2
[AMQTT] _handleQueue: released packetType # PINGREQ
[AMQTT] _onAck: ack len = 31
[AMQTT] _onData : data rcv len = 2
[AMQTT] _onData: rcv PINGRESP
[AMQTT] PINGRESP
This is terminal debug output when running FullyFeaturedSSL_WT32_ETH01 on WT32-ETH01 connecting to broker.emqx.io
secured MQTT server (port 8883).
Starting FullyFeatureSSL_WT32_ETH01 on WT32-ETH01 with ETH_PHY_LAN8720
WebServer_WT32_ETH01 v1.5.1 for core v2.0.0+
AsyncMQTT_Generic v1.8.1 for ESP32 core v2.0.0+
ETH starting
ETH connected
ETH got IP
IP address: 192.168.2.97
Connecting to MQTT...
Connected to MQTT broker: broker.emqx.io, port: 8883
PubTopic: async-mqtt/WT32_ETH01_SSL_Pub
************************************************
Session present: 0
Subscribing at QoS 2, packetId: 1
Publishing at QoS 0
Publishing at QoS 1, packetId: 2
Publishing at QoS 2, packetId: 3
************************************************
Subscribe acknowledged.
packetId: 1
qos: 2
Publish received.
topic: async-mqtt/WT32_ETH01_SSL_Pub
qos: 0
dup: 0
retain: 0
len: 15
index: 0
total: 15
Publish acknowledged
packetId: 2
Publish received.
topic: async-mqtt/WT32_ETH01_SSL_Pub
qos: 1
dup: 0
retain: 0
len: 6
index: 0
total: 6
Publish received.
topic: async-mqtt/WT32_ETH01_SSL_Pub
qos: 2
dup: 0
retain: 0
len: 6
index: 0
total: 6
Publish acknowledged
packetId: 3
This is terminal debug output when running FullyFeature_STM32 on STM32F7 NUCLEO_F767ZI connecting to broker.emqx.io
MQTT server. The Ethernet loss was tested by disconnecting, then reconnecting the Ethernet cable.
Starting FullyFeature_STM32 on NUCLEO_F767ZI
AsyncMQTT_Generic v1.8.1 for STM32
Connected to network. IP = 192.168.2.118
Connecting to MQTT...
Connected to MQTT broker: broker.emqx.io, port: 1883
PubTopic: async-mqtt/STM32_Pub
************************************************
Session present: 0
Subscribing at QoS 2, packetId: 1
Publishing at QoS 0
Publishing at QoS 1, packetId: 2
Publishing at QoS 2, packetId: 3
************************************************
Subscribe acknowledged.
packetId: 1
qos: 2
Publish received.
topic: async-mqtt/STM32_Pub
message: STM32 Test3
qos: 2
dup: 0
retain: 1
len: 11
index: 0
total: 11
Publish acknowledged.
packetId: 2
Publish received.
topic: async-mqtt/STM32_Pub
message: STM32 Test1
qos: 0
dup: 0
retain: 0
len: 11
index: 0
total: 11
Publish received.
topic: async-mqtt/STM32_Pub
message: STM32 Test2
qos: 1
dup: 0
retain: 0
len: 11
index: 0
total: 11
Publish received.
topic: async-mqtt/STM32_Pub
message: STM32 Test3
qos: 2
dup: 0
retain: 0
len: 11
index: 0
total: 11
Publish acknowledged.
packetId: 3
Ethernet disconnected <==== Test disconnect Ethernet very short time
Ethernet reconnected.
Ethernet disconnected <==== Test disconnect Ethernet long enough time to force MQTT disconnection
Ethernet reconnected.
Disconnected from MQTT. <==== MQTT disconnected and reconnected
Connected to MQTT broker: broker.emqx.io, port: 1883
PubTopic: async-mqtt/STM32_Pub
************************************************
Session present: 0
Subscribing at QoS 2, packetId: 4
Publishing at QoS 0
Publishing at QoS 1, packetId: 5
Publishing at QoS 2, packetId: 6
************************************************
Subscribe acknowledged.
packetId: 4
qos: 2
Publish received.
topic: async-mqtt/STM32_Pub
message: STM32 Test3
qos: 2
dup: 0
retain: 1
len: 11
index: 0
total: 11
Publish acknowledged.
packetId: 5
Publish received.
topic: async-mqtt/STM32_Pub
message: STM32 Test1
qos: 0
dup: 0
retain: 0
len: 11
index: 0
total: 11
Publish received.
topic: async-mqtt/STM32_Pub
message: STM32 Test2
qos: 1
dup: 0
retain: 0
len: 11
index: 0
total: 11
Publish received.
topic: async-mqtt/STM32_Pub
message: STM32 Test3
qos: 2
dup: 0
retain: 0
len: 11
index: 0
total: 11
Publish acknowledged.
packetId: 6
Starting FullyFeature_STM32 on NUCLEO_F767ZI
AsyncMQTT_Generic v1.8.1 for STM32
Connected to network. IP = 192.168.2.126
Connecting to MQTT...
[AMQTT] CONNECTING
[AMQTT] ClientID = stm32-DEADBEEF3201
[AMQTT] TCP conn, MQTT CONNECT
[AMQTT] _addFront: new front, packetType = CONNECT
[AMQTT] _handleQueue: snd, packetType # CONNECT
[AMQTT] _handleQueue: sent / _headsize = 32 / 32
[AMQTT] _handleQueue: released packetType # CONNECT
[AMQTT] _onAck: ack len = 32
[AMQTT] _onData : data rcv len = 4
[AMQTT] _onData: rcv CONNACK
[AMQTT] CONNACK
Connected to MQTT broker: broker.emqx.io, port: 1883
PubTopic: async-mqtt/STM32_Pub
************************************************
Session present: 0
[AMQTT] SUBSCRIBE
[AMQTT] _addBack: new back, packetType = SUBSCRIBE
[AMQTT] _handleQueue: snd, packetType # SUBSCRIBE
[AMQTT] _handleQueue: sent / _headsize = 27 / 27
Subscribing at QoS 2, packetId: 1
[AMQTT] PUBLISH
[AMQTT] _addBack: new back, packetType = PUBLISH
Publishing at QoS 0
[AMQTT] PUBLISH
[AMQTT] _addBack: new back, packetType = PUBLISH
Publishing at QoS 1, packetId: 2
[AMQTT] PUBLISH
[AMQTT] _addBack: new back, packetType = PUBLISH
Publishing at QoS 2, packetId: 3
************************************************
[AMQTT] _onAck: ack len = 27
[AMQTT] _onData : data rcv len = 5
[AMQTT] _onData: rcv SUBACK
[AMQTT] SUBACK
[AMQTT] SUB released
Subscribe acknowledged.
packetId: 1
qos: 2
[AMQTT] _handleQueue: released packetType # SUBSCRIBE
[AMQTT] _handleQueue: snd, packetType # PUBLISH
[AMQTT] _handleQueue: sent / _headsize = 35 / 35
[AMQTT] _handleQueue: released packetType # PUBLISH
[AMQTT] _handleQueue: snd, packetType # PUBLISH
[AMQTT] _handleQueue: sent / _headsize = 37 / 37
[AMQTT] _onData : data rcv len = 37
[AMQTT] _onData: rcv PUBLISH
Publish received.
topic: async-mqtt/STM32_Pub
message: STM32 Test3
qos: 2
dup: 0
retain: 1
len: 11
index: 0
total: 11
[AMQTT] _addBack: new back, packetType = PUBREC
[AMQTT] _onAck: ack len = 72
[AMQTT] _onData : data rcv len = 4
[AMQTT] _onData: rcv PUBACK
[AMQTT] PUB released
Publish acknowledged.
packetId: 2
[AMQTT] _onData : data rcv len = 72
[AMQTT] _onData: rcv PUBLISH
Publish received.
topic: async-mqtt/STM32_Pub
message: STM32 Test1
qos: 0
dup: 0
retain: 0
len: 11
index: 0
total: 11
[AMQTT] _onData: rcv PUBLISH
Publish received.
topic: async-mqtt/STM32_Pub
message: STM32 Test2
qos: 1
dup: 0
retain: 0
len: 11
index: 0
total: 11
[AMQTT] _addBack: new back, packetType = PUBACK
[AMQTT] _handleQueue: released packetType # PUBLISH
[AMQTT] _handleQueue: snd, packetType # PUBLISH
[AMQTT] _handleQueue: sent / _headsize = 37 / 37
[AMQTT] _onAck: ack len = 37
[AMQTT] _onData : data rcv len = 4
[AMQTT] _onData: rcv PUBREC
[AMQTT] snd PUBREL
[AMQTT] PUB released
[AMQTT] _insert: new insert, packetType = PUBREL
[AMQTT] _handleQueue: released packetType # PUBLISH
[AMQTT] _handleQueue: snd, packetType # PUBREL
[AMQTT] _handleQueue: sent / _headsize = 4 / 4
[AMQTT] _onData : data rcv len = 37
[AMQTT] _onData: rcv PUBLISH
Publish received.
topic: async-mqtt/STM32_Pub
message: STM32 Test3
qos: 2
dup: 0
retain: 0
len: 11
index: 0
total: 11
[AMQTT] _addBack: new back, packetType = PUBREC
[AMQTT] _onAck: ack len = 4
[AMQTT] _onData : data rcv len = 4
[AMQTT] _onData: rcv PUBCOMP
[AMQTT] PUBREL released
Publish acknowledged.
packetId: 3
[AMQTT] _handleQueue: released packetType # PUBREL
[AMQTT] _handleQueue: snd, packetType # PUBREC
[AMQTT] _handleQueue: sent / _headsize = 4 / 4
[AMQTT] _onAck: ack len = 4
[AMQTT] _onData : data rcv len = 4
[AMQTT] _onData: rcv PUBREL
[AMQTT] _insert: new insert, packetType = PUBCOMP
[AMQTT] _handleQueue: released packetType # PUBREC
[AMQTT] _handleQueue: snd, packetType # PUBCOMP
[AMQTT] _handleQueue: sent / _headsize = 4 / 4
[AMQTT] _handleQueue: released packetType # PUBCOMP
[AMQTT] _handleQueue: snd, packetType # PUBACK
[AMQTT] _handleQueue: sent / _headsize = 4 / 4
[AMQTT] _handleQueue: released packetType # PUBACK
[AMQTT] _handleQueue: snd, packetType # PUBREC
[AMQTT] _handleQueue: sent / _headsize = 4 / 4
[AMQTT] PUBREC released
[AMQTT] _onAck: ack len = 12
[AMQTT] _onData : data rcv len = 4
[AMQTT] _onData: rcv PUBREL
[AMQTT] _insert: new insert, packetType = PUBCOMP
[AMQTT] _handleQueue: released packetType # PUBREC
[AMQTT] _handleQueue: snd, packetType # PUBCOMP
[AMQTT] _handleQueue: sent / _headsize = 4 / 4
[AMQTT] _handleQueue: released packetType # PUBCOMP
[AMQTT] PUBREC released
[AMQTT] _onAck: ack len = 4
[AMQTT] PING
[AMQTT] _addBack: new back, packetType = PINGREQ
[AMQTT] _handleQueue: snd, packetType # PINGREQ
[AMQTT] _handleQueue: sent / _headsize = 2 / 2
[AMQTT] _handleQueue: released packetType # PINGREQ
[AMQTT] _onAck: ack len = 2
[AMQTT] _onData : data rcv len = 2
[AMQTT] _onData: rcv PINGRESP
[AMQTT] PINGRESP
[AMQTT] PING
[AMQTT] _addBack: new back, packetType = PINGREQ
[AMQTT] _handleQueue: snd, packetType # PINGREQ
[AMQTT] _handleQueue: sent / _headsize = 2 / 2
[AMQTT] _handleQueue: released packetType # PINGREQ
[AMQTT] _onAck: ack len = 2
[AMQTT] _onData : data rcv len = 2
[AMQTT] _onData: rcv PINGRESP
[AMQTT] PINGRESP
This is terminal debug output when running FullyFeatured_STM32_LAN8720 on STM32F4 BLACK_F407VE connecting to broker.emqx.io
MQTT server.
Starting FullyFeatured_STM32_LAN8720 on BLACK_F407VE
AsyncMQTT_Generic v1.8.1 for STM32
Connected to network. IP = 192.168.2.132
Connecting to MQTT...
Connected to MQTT broker: broker.emqx.io, port: 1883
PubTopic: async-mqtt/STM32_Pub
************************************************
Session present: 0
Subscribing at QoS 2, packetId: 1
Publishing at QoS 0
Publishing at QoS 1, packetId: 2
Publishing at QoS 2, packetId: 3
************************************************
Subscribe acknowledged.
packetId: 1
qos: 2
Publish received.
topic: async-mqtt/STM32_Pub
message: STM32 Test3
qos: 2
dup: 0
retain: 1
len: 11
index: 0
total: 11
Publish acknowledged.
packetId: 2
Publish received.
topic: async-mqtt/STM32_Pub
message: STM32 Test1
qos: 0
dup: 0
retain: 0
len: 11
index: 0
total: 11
Publish received.
topic: async-mqtt/STM32_Pub
message: STM32 Test2
qos: 1
dup: 0
retain: 0
len: 11
index: 0
total: 11
Publish received.
topic: async-mqtt/STM32_Pub
message: STM32 Test3
qos: 2
dup: 0
retain: 0
len: 11
index: 0
total: 11
Publish acknowledged.
packetId: 3
This is terminal debug output when running FullyFeatured_PortentaH7_WiFi on STM32H7 PORTENTA_H7_M7 using Murata WiFi
, connecting to broker.emqx.io
MQTT server.
Starting FullyFeatured_PortentaH7_WiFi on PORTENTA_H7_M7
AsyncMQTT_Generic v1.8.1 for Portenta_H7_M7
Connecting to SSID: HueNet1
Connected to SSID: HueNet1
Local IP Address: 192.168.2.134
Signal strength (RSSI):-37 dBm
Connecting to MQTT...
Connected to MQTT broker: broker.emqx.io, port: 1883
PubTopic: async-mqtt/Portenta_H7_WiFi_Pub
************************************************
Session present: 0
Subscribing at QoS 2, packetId: 1
Publishing at QoS 0
Publishing at QoS 1, packetId: 2
Publishing at QoS 2, packetId: 3
************************************************
Subscribe acknowledged.
packetId: 1
qos: 2
Publish received.
topic: async-mqtt/Portenta_H7_WiFi_Pub
message: Portenta_H7_WiFi Test 3
qos: 2
dup: 0
retain: 1
len: 23
index: 0
total: 23
Publish acknowledged.
packetId: 2
Publish received.
topic: async-mqtt/Portenta_H7_WiFi_Pub
message: Portenta_H7_WiFi Test1
qos: 0
dup: 0
retain: 0
len: 22
index: 0
total: 22
Publish received.
topic: async-mqtt/Portenta_H7_WiFi_Pub
message: Portenta_H7_WiFi Test 2
qos: 1
dup: 0
retain: 0
len: 23
index: 0
total: 23
Publish received.
topic: async-mqtt/Portenta_H7_WiFi_Pub
message: Portenta_H7_WiFi Test 3
qos: 2
dup: 0
retain: 0
len: 23
index: 0
total: 23
Publish acknowledged.
packetId: 3
This is terminal debug output when running FullyFeatured_PortentaH7_Ethernet on STM32H7 PORTENTA_H7_M7, using built-in Ethernet
, connecting to broker.emqx.io
MQTT server.
Starting FullyFeatured_PortentaH7_Ethernet on PORTENTA_H7_M7
AsyncMQTT_Generic v1.8.1 for Portenta_H7_M7
Connected to network. IP = 192.168.2.133
Connecting to MQTT...
Connected to MQTT broker: broker.emqx.io, port: 1883
PubTopic: async-mqtt/Portenta_H7_Ethernet_Pub
************************************************
Session present: 0
Subscribing at QoS 2, packetId: 1
Publishing at QoS 0
Publishing at QoS 1, packetId: 2
Publishing at QoS 2, packetId: 3
************************************************
Subscribe acknowledged.
packetId: 1
qos: 2
Publish received.
topic: async-mqtt/Portenta_H7_Ethernet_Pub
message: Portenta_H7_Ethernet Test3
qos: 2
dup: 0
retain: 1
len: 26
index: 0
total: 26
Publish acknowledged.
packetId: 2
Publish received.
topic: async-mqtt/Portenta_H7_Ethernet_Pub
message: Portenta_H7_Ethernet Test1
qos: 0
dup: 0
retain: 0
len: 26
index: 0
total: 26
Publish received.
topic: async-mqtt/Portenta_H7_Ethernet_Pub
message: Portenta_H7_Ethernet Test2
qos: 1
dup: 0
retain: 0
len: 26
index: 0
total: 26
Publish received.
topic: async-mqtt/Portenta_H7_Ethernet_Pub
message: Portenta_H7_Ethernet Test3
qos: 2
dup: 0
retain: 0
len: 26
index: 0
total: 26
Publish acknowledged.
packetId: 3
Ethernet disconnected <==== Test disconnect Ethernet very short time
Ethernet reconnected.
Ethernet disconnected <==== Test disconnect Ethernet long enough time to force MQTT disconnection
Ethernet reconnected.
[ATCP] setCloseError() to: Connection reset => -14
Disconnected from MQTT. <==== MQTT disconnected and reconnected
Connected to MQTT broker: broker.emqx.io, port: 1883
PubTopic: async-mqtt/Portenta_H7_Ethernet_Pub
************************************************
Session present: 0
Subscribing at QoS 2, packetId: 4
Publishing at QoS 0
Publishing at QoS 1, packetId: 5
Publishing at QoS 2, packetId: 6
************************************************
Subscribe acknowledged.
packetId: 4
qos: 2
Publish received.
topic: async-mqtt/Portenta_H7_Ethernet_Pub
message: Portenta_H7_Ethernet Test3
qos: 2
dup: 0
retain: 1
len: 26
index: 0
total: 26
Publish acknowledged.
packetId: 5
Publish received.
topic: async-mqtt/Portenta_H7_Ethernet_Pub
message: Portenta_H7_Ethernet Test1
qos: 0
dup: 0
retain: 0
len: 26
index: 0
total: 26
Publish received.
topic: async-mqtt/Portenta_H7_Ethernet_Pub
message: Portenta_H7_Ethernet Test2
qos: 1
dup: 0
retain: 0
len: 26
index: 0
total: 26
Publish received.
topic: async-mqtt/Portenta_H7_Ethernet_Pub
message: Portenta_H7_Ethernet Test3
qos: 2
dup: 0
retain: 0
len: 26
index: 0
total: 26
Publish acknowledged.
packetId: 6
This is terminal debug output when running FullyFeatured_QNEthernet on TEENSY 4.1, using built-in Ethernet with QNEthernet Library
, connecting to broker.emqx.io
MQTT server.
Starting FullyFeatured_QNEthernet on TEENSY 4.1
AsyncMQTT_Generic v1.8.1 for Teensy 4.1 QNEthernet
Initialize Ethernet using static IP => Connected! IP address:192.168.2.222
Connecting to MQTT...
Connected to MQTT broker: broker.emqx.io, port: 1883
PubTopic: async-mqtt/Teensy41_QNEthernet_Pub
************************************************
Session present: 0
Subscribing at QoS 2, packetId: 1
Publishing at QoS 0
Publishing at QoS 1, packetId: 2
Publishing at QoS 2, packetId: 3
************************************************
Subscribe acknowledged.
packetId: 1
qos: 2
Publish received.
topic: async-mqtt/Teensy41_QNEthernet_Pub
message: Teensy41_QNEthernet_Pub Test3
qos: 2
dup: 0
retain: 1
len: 29
index: 0
total: 29
Publish acknowledged.
packetId: 2
Publish received.
topic: async-mqtt/Teensy41_QNEthernet_Pub
message: Teensy41_QNEthernet_Pub Test1
qos: 0
dup: 0
retain: 0
len: 29
index: 0
total: 29
Publish received.
topic: async-mqtt/Teensy41_QNEthernet_Pub
message: Teensy41_QNEthernet_Pub Test2
qos: 1
dup: 0
retain: 0
len: 29
index: 0
total: 29
Publish received.
topic: async-mqtt/Teensy41_QNEthernet_Pub
message: Teensy41_QNEthernet_Pub Test3
qos: 2
dup: 0
retain: 0
len: 29
index: 0
total: 29
Publish acknowledged.
packetId: 3
This is terminal debug output when running FullyFeatured_ESP8266_Ethernet on ESP8266_NODEMCU_ESP12E, using ENC28J60 Ethernet
with lwIP_enc28j60
Library, connecting to broker.emqx.io
MQTT server.
Starting FullyFeatured_ESP8266_Ethernet on ESP8266_NODEMCU_ESP12E using ESP8266_ENC28J60 Ethernet
AsyncMQTT_Generic v1.8.1 for ESP8266
Connecting to network : .....................................
Ethernet DHCP IP address: 192.168.2.187
Connecting to MQTT...
Connected to MQTT broker: broker.emqx.io, port: 1883
PubTopic: async-mqtt/ESP8266_Pub
************************************************
Session present: 0
Subscribing at QoS 2, packetId: 1
Publishing at QoS 0
Publishing at QoS 1, packetId: 2
Publishing at QoS 2, packetId: 3
************************************************
Subscribe acknowledged.
packetId: 1
qos: 2
Publish received.
topic: async-mqtt/ESP8266_Pub
message: ESP8266_Ethernet Test3
qos: 2
dup: 0
retain: 1
len: 22
index: 0
total: 22
Publish acknowledged.
packetId: 2
Publish received.
topic: async-mqtt/ESP8266_Pub
message: ESP8266_Ethernet Test1
qos: 0
dup: 0
retain: 0
len: 22
index: 0
total: 22
Publish received.
topic: async-mqtt/ESP8266_Pub
message: ESP8266_Ethernet Test2
qos: 1
dup: 0
retain: 0
len: 22
index: 0
total: 22
Publish received.
topic: async-mqtt/ESP8266_Pub
message: ESP8266_Ethernet Test3
qos: 2
dup: 0
retain: 0
len: 22
index: 0
total: 22
Publish acknowledged.
packetId: 3
This is terminal debug output when running FullyFeatured_ESP8266_Ethernet on ESP8266_NODEMCU_ESP12E, using W5500 Ethernet
with lwIP_w5500
Library, connecting to broker.emqx.io
MQTT server.
Starting FullyFeatured_ESP8266_Ethernet on ESP8266_NODEMCU_ESP12E using ESP8266_W5500 Ethernet
AsyncMQTT_Generic v1.8.1 for ESP8266
Connecting to network : .
Ethernet DHCP IP address: 192.168.2.188
Connecting to MQTT...
Connected to MQTT broker: broker.emqx.io, port: 1883
PubTopic: async-mqtt/ESP8266_Pub
************************************************
Session present: 0
Subscribing at QoS 2, packetId: 1
Publishing at QoS 0
Publishing at QoS 1, packetId: 2
Publishing at QoS 2, packetId: 3
************************************************
Subscribe acknowledged.
packetId: 1
qos: 2
Publish received.
topic: async-mqtt/ESP8266_Pub
message: ESP8266_Ethernet Test3
qos: 2
dup: 0
retain: 1
len: 22
index: 0
total: 22
Publish acknowledged.
packetId: 2
Publish received.
topic: async-mqtt/ESP8266_Pub
message: ESP8266_Ethernet Test1
qos: 0
dup: 0
retain: 0
len: 22
index: 0
total: 22
Publish received.
topic: async-mqtt/ESP8266_Pub
message: ESP8266_Ethernet Test2
qos: 1
dup: 0
retain: 0
len: 22
index: 0
total: 22
Publish received.
topic: async-mqtt/ESP8266_Pub
message: ESP8266_Ethernet Test3
qos: 2
dup: 0
retain: 0
len: 22
index: 0
total: 22
Publish acknowledged.
packetId: 3
This is terminal debug output when running FullyFeature_RP2040W on RASPBERRY_PI_PICO_W, using CYW43439 WiFi
, connecting to broker.emqx.io
MQTT server.
Starting FullyFeature_RP2040W on RASPBERRY_PI_PICO_W
AsyncMQTT_Generic v1.8.1 for RP2040W CYW43439 WiFi
Connecting to SSID: HueNet2
Connected to SSID: HueNet2
Local IP Address: 192.168.2.180
Signal strength (RSSI):0 dBm
Connecting to MQTT...
Connected to MQTT broker: broker.emqx.io, port: 1883
PubTopic: async-mqtt/RP2040W_Pub
************************************************
Session present: 0
Subscribing at QoS 2, packetId: 1
Publishing at QoS 0
Publishing at QoS 1, packetId: 2
Publishing at QoS 2, packetId: 3
************************************************
Subscribe acknowledged.
packetId: 1
qos: 2
Publish received.
topic: async-mqtt/RP2040W_Pub
message: RP2040W Test3
qos: 2
dup: 0
retain: 1
len: 13
index: 0
total: 13
Publish acknowledged.
packetId: 2
Publish received.
topic: async-mqtt/RP2040W_Pub
message: RP2040W Test1
qos: 0
dup: 0
retain: 0
len: 13
index: 0
total: 13
Publish received.
topic: async-mqtt/RP2040W_Pub
message: RP2040W Test2
qos: 1
dup: 0
retain: 0
len: 13
index: 0
total: 13
Publish received.
topic: async-mqtt/RP2040W_Pub
message: RP2040W Test3
qos: 2
dup: 0
retain: 0
len: 13
index: 0
total: 13
Publish acknowledged.
packetId: 3
This is terminal debug output when running FullyFeatureSSL_ESP32_ENC on ESP32_DEV with ESP32_ENC28J60
, connecting to broker.emqx.io
MQTTS server
Starting FullyFeatureSSL_ESP32_ENC on ESP32_DEV with ESP32_ENC28J60
WebServer_ESP32_ENC v1.5.3 for core v2.0.0+
AsyncMQTT_Generic v1.8.1 for ESP32 core v2.0.0+
ETH starting
ETH connected
ETH got IP
IP address: 192.168.2.96
Connecting to MQTT...
Connected to MQTT broker: broker.emqx.io, port: 8883
PubTopic: async-mqtt/ESP32_ENC_SSL_Pub
************************************************
Session present: 0
Subscribing at QoS 2, packetId: 1
Publishing at QoS 0
Publishing at QoS 1, packetId: 2
Publishing at QoS 2, packetId: 3
************************************************
Subscribe acknowledged.
packetId: 1
qos: 2
Publish received.
topic: async-mqtt/ESP32_ENC_SSL_Pub
qos: 0
dup: 0
retain: 0
len: 14
index: 0
total: 14
Publish acknowledged
packetId: 2
Publish received.
topic: async-mqtt/ESP32_ENC_SSL_Pub
qos: 1
dup: 0
retain: 0
len: 6
index: 0
total: 6
Publish received.
topic: async-mqtt/ESP32_ENC_SSL_Pub
qos: 2
dup: 0
retain: 0
len: 6
index: 0
total: 6
Publish acknowledged
packetId: 3
This is terminal debug output when running FullyFeatureSSL_ESP32_W5500 on ESP32_DEV with W5500
, connecting to broker.emqx.io
MQTTS server
Starting FullyFeatureSSL_ESP32_W5500 on ESP32_DEV with ESP32_W5500
WebServer_ESP32_W5500 v1.5.3 for core v2.0.0+
AsyncMQTT_Generic v1.7.0 for ESP32 core v2.0.0+
ETH starting
ETH connected
ETH got IP
IP address: 192.168.2.103
Connecting to MQTT...
Connected to MQTT broker: broker.emqx.io, port: 8883
PubTopic: async-mqtt/ESP32_W5500_SSL_Pub
************************************************
Session present: 0
Subscribing at QoS 2, packetId: 1
Publishing at QoS 0
Publishing at QoS 1, packetId: 2
Publishing at QoS 2, packetId: 3
************************************************
Subscribe acknowledged.
packetId: 1
qos: 2
Publish received.
topic: async-mqtt/ESP32_W5500_SSL_Pub
qos: 2
dup: 0
retain: 1
len: 6
index: 0
total: 6
Publish received.
topic: async-mqtt/ESP32_W5500_SSL_Pub
qos: 0
dup: 0
retain: 0
len: 16
index: 0
total: 16
Publish acknowledged
packetId: 2
Publish received.
topic: async-mqtt/ESP32_W5500_SSL_Pub
qos: 1
dup: 0
retain: 0
len: 6
index: 0
total: 6
Publish received.
topic: async-mqtt/ESP32_W5500_SSL_Pub
qos: 2
dup: 0
retain: 0
len: 6
index: 0
total: 6
Publish acknowledged
packetId: 3
Debug is enabled by default on Serial. Debug Level from 0 to 4. To disable, change the _MYSQLLOGLEVEL to 0
#define ASYNC_MQTT_DEBUG_PORT Serial
// Debug Level from 0 to 4
#define _ASYNC_MQTT_LOGLEVEL_ 1
If you get compilation errors, more often than not, you may need to install a newer version of the core for Arduino boards.
Sometimes, the library will only work if you update the board core to the latest version because I am using newly added functions.
Submit issues to: AsyncMQTT_Generic issues
SSL/TLS
STM32Ethernet library
and STM32duino_LwIP library
.LAN8720
Ethernet, such as F407xx, NUCLEO_F429ZI, DISCO_F746NG, NUCLEO_F746ZG, NUCLEO_F756ZG, etc.Murata WiFi
or Vision-shield Ethernet
allman
style. Restyle the libraryLwIP W5500 Ethernet
, (SSL and non-SSL)LwIP ENC28J60 Ethernet
, (SSL and non-SSL)AsyncWebServer_MQTT
for ESP32 example to demo how to use AsyncWebServer
and AsyncMQTT_Generic
togetherAsyncWebServer_MQTT_RP2040W
example to demo how to use AsyncWebServer_RP2040W
and AsyncMQTT_Generic
togetherREADME.md
so that links can be used in other sites, such as PIO
⭐️ Marvin Roger |
Jens Chr Brynildsen |
If you want to contribute to this project:
Most of the credits go to original author Marvin Roger
The library is licensed under MIT