UncleRus / esp-idf-lib

Component library for ESP32-xx and ESP8266
https://esp-idf-lib.readthedocs.io/en/latest/
1.38k stars 428 forks source link

error while using ESP-IDF MQTT TCP example #481

Closed went521 closed 1 year ago

went521 commented 1 year ago

The issue

As a novice, I encountered the same problem: esp tls: couldn't get hostname for: mqtts. the clouds com: getaddrinfo() returns 202, addrinfo=0x0 How can I solve this problem? If you could help me, I would be very grateful!

Which SDK are you using?

esp-idf

Which version of SDK are you using?

v4.4.3

Which build target have you used?

Component causing the issue

mqtt-tcp

Anything in the logs that might be useful for us?

esp_mqtt_client_config_t mqtt_cfg = {    
        .host = "mqtts.heclouds.com",
        .client_id=ONENET_clientId,
        .username=ONENET_UserName,
        .password=ONENET_PassWord,
        .port=1883,
    };

E (828) esp-tls: couldn't get hostname for :mqtts.heclouds.com: getaddrinfo() returns 202, addrinfo=0x0
E (838) TRANSPORT_BASE: Failed to open a new connection: 32769
E (848) MQTT_CLIENT: Error transport connect

Additional information or context

No response

Confirmation

went521 commented 1 year ago

my device is esp-wroom-32

trombik commented 1 year ago

first, don't lie. this is a question. second, we do not maintain the library. ask at https://www.esp32.com/viewforum.php?f=13