ESP8266 on MBED PROBLEMS

Hi,

I’m experiencing problems with ESP8266 on MBED Platform

Initializing interface
Connecting to 34.226.39.40:1883
MQTT connect failed, error: -1
Connection failed, exiting

I’m trying also with address 52.5.94.29

Thanks for your help.

Hi @stefanococo,

Hard to say, can you share any other information like your code? Have you tried using Arduino IDE to see if it will compile there?

~Benny

The code is the basic mbed example for ESP8266:

Can be the problem the cayenne ip address?
Thanks!

I thought I had a solution but looks like you already tried it. :slight_smile:

I don’t see the port listed anywhere… maybe make sure its using that correctly (1883)

You are trying this example? Cayenne-MQTT-ESP/ESP8266.ino at master · myDevicesIoT/Cayenne-MQTT-ESP · GitHub

?

The port is correct 1883 as you can see in th first post. The example into
arduino isn’t useful cause I’m on mbed framework and stm nucleo board. I
really don’t know why it isn’t working…
Thanks to all for your help!

Aw…I understand. Let’s see if there is a problem with your network and the port. Do you have some firewall? Can you test if the port is open, so we can exclude some options ?

@jburhenn is the IP address still 57.7.250.10? I see you posted that file almost a year ago.

No, the IP has changed, but @stefanococo appears to be using the correct ones. Either 34.226.39.40 or 52.5.94.29 should work. I just tried both using an Uno and they worked for me.

So perhaps it’s something else. @stefanococo, did you update the libraries when you imported them in Mbed? I’ve sometimes noticed compatibility issues when I update all the libraries in an example. For some reason the updated revisions don’t always work well together. So you might try importing the example using the older library revisions that are part of the example, if you haven’t already.

2 Likes