Your new topic does not fit any of the above??? Check first. Then post here. Thanks.

Moderator: igrr

User avatar
By DTesla
#68177 Hi all,

I activated the debug on Serial port, and I get some debug info which I don't know the meaning.

i.e. wifi evt: 7, where do I find the debug file/error with some specs?

Thanks :D
User avatar
By Millstone
#68186 So a little searching shows that this error code belongs to arduino ide code.
I searched the libs for the error code and found the Error-Code-source in this file:

ESP8266WiFiGeneric.cpp

More precisely it's :

Code: Select all/**
 * callback for WiFi events
 * @param arg
 */
void ESP8266WiFiGenericClass::_eventCallback(void* arg) {
    System_Event_t* event = reinterpret_cast<System_Event_t*>(arg);
    DEBUG_WIFI("wifi evt: %d\n", event->event);

    if(event->event == EVENT_STAMODE_DISCONNECTED) {
        DEBUG_WIFI("STA disconnect: %d\n", event->event_info.disconnected.reason);
        WiFiClient::stopAll();
    }

    for(uint32_t i = 0; i < cbEventList.size(); i++) {
        WiFiEventCbList_t entry = cbEventList[i];
        if(entry.cb) {
            if(entry.event == (WiFiEvent_t) event->event || entry.event == WIFI_EVENT_MAX) {
                entry.cb((WiFiEvent_t) event->event);
            }
        }
    }
}


This event-Struct is set by the .ino File due to the WiFiEvent_t enum. The entries get Values acoording to their order. The default example WiFiClientEvents.ino gives this sequence.



Code: Select alltypedef enum {
    WIFI_EVENT_STAMODE_CONNECTED = 0,
    WIFI_EVENT_STAMODE_DISCONNECTED,
    WIFI_EVENT_STAMODE_AUTHMODE_CHANGE,
    WIFI_EVENT_STAMODE_GOT_IP,
    WIFI_EVENT_STAMODE_DHCP_TIMEOUT,
    WIFI_EVENT_SOFTAPMODE_STACONNECTED,
    WIFI_EVENT_SOFTAPMODE_STADISCONNECTED,
    WIFI_EVENT_SOFTAPMODE_PROBEREQRECVED,
    WIFI_EVENT_MAX
} WiFiEvent_t;



I did not try to veryfy , but hope that this helps.