ESP8266 on MBED PROBLEMS


#1

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.


#2

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


#3

The code is the basic mbed example for ESP8266:
https://os.mbed.com/teams/myDevicesIoT/code/Cayenne-ESP8266Interface/

Can be the problem the cayenne ip address?
Thanks!


#5

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)


#6

You are trying this example? https://github.com/myDevicesIoT/Cayenne-MQTT-ESP8266/blob/master/examples/ESP8266/ESP8266.ino

?


#7

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!


#8

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 ?


#9

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


#10

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.