Page 1 of 1

ESP8266 as Host Name Resolver

Posted: Fri Jan 13, 2023 12:01 pm
by mexcoindia
I am new to use esp8266. I have successfully accessed website using ESP8266. Now, I want to access the Azure-Iot-Hub, for which I need to first access the url: "global.azure-devcies-provisioning.net". In sample code, the on chip Modem is used to establish internet connection and then below written function is called:
err = getaddrinfo(CONFIG_AZURE_IOT_HUB_DPS_HOSTNAME,NULL, &hints, &result);, this function uses POSIX API.

I want to add default wifi capability for internet access. Then, I need to modify above function accordingly. I don't know, how to use such a function with esp8266 ?

In sample code,
CONFIG_AZURE_IOT_HUB_DPS_HOSTNAME = "global.azure-devcies-provisioning.net"