-
Notifications
You must be signed in to change notification settings - Fork 7.6k
MDNS special packet from Android App crashes and reboots ESP32/ESP32-S2 #6368
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
Comments
msdn-capture-esp32-crashme-with-crash.zip |
The previously-mentioned Android App still causes a crash in the ESP32 firmware when compiled under v2.0.3-rc1. This espressif/esp-idf issue is marked as "resolved" but apparently the change is still not present in -rc1. |
Its resolved in idf master, not sure if already backported to v4.4, and most likely not included in v2.0.3-rc1. |
Adding this to roadmap and when we have time we will test this. |
I can confirm this problem using the above sketch and also my ESP32 app. I'm using platformio with configuration [env:esp32dev] Also, the Android Service Browser by Andriy Druk shows the IP and DNS name "esp32-crashme", but a browser (Vivaldi or Opera) will not open the page using http://esp32-crashme.local, while it will open using http://[ip address] Also a Windows 10 browser does not open the page http://esp32-crashme.local and cannot ping esp32-crashme.local. I have bonjour 64 bit installed. Also checked for zeroconf services using python
|
Still crashing in the same way when sketch compiled with 2.0.3 stable. |
Thanks for testing, we will investigate this in next milestone. |
I think I got what is going on. Can you please try to add |
I just performed this test, not exactly with those strings, but two other ones. Device STILL crashes:
In the Android app, the phone managed to retrieve the strings I added as part of the test. |
With this:
I do not see the crash any more from Druk Service Browser. Also dns.local is working on Windows 10 browser and ping. YAY! Thanks! Android (LG G8 phone with Vivaldi and Opera) still works only with IP address but not with dns lookup, even though Service Browser shows mDNS name. |
Your experience does not match mine. I am still experiencing crashes. I used the strings "YUBOX", "xyzxy" instead of "hello", "world". I am using an ESP32S2 with PSRAM enabled and compiled under Arduino-ESP32 v2.3.0. What is your setup? |
My apology, I was not thorough enough in my test. I thought maybe it was because I had "_http" and not "http" but now I see a crash with either one. --- Miniterm on COM6 115200,8,N,1 --- rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT) Connected to IP address: 192.168.4.1 Input channel: 4 set. Core 0 register dump: Backtrace:0x400894b4:0x3ffcd8f00x4010a418:0x3ffcd910 0x4010e20d:0x3ffcd940 0x4010eead:0x3ffcda10 ELF file SHA256: 0000000000000000 Rebooting... |
yup... my fault misreading the request. It does not contain service name at all and that is what is crashing mdns. It never expected such TXT query. Fix was merged in IDF master here waiting to be backported to 4.4 so that we can pick it up :) |
Hi there, I also encountered this problem! I don't really know what the correct way of fixing this issue here on github is (the backporting to 4.4 thing). To get something that works in the meantime I downloaded arduino-esp32 v2.0.3 and esp-idf v4.4.1 and replaced the mdns folder in components with the one the latest one on the master branch of the esp-idf repo. I used that to generated the necessary libmdns.a file for my project. If someone else wants to use this in the mean time until a proper fix drops here are the necessary mdns files: There are some instructions on how to use it, I only tested this with an ESP32, I used Windows and PlattformIO to test this out, so your mileage may vary. Note: I will remove the repository when the proper fix is here, also be aware that updates to the package that are loaded automatically may break things since this is just a drag&drop solution, you have to apply this whenever the package gets replaced which can be prevented (atleast as far as I know in PlattformIO) by just specifying the version of the package you want. Hope this helps 😁 |
Please try 2.0.4 |
I can confirm this bug was FIXED when building under 2.0.4 on both ESP32 and ESP32-S2. Thanks! |
Board
ESP32, ESP32-S2
Device Description
Issue reproduced on both YUBOX Node (ESP32) and YUBOX One (ESP32-S2)
Hardware Configuration
ESP32 board has inbuilt I2C sensors, otherwise plain
ESP32-S2 board has buzzer and I2C sensors on different pins
Version
v2.0.2
IDE Name
Arduino IDE 1.8.19
Operating System
Android 8.x, Android 9
Flash frequency
80 MHz
PSRAM enabled
no
Upload speed
115200
Description
I downloaded an Android App to perform MDNS discovery of various ESP32 and ESP32-S2 devices connected to a local network. The Android App is Service Browser by Andriy Druk. This is the link to the Google Play Store.
My YUBOX Framework projects enable MDNS and expose _http._tcp as a MDNS service in order to be discoverable. With other OS such as Fedora Linux and Windows, all runs OK. However, when using the app, and choosing the _http._tcp section, then the specific ESP32 name exposed by the device, the device itself crashes and reboots.
The below sketch also reproduces this bug. It is a straightforward copy of the MDNS HTTP server example provided by Arduino-ESP32, except with my WiFi credentials, and the MDNS name changed to
esp32-crashme
.The expected behavior is, obviously, no crash.
Sketch
Debug Message
Other Steps to Reproduce
No response
I have checked existing issues, online documentation and the Troubleshooting Guide
The text was updated successfully, but these errors were encountered: