Add initial support for remote wifi

This commit is contained in:
Jonathan Swoboda
2025-05-23 12:44:34 -04:00
parent 5aa13db815
commit af1a4d8a0a
3 changed files with 52 additions and 0 deletions

View File

@@ -145,6 +145,7 @@ esphome/components/esp32_ble_client/* @jesserockz
esphome/components/esp32_ble_server/* @Rapsssito @clydebarrow @jesserockz
esphome/components/esp32_camera_web_server/* @ayufan
esphome/components/esp32_can/* @Sympatron
esphome/components/esp32_hosted/* @swoboda1337
esphome/components/esp32_improv/* @jesserockz
esphome/components/esp32_rmt/* @jesserockz
esphome/components/esp32_rmt_led_strip/* @jesserockz

View File

@@ -0,0 +1,39 @@
import os
from esphome.components import esp32
import esphome.config_validation as cv
from esphome.const import CONF_VARIANT, KEY_CORE, KEY_FRAMEWORK_VERSION
from esphome.core import CORE
CODEOWNERS = ["@swoboda1337"]
CONFIG_SCHEMA = cv.All(
cv.Schema(
{
cv.Optional(CONF_VARIANT): cv.one_of(*esp32.VARIANTS, upper=True),
}
),
)
async def to_code(config):
framework_ver: cv.Version = CORE.data[KEY_CORE][KEY_FRAMEWORK_VERSION]
os.environ["ESP_IDF_VERSION"] = f"{framework_ver.major}.{framework_ver.minor}"
esp32.add_idf_sdkconfig_option(
f"CONFIG_SLAVE_IDF_TARGET_{config[CONF_VARIANT]}", # NOLINT
True,
)
esp32.add_idf_component(
name="esp_wifi_remote",
repo="https://github.com/espressif/esp-wifi-remote.git",
path="components/esp_wifi_remote",
)
esp32.add_extra_script(
"post",
"esp32_hosted.py",
os.path.join(os.path.dirname(__file__), "esp32_hosted.py.script"),
)

View File

@@ -0,0 +1,12 @@
# pylint: disable=E0602
Import("env") # noqa
# Workaround whole archive issue
if "__LIB_DEPS" in env and "libespressif__esp_hosted.a" in env["__LIB_DEPS"]:
env.Append(
LINKFLAGS=[
"-Wl,--whole-archive",
env["BUILD_DIR"] + "/esp-idf/espressif__esp_hosted/libespressif__esp_hosted.a",
"-Wl,--no-whole-archive",
]
)