Go Down

Topic: I have error when tried start example arduino esp8266 (Read 716 times) previous topic - next topic

IP696

I tried connect android to esp8266 and write this code for esp from this site and this simple
Code: [Select]
#include <ESP8266WiFi.h>

const char* ssid = "espsid";
const char* password = "testpassword";
const int ledPin = 13;
WiFiServer server(1337);

void printWiFiStatus();

void setup(void) {
  Serial.println("Serial start");
  Serial.begin(115200);
  Serial.println("WiFi start");
  WiFi.begin(ssid, password);
  Serial.println("pinMode start");
  // Configure GPIO2 as OUTPUT.
  pinMode(ledPin, OUTPUT);
  Serial.println("server.begin");
  // Start TCP server.
  server.begin();
  Serial.println("server startded");
}

void loop(void) {
  // Check if module is still connected to WiFi.
  if (WiFi.status() != WL_CONNECTED) {
    while (WiFi.status() != WL_CONNECTED) {
      delay(500);
    }
    // Print the new IP to Serial.
    printWiFiStatus();
  }

  WiFiClient client = server.available();

  if (client) {
    Serial.println("Client connected.");

    while (client.connected()) {
      if (client.available()) {
        char command = client.read();
        if (command == 'H') {
          digitalWrite(ledPin, HIGH);
          Serial.println("LED is now on.");
        }
        else if (command == 'L') {
          digitalWrite(ledPin, LOW);
          Serial.println("LED is now off.");
        }
      }
    }
    Serial.println("Client disconnected.");
    client.stop();
  }
}

void printWiFiStatus() {
  Serial.println("");
  Serial.print("Connected to ");
  Serial.println(ssid);
  Serial.print("IP address: ");
  Serial.println(WiFi.localIP());
}


I have this exception and I do not understend what happened. This error not readible

Code: [Select]
ets Jan  8 2013,rst cause:2, boot mode:(3,6)

load 0x4010f000, len 1264, room 16
tail 0
chksum 0x0f
csum 0x0f
~ld
WiFi start

Exception (3):
epc1=0x401003e9 epc2=0x00000000 epc3=0x00000000 excvaddr=0x400207b1 depc=0x00000000

ctx: cont
sp: 3ffef810 end: 3ffefbe0 offset: 01a0

>>>stack>>>
3ffef9b0:  feefeffe feefeffe feefeffe feefeffe 
3ffef9c0:  feefeffe feefeffe feefeffe 3ffefb27 
3ffef9d0:  00000484 00000484 000003fd 401004f4 
3ffef9e0:  00000000 00001000 000003fd 40106dd4 
3ffef9f0:  40004b31 3ffefa20 0000001c 4021a805 
3ffefa00:  401054a2 4021a8ed 3fff0aec 000003ff 
3ffefa10:  000003fd 3ffefb27 3fff0aec 000003fd 
3ffefa20:  ffffff00 55aa55aa 00000012 0000001c 
3ffefa30:  0000001c 000000b0 000000b0 000003ff 
3ffefa40:  4021acdc 3fff0aec 3fff0aec 000000ff 
3ffefa50:  00000001 3ffefb47 4021ae37 00000008 
3ffefa60:  3fff0aec 000000ff 3ffefb27 00000000 
3ffefa70:  3fff0bac 3ffefb88 00000001 4021aec4 
3ffefa80:  3ffefb27 3fff0aec 00000000 00000004 
3ffefa90:  3ffefb47 3fff6e24 3fff0aec 00000000 
3ffefaa0:  4021af00 3ffe8480 3ffe8490 feefeffe 
3ffefab0:  402020da 3ffe8490 3ffe8480 40201ffb 
3ffefac0:  00000000 00000000 3ffeea88 401004d8 
3ffefad0:  feefeffe feefeffe 3fff0a94 40201a59 
3ffefae0:  00000000 00000001 feefeffe feefeffe 
3ffefaf0:  feefeffe feefeffe feefeffe 0001c200 
3ffefb00:  0000001c 00000000 3ffeea88 402023fc 
3ffefb10:  00000001 feefeffe feefeffe feefeffe 
3ffefb20:  ffffff00 65ffffff 69737073 feef0064 
3ffefb30:  feefeffe feefeffe feefeffe 0001c200 
3ffefb40:  0000001c 74000000 70747365 77737361 
3ffefb50:  0064726f 00000001 3ffe866d 402031b8 
3ffefb60:  00000000 00000009 3ffe8401 3ffeebac 
3ffefb70:  3fffdad0 0000000a 3ffeeb80 40202c39 
3ffefb80:  3ffe866c 00000000 3ffeeb80 40202c39 
3ffefb90:  3ffeea8c 00000000 00000001 40202c64 
3ffefba0:  feefeffe feefeffe 3ffeeb80 3ffeebac 
3ffefbb0:  3fffdad0 00000000 3ffeeb80 40201c8e 
3ffefbc0:  feefeffe feefeffe 3ffeeba4 40202f18 
3ffefbd0:  feefeffe feefeffe 3ffeebc0 40100718 
<<<stack<<<
whan means this stacktrace and exception?

badweasel

Dude!

I've been dealing with a similar error and had basically given up.  I had my unit working fine via arduino through a logic line level converter.  But I issued a specific AT command and after that can't get anything but Exception (28) and all it does now is repeat that error over and over again.

I just tried a second unit and it was working fine I issued that same AT command and I looked over and it was SMOKING.  One of the chips cracked open.  And I don't think I had more than 3.3v going to it.

This stuff shouldn't be this hard.  This unit seems really fragile and hard to configure.  I'm going to post my wiring setup on the arduino stack overflow forum and see if I can find out what I did wrong.

-michael

Go Up