| 4 | #include <sstream> |
| 5 | |
| 6 | bool internetConnection() { |
| 7 | WiFiClient client; |
| 8 | const char *host = "8.8.8.8"; // Google DNS |
| 9 | const uint16_t port = 53; // DNS Port |
| 10 | |
| 11 | if (client.connect(host, port)) { |
| 12 | client.stop(); |
| 13 | return true; // Connected |
| 14 | } else return false; |
| 15 | } |
| 16 | |
| 17 | String getManufacturer(const String &mac) { |
| 18 | if (!internetConnection()) { return "NO_INTERNET_ACCESS"; } |
no test coverage detected