Hello all,
Has anyone been able to load a web page with the Arduino/WiFly? I’m able to connect to my wireless network, ping and so on. However after I use the “open http://www.google.com 80” it connects, but the GET request gets lost. Here’s a code snippet, would anyone mind taking a look and see what I may be doing wrong?
Thanks is advance
Serial.println("Associated!");
Serial.println("Trying to open webpage.");
SPI_Uart_println("open www.google.com 80");
//Flush_RX();
delay(3000);
Serial.println("Sending GET request.");
SPI_Uart_println("GET / HTTP/1.1 ");
SPI_Uart_println("host: www.google.com");
SPI_Uart_println("\n\r");
//Flush_RX();
time = millis();
while (millis() - time < 8000)
{
if((SPI_Uart_ReadByte(LSR) & 0x01))
{
incoming_data = SPI_Uart_ReadByte(RHR);
Serial.print(incoming_data,BYTE);
}
}
Serial.println("Closing.");
SPI_Uart_print("$$");
SPI_Uart_println("close");
Flush_RX();