witnessmenow / esp8266-alexa-wemo-emulator

multiple belkin wemos switch emulator using ESP8266
GNU General Public License v2.0
132 stars 43 forks source link

Exception (28) on demo app #21

Open aldolo69 opened 3 years ago

aldolo69 commented 3 years ago

during "discovery" esp crash with exc 28 every time. esp core version 2.7.4 (latest)

lalalandrus commented 3 years ago

took a while but i narrowed the exception cause in WemoManager.cpp to line 65 : UDP.read(packetBuffer, packetSize);

I think the new core returns a UDP packet larger than packetBuffer as packetSize is unchecked. My fix is to modify WemoManager.cpp line 8 to: char packetBuffer[1024];

Probably overkill but it works. If you are short on ram then reduce it until it doesnt work and report your findings. There probably is a way to check the UDP library to see what it should be expecting based on the typical Alexa packet but I am too lazy.

aldolo69 commented 3 years ago

it works now. you should commit the change to github