Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invalid Event when Client connect AP + debug output #2285

Closed
luc-github opened this issue Jan 7, 2019 · 35 comments

Comments

@luc-github
Copy link
Contributor

commented Jan 7, 2019

Using latest Git
Using WiFiAccessPoint sample
Debug is disabled but message appear

When client connect to AP there is an unwished output:

E (28866) event: mismatch or invalid event, id=63
E (28867) event: default event handler failed!
dhcps: send_offer>>udp_sendto result 0

error messages seems come from : https://github.com/espressif/esp-idf/blob/master/components/esp32/event_default_handlers.c#L457

Debug message is from : https://github.com/espressif/esp-idf/blob/master/components/lwip/apps/dhcpserver/dhcpserver.c#L527
looks like #if DHCPS_DEBUG is missing

I know they looks like IDF issue but I only use arduino
I have opened ticket for Debug message : espressif/esp-idf#2924
But no idea what to do with other issue sorry

@me21

This comment has been minimized.

Copy link

commented Jan 14, 2019

I confirm, my Arduino version is 1.0.1.

@markingle

This comment has been minimized.

Copy link

commented Jan 14, 2019

I am having the same problem. I am unable to connect to the esp32 wifi from my Windows laptop and Mac mini. I just pulled the latest version from the arduino-esp32 repo

@me21

This comment has been minimized.

Copy link

commented Jan 14, 2019

This is not the same bug. I am able to connect, but I get error messages from ESP32 as a side effect.

In fact, I wasn't able to connect to ESP32 AP on the previous versions of Arduino framework (was getting authentication errors).

@me21

This comment has been minimized.

Copy link

commented Jan 14, 2019

Related bugs in ESP-IDF: espressif/esp-idf#2916, espressif/esp-idf#2915.

They are going to fix those within 2 weeks.

@me-no-dev

This comment has been minimized.

Copy link
Member

commented Jan 23, 2019

There already is a "fix" for this in arduino master, but is available to github installs only.

@luc-github

This comment has been minimized.

Copy link
Contributor Author

commented Jan 23, 2019

@me-no-dev you mean esp-idf github ?

@me-no-dev

This comment has been minimized.

Copy link
Member

commented Jan 23, 2019

@luc-github

This comment has been minimized.

Copy link
Contributor Author

commented Jan 23, 2019

@me-no-dev Yes I saw this commit but it is not same issue actually
the message is raised by ESP_LOGE(TAG, "mismatch or invalid event, id=%d", event->event_id);
https://github.com/espressif/esp-idf/blob/master/components/esp32/event_default_handlers.c#L457

not https://github.com/espressif/arduino-esp32/blob/master/libraries/WiFi/src/WiFiGeneric.cpp#L342

Confirmed still present with today git test

@zhivko

This comment has been minimized.

Copy link

commented Jan 23, 2019

Same problem here with latest esp-idf

event: mismatch or invalid event, id=63
I (13955) wifi: new:<1,1>, old:<1,0>, ap:<1,1>, sta:<255,255>, prof:1
I (13955) wifi: bss=0x3ffbcfac, resp=16 join
I (13965) wifi: station: 78:0c:b8:b3:33:c3 join, AID=1, bgn, 40U
I (13965) wifi: join success, ap send assoc response
W (13975) event: unexpected system event 63!
E (13975) event: mismatch or invalid event, id=63
E (13985) event: default event handler failed!
Guru Meditation Error: Core  1 panic'ed (LoadProhibited). Exception was unhandled.
Core 1 register dump:
PC      : 0x40099ad4  PS      : 0x00060330  A0      : 0x800dd0e6  A1      : 0x3ffc0740  
A2      : 0xb33fffff  A3      : 0xb33ffffb  A4      : 0x000000ff  A5      : 0x0000ff00  
A6      : 0x00ff0000  A7      : 0xff000000  A8      : 0x00000000  A9      : 0x00000000  
A10     : 0x00000000  A11     : 0x3ffc0942  A12     : 0x00000000  A13     : 0x3ffbe27c  
A14     : 0x00000002  A15     : 0x3ffbe920  SAR     : 0x00000004  EXCCAUSE: 0x0000001c  
EXCVADDR: 0xb33fffff  LBEG    : 0x40099af5  LEND    : 0x40099b05  LCOUNT  : 0xfffffffc

gives:

c:\msys32\home\klemen\esp\DoubleLifter>java -jar EspStackTraceDecoder.jar c:\Users\klemen\Dropbox\Voga\BleVogaLifter-esp32-DRV8703Q\xtensa-lx106-elf-addr2line.exe c:\msys32\home\klemen\esp\DoubleLifter\build\DoubleLifter.elf c:\msys32\home\klemen\esp\DoubleLifter\dump3.txt
Exception Cause: Not found

0x40099ad4: strlen at /home/jeroen/esp8266/esp32/newlib_xtensa-2.2.0-bin/newlib_xtensa-2.2.0/xtensa-esp32-elf/newlib/libc/machine/xtensa/../../../../.././newlib/libc/machine/xtensa/strlen.S:46
0x40099af5: strlen at /home/jeroen/esp8266/esp32/newlib_xtensa-2.2.0-bin/newlib_xtensa-2.2.0/xtensa-esp32-elf/newlib/libc/machine/xtensa/../../../../.././newlib/libc/machine/xtensa/strlen.S:84
0x40099b05: strlen at /home/jeroen/esp8266/esp32/newlib_xtensa-2.2.0-bin/newlib_xtensa-2.2.0/xtensa-esp32-elf/newlib/libc/machine/xtensa/../../../../.././newlib/libc/machine/xtensa/strlen.S:96
0x40099ad4: strlen at /home/jeroen/esp8266/esp32/newlib_xtensa-2.2.0-bin/newlib_xtensa-2.2.0/xtensa-esp32-elf/newlib/libc/machine/xtensa/../../../../.././newlib/libc/machine/xtensa/strlen.S:46
0x400dd0e3: _svfprintf_r at /home/jeroen/esp8266/esp32/newlib_xtensa-2.2.0-bin/newlib_xtensa-2.2.0/xtensa-esp32-elf/newlib/libc/stdio/../../../.././newlib/libc/stdio/vfprintf.c:1529
0x40168489: _vsnprintf_r at /home/jeroen/esp8266/esp32/newlib_xtensa-2.2.0-bin/newlib_xtensa-2.2.0/xtensa-esp32-elf/newlib/libc/stdio/../../../.././newlib/libc/stdio/vsnprintf.c:72
0x401684d6: vsnprintf at /home/jeroen/esp8266/esp32/newlib_xtensa-2.2.0-bin/newlib_xtensa-2.2.0/xtensa-esp32-elf/newlib/libc/stdio/../../../.././newlib/libc/stdio/vsnprintf.c:41
0x4010007a: log_printf at C:/msys32/home/klemen/esp/DoubleLifter/components/arduino/cores/esp32/esp32-hal-uart.c:473
0x401040ce: WiFiGenericClass::_eventCallback(void*, system_event_t*) at C:/msys32/home/klemen/esp/DoubleLifter/components/arduino/libraries/WiFi/src/WiFiGeneric.cpp:321
0x401044f2: _network_event_task at C:/msys32/home/klemen/esp/DoubleLifter/components/arduino/libraries/WiFi/src/WiFiGeneric.cpp:321
0x40094725: vPortTaskWrapper at C:/msys32/home/klemen/esp/esp-idf/components/freertos/port.c:435
@Aimlessisland

This comment has been minimized.

Copy link

commented Jan 26, 2019

Same problem here really annoying
IP address: 192.168.4.1
E (1113) event: mismatch or invalid event, id=63
E (1114) event: default event handler failed!

@chegewara

This comment has been minimized.

Copy link
Contributor

commented Jan 26, 2019

If i remember correct event: mismatch or invalid event, id=63 is wifi mesh event and in normal wifi connection can be ignored. It was answered on esp-idf issue tracker or on forum, but im not 100% sure.

@sbarrufaldi

This comment has been minimized.

Copy link

commented Jan 29, 2019

I have the same problem when I try to connect to AP.

E (4302) event: mismatch or invalid event, id=63
E (4303) event: default event handler failed!
dhcps: send_offer>>udp_sendto result 0
Guru Meditation Error: Core  0 panic'ed (InstrFetchProhibited). Exception was unhandled.
Core 0 register dump:
PC      : 0x00000000  PS      : 0x00060e30  A0      : 0x80116eb1  A1      : 0x3ffb3d30  
A2      : 0x3ffc9314  A3      : 0x3ffc98c4  A4      : 0x3ffc8a60  A5      : 0x3ffbb95c  
A6      : 0x0204a8c0  A7      : 0x0c04a8c0  A8      : 0x80116d54  A9      : 0x3ffb3cf0  
A10     : 0x3ffc9324  A11     : 0x3ffc98c4  A12     : 0x3ffb3d3c  A13     : 0x00000044  
A14     : 0x00000001  A15     : 0x00000006  SAR     : 0x00000010  EXCCAUSE: 0x00000014  
EXCVADDR: 0x00000000  LBEG    : 0x4000c349  LEND    : 0x4000c36b  LCOUNT  : 0x00000000  

Backtrace: 0x00000000:0x3ffb3d30 0x40116eae:0x3ffb3d70 0x40123055:0x3ffb3d90 0x401269ed:0x3ffb3dd0 0x4012bc22:0x3ffb3df0 0x4011a547:0x3ffb3e10 0x4008e9d1:0x3ffb3e40

Rebooting...

It keeps rebooting 4 or 5 times and then it connects perfectly. But for my program are 10 missed seconds...

@superfrobo

This comment has been minimized.

Copy link

commented Jan 30, 2019

Hi everybody, I have the same problem. Deleting all chip before programming does not solve.

Soft-AP configuration ... System started
Connected
E (106828) event: mismatch or invalid event, id=63
E (106829) event: default event handler failed!
Guru Meditation Error: Core 0 panic'ed (InstrFetchProhibited). Exception was unhandled.
Core 0 register dump:
PC : 0x00000000 PS : 0x00060030 A0 : 0x800f4f55 A1 : 0x3ffb5300
A2 : 0x3ffd47b0 A3 : 0x3ffd4d08 A4 : 0x3ffbdb14 A5 : 0x3ffb4760
A6 : 0x0204a8c0 A7 : 0x0c04a8c0 A8 : 0x800f4df8 A9 : 0x3ffb52c0
A10 : 0x3ffd47c0 A11 : 0x3ffd4d08 A12 : 0x3ffb530c A13 : 0x00000044
A14 : 0x00000001 A15 : 0x00000006 SAR : 0x00000010 EXCCAUSE: 0x00000014
EXCVADDR: 0x00000000 LBEG : 0x4000c349 LEND : 0x4000c36b LCOUNT : 0x00000000

Backtrace: 0x00000000:0x3ffb5300 0x400f4f52:0x3ffb5340 0x401001c5:0x3ffb5360 0x40103b5d:0x3ffb53a0 0x40108d92:0x3ffb53c0 0x400f7d3f:0x3ffb53e0 0x4008eaa5:0x3ffb5410

Rebooting...

3 more reboots follow. then system stabilizes and event happens again at next attempt to connect.
Developing with Platformio and updated arduino framework for Esp32

Any workaround?

@b1gmans

This comment has been minimized.

Copy link

commented Feb 14, 2019

I also have this issue, it is serious as my project will not run as expected after the error messages are displayed:
E (27188) event: mismatch or invalid event, id=63
E (27189) event: default event handler failed!

Is there a fix for this please?
I have downloaded the latest esp32 system in my arduino ide - still no better? v1.0.1 is what Im running

Is there a way to get latest fixes that may not yet be in this official release? how? Im using windows 10?

@me-no-dev

This comment has been minimized.

Copy link
Member

commented Feb 14, 2019

so, I can not fix the error in IDF, but with the commit I linked above this has been fixed to not cause exception.

@b1gmans

This comment has been minimized.

Copy link

commented Feb 14, 2019

I have tried that and it still doesnt work - I have no debug on at all, and still get the error.

@dneault333

This comment has been minimized.

Copy link

commented Feb 14, 2019

Same

@luc-github

This comment has been minimized.

Copy link
Contributor Author

commented Feb 15, 2019

invalid event is solved with 010a7c6

but still Debug output is present, even debug is disabled:

dhcps: send_offer>>udp_sendto result 0
dhcps: send_offer>>udp_sendto result 0
dhcps: send_offer>>udp_sendto result 0
dhcps: send_offer>>udp_sendto result 0
dhcps: send_offer>>udp_sendto result 0
@me-no-dev

This comment has been minimized.

Copy link
Member

commented Feb 15, 2019

this is something that comes from IDF :) you should complain there

@luc-github

This comment has been minimized.

Copy link
Contributor Author

commented Feb 16, 2019

Yes I did , it is in first comment :D (espressif/esp-idf#2924) need to wait IDF 4.0
I did not expect this change needed to wait so long ...

@themindfactory

This comment has been minimized.

Copy link

commented Feb 17, 2019

I have the same issue too....
once the error message is displayed the system will panic and fail, sometimes it takes a few reboots to get it working again, as long as I do not log on the AP from PC all is OK, once you log onto AP with PC or Android Phone.... it happens.

@GeorgeFlorian

This comment has been minimized.

Copy link

commented Feb 18, 2019

invalid event is solved with 010a7c6

but still Debug output is present, even debug is disabled:

dhcps: send_offer>>udp_sendto result 0
dhcps: send_offer>>udp_sendto result 0
dhcps: send_offer>>udp_sendto result 0
dhcps: send_offer>>udp_sendto result 0
dhcps: send_offer>>udp_sendto result 0

How was it solved ? Do we need to reinstall the Arduino ESP32 core ?
I reinstalled Arduino IDE and ESP32 Core for Arduino IDE last week (probably before the fix) and I still have both of these issues.

Edit: I removed esp32 platform from Boards Manager in Arduino IDE and then installed it again following these instructions and I still get that output:

12:08:17.034 -> E (25868) event: mismatch or invalid event, id=63
12:08:17.067 -> E (25868) event: default event handler failed!
12:08:18.095 -> dhcps: send_offer>>udp_sendto result 0

Also, I saw that there were a lot of files changed 4 days ago. How do we get our hands on those updates ? I just confirmed that reinstalling it using Boards Manager does not work.

@me-no-dev

This comment has been minimized.

Copy link
Member

commented Feb 18, 2019

it's not in boards manager yet. it's fixed in master branch here on github. We can not push releases to package manager too often or the json descriptors will become huge. Look at installing Arduino from github instructions :)

@GeorgeFlorian

This comment has been minimized.

Copy link

commented Feb 18, 2019

it's not in boards manager yet. it's fixed in master branch here on github. We can not push releases to package manager too often or the json descriptors will become huge. Look at installing Arduino from github instructions :)

Thank you !

I can confirm that it worked this way. The only strange output I get now is this:

13:06:38.056 -> dhcps: send_offer>>udp_sendto result 0
13:12:12.302 -> dhcps: send_offer>>udp_sendto result 0
13:12:12.302 -> dhcps: send_nak>>udp_sendto result 0
13:15:20.390 -> dhcps: send_nak>>udp_sendto result 0
@svicar

This comment has been minimized.

Copy link

commented Feb 18, 2019

I deleted ESP32 from board meneger and install from git 2 days ago. The errors are not showing only dhcps: send_offer>>udp_sendto result 0 is shown sometimes...but the problems are not solved. Still dropping wifi connection after few seconds (not always), then problem to get the IP. Maybe is working a little better but the problem are not totaly fixed. The problems occored if you disable and enable wifi on smartphone when connection to ESP established or reset the ESP when connection established.

@vsn97

This comment has been minimized.

Copy link

commented Feb 22, 2019

hi @svicar. Can you please provide me the link of the ESP32 in git.

@williamesp2015

This comment has been minimized.

Copy link

commented Feb 23, 2019

I have the same problem since few weeks ago using PlatformIO and Arduino Platform using ESP32
My PlatformIo library and core are updated

Setting soft-AP configuration ... Ready..
Setting soft-AP ... Soft-AP IP address = 192.168.1.11
E (10844) event: mismatch or invalid event, id=63
E (10845) event: default event handler failed!
dhcps: send_offer>>udp_sendto result 0
Please help

@svicar

This comment has been minimized.

Copy link

commented Feb 24, 2019

@vsn97

This comment has been minimized.

Copy link

commented Feb 25, 2019

I downloaded git from:
https://github.com/espressif/arduino-esp32/blob/master/docs/arduino-ide/windows.md
here are video manual I folowed (but I didnt install python)
https://www.youtube.com/watch?v=4jfb_PL-FEA&t=390s

Thank you very much :)

@vsn97

This comment has been minimized.

Copy link

commented Feb 25, 2019

@williamesp2015 I dont think so there is an fix for this issue yet. Download the esp APIs from GIT using the instructions given by @svicar . Though, it doesnt solve the problem, the error message disappears.

@williamesp2015

This comment has been minimized.

Copy link

commented Feb 27, 2019

Any help would be appreciated to update these changes in PlatformIo.ini
[env:esp32dev]
platform = espressif32
framework = arduino
board = esp32dev

@DeepSkyDad

This comment has been minimized.

Copy link

commented Mar 6, 2019

Hello all,

For me the (temporary) solution was downgrading to espressif32 1.5.0

Best regards,
Pavle

@treii28

This comment has been minimized.

Copy link

commented Mar 27, 2019

same problem - trying v1.5.0 doesn't work for me because I get AsyncTCP errors
Any timeline on a fix for platformio?

@luc-github

This comment has been minimized.

Copy link
Contributor Author

commented Apr 13, 2019

I cannot reproduce with latest git - thank you

@luc-github luc-github closed this Apr 13, 2019

@Nathan-ma

This comment has been minimized.

Copy link

commented Jun 19, 2019

Any solution yet? I'm using arduino-esp32 version 1.0.2. I though it would be already solved by now!!

Edit: After doing a little research a found a possible fix, turning off the AMPDU_RX, as far as I could understood this fix is already implemented on master IDF.

Unfortunately, I don't know what IDF version arduino-esp32 1.0.2 uses but if it uses v3.2, well than that fix is not implemented yet!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
You can’t perform that action at this time.