[SOLVED] Wifi connection exception



  • Hello, when I do the connection to the Wifi with my two wemos D1 mini pro boards, I allways get the same exception

    Connecting to vicWifi

    ets Jan 8 2013,rst cause:4, boot mode:(3,0)

    wdt reset
    load 0x4010f000, len 1384, room 16
    tail 8
    chksum 0x2d
    csum 0x2d
    v09f0c112
    ~ld
    ø

    Connecting to vicWifi

    The code is very simple, so I don't know where is my mistake
    void setup() {
    Serial.begin(115200);
    // Connect to WiFi network
    Serial.print("Connecting to ");
    Serial.println(ssid);
    WiFi.begin(ssid, pass);
    }

    Can anyone help?
    Thank you



  • @vicsan

    You need the loop in there, even if there's nothing between the brackets.

    I'd add some serial output so you know whether the error occurs once you've successfully connected to wifi.



  • @Roo-ster . Thank you for the answer.
    There is a loop procedure, but, as you say, it is empty, so I didn't write it in the post.
    The program is breaking in the wifi conection "WiFi.begin(ssid, pass);" If I delete this line the program doesn't throw any exception.

    I forgot it in my las post, the library I'm using is the Wifi.h, included in the Arduino IDE.



  • I have changed the library to ESP8266WiFi.h and it works fine.



  • Hi,

    I am sorry for the following question but I am not finding the information that I need. I am using Wemos D1 mini under the Arduino IDE (latest version). The project uses 2 serial inputs (one Serial swapped) (the other SoftwareSerial). The module starts a Soft AP and is programmable through a simple web server. In normal operation the system sends the input serial data through wifi using the UDP protocol. Everything works fine except if long sequences of characters arrive at the SoftwareSerial port. In this cause the system "crashes" after an hour or so. I wrote "crashes" with quotes since what really happens is: (i) the Soft AP Ssid disappears and the client that was receiving the UDP packets loses the connection (ii) but the ESP8266 is still working as I have a LED that blinks as soon a complete serial sentence is received without errors. I would like to debug this in order to, for example, if I detect the "crash" situation, force a ESP.restart()

    My question: how can I get the debug information like in the OP:

    ets Jan 8 2013,rst cause:4, boot mode:(3,0) ............ ?

    The only thing I know for debugging is to use a macro like:

    //#define DEBUG
    #ifdef DEBUG
    #define DebugPrint(x) Serial.print(x)
    #define DebugPrintln(x) Serial.println(x)
    #define DebugBegin(x) Serial.begin(x)
    #define DebugStartSerial(x)
    #define DebugStartSwap()
    #else
    #define DebugPrint(x)
    #define DebugPrintln(x)
    #define DebugBegin(x)
    #define DebugStartSerial(x) Serial.begin(x)
    #define DebugStartSwap() Serial.swap()
    #endif

    Any help would be appreciated and, excuse me if this is out of topic.




Log in to reply
 

Looks like your connection to WEMOS Forum was lost, please wait while we try to reconnect.