Hi trying to upload to publish data in MQTT using only IP (host) address in MQTT setup configuration but its failed to upload (used mobile hotspot to connect server for MQTT). If uri is used its uploading and works fine. Any solution for this issue kindly let me know and thank you in advance.
esp_mqtt_client_config_t mqtt_cfg = { .uri =
"mqtt://mqtt.eclipseprojects.io", /****works fine if i use only this parameter********/
//.host = "137.135.83.217",/**unable to upload to server using only host ********/
.port = config.port,
.username = config.usr_name,
.password = config.usr_pwd,
};
esp_mqtt_client_handle_t client = esp_mqtt_client_init(&mqtt_cfg);
Unable to connect mqtt server using only IP instead of url.
-
- Posts: 15
- Joined: Tue Jun 01, 2021 10:21 am
Who is online
Users browsing this forum: No registered users and 146 guests