Tool/software: TI-RTOS
Hello,
I would like to try the Azure Iot Example but the provided example hangs on the following call:
/*
* ======== getAddrByName ========
* Retrieve host IP address corresponding to a host name
*/
static int32_t getAddrByName(const char *name, uint32_t *addr, uint16_t *family)
{
int32_t ifID;
uint16_t addrLen = 1;
/* Query DNS for IPv4 address. */
ifID = SlNetUtil_getHostByName(0, (char *)name, strlen(name), addr, &addrLen, SLNETSOCK_AF_INET);
getHostByName - never returns. This statement is executed after this call:
retval = SNTP_getTime(NULL, 0, &timeval, &ntpTimeStamp);
For SNTP the host name resolution never returns..
I had host name resolution problem in the past using TM4C and I could make it work when IP address is supplied instead of hostname.
Can you help me to solve this problem? btw. why doesn't have this function timeout value?