knolleary / pubsubclient

A client library for the Arduino Ethernet Shield that provides support for MQTT.
http://pubsubclient.knolleary.net/
MIT License
3.82k stars 1.47k forks source link

WiFishield R3 on MEGA2560 R3 no MQTT #939

Open AndiP-IoT opened 2 years ago

AndiP-IoT commented 2 years ago

I use the combination this MQTT-lib and Wifishield on UNO and Leonardo a lot - no problem.

Same sketch on MEGA2560 makes a WiFi connection, but on MQTT connection - it can't connect. No additional things attached, no SD-card, just plain MEGA+WiFiShield.

IronBamBam1990 commented 2 years ago

What can i do about it? Details pls

AndiP-IoT commented 2 years ago

Hi IronBamBam1990 When I use the WIFI shield on MEGA2560 I can connect to a WIFI Net without any Problem. But adding your MQTT library does't work. I just can't connect with the broker. Using e.g. a W5500 LAN modul with MEGA, or an ESP32 or ESP8266 with the proper WIFI, Ethernet libraries AND your MQTT, everything is OK. BUT only on UNO an MEGA the same constellation doesn't work, which means WIFI/LAN works, but no MQTT Broker connection.

What can i do about it? Details pls

I'm not sure. I didn't look into your library, my programming skills are too low to understand the library. But I think it's interesting that the combination WIFI-Shield on UNO or MEGA and MQTT is not working.

What info can I provide to help to understand this issue? The used shield : https://docs.arduino.cc/retired/shields/arduino-wifi-shield Ah an no SD card is used.

Thank you.

IronBamBam1990 commented 2 years ago

Did you check actually you have communication WiFi-shield ---> arduino? If not you should first check it. You should not have problem with mqtt.