Hi
I am stuck trying to do a tcp_connect to a remote server.
Ican resolve the ip address with dns_gethostbyname(...)
But trying to do a tcp_connect(...) to a remote server always return errorcode 4
This is a snippet of my code :
LOCK_TCPIP_CORE();
pcb = tcp_new();
UNLOCK_TCPIP_CORE();
IP_ADDR4(&ipAddress, 172, 217, 18, 100); // www.google.com's ip address
LOCK_TCPIP_CORE();
RetVal = tcp_connect(pcb, &ipAddress, 80, connectCallback);
UNLOCK_TCPIP_CORE();
UART_PRINT("tcp_connect returns : %d \n", RetVal);
ErrorCode 4 is a routing error - so is it related to the fact that many websites redirect to secure(HTTPS) ?
Or am I missing something else ?
Hope you can help - Thanks!
kind regards
Thomas Bødker