-->
Page 1 of 1

Debug output explanation

PostPosted: Wed Jul 12, 2017 1:44 am
by DTesla
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

Re: Debug output explanation

PostPosted: Wed Jul 12, 2017 5:46 am
by Millstone
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.

Re: Debug output explanation

PostPosted: Thu Jul 13, 2017 4:16 am
by DTesla
Hi Millstone,

thank you for your reply.

So wifi evt: 7 means WIFI_EVENT_SOFTAPMODE_PROBEREQRECVED? What's that? :shock:

Thanks

Re: Debug output explanation

PostPosted: Thu Jul 13, 2017 4:51 am
by Millstone
Hey DTesla,

according to https://github.com/esp8266/Arduino/issues/2735

it says:

"[AP]err on recieved request"

By the way. Which libs do you use? You could post your set-up for better debugging.