burkmurray wrote:For fun, I added some debugging in DNSServer.ccp to see what Android was doing as soon as it connects. This is what it spits out.
...
DNS responds: 192.168.1.1 for connectivitycheck.android.com
Your debug responses are super handy - are you grabbing that from replyWithIP? Mind sharing a code snip?
DNSServer.ccp replyWithIP extra logging
void DNSServer::replyWithIP()
{
_dnsHeader->QR = DNS_QR_RESPONSE;
_dnsHeader->ANCount = _dnsHeader->QDCount;
_dnsHeader->QDCount = 0;
_udp.beginPacket(_udp.remoteIP(), _udp.remotePort());
_udp.write(_buffer, _currentPacketSize);
_udp.write((unsigned char*)&_ttl, 4);
// Length of RData is 4 bytes (because, in this case, RData is IPv4)
_udp.write((uint8_t)0);
_udp.write((uint8_t)4);
_udp.write(_resolvedIP, sizeof(_resolvedIP));
_udp.endPacket();
//*********************************************************
Serial.print("DNS responds: ");
Serial.print(_resolvedIP[0]);
Serial.print(".");
Serial.print(_resolvedIP[1]);
Serial.print(".");
Serial.print(_resolvedIP[2]);
Serial.print(".");
Serial.print(_resolvedIP[3]);
Serial.print(" for ");
Serial.println(getDomainNameWithoutWwwPrefix());
}
burkmurray wrote:Also, have you tried plugging connectivitycheck.android.com into a server.on() test?Code: Select allserver.on("connectivitycheck.android.com", handle_root);
I don't see how that will work, if it never connects to the webserver after the DNS request. To me it seems that android and windows do not understand the response from the DNS server, hence constantly repeating over and over. Neither ever attempt to connect to the webserver.
burkmurray wrote:Finally, I've been trying to figure out how to navigate Apple's CNA, and the one thing that consistently works is sending the word "Success" in the head of a message:Code: Select all"<!DOCTYPE html><html><head><title>Success</title></head><body>"
I've read that Google uses a similar approach - might be worth a shot.
You suggest returning the above html snippet, if it actually makes contact with the websrever part?
I am starting to wonder if Android and Windows attempt to contact home via a different port? Maybe trying to contact a UDP webserver instead of a TCP webserver???
I may have to setup up a TCPDUMP at home on my wifi and see what the heck Android does as soon as wifi is enabled.