PlatformIO Community

Invalid Event when Client connect AP + debug output

Using latest Platformio Core (4.1.0) and Home (3.0.1) with ESP32. Still seeing effects a bug reported here:


and

in which an older version of dhcpserver.c neglected to include some conditionals for debugging. That causes spurious output of debug messages like:
dhcps: send_offer>>udp_sendto result 0
dhcps: send_nak>>udp_sendto result 0

Espressif said: “We already know the problem, and we are planing to add it in v4.0.”

Does PlatformIO use some older 3.x version of the Espressif ESP32 libraries?

Following the discussion in this link


apparently it may be possible for me to rebuild the platform libraries, which would allow a repaired dhcpserver.c file to be recompiled and relinked into a compiled library that Platformio would use. But the explanation on how to do that is very vague and I can’t follow it.

Thanks for the help. The spurious debug messages are making me crazy.

This discussion references ESP8266 not ESP32.

PlatformIO uses the latest stable release versions of Arduino-ESP32. As you can see here the platform-espressif32 version 1.11.1 uses the Arduino release 1.0.4, which is also the latest release (see here).

You can check if you’re using the most recent version by doing the platform updates in the VSCode GUI or executing pio platform update on the commandline.

So first check that, and if that doesn’t help, your problem is likely not fixed in the latest stable release of the framework. I’d then check if it the latest git version Arduino-ESP32 is buildable by PlatformIO. You can do this by adding

platform_packages =
  ; use upstream Git version
  framework-arduinoespressif32 @ https://github.com/espressif/arduino-esp32.git

in the platformio.ini, as it’s documented in the docs.

Thanks for the quick reply.

This discussion references ESP8266 not ESP32.
The issue I’m seeing fits this problem description exactly. Apparently ESP8266 and ESP32 share(d) the same flawed dhcpserver.c file, since I found a version of this file in a directory I had:
esp32\esp-idf\v3.2\components\lwip\apps\dhcpserver (from some download, not sure origin)

I had done pio platform update before. No help. Everything appearing up to date:
Updating espressif32 @ 339e7d9 [Up-to-date]
Updating toolchain-xtensa32 @ 2.50200.80 [Up-to-date]
Updating framework-arduinoespressif32 @ 2.10004.191002 [Up-to-date]
Updating framework-espidf @ 3.30300.190916 [Up-to-date]
Updating tool-esptoolpy @ 1.20600.0 [Up-to-date]
Updating tool-openocd-esp32 @ 1.1000.20190708[Up-to-date]
Updating tool-mkspiffs @ 2.230.0 [Up-to-date]

Tried as you suggested to use upstream Git version of platform_packages. In the compile, I got:
framework-arduinoespressif32 @ 3fc974f has been successfully installed!

Problem remains.

When you say “likely not fixed in the latest git version of Arduino-ESP32” that would be odd, since I found the problem report and indication that it had been fixed last year. Here is the record of the correction for this error in dhcpserver.c, for ESP IDF from March 2019:

Perhaps it’s been fixed on the ESP-IDF side, but that fix hasn’t made it into the Arduino side? It’s not clear to me the relationship between these, but I’m guessing there is a lot of commonality in the libraries. Thanks for your help.

The latest Arduino ESP32 board support package is using ESP-IDF v3.2 (hence “ESP32 Arduino 1.0.4 (IDF 3.2)” in the release details). 4.x is still at beta stage, and judging from the tags on that commit you referenced, the fix should go live when 4.0 is released.

I don’t know if/when the Arduino ESP32 BSP will update to 4.0, but I suspect it will be several months. I would have thought effort was underway to support 3.3 already since it was released in September `19, and is a LTS version. Or maybe there is and I just haven’t been paying attention! :open_mouth:

1 Like