Hi everyone,
I am using pubsubclient library..using mqtt_basic example..i am able to send data "hello world"to command line using "mosquitto_sub -v -t outTopic "as shown in screenshot..but i didnt get replied in serial monitor of arduino ..i tried lots of examples from internet ...
thank you
Did you update these with values suitable for your network?
// Update these with values suitable for your network.
byte mac[] = { 0xDE, 0xED, 0xBA, 0xFE, 0xFE, 0xED };
IPAddress ip(172, 16, 0, 100);
IPAddress server(172, 16, 0, 2);
akshay123:
i didnt get replied in serial monitor of arduino ..i tried lots of examples from internet ...
What did you publish on topic "inTopic"? client.subscribe("inTopic");
Your Arduino is publishing "hello world" on topic "outTopic" and has subscribed to topic "inTopic". Until something is published on topic "inTopic" your Arduino won't receive it.