I don't think the client is even connecting to the http server since I dont see the same GET post in the serial monitor of the server. So my browser is connecting fine as I do see the GET post in the serial monitor. I have been troubleshooting this for about a week so I thought I would reach out after finding the post. I fear my problem may be a basic issue that I just cannot figure out.
Below is a section(s) of the code from MyAPClient...
#include <ESP8266WiFi.h>
const char *ssid = "MyESPAP";
const char *password = "MyPassword";
const char *host = "192.168.4.1";
..........
void loop() {
delay(8000);
if (rate_toogle == 0)
rate_toogle = 1;
else
rate_toogle = 0;
Serial.print("connecting to ");
Serial.println(host);
WiFiClient client;
const int httpPort = 80;
if (!client.connect(host, httpPort)) {
Serial.println("connection failed");
return;
}
.........
Here is the response from the serial monitor:
Connecting to MyESPAP
...........
WiFi connected
IP address:
192.168.4.2
connecting to 192.168.4.1
connection failed
connecting to 192.168.4.1
connection failed
Thanks in advance!