Skip to content

Getting Exception 28 while connecting #145

@beicnet

Description

@beicnet

Hi there,

I'm trying to use this library for the first time to connect to my MariaDB database, all compiling just fine, but I'm getting continuous reset loop with Exception code 28.

My setup is Arduino IDE v1.8.2, ESP8266 Core v2.3.0 and MySQL Connector v1.2.0, only WeMos D1 mini attached nothing else.

All connection and database parameters are configured correctly, because I using them on daily level.

Any help would be highly appreciated!

Kind regards,
Viktor

Output:

Connecting to Wifi
...
WiFi connected
IP address: 
192.168.0.28
Connecting...
...trying...

Exception (28):
epc1=0x402022dd epc2=0x00000000 epc3=0x00000000 excvaddr=0x00000020 depc=0x00000000

ctx: cont 
sp: 3ffef4d0 end: 3ffef700 offset: 01a0

>>>stack>>>
3ffef670:  00000000 3ffee6a0 3ffee460 402022d5  
3ffef680:  3ffe8474 0000000d 3ffee6a0 40202df5  
3ffef690:  3ffef6d0 00000ceb 3ffe8354 3ffe834c  
3ffef6a0:  00000000 3ffee4fc 3ffee6a0 40202e20  
3ffef6b0:  1c00a8c0 00ffffff 3ffee6a0 3ffee6cc  
3ffef6c0:  3ffe8474 3ffee460 3ffee6a0 40201cec  
3ffef6d0:  3ffe8718 f200a8c0 feefeffe feefeffe  
3ffef6e0:  3fffdad0 00000000 3ffee6c4 40203274  
3ffef6f0:  feefeffe feefeffe 3ffee6e0 40100718  
<<<stack<<<

Sketch what I'm using:

#include "ESP8266WiFi.h"
#include "ESP8266HTTPClient.h"
#include "MySQL_Connection.h"
#include "MySQL_Cursor.h"

const char* ssid  = "YourWifiSsid";
const char* pass  = "YourWifiPassword";

IPAddress db_addr(192, 168, 0, 242);
int db_port = 3307;
char db_usr[] = "YourDbUsername";
char db_pwd[] = "YourDbPassword";
char db_name[] = "YourDbName";

HTTPClient client;
MySQL_Connection db((Client *)&client);

void setup()
{
  Serial.begin(9600);

  delay(100);

  Serial.println();
  Serial.println();
  Serial.print("Connecting to ");
  Serial.println(ssid);

  WiFi.begin(ssid, pass);

  while (WiFi.status() != WL_CONNECTED) {
    delay(500);
    Serial.print(".");
  }

  Serial.println("");
  Serial.println("WiFi connected");
  Serial.println("IP address: ");
  Serial.println(WiFi.localIP());

  Serial.println("Connecting...");

  if (db.connect(db_addr, db_port, db_usr, db_pwd, db_name)) {
    delay(1000);
  } else {
    Serial.println("Connection failed.");
    db.close();
  }

}

void loop()
{
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions