Connecting 2 ESP32 to the same custer on port8883

Hi, I’ve been using Hive MQ Cloud for a few months now but always just connecting one Esp32 microcontroller + a node-red program at a time. Now I need to connect both my Esp32 together at the same time to send data through the broker. Both have different user names, passwords and client ID, so I don’t understande why I am having this problem.
Besides that, I thought that it might have been because both used the same port, so I descovered that I also cannot connect on the 8884 port. Even by itself.
Can you help with this issue? Anybody connected multiple microcontrollers before?

thanks

Hi @IngLopes ,
Great to see your interest in MQTT and HiveMQ Cloud, welcome to our community :wave:

Port 8884 is a WebSocket interface and 8883 is TCP, it might be that the client (device) doesn’t support WebSocket protocol.

Multiple clients can connect to the same port. Only if a client has the same id as another client, then client take-over will happen.

What is exactly the error that you see? Did you check if your clients connect, when they both use the same login credentials and only have different client id-s?

Kind regards,
Dasha from HiveMQ team

I tried using the esp32 with different usernames first, but after the sugestion i tried with the same username and password but had the same problem. They both connect, send data for like 2 seconds and then one of them disconnects.

@IngLopes what about client id? Are your devices using different client id, same client id, no client id?

different client ids