MQTT Connection and Subscription with PubsubClient

Hello,
I try to connect Arduino Mega 2650 with ESP-01 module. It works fine, connection is created and I can send messages to MQTT. I use RabbitMQ MQTT plugin.
Problem is that I want to subscribe some topic. Topic queue is created when I use subscribe method. But any message is not delivered.

I call loop method there is not problem. But I found out that MQTTPINGRESP is not delivered or is missing so connection goes down for timeout. I tried to extend keep alive interval but without change.
Message type MQTTPUBLISH is not delivered any time.

It seems like connection is dropped immediately after connection is established.

For testing purposes I have ESP-01 connected to Arduino (through 3.3V adapter) directly. So can be problem with power supply that Arduino doesn't have power enough to power ESP-01? Signal strength is -55 so I think it is good.

Thanks.

If you have a hand drawn wiring diagram, and source code in code tags, then ask a question. What you expect, what happened. Any error msgs also in code tags.

I don't understand what happened but it started works.

You should separate the power supply but keep common ground.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.