Go Down

Topic: Unable to connect MQTT Broker using Ethernet Sheild (Read 201 times) previous topic - next topic

yaronz

Hi
i am try to use the MQTT example from the IDE to connect a MQTT broker using the Ethernet sheild.
i changed the ip address of the Arduino Uno that i am using according to my network.
Still no connection.

I used the MqttPubSub example and same problem - i'm getting rc=-2 error.

any suggestions?

Thanks

Juraj


yaronz


Juraj

No.
this is the problem.
the why do you ask about MQTT?
what does the WebClient example print?
did you connect the shield to a router or to computer? if to computer, connect it to router

yaronz

hi
thanks for your response.

the shield is connected to my router.

when i run the webClient sketch it works and displays some HTML code of Google page.
it seems response ok, though it keeps printing all the time.

i also tested the ChatServer sketch using Telnet and it work just fine.

maybe i have to make modifications in the MQTT sketch. i dont know. it is cot connecting to the broker.

yaronz

The examples of Ethernet works fine as suppose to.

The problem is with the MQTT examples.

i tried also PubSubLibrary example.

i am getting client.state = -2, means MQTT_CONNECT_FAILED - the network connection failed.

i cant understand what is the problem.

Juraj

The examples of Ethernet works fine as suppose to.

The problem is with the MQTT examples.

i tried also PubSubLibrary example.

i am getting client.state = -2, means MQTT_CONNECT_FAILED - the network connection failed.

i cant understand what is the problem.
post your test sketch

Go Up