mqttclient.cpp: Set Ethernet hostname
This commit is contained in:
		
							parent
							
								
									e6782185ca
								
							
						
					
					
						commit
						fc1ac508ef
					
				| @ -22,6 +22,7 @@ esp_err_t mqtt_init(void) { | ||||
| 
 | ||||
|   // setup network connection and MQTT client
 | ||||
|   ETH.begin(); | ||||
|   ETH.setHostname(clientId); | ||||
|   mqttClient.begin(MQTT_SERVER, MQTT_PORT, netClient); | ||||
|   mqttClient.setKeepAlive(MQTT_KEEPALIVE); | ||||
|   mqttClient.onMessageAdvanced(mqtt_callback); | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user