I'm trying to make a connection on my public IP and I'm not getting it, but if I connect to a local machine, it works.
This is the code i am using:
Code: Select all
internet.println("AT+RST");
delay(2000);
internet.println("AT+CWMODE=3");
delay(100);
internet.println("AT+CWJAP=\""+ network +"\",\""+ password +"\"");
delay(2000);
internet.println("AT+CIFSR");
internet.println(""AT+CIPSTART=\"TCP\",\"" + IP + "\"," + Port")
If I connect to a local IP, it works, if I try to connect to my server in the cloud the return is ERROR CLOSED.
What should I do?