pubsubclient
pubsubclient copied to clipboard
PubSubClient.connect with userName/password ?
I can't connect to my MQTT server because it wants to login but PubSubClient.connect hasn't this ability. Know someone what can I do, please ?
You use the set_auth
method on MQTT::Connect
:
PubSubClient client(wifiClient, server_ip, port);
client.connect(MQTT::Connect("some_id_string").set_auth("username", "password"));