Hi
After managing to get my 1284p - mighty core to initialise the ESP-07 module connected to serial1 i am now unable to connect to the local wifi AP using the test sketch below :
#include "WiFiEsp.h"
#define esp8266Enable 1
#define esp8266Reset 4
const char ssid[] = "Skynet3"; // your network SSID (name)
const char pass[] = "XXXXXX"; // your network password
int status = WL_IDLE_STATUS; // the Wifi radio's status
void setup()
{
pinMode(esp8266Enable,OUTPUT);
pinMode(esp8266Reset,OUTPUT);
digitalWrite(esp8266Enable,HIGH);
digitalWrite(esp8266Reset,HIGH);
// initialize serial for debugging
Serial.begin(9600);
// initialize serial for ESP module
Serial1.begin(115200);
// initialize ESP module
WiFi.init(&Serial1);
// check for the presence of the shield
if (WiFi.status() == WL_NO_SHIELD) {
Serial.println("WiFi shield not present");
// don't continue
while (true);
}
// attempt to connect to WiFi network
while ( status != WL_CONNECTED) {
Serial.print("Attempting to connect to WPA SSID: ");
Serial.println(ssid);
// Connect to WPA/WPA2 network
status = WiFi.begin(ssid, pass);
Serial.println(status);
delay(500);
}
Serial.println("You're connected to the network");
}
void loop()
{
// print the network connection information every 10 seconds
Serial.println();
printCurrentNet();
printWifiData();
Serial1.print("AT+GMR");
delay(10000);
}
void printWifiData()
{
// print your WiFi shield's IP address
IPAddress ip = WiFi.localIP();
Serial.print("IP Address: ");
Serial.println(ip);
// print your MAC address
byte mac[6];
WiFi.macAddress(mac);
char buf[20];
sprintf(buf, "%02X:%02X:%02X:%02X:%02X:%02X", mac[5], mac[4], mac[3], mac[2], mac[1], mac[0]);
Serial.print("MAC address: ");
Serial.println(buf);
}
void printCurrentNet()
{
// print the SSID of the network you're attached to
Serial.print("SSID: ");
Serial.println(WiFi.SSID());
// print the MAC address of the router you're attached to
byte bssid[6];
WiFi.BSSID(bssid);
char buf[20];
sprintf(buf, "%02X:%02X:%02X:%02X:%02X:%02X", bssid[5], bssid[4], bssid[3], bssid[2], bssid[1], bssid[0]);
Serial.print("BSSID: ");
Serial.println(buf);
// print the received signal strength
long rssi = WiFi.RSSI();
Serial.print("Signal strength (RSSI): ");
Serial.println(rssi);
}
Output
[WiFiEsp] Initializing ESP module
[WiFiEsp] >>> TIMEOUT >>>
[WiFiEsp] Initilization successful - 2.0.0
Attempting to connect to WPA SSID: Skynet3
[WiFiEsp] Failed connecting to Skynet3
2
Attempting to connect to WPA SSID: Skynet3
[WiFiEsp] Failed connecting to Skynet3
Note that I added a line to print out the number of the 'status' state which gives out '2'
I have also tried the above with a second AP with the same result.
AT+GMR
AT version:1.3.0.0(Jul 14 2016 18:54:01)
SDK version:2.0.0(5a875ba)
v1.0.0.3
Mar 13 2018 09:37:06
OK
AT ESP Boot:
ets Jan 8 2013,rst cause:1, boot mode:(3,7)
load 0x40100000, len 2408, room 16
tail 8
chksum 0xe5
load 0x3ffe8000, len 776, room 0 88f
8
.e0M F
Is there anything to check (other than correct SSID and password)