Skip to content

AsyncTCP not compiling on ESPHome with Arduino Framework #83

@alexanderschanz10-netizen

Description

IDE / Tooling

Arduino (IDE/CLI)

What happened?

The code ist not compiling unter ESP Home using

esp32:
board: adafruit_feather_esp32s3
framework:
type: arduino

It ist trying to use the NetworkInterface.h header on the platform which is not available.

Since the intend is “include NetworkInterface.h only when using ESP‑IDF ≥ 5 and NOT Arduino,” please modify the check as follows:

#include "esp_idf_version.h"
#if (ESP_IDF_VERSION_MAJOR >= 5) && !defined(ARDUINO)
#include <NetworkInterface.h>
#endif

#ifdef ARDUINO
#include <esp32-hal.h>
#include <esp32-hal-log.h>
#endif

logs_hcpbridge_compile.txt

Stack Trace

logs_hcpbridge_compile.txt

Minimal Reproductible Example (MRE)

See Error log

I confirm that:

  • I have read the documentation.
  • I have searched for similar discussions.
  • I have searched for similar issues.
  • I have looked at the examples.
  • I have upgraded to the lasted version of AsyncTCP.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions