I need help figuring out why only mozilla works and edge, safari, chrome and IE don't work.
All i am trying to do is a webserver that replies back. Right now, all I am doing is to say back: "Hi its me"
As if can be seen, with mozilla, works fine
with Edge I get this:
Other than that, i don't get why the symbols are messed up.
When i just upload an empty sketch and type commands in the serial monitor, everything works ok and i don't get messed up symbols. I used pin 0 and 1 when all codes are empty.
when i use this code, (changed the pins to 2 and 3 because if i use 0 and 1, nothing happens) i get the problem shown above.
#include <SoftwareSerial.h>
#define DEBUG true
SoftwareSerial esp8266(2,3);
void setup()
{
Serial.begin(115200);
esp8266.begin(115200);
sendData("AT+RST\r\n",2000,DEBUG);
sendData("AT+CWMODE=1\r\n",1000,DEBUG);
sendData("AT+CIFSR\r\n",1000,DEBUG);
sendData("AT+CIPMUX=1\r\n",1000,DEBUG);
sendData("AT+CIPSERVER=1,8080\r\n",1000,DEBUG);
}
void loop()
{
if(esp8266.available()) // check if the esp is sending a message
{
/*
while(esp8266.available())
{
char c = esp8266.read();
Serial.write(c);
} */
if(esp8266.find("+IPD,"))
{
delay(1000);
int connectionId = esp8266.read()-48;
String webpage = "Hi its me";
String cipSend = "AT+CIPSEND=";
cipSend += connectionId;
cipSend += ",";
cipSend +=webpage.length();
cipSend +="\r\n";
sendData(cipSend,1000,DEBUG);
sendData(webpage,1000,DEBUG);
String closeCommand = "AT+CIPCLOSE=";
closeCommand+=connectionId;
closeCommand+="\r\n";
sendData(closeCommand,3000,DEBUG);
}
}
}
String sendData(String command, const int timeout, boolean debug)
{
String response = "";
esp8266.print(command);
long int time = millis();
while( (time+timeout) > millis())
{
while(esp8266.available())
{
char c = esp8266.read();
response+=c;
}
}
if(debug)
{
Serial.print(response);
}
return response;
}
Can anyone please kindly help me out. in conclusion questions are:
1- why other browsers don't work?
2- how to get any browser to work?
3- why are symbols all messed up? (just in case, using baud rate 115200)
Thank You