m=mqtt.Client("nodemcu_box", 120)
m:connect("192.168.1.3", 1883, 0, function(conn)
print("connected")
end)
m:publish("hello/world","hello from nodemcu",0,0, function(conn)
print("sent")
end)
but I can send messages to the broker using console client
$ mosquitto_pub -h 192.168.1.3 -p 1883 -d -t hello/world -m "hello"
and receive it if I subscribe to topic.
What might be the reason why it is not working from nodemcu?