viewtopic.php?f=13&t=275&hilit=fios&start=20
The problem I am having is that most of the time, the board is never ever to make even one GETRequest, if it is able to make one, then it is never able to make another. However the feedback I am getting is confusing. I have "verbose" or "DEBUG" mode enabled in WiServer.cpp and each time I try to make a request, it reports that it gets a connection and then a few seconds later moments later (maybe 10-20 seconds) that the connection ended. Then after the connection is ended, "printData(char* data, int len) " in SimpleClient.pde prints an empty buffer. The connection is always ended due to a timeout, I was able to determine this by modifying the following code in "g2100.c":
- Code: Select all
if (uip_aborted() || uip_timedout() || uip_closed()) {
if (req != NULL) {
if (verbose) {
Serial.print("\nEnded connection with ");
Serial.print(req->hostName);
Serial.print("\n Reason: ");
if( uip_aborted() )
Serial.print("\n aborted");
if( uip_timedout() )
Serial.print("\n timedout");
if( uip_closed() )
Serial.print("\n closed");
}
if (req->returnFunc) {
// Call the sketch's callback function with 0 bytes to indicate End Of Data
req->returnFunc((char*)uip_appdata, 0);
}
// Remove the request from the connection
app->request = NULL;
// Request is no longer active
req->active = false;
}
}
The above mentioned fix to resolve the problem with the Actiontec MI424 Verizon FIOS Router sending packets through that are too big is to ignore the packet:
From "g2100.c"
- Code: Select all
case ZG_INTR_ST_RD_CTRL_REG:
{
U16 rx_byte_cnt = (0x0000 | (hdr[1] << 8) | hdr[2]) & 0x0fff;
if ( rx_byte_cnt < (U16)UIP_BUFSIZE ){ // Check if our buffer is large enough for packet
zg_buf[0] = ZG_CMD_RD_FIFO;
spi_transfer(zg_buf, rx_byte_cnt + 1, 1); // copy ZG2100 buffer contents into zg_buf (uip_buf)
hdr[0] = ZG_CMD_RD_FIFO_DONE; // Tell ZG2100 we're done reading from it's buffer
spi_transfer(hdr, 1, 1);
intr_valid = 1;
intr_state = 0;
break;
}{ // Too Big, ignore it and continue
intr_valid = 0;
intr_state = 0;
packet_too_big++; // Log how many times this part of the code is ever reached
break;
}
}
I was able to determine that once a packet comes through that is too large and the part of the code is triggered that ignores the packet, this whole block of code is never called again. This seems to indicating that despite this "fix", the application is still failing.
I'm guessing that something more needs to be done about these oversized packets, perhaps they need to be caught sooner and/or ignored more gracefully?
Edit::::::::::::
I just logged into my neighbor's unsecured linksys router. I had basically the same problem there, except I had a much higher instance of successfully completing the GETRequest() once. But even with the linksys, after a packet comes in that is too big nothing works.